repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20100129142347_create_import_requests.rb
db/migrate/20100129142347_create_import_requests.rb
class CreateImportRequests < ActiveRecord::Migration[4.2] def change create_table :import_requests do |t| t.string :isbn t.integer :manifestation_id t.integer :user_id t.timestamps end add_index :import_requests, :isbn add_index :import_requests, :manifestation_id add_index :import_requests, :user_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110627034940_create_series_statement_merge_lists.rb
db/migrate/20110627034940_create_series_statement_merge_lists.rb
class CreateSeriesStatementMergeLists < ActiveRecord::Migration[4.2] def change create_table :series_statement_merge_lists do |t| t.string :title t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120129020544_add_budget_type_id_to_item.rb
db/migrate/20120129020544_add_budget_type_id_to_item.rb
class AddBudgetTypeIdToItem < ActiveRecord::Migration[4.2] def change add_column :items, :budget_type_id, :integer end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110627035057_create_series_statement_merges.rb
db/migrate/20110627035057_create_series_statement_merges.rb
class CreateSeriesStatementMerges < ActiveRecord::Migration[4.2] def change create_table :series_statement_merges do |t| t.integer :series_statement_id, null: false t.integer :series_statement_merge_list_id, null: false t.timestamps end add_index :series_statement_merges, :series_statement_id add_index :series_statement_merges, :series_statement_merge_list_id, name: "index_series_statement_merges_on_list_id" end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/033_create_checkouts.rb
db/migrate/033_create_checkouts.rb
class CreateCheckouts < ActiveRecord::Migration[4.2] def up create_table :checkouts do |t| t.references :user, index: true, foreign_key: true t.references :item, index: true, foreign_key: true, null: false t.references :checkin, index: true, foreign_key: true t.references :librarian, index: true t.references :basket, index: true t.datetime :due_date t.integer :checkout_renewal_count, default: 0, null: false t.integer :lock_version, default: 0, null: false t.timestamps end add_index :checkouts, [:item_id, :basket_id], unique: true end def down drop_table :checkouts end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[4.2] def up rename_column :manifestations, :periodical, :serial end def down rename_column :manifestations, :serial, :periodical end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/132_create_circulation_statuses.rb
db/migrate/132_create_circulation_statuses.rb
class CreateCirculationStatuses < ActiveRecord::Migration[4.2] def up create_table :circulation_statuses do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end end def down drop_table :circulation_statuses end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb
db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb
class AddMostRecentToEventExportFileTransitions < ActiveRecord::Migration[4.2] def up add_column :event_export_file_transitions, :most_recent, :boolean, null: true end def down remove_column :event_export_file_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20240824034303_convert_statesman_metadata_column_to_jsonb.rb
db/migrate/20240824034303_convert_statesman_metadata_column_to_jsonb.rb
class ConvertStatesmanMetadataColumnToJsonb < ActiveRecord::Migration[7.1] def up %w( agent_import_file event_import_file resource_import_file user_import_file event_export_file resource_export_file user_export_file manifestation_checkout_stat manifestation_reserve_stat user_checkout_stat user_reserve_stat bookmark_stat import_request message order_list reserve ).each do |name| change_column_default :"#{name}_transitions", :metadata, from: '{}', to: nil change_column :"#{name}_transitions", :metadata, :jsonb, using: 'metadata::text::jsonb' change_column_default :"#{name}_transitions", :metadata, from: nil, to: {} change_column_null :"#{name}_transitions", :metadata, false end end def down %w( agent_import_file event_import_file resource_import_file user_import_file event_export_file resource_export_file user_export_file manifestation_checkout_stat manifestation_reserve_stat user_checkout_stat user_reserve_stat bookmark_stat import_request message order_list reserve ).each do |name| change_column :"#{name}_transitions", :metadata, :text change_column_default :"#{name}_transitions", :metadata, from: nil, to: '{]' change_column_null :"#{name}_transitions", :metadata, true end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120129014038_create_budget_types.rb
db/migrate/20120129014038_create_budget_types.rb
class CreateBudgetTypes < ActiveRecord::Migration[4.2] def change create_table :budget_types do |t| t.string :name t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221112064827_add_index_to_creates_on_work_id_and_agent_id.rb
db/migrate/20221112064827_add_index_to_creates_on_work_id_and_agent_id.rb
class AddIndexToCreatesOnWorkIdAndAgentId < ActiveRecord::Migration[6.1] def change remove_index :creates, :work_id add_index :creates, [:work_id, :agent_id], unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/117_create_form_of_works.rb
db/migrate/117_create_form_of_works.rb
class CreateFormOfWorks < ActiveRecord::Migration[4.2] def change create_table :form_of_works do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20111124110059_create_create_types.rb
db/migrate/20111124110059_create_create_types.rb
class CreateCreateTypes < ActiveRecord::Migration[4.2] def change create_table :create_types do |t| t.string :name t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221112065100_add_index_to_owns_on_item_id_and_agent_id.rb
db/migrate/20221112065100_add_index_to_owns_on_item_id_and_agent_id.rb
class AddIndexToOwnsOnItemIdAndAgentId < ActiveRecord::Migration[6.1] def change remove_index :owns, :item_id add_index :owns, [:item_id, :agent_id], unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20150221063719_add_settings_to_library_group.rb
db/migrate/20150221063719_add_settings_to_library_group.rb
class AddSettingsToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :settings, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140823083524_add_extent_to_manifestation.rb
db/migrate/20140823083524_add_extent_to_manifestation.rb
class AddExtentToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :extent, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
# This migration comes from acts_as_taggable_on_engine (originally 5) # This migration is added to circumvent issue #623 and have special characters # work properly if ActiveRecord.gem_version >= Gem::Version.new('5.0') class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]; end else class ChangeCollationForTagNames < ActiveRecord::Migration; end end ChangeCollationForTagNames.class_eval do def up if ActsAsTaggableOn::Utils.using_mysql? execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;") end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
class AddMostRecentToMessageTransitions < ActiveRecord::Migration[5.2] def up add_column :message_transitions, :most_recent, :boolean, null: true end def down remove_column :message_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20220918091043_create_active_storage_variant_records.active_storage.rb
db/migrate/20220918091043_create_active_storage_variant_records.active_storage.rb
# This migration comes from active_storage (originally 20191206030411) class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] def change return unless table_exists?(:active_storage_blobs) # Use Active Record's configured type for primary key create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type t.string :variation_digest, null: false t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true t.foreign_key :active_storage_blobs, column: :blob_id end end private def primary_key_type config = Rails.configuration.generators config.options[config.orm][:primary_key_type] || :primary_key end def blobs_primary_key_type pkey_name = connection.primary_key(:active_storage_blobs) pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } pkey_column.bigint? ? :bigint : pkey_column.type end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110918162329_add_note_to_series_statement.rb
db/migrate/20110918162329_add_note_to_series_statement.rb
class AddNoteToSeriesStatement < ActiveRecord::Migration[4.2] def up add_column :series_statements, :note, :text end def down remove_column :series_statements, :note end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/113_create_events.rb
db/migrate/113_create_events.rb
class CreateEvents < ActiveRecord::Migration[4.2] def up create_table :events do |t| t.references :library, index: true, null: false t.references :event_category, index: true, null: false t.string :name t.text :note t.datetime :start_at t.datetime :end_at t.boolean :all_day, default: false, null: false t.datetime :deleted_at t.text :display_name t.timestamps end end def down drop_table :events end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130506175303_create_identifier_types.rb
db/migrate/20130506175303_create_identifier_types.rb
class CreateIdentifierTypes < ActiveRecord::Migration[4.2] def change create_table :identifier_types do |t| t.string :name t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
class AddErrorMessageToResourceImportResult < ActiveRecord::Migration[4.2] def change add_column :resource_import_results, :error_message, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160813203039_add_user_id_to_library_group.rb
db/migrate/20160813203039_add_user_id_to_library_group.rb
class AddUserIdToLibraryGroup < ActiveRecord::Migration[4.2] def change add_reference :library_groups, :user, index: true, foreign_key: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20090812151902_create_agent_relationship_types.rb
db/migrate/20090812151902_create_agent_relationship_types.rb
class CreateAgentRelationshipTypes < ActiveRecord::Migration[4.2] def change create_table :agent_relationship_types do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140614065404_create_resource_export_files.rb
db/migrate/20140614065404_create_resource_export_files.rb
class CreateResourceExportFiles < ActiveRecord::Migration[4.2] def change create_table :resource_export_files do |t| t.integer :user_id t.string :resource_export_content_type t.string :resource_export_file_name t.integer :resource_export_file_size t.datetime :executed_at t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb
db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb
class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2] def up add_column :manifestation_checkout_stat_transitions, :most_recent, :boolean, null: true end def down remove_column :manifestation_checkout_stat_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20101212070145_add_acquired_at_to_item.rb
db/migrate/20101212070145_add_acquired_at_to_item.rb
class AddAcquiredAtToItem < ActiveRecord::Migration[4.2] def up add_column :items, :acquired_at, :timestamp end def down remove_column :items, :acquired_at end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130421164124_add_series_master_to_series_statement.rb
db/migrate/20130421164124_add_series_master_to_series_statement.rb
class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration[4.2] def change add_column :series_statements, :series_master, :boolean end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb
class AddConstraintsToMostRecentForMessageTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up add_index :message_transitions, [:message_id, :most_recent], unique: true, where: "most_recent", name: "index_message_transitions_parent_most_recent" # , algorithm: :concurrently change_column_null :message_transitions, :most_recent, false end def down remove_index :message_transitions, name: "index_message_transitions_parent_most_recent" change_column_null :message_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently change_column_null :user_export_file_transitions, :most_recent, false end def down remove_index :user_export_file_transitions, name: "index_user_export_file_transitions_parent_most_recent" change_column_null :user_export_file_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20090913185239_add_nii_type_id_to_manifestation.rb
db/migrate/20090913185239_add_nii_type_id_to_manifestation.rb
class AddNiiTypeIdToManifestation < ActiveRecord::Migration[4.2] def up add_column :manifestations, :nii_type_id, :integer, if_not_exists: true add_index :manifestations, :nii_type_id, if_not_exists: true end def down remove_column :manifestations, :nii_type_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20090126071155_create_news_posts.rb
db/migrate/20090126071155_create_news_posts.rb
class CreateNewsPosts < ActiveRecord::Migration[4.2] def up create_table :news_posts, if_not_exists: true do |t| t.text :title t.text :body t.integer :user_id t.datetime :start_date t.datetime :end_date t.integer :required_role_id, default: 1, null: false t.text :note t.integer :position t.boolean :draft, default: false, null: false t.timestamps end add_index :news_posts, :user_id end def down drop_table :news_posts end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[4.2] def change add_reference :user_import_files, :default_library end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20170116150432_create_jpno_records.rb
db/migrate/20170116150432_create_jpno_records.rb
class CreateJpnoRecords < ActiveRecord::Migration[5.2] def up create_table :jpno_records, if_not_exists: true do |t| t.string :body, index: {unique: true}, null: false t.references :manifestation, foreign_key: true, null: false t.timestamps end end def down drop_table :jpno_records end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081215094955_create_checkout_stat_has_users.rb
db/migrate/20081215094955_create_checkout_stat_has_users.rb
class CreateCheckoutStatHasUsers < ActiveRecord::Migration[4.2] def up create_table :checkout_stat_has_users do |t| t.references :user_checkout_stat, index: true, foreign_key: true, null: false t.references :user, index: true, foreign_key: true, null: false t.integer :checkouts_count, default: 0, null: false t.timestamps end end def down drop_table :checkout_stat_has_users end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140519171220_create_import_request_transitions.rb
db/migrate/20140519171220_create_import_request_transitions.rb
class CreateImportRequestTransitions < ActiveRecord::Migration[4.2] def change create_table :import_request_transitions do |t| t.string :to_state if ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).first.adapter.try(:match, /mysql/) t.text :metadata else t.text :metadata, default: "{}" end t.integer :sort_key t.integer :import_request_id t.timestamps end add_index :import_request_transitions, :import_request_id add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id" end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20100925074639_create_event_import_results.rb
db/migrate/20100925074639_create_event_import_results.rb
class CreateEventImportResults < ActiveRecord::Migration[4.2] def up create_table :event_import_results do |t| t.references :event_import_file t.references :event t.text :body t.timestamps end end def down drop_table :event_import_results end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20190818075603_add_memo_to_manifestation.rb
db/migrate/20190818075603_add_memo_to_manifestation.rb
class AddMemoToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :memo, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb
db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb
class AddManifestaitonIdToSeriesStatement < ActiveRecord::Migration[4.2] def up add_column :series_statements, :manifestation_id, :integer add_index :series_statements, :manifestation_id end def down remove_column :series_statements, :manifestation_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb
db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb
class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[4.2] def up add_column :resource_export_file_transitions, :most_recent, :boolean, null: true end def down remove_column :resource_export_file_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140523171309_create_event_import_file_transitions.rb
db/migrate/20140523171309_create_event_import_file_transitions.rb
class CreateEventImportFileTransitions < ActiveRecord::Migration[4.2] def change create_table :event_import_file_transitions do |t| t.string :to_state if ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).first.adapter.try(:match, /mysql/) t.text :metadata else t.text :metadata, default: "{}" end t.integer :sort_key t.integer :event_import_file_id t.timestamps end add_index :event_import_file_transitions, :event_import_file_id add_index :event_import_file_transitions, [:sort_key, :event_import_file_id], unique: true, name: "index_event_import_file_transitions_on_sort_key_and_file_id" end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20111124110319_create_realize_types.rb
db/migrate/20111124110319_create_realize_types.rb
class CreateRealizeTypes < ActiveRecord::Migration[4.2] def change create_table :realize_types do |t| t.string :name t.text :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[4.2] def change change_column_null :items, :manifestation_id, false end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/002_devise_create_users.rb
db/migrate/002_devise_create_users.rb
# frozen_string_literal: true class DeviseCreateUsers < ActiveRecord::Migration[5.2] def change create_table :users do |t| ## Database authenticatable t.string :email, null: false, default: "" t.string :encrypted_password, null: false, default: "" ## Recoverable t.string :reset_password_token t.datetime :reset_password_sent_at ## Rememberable t.datetime :remember_created_at ## Trackable # t.integer :sign_in_count, default: 0, null: false # t.datetime :current_sign_in_at # t.datetime :last_sign_in_at # t.string :current_sign_in_ip # t.string :last_sign_in_ip ## Confirmable # t.string :confirmation_token # t.datetime :confirmed_at # t.datetime :confirmation_sent_at # t.string :unconfirmed_email # Only if using reconfirmable ## Lockable # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts # t.string :unlock_token # Only if unlock strategy is :email or :both # t.datetime :locked_at t.timestamps null: false end add_index :users, :email, unique: true add_index :users, :reset_password_token, unique: true # add_index :users, :confirmation_token, unique: true # add_index :users, :unlock_token, unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110619064807_add_edition_string_to_manifestation.rb
db/migrate/20110619064807_add_edition_string_to_manifestation.rb
class AddEditionStringToManifestation < ActiveRecord::Migration[4.2] def up add_column :manifestations, :edition_string, :string end def down remove_column :manifestations, :edition_string end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081117143455_create_inventories.rb
db/migrate/20081117143455_create_inventories.rb
class CreateInventories < ActiveRecord::Migration[4.2] def up create_table :inventories, if_not_exists: true do |t| t.references :item, index: true t.references :inventory_file, index: true t.text :note t.timestamps end end def down drop_table :inventories end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/123_create_purchase_requests.rb
db/migrate/123_create_purchase_requests.rb
class CreatePurchaseRequests < ActiveRecord::Migration[6.1] def up create_table :purchase_requests, if_not_exists: true do |t| t.references :user, foreign_key: true, null: false t.text :title, null: false t.text :author t.text :publisher t.string :isbn t.datetime :date_of_publication t.integer :price t.string :url t.text :note t.datetime :accepted_at t.datetime :denied_at t.string :state t.string :pub_date t.timestamps end add_index :purchase_requests, :state end def down drop_table :purchase_requests end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20150421023923_create_identities.rb
db/migrate/20150421023923_create_identities.rb
class CreateIdentities < ActiveRecord::Migration[4.2] def change create_table :identities do |t| t.string :name t.string :email t.string :password_digest t.references :profile, index: true t.timestamps null: false end add_index :identities, :name add_index :identities, :email end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20100314190054_add_opening_hour_to_library.rb
db/migrate/20100314190054_add_opening_hour_to_library.rb
class AddOpeningHourToLibrary < ActiveRecord::Migration[4.2] def up add_column :libraries, :opening_hour, :text end def down remove_column :libraries, :opening_hour end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20231027174453_add_unique_index_to_accepts_on_item_id.rb
db/migrate/20231027174453_add_unique_index_to_accepts_on_item_id.rb
class AddUniqueIndexToAcceptsOnItemId < ActiveRecord::Migration[6.1] def change remove_index :accepts, :item_id add_index :accepts, :item_id, unique: true remove_index :withdraws, :item_id add_index :withdraws, :item_id, unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb
db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb
class AddYearOfPublicationToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :year_of_publication, :integer end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130421093852_add_periodical_to_manifestation.rb
db/migrate/20130421093852_add_periodical_to_manifestation.rb
class AddPeriodicalToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :periodical, :boolean end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221114163530_add_foreign_key_to_agents_referencing_roles.rb
db/migrate/20221114163530_add_foreign_key_to_agents_referencing_roles.rb
class AddForeignKeyToAgentsReferencingRoles < ActiveRecord::Migration[6.1] def change [ :agents, :items, :manifestations, :news_posts, :profiles, :subjects ].each do |table| add_foreign_key table, :roles, column: 'required_role_id' end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20190818075628_add_memo_to_item.rb
db/migrate/20190818075628_add_memo_to_item.rb
class AddMemoToItem < ActiveRecord::Migration[5.2] def change add_column :items, :memo, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
class AddLftAndRgtToMessage < ActiveRecord::Migration[5.2] def change add_column :messages, :lft, :integer add_column :messages, :rgt, :integer end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/154_create_messages.rb
db/migrate/154_create_messages.rb
class CreateMessages < ActiveRecord::Migration[5.2] def change create_table :messages do |t| t.datetime :read_at t.references :sender, index: true t.references :receiver, index: true t.string :subject, null: false t.text :body t.references :message_request, index: true t.references :parent, foreign_key: {to_table: :messages} t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20200425074758_create_manifestation_custom_values.rb
db/migrate/20200425074758_create_manifestation_custom_values.rb
class CreateManifestationCustomValues < ActiveRecord::Migration[5.2] def change create_table :manifestation_custom_values do |t| t.references :manifestation_custom_property, null: false, foreign_key: true, index: {name: 'index_manifestation_custom_values_on_custom_property_id'} t.references :manifestation, null: false, foreign_key: true t.text :value t.timestamps end add_index :manifestation_custom_values, [:manifestation_custom_property_id, :manifestation_id], unique: true, name: 'index_manifestation_custom_values_on_property_manifestation' end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb
db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb
class AddMostRecentToManifestationReserveStatTransitions < ActiveRecord::Migration[4.2] def up add_column :manifestation_reserve_stat_transitions, :most_recent, :boolean, null: true end def down remove_column :manifestation_reserve_stat_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb
db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb
class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration[4.2] def change add_column :series_statements, :root_manifestation_id, :integer add_index :series_statements, :root_manifestation_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20151128142913_create_places.rb
db/migrate/20151128142913_create_places.rb
class CreatePlaces < ActiveRecord::Migration[4.2] def change create_table :places do |t| t.string :term t.text :city t.references :country, index: true t.float :latitude t.float :longitude t.timestamps null: false end add_index :places, :term end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb
db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb
class AddFulltextContentToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :fulltext_content, :boolean end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20190102034126_create_doi_records.rb
db/migrate/20190102034126_create_doi_records.rb
class CreateDoiRecords < ActiveRecord::Migration[6.1] def change create_table :doi_records do |t| t.string :body, null: false t.references :manifestation, null: false, foreign_key: true t.timestamps end add_index :doi_records, "lower(body), manifestation_id", unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/080_create_library_groups.rb
db/migrate/080_create_library_groups.rb
class CreateLibraryGroups < ActiveRecord::Migration[4.2] def change create_table :library_groups do |t| t.string :name, null: false t.text :display_name t.string :short_name, index: true, null: false t.text :my_networks t.text :login_banner t.text :note t.integer :country_id t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb
db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb
class AddForeignKeyToEventsReferencingEventCategories < ActiveRecord::Migration[5.1] def change add_foreign_key :events, :event_categories end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb
db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb
class DropEmailUniqueConstraintEnjuLeafRc10 < ActiveRecord::Migration[4.2] def up remove_index :users, :email add_index :users, :email end def down remove_index :users, :email add_index :users, :email, unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/055_create_bookmarks.rb
db/migrate/055_create_bookmarks.rb
class CreateBookmarks < ActiveRecord::Migration[4.2] def up create_table :bookmarks, if_not_exists: true do |t| t.integer :user_id, null: false t.integer :manifestation_id t.text :title t.string :url t.text :note t.boolean :shared t.timestamps end add_index :bookmarks, :user_id add_index :bookmarks, :manifestation_id add_index :bookmarks, :url end def down drop_table :bookmarks end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb
db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb
class AddConstraintsToMostRecentForEventImportFileTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :event_import_file_transitions, [:event_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_event_import_file_transitions_parent_most_recent" #, algorithm: :concurrently change_column_null :event_import_file_transitions, :most_recent, false end def down remove_index :event_import_file_transitions, name: "index_event_import_file_transitions_parent_most_recent" change_column_null :event_import_file_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20250726135437_add_not_null_to_user_id_on_agent_import_files.rb
db/migrate/20250726135437_add_not_null_to_user_id_on_agent_import_files.rb
class AddNotNullToUserIdOnAgentImportFiles < ActiveRecord::Migration[7.1] def change change_column_null :agent_import_files, :user_id, false change_column_null :bookmarks, :user_id, false change_column_null :demands, :user_id, false change_column_null :event_export_files, :user_id, false change_column_null :event_import_files, :user_id, false change_column_null :import_requests, :user_id, false change_column_null :inventory_files, :user_id, false change_column_null :manifestation_checkout_stats, :user_id, false change_column_null :manifestation_reserve_stats, :user_id, false change_column_null :news_posts, :user_id, false change_column_null :purchase_requests, :user_id, false change_column_null :resource_import_files, :user_id, false change_column_null :resource_export_files, :user_id, false change_column_null :subscriptions, :user_id, false change_column_null :user_checkout_stats, :user_id, false change_column_null :user_export_files, :user_id, false change_column_null :user_import_files, :user_id, false change_column_null :user_reserve_stats, :user_id, false end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130519065837_add_lock_version_to_checkin.rb
db/migrate/20130519065837_add_lock_version_to_checkin.rb
class AddLockVersionToCheckin < ActiveRecord::Migration[4.2] def change add_column :checkins, :lock_version, :integer, default: 0, null: false end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20110220103937_add_url_to_news_post.rb
db/migrate/20110220103937_add_url_to_news_post.rb
class AddUrlToNewsPost < ActiveRecord::Migration[4.2] def up add_column :news_posts, :url, :string, if_not_exists: true end def down remove_column :news_posts, :url end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb
db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb
class AddMostRecentToReserveTransitions < ActiveRecord::Migration[4.2] def up add_column :reserve_transitions, :most_recent, :boolean, null: true end def down remove_column :reserve_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130304015019_add_postponed_at_to_reserve.rb
db/migrate/20130304015019_add_postponed_at_to_reserve.rb
class AddPostponedAtToReserve < ActiveRecord::Migration[4.2] def change add_column :reserves, :postponed_at, :datetime end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/120_create_baskets.rb
db/migrate/120_create_baskets.rb
class CreateBaskets < ActiveRecord::Migration[4.2] def change create_table :baskets do |t| t.references :user, index: true t.text :note t.integer :lock_version, default: 0, null: false t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130504133816_add_manifestation_id_to_subject.rb
db/migrate/20130504133816_add_manifestation_id_to_subject.rb
class AddManifestationIdToSubject < ActiveRecord::Migration[4.2] def change add_column :subjects, :manifestation_id, :integer add_index :subjects, :manifestation_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140813182425_add_publication_place_to_manifestation.rb
db/migrate/20140813182425_add_publication_place_to_manifestation.rb
class AddPublicationPlaceToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :publication_place, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20091025080447_create_licenses.rb
db/migrate/20091025080447_create_licenses.rb
class CreateLicenses < ActiveRecord::Migration[4.2] def change create_table :licenses do |t| t.string :name, null: false t.string :display_name t.text :note t.integer :position t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb
db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb
class AddMostRecentToEventImportFileTransitions < ActiveRecord::Migration[4.2] def up add_column :event_import_file_transitions, :most_recent, :boolean, null: true end def down remove_column :event_import_file_transitions, :most_recent end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221112064837_add_index_to_realizes_on_expression_id_and_agent_id.rb
db/migrate/20221112064837_add_index_to_realizes_on_expression_id_and_agent_id.rb
class AddIndexToRealizesOnExpressionIdAndAgentId < ActiveRecord::Migration[6.1] def change remove_index :realizes, :expression_id add_index :realizes, [:expression_id, :agent_id], unique: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120413170734_add_error_message_to_event_import_file.rb
db/migrate/20120413170734_add_error_message_to_event_import_file.rb
class AddErrorMessageToEventImportFile < ActiveRecord::Migration[4.2] def change add_column :event_import_files, :error_message, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/121_create_checked_items.rb
db/migrate/121_create_checked_items.rb
class CreateCheckedItems < ActiveRecord::Migration[4.2] def up create_table :checked_items do |t| t.references :item, index: true, foreign_key: true, null: false t.references :basket, index: true, foreign_key: true, null: false t.references :librarian, index: true t.datetime :due_date, null: false t.timestamps end end def down drop_table :checked_items end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140802082007_add_manifestation_id_to_item.rb
db/migrate/20140802082007_add_manifestation_id_to_item.rb
class AddManifestationIdToItem < ActiveRecord::Migration[4.2] def change add_column :items, :manifestation_id, :integer add_index :items, :manifestation_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20081216190724_create_manifestation_reserve_stats.rb
db/migrate/20081216190724_create_manifestation_reserve_stats.rb
class CreateManifestationReserveStats < ActiveRecord::Migration[4.2] def up create_table :manifestation_reserve_stats do |t| t.datetime :start_date t.datetime :end_date t.text :note t.timestamps end end def down drop_table :manifestation_reserve_stats end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb
db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb
class AddConstraintsToMostRecentForManifestationReserveStatTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :manifestation_reserve_stat_transitions, [:manifestation_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_reserve_stat_transitions_parent_most_recen" # , algorithm: :concurrently change_column_null :manifestation_reserve_stat_transitions, :most_recent, false end def down remove_index :manifestation_reserve_stat_transitions, name: "index_manifestation_reserve_stat_transitions_parent_most_recen" change_column_null :manifestation_reserve_stat_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107172413_add_constraints_to_most_recent_for_bookmark_stat_transitions.rb
db/migrate/20180107172413_add_constraints_to_most_recent_for_bookmark_stat_transitions.rb
class AddConstraintsToMostRecentForBookmarkStatTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :bookmark_stat_transitions, [:bookmark_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_bookmark_stat_transitions_parent_most_recent", if_not_exists: true #, algorithm: :concurrently change_column_null :bookmark_stat_transitions, :most_recent, false end def down remove_index :bookmark_stat_transitions, name: "index_bookmark_stat_transitions_parent_most_recent" change_column_null :bookmark_stat_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20140519170214_create_resource_import_file_transitions.rb
db/migrate/20140519170214_create_resource_import_file_transitions.rb
class CreateResourceImportFileTransitions < ActiveRecord::Migration[4.2] def change create_table :resource_import_file_transitions do |t| t.string :to_state if ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).first.adapter.try(:match, /mysql/) t.text :metadata else t.text :metadata, default: "{}" end t.integer :sort_key t.integer :resource_import_file_id t.timestamps end add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id" add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id" end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180709023040_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb
db/migrate/20180709023040_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb
# This migration comes from acts_as_taggable_on_engine (originally 6) if ActiveRecord.gem_version >= Gem::Version.new('5.0') class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end else class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end end AddMissingIndexesOnTaggings.class_eval do def change add_index :taggings, :tag_id unless index_exists? :taggings, :tag_id add_index :taggings, :taggable_id unless index_exists? :taggings, :taggable_id add_index :taggings, :taggable_type unless index_exists? :taggings, :taggable_type add_index :taggings, :tagger_id unless index_exists? :taggings, :tagger_id add_index :taggings, :context unless index_exists? :taggings, :context unless index_exists? :taggings, [:tagger_id, :tagger_type] add_index :taggings, [:tagger_id, :tagger_type] end unless index_exists? :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/012_create_owns.rb
db/migrate/012_create_owns.rb
class CreateOwns < ActiveRecord::Migration[4.2] def change create_table :owns do |t| t.references :agent, null: false t.references :item, null: false t.integer :position t.timestamps end add_index :owns, :agent_id add_index :owns, :item_id end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/001_create_agents.rb
db/migrate/001_create_agents.rb
class CreateAgents < ActiveRecord::Migration[4.2] def change create_table :agents do |t| t.string :last_name t.string :middle_name t.string :first_name t.string :last_name_transcription t.string :middle_name_transcription t.string :first_name_transcription t.string :corporate_name t.string :corporate_name_transcription t.string :full_name t.text :full_name_transcription t.text :full_name_alternative t.timestamps t.datetime :deleted_at t.string :zip_code_1 t.string :zip_code_2 t.text :address_1 t.text :address_2 t.text :address_1_note t.text :address_2_note t.string :telephone_number_1 t.string :telephone_number_2 t.string :fax_number_1 t.string :fax_number_2 t.text :other_designation t.text :place t.string :postal_code t.text :street t.text :locality t.text :region t.datetime :date_of_birth t.datetime :date_of_death t.integer :language_id, default: 1, null: false t.integer :country_id, default: 1, null: false t.integer :agent_type_id, default: 1, null: false t.integer :lock_version, default: 0, null: false t.text :note t.integer :required_role_id, default: 1, null: false t.integer :required_score, default: 0, null: false t.text :email t.text :url end add_index :agents, :language_id add_index :agents, :country_id add_index :agents, :required_role_id add_index :agents, :full_name end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20221112015501_add_not_null_on_timestamps.rb
db/migrate/20221112015501_add_not_null_on_timestamps.rb
class AddNotNullOnTimestamps < ActiveRecord::Migration[6.1] def change ActiveRecord::Base.connection.tables.each do |table| next if [ 'schema_migrations', 'countries', 'languages', 'active_storage_blobs', 'active_storage_attachments', 'active_storage_variant_records', 'friendly_id_slugs', 'versions' ].include?(table) change_column_null table, :created_at, false change_column table, :created_at, :datetime, precision: 6 next if 'taggings' == table change_column_null table, :updated_at, false change_column table, :updated_at, :datetime, precision: 6 end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
class AddAllowBookmarkExternalUrlToLibraryGroup < ActiveRecord::Migration[4.2] def up add_column :library_groups, :allow_bookmark_external_url, :boolean, null: false, default: false, if_not_exists: true end def down remove_column :library_groups, :allow_bookmark_external_url end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb
class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :max_number_of_results, :integer, default: 1000 end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb
db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb
class AddFingerprintToAgentImportFile < ActiveRecord::Migration[4.2] def change add_column :agent_import_files, :agent_import_fingerprint, :string end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20200425072340_create_manifestation_custom_properties.rb
db/migrate/20200425072340_create_manifestation_custom_properties.rb
class CreateManifestationCustomProperties < ActiveRecord::Migration[5.2] def change create_table :manifestation_custom_properties do |t| t.string :name, null: false, comment: 'ラベル名', index: {unique: true} t.text :display_name, null: false, comment: '表示名' t.text :note, comment: '備考' t.integer :position, default: 1, null: false t.timestamps end end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb
db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb
class AddEventImportFingerprintToEventImportFile < ActiveRecord::Migration[4.2] def change add_column :event_import_files, :event_import_fingerprint, :string end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb
db/migrate/20120413170705_add_error_message_to_resource_import_file.rb
class AddErrorMessageToResourceImportFile < ActiveRecord::Migration[4.2] def change add_column :resource_import_files, :error_message, :text end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20141020120523_add_library_id_to_checkout.rb
db/migrate/20141020120523_add_library_id_to_checkout.rb
class AddLibraryIdToCheckout < ActiveRecord::Migration[4.2] def change add_reference :checkouts, :library, index: true, foreign_key: true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb
db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb
class AddAttachmentsAttachmentToManifestation < ActiveRecord::Migration[4.2] def up add_column :manifestations, :attachment_file_name, :string add_column :manifestations, :attachment_content_type, :string add_column :manifestations, :attachment_file_size, :integer add_column :manifestations, :attachment_updated_at, :datetime end def down remove_column :manifestations, :attachment_file_name remove_column :manifestations, :attachment_content_type remove_column :manifestations, :attachment_file_size remove_column :manifestations, :attachment_updated_at end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" #, algorithm: :concurrently change_column_null :import_request_transitions, :most_recent, false end def down remove_index :import_request_transitions, name: "index_import_request_transitions_parent_most_recent" change_column_null :import_request_transitions, :most_recent, true end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false
next-l/enju_leaf
https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/db/migrate/20130303124821_add_retained_at_to_reserve.rb
db/migrate/20130303124821_add_retained_at_to_reserve.rb
class AddRetainedAtToReserve < ActiveRecord::Migration[4.2] def change add_column :reserves, :retained_at, :datetime end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false