Skip to content

Commit

Permalink
revert using uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Apr 26, 2019
1 parent e66f757 commit dd402d0
Show file tree
Hide file tree
Showing 101 changed files with 669 additions and 669 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20081117143156_create_inventory_files.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateInventoryFiles < ActiveRecord::Migration[5.2]
def change
create_table :inventory_files, id: :uuid do |t|
create_table :inventory_files do |t|
t.references :user, foreign_key: true, null: false
t.text :note

Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20081117143455_create_inventories.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateInventories < ActiveRecord::Migration[5.2]
def change
create_table :inventories do |t|
t.references :item, foreign_key: true, type: :uuid
t.references :inventory_file, foreign_key: true, type: :uuid
t.references :item, foreign_key: true
t.references :inventory_file, foreign_key: true
t.text :note

t.timestamps
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/001_create_agents.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateAgents < ActiveRecord::Migration[5.2]
def change
create_table :agents, id: :uuid do |t|
create_table :agents do |t|
t.string :last_name
t.string :middle_name
t.string :first_name
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/005_create_manifestations.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateManifestations < ActiveRecord::Migration[5.2]
def change
create_table :manifestations, id: :uuid do |t|
create_table :manifestations do |t|
t.text :original_title, null: false
t.text :title_alternative
t.text :title_transcription
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/006_create_items.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class CreateItems < ActiveRecord::Migration[5.2]
def change
create_table :items, id: :uuid do |t|
create_table :items do |t|
t.string :call_number
t.string :item_identifier, index: {unique: true}
t.timestamps
t.references :shelf, type: :uuid
t.references :shelf
t.boolean :include_supplements, default: false, null: false
t.text :note
t.string :url
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/012_create_owns.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateOwns < ActiveRecord::Migration[5.2]
def change
create_table :owns do |t|
t.references :agent, null: false, type: :uuid
t.references :item, null: false, type: :uuid
t.references :agent, null: false
t.references :item, null: false
t.integer :position
t.timestamps
end
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/015_create_creates.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateCreates < ActiveRecord::Migration[5.2]
def change
create_table :creates do |t|
t.references :agent, foreign_key: true, null: false, type: :uuid
t.references :work, null: false, type: :uuid, foreign_key: {to_table: :manifestations}
t.references :agent, foreign_key: true, null: false
t.references :work, null: false, foreign_key: {to_table: :manifestations}
t.integer :position
t.timestamps
end
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/032_create_checkins.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateCheckins < ActiveRecord::Migration[5.2]
def change
create_table :checkins, id: :uuid do |t|
create_table :checkins do |t|
t.references :librarian, index: true
t.references :basket, index: true, type: :uuid
t.references :basket, index: true
t.timestamps
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/dummy/db/migrate/033_create_checkouts.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class CreateCheckouts < ActiveRecord::Migration[5.2]
def change
create_table :checkouts, id: :uuid do |t|
create_table :checkouts do |t|
t.references :user, foreign_key: true
t.references :item, foreign_key: true, null: false, type: :uuid
t.references :item, foreign_key: true, null: false
t.references :librarian, foreign_key: {to_table: :users}
t.references :basket, index: true, type: :uuid
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
Expand Down
6 changes: 3 additions & 3 deletions spec/dummy/db/migrate/035_create_reserves.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class CreateReserves < ActiveRecord::Migration[5.2]
def change
create_table :reserves, id: :uuid do |t|
create_table :reserves do |t|
t.references :user, foreign_key: true, null: false
t.references :manifestation, foreign_key: true, null: false, type: :uuid
t.references :item, foreign_key: true, type: :uuid
t.references :manifestation, foreign_key: true, null: false
t.references :item, foreign_key: true
t.references :request_status_type, null: false
t.datetime :checked_out_at
t.timestamps
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/047_create_produces.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateProduces < ActiveRecord::Migration[5.2]
def change
create_table :produces do |t|
t.references :agent, foreign_key: true, null: false, type: :uuid
t.references :manifestation, foreign_key: true, null: false, type: :uuid
t.references :agent, foreign_key: true, null: false
t.references :manifestation, foreign_key: true, null: false
t.integer :position
t.timestamps
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/059_create_libraries.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateLibraries < ActiveRecord::Migration[5.2]
def change
create_table :libraries, id: :uuid do |t|
create_table :libraries do |t|
t.string :name, index: {unique: true}, null: false
t.jsonb :display_name_translations, default: {}, null: false
t.string :short_display_name, null: false
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/069_create_shelves.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class CreateShelves < ActiveRecord::Migration[5.2]
def change
create_table :shelves, id: :uuid do |t|
create_table :shelves do |t|
t.string :name, null: false
t.jsonb :display_name_translations, default: {}, null: false
t.text :note
t.references :library, foreign_key: true, null: false, type: :uuid
t.references :library, foreign_key: true, null: false
t.integer :items_count, default: 0, null: false
t.integer :position
t.timestamps
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/073_create_carrier_types.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class CreateCarrierTypes < ActiveRecord::Migration[5.2]
def change
create_table :carrier_types, id: :uuid do |t|
create_table :carrier_types do |t|
t.string :name, null: false, index: {unique: true}
t.jsonb :display_name_translations, default: {}, null: false
t.text :note
t.integer :position
t.timestamps
end
add_reference :manifestations, :carrier_type, foreign_key: true, type: :uuid, null: false
add_reference :manifestations, :carrier_type, foreign_key: true, null: false
end
end
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/077_create_user_groups.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateUserGroups < ActiveRecord::Migration[5.2]
def change
create_table :user_groups, id: :uuid do |t|
create_table :user_groups do |t|
t.string :name, index: {unique: true}, null: false
t.jsonb :display_name_translations, default: {}, null: false
t.text :note
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/113_create_events.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateEvents < ActiveRecord::Migration[5.2]
def change
create_table :events, id: :uuid do |t|
t.references :library, foreign_key: true, null: false, type: :uuid
create_table :events do |t|
t.references :library, foreign_key: true, null: false
t.references :event_category, index: true, null: false
t.string :name, null: false
t.text :note
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/120_create_baskets.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateBaskets < ActiveRecord::Migration[5.2]
def change
create_table :baskets, id: :uuid do |t|
create_table :baskets do |t|
t.references :user, foreign_key: true
t.text :note
t.integer :lock_version, default: 0, null: false
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/121_create_checked_items.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateCheckedItems < ActiveRecord::Migration[5.2]
def change
create_table :checked_items do |t|
t.references :item, foreign_key: true, null: false, type: :uuid
t.references :basket, foreign_key: true, null: false, type: :uuid
t.references :item, foreign_key: true, null: false
t.references :basket, foreign_key: true, null: false
t.references :librarian, index: true
t.datetime :due_date, null: false

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/124_create_bookstores.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateBookstores < ActiveRecord::Migration[5.2]
def change
create_table :bookstores, id: :uuid do |t|
create_table :bookstores do |t|
t.text :name, null: false
t.string :zip_code
t.text :address
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/125_create_donates.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateDonates < ActiveRecord::Migration[5.2]
def change
create_table :donates do |t|
t.references :agent, foreign_key: true, null: false, type: :uuid
t.references :item, foreign_key: true, null: false, type: :uuid
t.references :agent, foreign_key: true, null: false
t.references :item, foreign_key: true, null: false

t.timestamps
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateItemHasUseRestrictions < ActiveRecord::Migration[5.2]
def change
create_table :item_has_use_restrictions do |t|
t.references :item, foreign_key: true, null: false, type: :uuid
t.references :item, foreign_key: true, null: false
t.references :use_restriction, foreign_key: true, null: false

t.timestamps
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/133_create_agent_merges.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateAgentMerges < ActiveRecord::Migration[5.2]
def change
create_table :agent_merges do |t|
t.references :agent, foreign_key: true, null: false, type: :uuid
t.references :agent_merge_list, null: false, type: :uuid
t.references :agent, foreign_key: true, null: false
t.references :agent_merge_list, null: false

t.timestamps
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/134_create_agent_merge_lists.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateAgentMergeLists < ActiveRecord::Migration[5.2]
def change
create_table :agent_merge_lists, id: :uuid do |t|
create_table :agent_merge_lists do |t|
t.string :title

t.timestamps
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/154_create_messages.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class CreateMessages < ActiveRecord::Migration[5.2]
def change
create_table :messages, id: :uuid do |t|
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}, type: :uuid
t.references :parent, foreign_key: {to_table: :messages}

t.timestamps
end
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/20080830154109_create_realizes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateRealizes < ActiveRecord::Migration[5.2]
def change
create_table :realizes do |t|
t.references :agent, foreign_key: true, null: false, type: :uuid
t.references :expression, null: false, type: :uuid, foreign_key: {to_table: :manifestations}
t.references :agent, foreign_key: true, null: false
t.references :expression, null: false, foreign_key: {to_table: :manifestations}
t.integer :position

t.timestamps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateSubscriptions < ActiveRecord::Migration[5.2]
def change
create_table :subscriptions, id: :uuid do |t|
create_table :subscriptions do |t|
t.text :title, null: false
t.text :note
t.references :user, foreign_key: true
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/20081006093246_create_subscribes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateSubscribes < ActiveRecord::Migration[5.2]
def change
create_table :subscribes do |t|
t.references :subscription, foreign_key: true, null: false, type: :uuid
t.references :work, null: false, type: :uuid
t.references :subscription, foreign_key: true, null: false
t.references :work, null: false
t.datetime :start_at, null: false
t.datetime :end_at, null: false

Expand Down
4 changes: 2 additions & 2 deletions spec/dummy/db/migrate/20081027150907_create_picture_files.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreatePictureFiles < ActiveRecord::Migration[5.2]
def change
create_table :picture_files, id: :uuid do |t|
t.references :picture_attachable, null: false, type: :uuid
create_table :picture_files do |t|
t.references :picture_attachable, null: false
t.string :picture_attachable_type, null: false
t.text :title
t.integer :position
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateAgentImportFiles < ActiveRecord::Migration[5.2]
def change
create_table :agent_import_files, id: :uuid do |t|
create_table :agent_import_files do |t|
t.references :user, foreign_key: true
t.text :note
t.datetime :executed_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateResourceImportFiles < ActiveRecord::Migration[5.2]
def change
create_table :resource_import_files, id: :uuid do |t|
create_table :resource_import_files do |t|
t.references :user, foreign_key: true
t.text :note
t.datetime :executed_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateUserGroupHasCheckoutTypes < ActiveRecord::Migration[5.2]
def change
create_table :user_group_has_checkout_types do |t|
t.references :user_group, foreign_key: true, null: false, type: :uuid
t.references :user_group, foreign_key: true, null: false
t.references :checkout_type, foreign_key: true, null: false
t.integer :checkout_limit, default: 0, null: false
t.integer :checkout_period, default: 0, null: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateCarrierTypeHasCheckoutTypes < ActiveRecord::Migration[5.2]
def change
create_table :carrier_type_has_checkout_types do |t|
t.references :carrier_type, foreign_key: true, null: false, type: :uuid
t.references :carrier_type, foreign_key: true, null: false
t.references :checkout_type, foreign_key: true, null: false
t.text :note
t.integer :position
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class CreateCheckoutStatHasManifestations < ActiveRecord::Migration[5.2]
def change
create_table :checkout_stat_has_manifestations do |t|
t.references :manifestation_checkout_stat, index: false, null: false, type: :uuid
t.references :manifestation, index: false, foreign_key: true, null: false, type: :uuid
t.references :manifestation_checkout_stat, index: false, null: false
t.references :manifestation, index: false, foreign_key: true, null: false
t.integer :checkouts_count

t.timestamps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateManifestationCheckoutStats < ActiveRecord::Migration[5.2]
def change
create_table :manifestation_checkout_stats, id: :uuid do |t|
create_table :manifestation_checkout_stats do |t|
t.datetime :start_date
t.datetime :end_date
t.text :note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateUserCheckoutStats < ActiveRecord::Migration[5.2]
def change
create_table :user_checkout_stats, id: :uuid do |t|
create_table :user_checkout_stats do |t|
t.datetime :start_date
t.datetime :end_date
t.text :note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateCheckoutStatHasUsers < ActiveRecord::Migration[5.2]
def change
create_table :checkout_stat_has_users do |t|
t.references :user_checkout_stat, foreign_key: true, null: false, type: :uuid
t.references :user_checkout_stat, foreign_key: true, null: false
t.references :user, index: true, foreign_key: true, null: false
t.integer :checkouts_count, default: 0, null: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CreateReserveStatHasManifestations < ActiveRecord::Migration[5.2]
def change
create_table :reserve_stat_has_manifestations do |t|
t.references :manifestation_reserve_stat, index: false, null: false
t.references :manifestation, index: false, foreign_key: true, null: false, type: :uuid
t.references :manifestation, index: false, foreign_key: true, null: false
t.integer :reserves_count

t.timestamps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateManifestationReserveStats < ActiveRecord::Migration[5.2]
def change
create_table :manifestation_reserve_stats, id: :uuid do |t|
create_table :manifestation_reserve_stats do |t|
t.datetime :start_date
t.datetime :end_date
t.text :note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateUserReserveStats < ActiveRecord::Migration[5.2]
def change
create_table :user_reserve_stats, id: :uuid do |t|
create_table :user_reserve_stats do |t|
t.datetime :start_date
t.datetime :end_date
t.text :note
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateReserveStatHasUsers < ActiveRecord::Migration[5.2]
def change
create_table :reserve_stat_has_users do |t|
t.references :user_reserve_stat, foreign_key: true, null: false, type: :uuid
t.references :user_reserve_stat, foreign_key: true, null: false
t.references :user, index: true, foreign_key: true, null: false
t.integer :reserves_count

Expand Down
Loading

0 comments on commit dd402d0

Please sign in to comment.