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/20160801080612_add_most_recent_to_import_request_transitions.rb
db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb
class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[4.2] def up add_column :import_request_transitions, :most_recent, :boolean, null: true end def down remove_column :import_request_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/20190501043418_create_ndl_bib_id_records.rb
db/migrate/20190501043418_create_ndl_bib_id_records.rb
class CreateNdlBibIdRecords < ActiveRecord::Migration[5.2] def up create_table :ndl_bib_id_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 :ndl_bib_id_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/130_create_request_status_types.rb
db/migrate/130_create_request_status_types.rb
class CreateRequestStatusTypes < ActiveRecord::Migration[4.2] def change create_table :request_status_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/20220918091044_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
db/migrate/20220918091044_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
# This migration comes from active_storage (originally 20211119233751) class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] def change return unless table_exists?(:active_storage_blobs) change_column_null(:active_storage_blobs, :checksum, 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/20140518050147_create_reserve_transitions.rb
db/migrate/20140518050147_create_reserve_transitions.rb
class CreateReserveTransitions < ActiveRecord::Migration[4.2] def change create_table :reserve_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 :reserve_id t.timestamps end add_index :reserve_transitions, :reserve_id add_index :reserve_transitions, [:sort_key, :reserve_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/035_create_reserves.rb
db/migrate/035_create_reserves.rb
class CreateReserves < ActiveRecord::Migration[4.2] def up create_table :reserves do |t| t.references :user, index: true, foreign_key: true, null: false t.references :manifestation, index: true, null: false t.references :item, index: true t.references :request_status_type, null: false t.datetime :checked_out_at t.timestamps t.datetime :canceled_at t.datetime :expired_at t.datetime :deleted_at t.boolean :expiration_notice_to_patron, default: false t.boolean :expiration_notice_to_library, default: false end end def down drop_table :reserves 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/144_create_classification_types.rb
db/migrate/144_create_classification_types.rb
class CreateClassificationTypes < ActiveRecord::Migration[4.2] def up create_table :classification_types 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 :classification_types 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/20140812153137_create_event_export_file_transitions.rb
db/migrate/20140812153137_create_event_export_file_transitions.rb
class CreateEventExportFileTransitions < ActiveRecord::Migration[4.2] def change create_table :event_export_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_export_file_id t.timestamps end add_index :event_export_file_transitions, :event_export_file_id, name: "index_event_export_file_transitions_on_file_id" add_index :event_export_file_transitions, [:sort_key, :event_export_file_id], unique: true, name: "index_event_export_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/20160811102604_add_picture_width_to_picture_file.rb
db/migrate/20160811102604_add_picture_width_to_picture_file.rb
class AddPictureWidthToPictureFile < ActiveRecord::Migration[4.2] def change add_column :picture_files, :picture_width, :integer add_column :picture_files, :picture_height, :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/20130519065638_add_lock_version_to_reserve.rb
db/migrate/20130519065638_add_lock_version_to_reserve.rb
class AddLockVersionToReserve < ActiveRecord::Migration[4.2] def change add_column :reserves, :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/145_create_subject_heading_types.rb
db/migrate/145_create_subject_heading_types.rb
class CreateSubjectHeadingTypes < ActiveRecord::Migration[4.2] def up create_table :subject_heading_types 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 :subject_heading_types 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/20120510140958_add_closed_to_shelf.rb
db/migrate/20120510140958_add_closed_to_shelf.rb
class AddClosedToShelf < ActiveRecord::Migration[4.2] def change add_column :shelves, :closed, :boolean, default: false, 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/20090705133942_add_attachments_picture_to_picture_file.rb
db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb
class AddAttachmentsPictureToPictureFile < ActiveRecord::Migration[4.2] def up add_column :picture_files, :picture_file_name, :string add_column :picture_files, :picture_content_type, :string add_column :picture_files, :picture_file_size, :integer add_column :picture_files, :picture_updated_at, :datetime end def down remove_column :picture_files, :picture_file_name remove_column :picture_files, :picture_content_type remove_column :picture_files, :picture_file_size remove_column :picture_files, :picture_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/20081009062129_create_order_lists.rb
db/migrate/20081009062129_create_order_lists.rb
class CreateOrderLists < ActiveRecord::Migration[6.1] def up create_table :order_lists, if_not_exists: true do |t| t.references :user, foreign_key: true, null: false t.references :bookstore, foreign_key: true, null: false t.text :title, null: false t.text :note t.datetime :ordered_at t.timestamps end end def down drop_table :order_lists 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/20120415164821_add_attachment_meta_to_manifestation.rb
db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
class AddAttachmentMetaToManifestation < ActiveRecord::Migration[4.2] def change add_column :manifestations, :attachment_meta, :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/20110301035123_add_pub_date_to_manifestation.rb
db/migrate/20110301035123_add_pub_date_to_manifestation.rb
class AddPubDateToManifestation < ActiveRecord::Migration[4.2] def up add_column :manifestations, :pub_date, :string end def down remove_column :manifestations, :pub_date 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/20151213072705_add_footer_banner_to_library_group.rb
db/migrate/20151213072705_add_footer_banner_to_library_group.rb
# This migration comes from enju_library_engine (originally 20151213072705) class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2] def up if defined?(Globalize) LibraryGroup.add_translation_fields! footer_banner: :text end if defined?(AwesomeHstoreTranslate) add_column :library_groups, :footer_banner, :hstore end end def down if defined?(Globalize) remove_column :library_group_translations, :footer_banner end if defined?(AwesomeHstoreTranslate) remove_column :library_groups, :footer_banner 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/047_create_produces.rb
db/migrate/047_create_produces.rb
class CreateProduces < ActiveRecord::Migration[4.2] def change create_table :produces do |t| t.references :agent, null: false t.references :manifestation, null: false t.integer :position t.timestamps end add_index :produces, :agent_id add_index :produces, :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/20090321130448_add_completed_at_to_user_checkout_stat.rb
db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb
class AddCompletedAtToUserCheckoutStat < ActiveRecord::Migration[4.2] def up add_column :user_checkout_stats, :started_at, :datetime add_column :user_checkout_stats, :completed_at, :datetime add_column :user_reserve_stats, :started_at, :datetime add_column :user_reserve_stats, :completed_at, :datetime add_column :manifestation_checkout_stats, :started_at, :datetime add_column :manifestation_checkout_stats, :completed_at, :datetime add_column :manifestation_reserve_stats, :started_at, :datetime add_column :manifestation_reserve_stats, :completed_at, :datetime end def down remove_column :user_checkout_stats, :started_at remove_column :user_checkout_stats, :completed_at remove_column :user_reserve_stats, :started_at remove_column :user_reserve_stats, :completed_at remove_column :manifestation_checkout_stats, :started_at remove_column :manifestation_checkout_stats, :completed_at remove_column :manifestation_reserve_stats, :started_at remove_column :manifestation_reserve_stats, :completed_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/20140110122216_create_user_import_files.rb
db/migrate/20140110122216_create_user_import_files.rb
class CreateUserImportFiles < ActiveRecord::Migration[4.2] def change create_table :user_import_files do |t| t.references :user, index: true t.text :note t.datetime :executed_at t.string :user_import_file_name t.string :user_import_content_type t.integer :user_import_file_size t.datetime :user_import_updated_at t.string :user_import_fingerprint t.string :edit_mode t.text :error_message 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/20160610093229_add_html_snippet_to_library_group.rb
db/migrate/20160610093229_add_html_snippet_to_library_group.rb
class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :html_snippet, :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/20140721151416_add_default_shelf_id_to_resource_import_file.rb
db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb
class AddDefaultShelfIdToResourceImportFile < ActiveRecord::Migration[4.2] def change add_column :resource_import_files, :default_shelf_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/20081117143156_create_inventory_files.rb
db/migrate/20081117143156_create_inventory_files.rb
class CreateInventoryFiles < ActiveRecord::Migration[4.2] def up create_table :inventory_files, if_not_exists: true do |t| t.string :filename t.string :content_type t.integer :size t.references :user, index: true t.text :note t.timestamps end end def down drop_table :inventory_files 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/20120125050502_add_depth_to_message.rb
db/migrate/20120125050502_add_depth_to_message.rb
class AddDepthToMessage < ActiveRecord::Migration[5.2] def change add_column :messages, :depth, :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/20170305064014_add_csv_charset_conversion_to_library_group.rb
db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: 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/20231027174830_add_unique_index_to_checked_items_on_basket_id_and_item_id.rb
db/migrate/20231027174830_add_unique_index_to_checked_items_on_basket_id_and_item_id.rb
class AddUniqueIndexToCheckedItemsOnBasketIdAndItemId < ActiveRecord::Migration[6.1] def change remove_index :checked_items, :item_id add_index :checked_items, [:item_id, :basket_id], unique: true remove_index :checkins, :item_id add_index :checkins, [:item_id, :basket_id], unique: true remove_index :checkouts, [:item_id, :basket_id] add_index :checkouts, [:item_id, :basket_id, :user_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/20151213070943_add_translation_table_to_library_group.rb
db/migrate/20151213070943_add_translation_table_to_library_group.rb
# This migration comes from enju_library_engine (originally 20151213070943) class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2] def up if defined?(Globalize) LibraryGroup.create_translation_table!({ login_banner: :text }, { migrate_data: true }) end end def down if defined?(Globalize) LibraryGroup.drop_translation_table! # migrate_data: 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/006_create_items.rb
db/migrate/006_create_items.rb
class CreateItems < ActiveRecord::Migration[4.2] def change create_table :items do |t| t.string :call_number t.string :item_identifier t.timestamps t.datetime :deleted_at t.integer :shelf_id, default: 1, null: false t.boolean :include_supplements, default: false, null: false t.text :note t.string :url t.integer :price t.integer :lock_version, default: 0, null: false t.integer :required_role_id, default: 1, null: false t.integer :required_score, default: 0, null: false end add_index :items, :shelf_id add_index :items, :item_identifier add_index :items, :required_role_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/20120125152919_add_title_subseries_transcription_to_series_statement.rb
db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
class AddTitleSubseriesTranscriptionToSeriesStatement < ActiveRecord::Migration[4.2] def change add_column :series_statements, :title_subseries_transcription, :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/20151125004028_add_profile_id_to_agent.rb
db/migrate/20151125004028_add_profile_id_to_agent.rb
class AddProfileIdToAgent < ActiveRecord::Migration[4.2] def change add_column :agents, :profile_id, :integer add_index :agents, :profile_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/20180102162311_add_header_logo_meta_to_library_group.rb
db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :header_logo_meta, :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/20140628073524_add_user_encoding_to_agent_import_file.rb
db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb
class AddUserEncodingToAgentImportFile < ActiveRecord::Migration[4.2] def change add_column :agent_import_files, :user_encoding, :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/20140528045617_create_manifestation_reserve_stat_transitions.rb
db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb
class CreateManifestationReserveStatTransitions < ActiveRecord::Migration[4.2] def change create_table :manifestation_reserve_stat_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 :manifestation_reserve_stat_id t.timestamps end add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: "index_manifestation_reserve_stat_transitions_on_stat_id" add_index :manifestation_reserve_stat_transitions, [:sort_key, :manifestation_reserve_stat_id], unique: true, name: "index_manifestation_reserve_stat_transitions_on_transition" 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/20160813191533_add_book_jacket_source_to_library_group.rb
db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb
class AddBookJacketSourceToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :book_jacket_source, :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/20180107155817_add_constraints_to_most_recent_for_order_list_transitions.rb
db/migrate/20180107155817_add_constraints_to_most_recent_for_order_list_transitions.rb
class AddConstraintsToMostRecentForOrderListTransitions < ActiveRecord::Migration[6.1] disable_ddl_transaction! def up add_index :order_list_transitions, [:order_list_id, :most_recent], unique: true, where: "most_recent", name: "index_order_list_transitions_parent_most_recent", if_not_exists: true #, algorithm: :concurrently change_column_null :order_list_transitions, :most_recent, false end def down remove_index :order_list_transitions, name: "index_order_list_transitions_parent_most_recent" change_column_null :order_list_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/20151201163718_add_place_id_to_event.rb
db/migrate/20151201163718_add_place_id_to_event.rb
class AddPlaceIdToEvent < ActiveRecord::Migration[4.2] def change add_reference :events, :place, index: 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/20081215094302_create_user_checkout_stats.rb
db/migrate/20081215094302_create_user_checkout_stats.rb
class CreateUserCheckoutStats < ActiveRecord::Migration[4.2] def up create_table :user_checkout_stats do |t| t.datetime :start_date t.datetime :end_date t.text :note t.timestamps end end def down drop_table :user_checkout_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/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
class AddConstraintsToMostRecentForReserveTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :reserve_transitions, [:reserve_id, :most_recent], unique: true, where: "most_recent", name: "index_reserve_transitions_parent_most_recent" # , algorithm: :concurrently change_column_null :reserve_transitions, :most_recent, false end def down remove_index :reserve_transitions, name: "index_reserve_transitions_parent_most_recent" change_column_null :reserve_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/20250726140939_remove_user_id_from_library_groups.rb
db/migrate/20250726140939_remove_user_id_from_library_groups.rb
class RemoveUserIdFromLibraryGroups < ActiveRecord::Migration[7.1] def change remove_column :library_groups, :user_id, :bigint 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/20120413100431_add_fingerprint_to_inventory_file.rb
db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb
class AddFingerprintToInventoryFile < ActiveRecord::Migration[4.2] def up add_column :inventory_files, :inventory_fingerprint, :string, if_not_exists: true end def down remove_column :inventory_files, :inventory_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/20140524074813_create_user_import_file_transitions.rb
db/migrate/20140524074813_create_user_import_file_transitions.rb
class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2] def change create_table :user_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.references :user_import_file, index: true t.timestamps end add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_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/146_create_subject_types.rb
db/migrate/146_create_subject_types.rb
class CreateSubjectTypes < ActiveRecord::Migration[4.2] def up create_table :subject_types 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 :subject_types 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/20120105074911_add_isil_to_library.rb
db/migrate/20120105074911_add_isil_to_library.rb
class AddIsilToLibrary < ActiveRecord::Migration[4.2] def change add_column :libraries, :isil, :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/20110621093332_remove_expire_date_from_reserve.rb
db/migrate/20110621093332_remove_expire_date_from_reserve.rb
class RemoveExpireDateFromReserve < ActiveRecord::Migration[4.2] def up remove_column :reserves, :expire_date end def down add_column :reserves, :expire_date, :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/20080905191442_create_agent_types.rb
db/migrate/20080905191442_create_agent_types.rb
class CreateAgentTypes < ActiveRecord::Migration[4.2] def change create_table :agent_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/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb
db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb
class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[4.2] def change add_foreign_key :items, :manifestations 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/20120413100352_add_fingerprint_to_picture_file.rb
db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
class AddFingerprintToPictureFile < ActiveRecord::Migration[4.2] def change add_column :picture_files, :picture_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/20200425074822_create_item_custom_values.rb
db/migrate/20200425074822_create_item_custom_values.rb
class CreateItemCustomValues < ActiveRecord::Migration[5.2] def change create_table :item_custom_values do |t| t.references :item_custom_property, null: false, foreign_key: true, index: {name: 'index_item_custom_values_on_custom_property_id'} t.references :item, null: false, foreign_key: true t.text :value t.timestamps end add_index :item_custom_values, [:item_custom_property_id, :item_id], unique: true, name: 'index_item_custom_values_on_custom_item_property_and_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/134_create_agent_merge_lists.rb
db/migrate/134_create_agent_merge_lists.rb
class CreateAgentMergeLists < ActiveRecord::Migration[4.2] def up create_table :agent_merge_lists do |t| t.string :title t.timestamps end end def down drop_table :agent_merge_lists 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/20081030023412_create_checkout_types.rb
db/migrate/20081030023412_create_checkout_types.rb
class CreateCheckoutTypes < ActiveRecord::Migration[4.2] def up create_table :checkout_types do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end add_index :checkout_types, :name end def down drop_table :checkout_types 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/20100606065209_create_user_has_roles.rb
db/migrate/20100606065209_create_user_has_roles.rb
class CreateUserHasRoles < ActiveRecord::Migration[4.2] def change create_table :user_has_roles do |t| t.references :user, index: true, foreign_key: true, null: false t.references :role, index: true, foreign_key: true, 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/20221112082648_add_index_to_item_has_use_restrictions_on_item_id.rb
db/migrate/20221112082648_add_index_to_item_has_use_restrictions_on_item_id.rb
class AddIndexToItemHasUseRestrictionsOnItemId < ActiveRecord::Migration[6.1] def change remove_index :item_has_use_restrictions, :item_id add_index :item_has_use_restrictions, [:item_id, :use_restriction_id], unique: true, name: 'index_item_has_use_restrictions_on_item_and_use_restriction' 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/20140528045539_create_user_reserve_stat_transitions.rb
db/migrate/20140528045539_create_user_reserve_stat_transitions.rb
class CreateUserReserveStatTransitions < ActiveRecord::Migration[4.2] def change create_table :user_reserve_stat_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 :user_reserve_stat_id t.timestamps end add_index :user_reserve_stat_transitions, :user_reserve_stat_id add_index :user_reserve_stat_transitions, [:sort_key, :user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_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/20081025083323_create_countries.rb
db/migrate/20081025083323_create_countries.rb
class CreateCountries < ActiveRecord::Migration[4.2] # ISO 3166 is the International Standard for country codes. # # ISO 3166-1:2006 Codes for the representation of names of countries and their subdivisions - Part 1: # Country codes which is what most users know as ISO's country codes. First published in 1974, it is has since # then become one of the world's most popular and most widely used standard solution for coding country names. # It contains a two-letter code which is recommended as the general purpose code, a three-letter code which has # better mnenomic properties and a numeric-3 code which can be useful if script independence of the codes is important. # # http://www.iso.org/iso/country_codes/background_on_iso_3166/what_is_iso_3166.htm def change create_table :countries do |t| t.string :name, size: 80, null: false t.text :display_name t.string :alpha_2, size: 2 t.string :alpha_3, size: 3 t.string :numeric_3, size: 3 t.text :note t.integer :position end add_index :countries, :name add_index :countries, :alpha_2 add_index :countries, :alpha_3 add_index :countries, :numeric_3 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/20100223121519_rename_series_statement_title_to_original_title.rb
db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
class RenameSeriesStatementTitleToOriginalTitle < ActiveRecord::Migration[4.2] def up rename_column :series_statements, :title, :original_title add_column :series_statements, :title_transcription, :text add_column :series_statements, :title_alternative, :text end def down rename_column :series_statements, :original_title, :title remove_column :series_statements, :title_transcription remove_column :series_statements, :title_alternative 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/20081023092436_create_search_engines.rb
db/migrate/20081023092436_create_search_engines.rb
class CreateSearchEngines < ActiveRecord::Migration[4.2] def change create_table :search_engines do |t| t.string :name, null: false t.text :display_name t.string :url, null: false t.text :base_url, null: false t.text :http_method, null: false t.text :query_param, null: false t.text :additional_param 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/032_create_checkins.rb
db/migrate/032_create_checkins.rb
class CreateCheckins < ActiveRecord::Migration[4.2] def up create_table :checkins do |t| t.references :item, index: true, foreign_key: true, null: false t.references :librarian, index: true t.references :basket, index: true t.timestamps end end def down drop_table :checkins 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/20140110131010_create_user_import_results.rb
db/migrate/20140110131010_create_user_import_results.rb
class CreateUserImportResults < ActiveRecord::Migration[4.2] def change create_table :user_import_results do |t| t.references :user_import_file, index: true t.references :user, index: true t.text :body 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/20130504195916_add_subject_heading_type_id_to_subject.rb
db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb
class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration[4.2] def change add_column :subjects, :subject_heading_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/20081006093246_create_subscribes.rb
db/migrate/20081006093246_create_subscribes.rb
class CreateSubscribes < ActiveRecord::Migration[4.2] def change create_table :subscribes do |t| t.references :subscription, index: true, null: false t.integer :work_id, null: false t.datetime :start_at, null: false t.datetime :end_at, null: false t.timestamps end add_index :subscribes, :work_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/20221114063534_add_foreign_key_to_agent_import_files_referencing_user.rb
db/migrate/20221114063534_add_foreign_key_to_agent_import_files_referencing_user.rb
class AddForeignKeyToAgentImportFilesReferencingUser < ActiveRecord::Migration[6.1] def change add_foreign_key :agent_import_files, :users add_foreign_key :baskets, :users add_foreign_key :bookmarks, :users add_foreign_key :event_export_files, :users add_foreign_key :import_requests, :users add_foreign_key :inventory_files, :users add_foreign_key :news_posts, :users add_foreign_key :resource_export_files, :users add_foreign_key :resource_import_files, :users add_foreign_key :subscriptions, :users add_foreign_key :user_export_files, :users add_foreign_key :user_import_files, :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/20140524020735_create_agent_import_file_transitions.rb
db/migrate/20140524020735_create_agent_import_file_transitions.rb
class CreateAgentImportFileTransitions < ActiveRecord::Migration[4.2] def change create_table :agent_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 :agent_import_file_id t.timestamps end add_index :agent_import_file_transitions, :agent_import_file_id add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_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/20140709113413_create_user_export_files.rb
db/migrate/20140709113413_create_user_export_files.rb
class CreateUserExportFiles < ActiveRecord::Migration[4.2] def change create_table :user_export_files do |t| t.references :user, index: true t.string :user_export_content_type t.string :user_export_file_name t.integer :user_export_file_size t.datetime :user_export_updated_at 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/20140810091231_add_checkout_icalendar_token_to_profile.rb
db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb
class AddCheckoutIcalendarTokenToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :checkout_icalendar_token, :string add_index :profiles, :checkout_icalendar_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/20141003182825_add_date_of_birth_to_profile.rb
db/migrate/20141003182825_add_date_of_birth_to_profile.rb
class AddDateOfBirthToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :date_of_birth, :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/20200506091212_create_ncid_records.rb
db/migrate/20200506091212_create_ncid_records.rb
class CreateNcidRecords < ActiveRecord::Migration[6.1] def change create_table :ncid_records do |t| t.references :manifestation, null: false, foreign_key: true t.string :body, null: false t.timestamps end add_index :ncid_records, :body, 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/20250426125356_remove_primary_from_identifiers.rb
db/migrate/20250426125356_remove_primary_from_identifiers.rb
class RemovePrimaryFromIdentifiers < ActiveRecord::Migration[7.1] def change remove_column :identifiers, :primary, :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/20140628071719_add_user_encoding_to_event_import_file.rb
db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb
class AddUserEncodingToEventImportFile < ActiveRecord::Migration[4.2] def change add_column :event_import_files, :user_encoding, :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/20220404101903_create_active_storage_tables.active_storage.rb
db/migrate/20220404101903_create_active_storage_tables.active_storage.rb
# This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[5.2] def change create_table :active_storage_blobs do |t| t.string :key, null: false t.string :filename, null: false t.string :content_type t.text :metadata t.string :service_name, null: false t.bigint :byte_size, null: false t.string :checksum, null: false t.datetime :created_at, null: false t.index [ :key ], unique: true end create_table :active_storage_attachments do |t| t.string :name, null: false t.references :record, null: false, polymorphic: true, index: false t.references :blob, null: false t.datetime :created_at, null: false t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true t.foreign_key :active_storage_blobs, column: :blob_id end create_table :active_storage_variant_records do |t| t.belongs_to :blob, null: false, index: false 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 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/20090913173236_create_nii_types.rb
db/migrate/20090913173236_create_nii_types.rb
class CreateNiiTypes < ActiveRecord::Migration[4.2] def change create_table :nii_types, if_not_exists: true do |t| t.string :name, null: false t.text :display_name t.text :note t.integer :position t.timestamps end add_index :nii_types, :name, unique: true, if_not_exists: 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/20250726143606_add_profile_id_to_users.rb
db/migrate/20250726143606_add_profile_id_to_users.rb
class AddProfileIdToUsers < ActiveRecord::Migration[7.1] def change add_reference :users, :profile, null: true, foreign_key: true Profile.where.not(user_id: nil).each do |profile| user = User.find_by(id: profile.user_id) next unless user user.update_column(:profile_id, profile.id) end change_column_null :users, :profile_id, false remove_column :profiles, :user_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/20191230082846_add_shelf_to_inventory_file.rb
db/migrate/20191230082846_add_shelf_to_inventory_file.rb
class AddShelfToInventoryFile < ActiveRecord::Migration[5.2] def up add_reference :inventory_files, :shelf, foreign_key: true, if_not_exists: true end def down remove_reference :inventory_files, :shelf 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/20081027150907_create_picture_files.rb
db/migrate/20081027150907_create_picture_files.rb
class CreatePictureFiles < ActiveRecord::Migration[4.2] def change create_table :picture_files do |t| t.integer :picture_attachable_id t.string :picture_attachable_type t.text :title t.integer :position t.timestamps end add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], name: "index_picture_files_on_picture_attachable_id_and_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/20140720170735_add_default_user_group_id_to_user_import_file.rb
db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb
class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration[4.2] def change add_reference :user_import_files, :default_user_group 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/20130504143515_add_manifestation_id_to_classification.rb
db/migrate/20130504143515_add_manifestation_id_to_classification.rb
class AddManifestationIdToClassification < ActiveRecord::Migration[4.2] def change add_column :classifications, :manifestation_id, :integer add_index :classifications, :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/20230818154419_create_lccn_records.rb
db/migrate/20230818154419_create_lccn_records.rb
class CreateLccnRecords < ActiveRecord::Migration[6.1] def change create_table :lccn_records do |t| t.string :body, null: false t.references :manifestation, null: false, foreign_key: true t.timestamps end add_index :lccn_records, :body, 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/20140812093836_add_share_bookmarks_to_profile.rb
db/migrate/20140812093836_add_share_bookmarks_to_profile.rb
class AddShareBookmarksToProfile < ActiveRecord::Migration[4.2] def up add_column :profiles, :share_bookmarks, :boolean, if_not_exists: true end def down remove_column :profiles, :share_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/20201025090703_add_missing_since_to_item.rb
db/migrate/20201025090703_add_missing_since_to_item.rb
class AddMissingSinceToItem < ActiveRecord::Migration[5.2] def change add_column :items, :missing_since, :date 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/20140810091417_add_save_checkout_history_to_profile.rb
db/migrate/20140810091417_add_save_checkout_history_to_profile.rb
class AddSaveCheckoutHistoryToProfile < ActiveRecord::Migration[4.2] def change add_column :profiles, :save_checkout_history, :boolean, default: false, 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/20180709023035_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
db/migrate/20180709023035_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
# This migration comes from acts_as_taggable_on_engine (originally 1) if ActiveRecord.gem_version >= Gem::Version.new('5.0') class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]; end else class ActsAsTaggableOnMigration < ActiveRecord::Migration; end end ActsAsTaggableOnMigration.class_eval do def up create_table :tags, if_not_exists: true do |t| t.string :name end create_table :taggings, if_not_exists: true do |t| t.references :tag # You should make sure that the column created is # long enough to store the required class names. t.references :taggable, polymorphic: true t.references :tagger, polymorphic: true # Limit is created to prevent MySQL error on index # length for MyISAM table type: http://bit.ly/vgW2Ql t.string :context, limit: 128 t.datetime :created_at end add_index :taggings, :tag_id, if_not_exists: true add_index :taggings, [:taggable_id, :taggable_type, :context], if_not_exists: true end def down drop_table :taggings drop_table :tags 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/20130421155019_add_creator_string_to_series_statement.rb
db/migrate/20130421155019_add_creator_string_to_series_statement.rb
class AddCreatorStringToSeriesStatement < ActiveRecord::Migration[4.2] def change add_column :series_statements, :creator_string, :text add_column :series_statements, :volume_number_string, :text add_column :series_statements, :volume_number_transcription_string, :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/129_create_item_has_use_restrictions.rb
db/migrate/129_create_item_has_use_restrictions.rb
class CreateItemHasUseRestrictions < ActiveRecord::Migration[4.2] def up create_table :item_has_use_restrictions do |t| t.references :item, index: true, foreign_key: true, null: false t.references :use_restriction, index: true, foreign_key: true, null: false t.timestamps end end def down drop_table :item_has_use_restrictions 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/20140528045600_create_manifestation_checkout_stat_transitions.rb
db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb
class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2] def change create_table :manifestation_checkout_stat_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 :manifestation_checkout_stat_id t.timestamps end add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id" add_index :manifestation_checkout_stat_transitions, [:sort_key, :manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition" 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/20130221154434_add_additional_attributes_to_user.rb
db/migrate/20130221154434_add_additional_attributes_to_user.rb
class AddAdditionalAttributesToUser < ActiveRecord::Migration[4.2] def change add_column :users, :username, :string add_column :users, :deleted_at, :datetime add_column :users, :expired_at, :datetime add_column :users, :failed_attempts, :integer, default: 0 add_column :users, :unlock_token, :string add_column :users, :locked_at, :datetime add_column :users, :confirmed_at, :datetime add_index :users, :username, 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/20120413170720_add_error_message_to_agent_import_file.rb
db/migrate/20120413170720_add_error_message_to_agent_import_file.rb
class AddErrorMessageToAgentImportFile < ActiveRecord::Migration[4.2] def change add_column :agent_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/127_create_use_restrictions.rb
db/migrate/127_create_use_restrictions.rb
class CreateUseRestrictions < ActiveRecord::Migration[4.2] def up create_table :use_restrictions 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 :use_restrictions 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/20090519203307_create_participates.rb
db/migrate/20090519203307_create_participates.rb
class CreateParticipates < ActiveRecord::Migration[4.2] def up create_table :participates do |t| t.references :agent, index: true, null: false t.references :event, index: true, null: false t.integer :position t.timestamps end end def down drop_table :participates 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/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb
db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb
class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" #, algorithm: :concurrently change_column_null :resource_export_file_transitions, :most_recent, false end def down remove_index :resource_export_file_transitions, name: "index_resource_export_file_transitions_parent_most_recent" change_column_null :resource_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/20081030023518_create_user_group_has_checkout_types.rb
db/migrate/20081030023518_create_user_group_has_checkout_types.rb
class CreateUserGroupHasCheckoutTypes < ActiveRecord::Migration[4.2] def up create_table :user_group_has_checkout_types do |t| t.references :user_group, index: true, foreign_key: true, null: false t.references :checkout_type, index: true, foreign_key: true, null: false t.integer :checkout_limit, default: 0, null: false t.integer :checkout_period, default: 0, null: false t.integer :checkout_renewal_limit, default: 0, null: false t.integer :reservation_limit, default: 0, null: false t.integer :reservation_expired_period, default: 7, null: false t.boolean :set_due_date_before_closing_day, default: false, null: false t.datetime :fixed_due_date t.text :note t.integer :position t.timestamps end end def down drop_table :user_group_has_checkout_types 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/20140720140916_add_binding_item_identifier_to_item.rb
db/migrate/20140720140916_add_binding_item_identifier_to_item.rb
class AddBindingItemIdentifierToItem < ActiveRecord::Migration[4.2] def change add_column :items, :binding_item_identifier, :string add_column :items, :binding_call_number, :string add_column :items, :binded_at, :datetime add_index :items, :binding_item_identifier 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/20140628073535_add_user_encoding_to_resource_import_file.rb
db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb
class AddUserEncodingToResourceImportFile < ActiveRecord::Migration[4.2] def change add_column :resource_import_files, :user_encoding, :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/20170116134120_create_isbn_record_and_manifestations.rb
db/migrate/20170116134120_create_isbn_record_and_manifestations.rb
class CreateIsbnRecordAndManifestations < ActiveRecord::Migration[6.1] def change create_table :isbn_record_and_manifestations, comment: '書誌とISBNの関係' do |t| t.references :isbn_record, foreign_key: true, null: false t.references :manifestation, foreign_key: true, null: false, index: false t.timestamps end add_index :isbn_record_and_manifestations, [:manifestation_id, :isbn_record_id], unique: true, name: 'index_isbn_record_and_manifestations_on_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/20180709161346_add_created_at_to_tag.rb
db/migrate/20180709161346_add_created_at_to_tag.rb
class AddCreatedAtToTag < ActiveRecord::Migration[5.1] def up add_column :tags, :created_at, :datetime, if_not_exists: true add_column :tags, :updated_at, :datetime, if_not_exists: true end def down remove_column :tags, :created_at remove_column :tags, :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/20250727021342_add_foreign_key_to_event_import_files_referencing_user.rb
db/migrate/20250727021342_add_foreign_key_to_event_import_files_referencing_user.rb
class AddForeignKeyToEventImportFilesReferencingUser < ActiveRecord::Migration[7.2] def change add_foreign_key :event_import_files, :users add_foreign_key :accepts, :users, column: :librarian_id add_foreign_key :checked_items, :users, column: :librarian_id add_foreign_key :checkins, :users, column: :librarian_id add_foreign_key :checkouts, :users, column: :librarian_id add_foreign_key :withdraws, :users, column: :librarian_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/059_create_libraries.rb
db/migrate/059_create_libraries.rb
class CreateLibraries < ActiveRecord::Migration[4.2] def change create_table :libraries do |t| t.string :name, index: true, null: false t.text :display_name t.string :short_display_name, null: false t.string :zip_code t.text :street t.text :locality t.text :region t.string :telephone_number_1 t.string :telephone_number_2 t.string :fax_number t.text :note t.integer :call_number_rows, default: 1, null: false t.string :call_number_delimiter, default: "|", null: false t.references :library_group, index: true, null: false t.integer :users_count, default: 0, null: false t.integer :position t.references :country t.timestamps t.datetime :deleted_at 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/114_create_event_categories.rb
db/migrate/114_create_event_categories.rb
class CreateEventCategories < ActiveRecord::Migration[4.2] def up create_table :event_categories 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 :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/20110301134521_add_expire_date_to_reserve.rb
db/migrate/20110301134521_add_expire_date_to_reserve.rb
class AddExpireDateToReserve < ActiveRecord::Migration[4.2] def up add_column :reserves, :expire_date, :string end def down remove_column :reserves, :expire_date 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/041_create_roles.rb
db/migrate/041_create_roles.rb
class CreateRoles < ActiveRecord::Migration[4.2] def change create_table "roles" do |t| t.column :name, :string, null: false t.column :display_name, :string t.column :note, :text t.column :created_at, :datetime t.column :updated_at, :datetime t.integer :score, default: 0, null: false t.integer :position 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/20110603184217_add_edit_mode_to_resource_import_file.rb
db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb
class AddEditModeToResourceImportFile < ActiveRecord::Migration[4.2] def up add_column :resource_import_files, :edit_mode, :string end def down remove_column :resource_import_files, :edit_mode 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/20171014084528_add_header_logo_to_library_group.rb
db/migrate/20171014084528_add_header_logo_to_library_group.rb
class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[4.2] def change add_column :library_groups, :header_logo_content_type, :string add_column :library_groups, :header_logo_file_name, :string add_column :library_groups, :header_logo_file_size, :integer end end
ruby
MIT
cd3cff6dcc8e67909e1cd0a12c38700b45af6a42
2026-01-04T17:52:15.550406Z
false