enju_leaf 1.3.2 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -0
  3. data/Rakefile +9 -1
  4. data/app/assets/javascripts/enju_leaf.js +1 -1
  5. data/app/assets/javascripts/{enju.menu.js → menu.js} +0 -0
  6. data/app/assets/javascripts/mobile.js +1 -1
  7. data/app/assets/stylesheets/enju.css +2 -0
  8. data/app/views/devise/registrations/edit.html.erb +1 -1
  9. data/app/views/page/about.en.html.erb +7 -7
  10. data/app/views/page/about.ja.html.erb +7 -7
  11. data/app/views/page/configuration.html.erb +2 -0
  12. data/app/views/page/opensearch.xml.builder +1 -0
  13. data/app/views/page/system_information.html.erb +7 -1
  14. data/config/locales/en.yml +7 -203
  15. data/config/locales/ja.yml +7 -193
  16. data/lib/enju_leaf.rb +0 -1
  17. data/lib/enju_leaf/version.rb +1 -1
  18. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +4 -19
  19. data/lib/generators/enju_leaf/seed/seed_generator.rb +29 -0
  20. data/lib/generators/enju_leaf/setup/setup_generator.rb +13 -14
  21. data/lib/generators/enju_leaf/setup/templates/Procfile +1 -1
  22. data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +13 -12
  23. data/lib/tasks/enju_leaf_tasks.rake +2 -1
  24. data/spec/dummy/app/models/application_record.rb +3 -0
  25. data/spec/dummy/app/models/user.rb +1 -1
  26. data/spec/dummy/config/application.rb +1 -1
  27. data/spec/dummy/db/schema.rb +0 -390
  28. data/spec/views/page/configuration.html.erb_spec.rb +1 -1
  29. metadata +76 -253
  30. data/README.rdoc +0 -30
  31. data/lib/generators/enju_leaf/setup/templates/db/fixtures/roles.yml +0 -29
  32. data/lib/generators/enju_leaf/setup/templates/db/fixtures/user_groups.yml +0 -7
  33. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  34. data/spec/dummy/db/migrate/032_create_checkins.rb +0 -17
  35. data/spec/dummy/db/migrate/033_create_checkouts.rb +0 -25
  36. data/spec/dummy/db/migrate/035_create_reserves.rb +0 -26
  37. data/spec/dummy/db/migrate/055_create_bookmarks.rb +0 -22
  38. data/spec/dummy/db/migrate/121_create_checked_items.rb +0 -17
  39. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +0 -16
  40. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +0 -17
  41. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +0 -25
  42. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +0 -18
  43. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +0 -17
  44. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -15
  45. data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -13
  46. data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +0 -13
  47. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -15
  48. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +0 -17
  49. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +0 -17
  50. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -15
  51. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -15
  52. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +0 -17
  53. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -23
  54. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +0 -15
  55. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
  56. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
  57. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +0 -9
  58. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +0 -9
  59. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
  60. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +0 -9
  61. data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +0 -6
  62. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
  63. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
  64. data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +0 -5
  65. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +0 -5
  66. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +0 -5
  67. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  68. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +0 -5
  69. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +0 -5
  70. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +0 -8
  71. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +0 -5
  72. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +0 -5
  73. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +0 -18
  74. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +0 -18
  75. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +0 -18
  76. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +0 -18
  77. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +0 -18
  78. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +0 -18
  79. data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +0 -18
  80. data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +0 -12
  81. data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +0 -6
  82. data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +0 -5
  83. data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +0 -5
  84. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +0 -6
  85. data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +0 -6
  86. data/spec/dummy/db/migrate/20150106001709_create_demands.rb +0 -14
  87. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -15
  88. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  89. data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +0 -9
  90. data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +0 -9
  91. data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +0 -9
  92. data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +0 -9
  93. data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +0 -9
  94. data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +0 -5
  95. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +0 -11
  96. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +0 -5
  97. data/spec/fixtures/agent_import_files.yml +0 -44
  98. data/spec/fixtures/agent_import_results.yml +0 -26
  99. data/spec/fixtures/agent_relationship_types.yml +0 -34
  100. data/spec/fixtures/agent_relationships.yml +0 -25
  101. data/spec/fixtures/agent_types.yml +0 -35
  102. data/spec/fixtures/agents.yml +0 -326
  103. data/spec/fixtures/baskets.yml +0 -80
  104. data/spec/fixtures/carrier_type_has_checkout_types.yml +0 -30
  105. data/spec/fixtures/checked_items.yml +0 -34
  106. data/spec/fixtures/checkins.yml +0 -54
  107. data/spec/fixtures/checkout_stat_has_manifestations.yml +0 -23
  108. data/spec/fixtures/checkout_stat_has_users.yml +0 -23
  109. data/spec/fixtures/checkout_types.yml +0 -33
  110. data/spec/fixtures/checkouts.yml +0 -162
  111. data/spec/fixtures/circulation_statuses.yml +0 -119
  112. data/spec/fixtures/create_types.yml +0 -47
  113. data/spec/fixtures/creates.yml +0 -66
  114. data/spec/fixtures/donates.yml +0 -31
  115. data/spec/fixtures/event_categories.yml +0 -55
  116. data/spec/fixtures/events.yml +0 -116
  117. data/spec/fixtures/exemplifies.yml +0 -168
  118. data/spec/fixtures/import_requests.yml +0 -25
  119. data/spec/fixtures/item_has_use_restrictions.yml +0 -60
  120. data/spec/fixtures/items.yml +0 -303
  121. data/spec/fixtures/lending_policies.yml +0 -98
  122. data/spec/fixtures/licenses.yml +0 -29
  123. data/spec/fixtures/manifestation_checkout_stats.yml +0 -27
  124. data/spec/fixtures/manifestation_relationship_types.yml +0 -29
  125. data/spec/fixtures/manifestation_relationships.yml +0 -30
  126. data/spec/fixtures/manifestation_reserve_stats.yml +0 -27
  127. data/spec/fixtures/medium_of_performances.yml +0 -29
  128. data/spec/fixtures/message_requests.yml +0 -27
  129. data/spec/fixtures/message_templates.yml +0 -105
  130. data/spec/fixtures/owns.yml +0 -27
  131. data/spec/fixtures/picture_files.yml +0 -64
  132. data/spec/fixtures/produce_types.yml +0 -31
  133. data/spec/fixtures/produces.yml +0 -150
  134. data/spec/fixtures/realize_types.yml +0 -39
  135. data/spec/fixtures/realizes.yml +0 -87
  136. data/spec/fixtures/request_status_types.yml +0 -63
  137. data/spec/fixtures/request_types.yml +0 -55
  138. data/spec/fixtures/reserve_stat_has_manifestations.yml +0 -23
  139. data/spec/fixtures/reserve_stat_has_users.yml +0 -23
  140. data/spec/fixtures/reserve_transitions.yml +0 -88
  141. data/spec/fixtures/reserves.yml +0 -162
  142. data/spec/fixtures/resource_import_files.yml +0 -44
  143. data/spec/fixtures/resource_import_results.yml +0 -29
  144. data/spec/fixtures/series_statements.yml +0 -45
  145. data/spec/fixtures/subscribes.yml +0 -45
  146. data/spec/fixtures/subscriptions.yml +0 -27
  147. data/spec/fixtures/use_restrictions.yml +0 -92
  148. data/spec/fixtures/user_checkout_stats.yml +0 -27
  149. data/spec/fixtures/user_group_has_checkout_types.yml +0 -110
@@ -1,23 +0,0 @@
1
- class AddCompletedAtToUserCheckoutStat < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :user_checkout_stats, :started_at, :datetime
4
- add_column :user_checkout_stats, :completed_at, :datetime
5
- add_column :user_reserve_stats, :started_at, :datetime
6
- add_column :user_reserve_stats, :completed_at, :datetime
7
- add_column :manifestation_checkout_stats, :started_at, :datetime
8
- add_column :manifestation_checkout_stats, :completed_at, :datetime
9
- add_column :manifestation_reserve_stats, :started_at, :datetime
10
- add_column :manifestation_reserve_stats, :completed_at, :datetime
11
- end
12
-
13
- def self.down
14
- remove_column :user_checkout_stats, :started_at
15
- remove_column :user_checkout_stats, :completed_at
16
- remove_column :user_reserve_stats, :started_at
17
- remove_column :user_reserve_stats, :completed_at
18
- remove_column :manifestation_checkout_stats, :started_at
19
- remove_column :manifestation_checkout_stats, :completed_at
20
- remove_column :manifestation_reserve_stats, :started_at
21
- remove_column :manifestation_reserve_stats, :completed_at
22
- end
23
- end
@@ -1,15 +0,0 @@
1
- class AddAttachmentsAttachmentToManifestation < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :manifestations, :attachment_file_name, :string
4
- add_column :manifestations, :attachment_content_type, :string
5
- add_column :manifestations, :attachment_file_size, :integer
6
- add_column :manifestations, :attachment_updated_at, :datetime
7
- end
8
-
9
- def self.down
10
- remove_column :manifestations, :attachment_file_name
11
- remove_column :manifestations, :attachment_content_type
12
- remove_column :manifestations, :attachment_file_size
13
- remove_column :manifestations, :attachment_updated_at
14
- end
15
- end
@@ -1,21 +0,0 @@
1
- class CreateLendingPolicies < ActiveRecord::Migration[4.2]
2
- def self.up
3
- create_table :lending_policies do |t|
4
- t.integer :item_id, null: false
5
- t.integer :user_group_id, null: false
6
- t.integer :loan_period, default: 0, null: false
7
- t.datetime :fixed_due_date
8
- t.integer :renewal, default: 0, null: false
9
- t.integer :fine, default: 0, null: false
10
- t.text :note
11
- t.integer :position
12
-
13
- t.timestamps
14
- end
15
- add_index :lending_policies, %i[item_id user_group_id], unique: true
16
- end
17
-
18
- def self.down
19
- drop_table :lending_policies
20
- end
21
- end
@@ -1,9 +0,0 @@
1
- class AddAllowBookmarkExternalUrlToLibraryGroup < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :library_groups, :allow_bookmark_external_url, :boolean, null: false, default: false
4
- end
5
-
6
- def self.down
7
- remove_column :library_groups, :allow_bookmark_external_url
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddExpireDateToReserve < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :reserves, :expire_date, :string
4
- end
5
-
6
- def self.down
7
- remove_column :reserves, :expire_date
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddCurrentCheckoutCountToUserGroupHasCheckoutType < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :user_group_has_checkout_types, :current_checkout_count, :integer
4
- end
5
-
6
- def self.down
7
- remove_column :user_group_has_checkout_types, :current_checkout_count
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddIssnToSeriesStatement < ActiveRecord::Migration[4.2]
2
- def self.up
3
- add_column :series_statements, :issn, :string
4
- end
5
-
6
- def self.down
7
- remove_column :series_statements, :issn
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class RemoveExpireDateFromReserve < ActiveRecord::Migration[4.2]
2
- def self.up
3
- remove_column :reserves, :expire_date
4
- end
5
-
6
- def self.down
7
- add_column :reserves, :expire_date, :string
8
- end
9
- end
@@ -1,6 +0,0 @@
1
- class AddPickupLocationToReserve < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :reserves, :pickup_location_id, :integer
4
- add_index :reserves, :pickup_location_id
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddSaveCheckoutHistoryToUser < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :users, :save_checkout_history, :boolean, default: false, null: false
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddCheckoutIcalendarTokenToUser < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :users, :checkout_icalendar_token, :string
4
- add_index :users, :checkout_icalendar_token, unique: true
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddShareBookmarksToUser < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :users, :share_bookmarks, :boolean
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddAttachmentMetaToManifestation < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :manifestations, :attachment_meta, :text
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddLibrarianIdToCheckedItem < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :checked_items, :librarian_id, :integer
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddDoiToManifestation < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :manifestations, :doi, :string
4
- add_index :manifestations, :doi
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddRetainedAtToReserve < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :reserves, :retained_at, :datetime
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddPostponedAtToReserve < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :reserves, :postponed_at, :datetime
4
- end
5
- end
@@ -1,8 +0,0 @@
1
- class AddCirculationStatusIdToItem < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :items, :circulation_status_id, :integer, default: 5, null: false
4
- add_column :items, :checkout_type_id, :integer, default: 1, null: false
5
- add_index :items, :circulation_status_id
6
- add_index :items, :checkout_type_id
7
- end
8
- end
@@ -1,5 +0,0 @@
1
- class AddLockVersionToReserve < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :reserves, :lock_version, :integer, default: 0, null: false
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddLockVersionToCheckin < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :checkins, :lock_version, :integer, default: 0, null: false
4
- end
5
- end
@@ -1,18 +0,0 @@
1
- class CreateReserveTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :reserve_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :reserve_id
12
- t.timestamps
13
- end
14
-
15
- add_index :reserve_transitions, :reserve_id
16
- add_index :reserve_transitions, %i[sort_key reserve_id], unique: true
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateBookmarkStatTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :bookmark_stat_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :bookmark_stat_id
12
- t.timestamps
13
- end
14
-
15
- add_index :bookmark_stat_transitions, :bookmark_stat_id
16
- add_index :bookmark_stat_transitions, %i[sort_key bookmark_stat_id], unique: true, name: "index_bookmark_stat_transitions_on_sort_key_and_stat_id"
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateUserCheckoutStatTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :user_checkout_stat_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :user_checkout_stat_id
12
- t.timestamps
13
- end
14
-
15
- add_index :user_checkout_stat_transitions, :user_checkout_stat_id
16
- add_index :user_checkout_stat_transitions, %i[sort_key user_checkout_stat_id], unique: true, name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id"
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateUserReserveStatTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :user_reserve_stat_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :user_reserve_stat_id
12
- t.timestamps
13
- end
14
-
15
- add_index :user_reserve_stat_transitions, :user_reserve_stat_id
16
- add_index :user_reserve_stat_transitions, %i[sort_key user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :manifestation_checkout_stat_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :manifestation_checkout_stat_id
12
- t.timestamps
13
- end
14
-
15
- add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id"
16
- add_index :manifestation_checkout_stat_transitions, %i[sort_key manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition"
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateManifestationReserveStatTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :manifestation_reserve_stat_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :manifestation_reserve_stat_id
12
- t.timestamps
13
- end
14
-
15
- add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: "index_manifestation_reserve_stat_transitions_on_stat_id"
16
- add_index :manifestation_reserve_stat_transitions, %i[sort_key manifestation_reserve_stat_id], unique: true, name: "index_manifestation_reserve_stat_transitions_on_transition"
17
- end
18
- end
@@ -1,18 +0,0 @@
1
- class CreateItemTransitions < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :item_transitions do |t|
4
- t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
10
- t.integer :sort_key
11
- t.integer :item_id
12
- t.timestamps
13
- end
14
-
15
- add_index :item_transitions, :item_id
16
- add_index :item_transitions, %i[sort_key item_id], unique: true
17
- end
18
- end
@@ -1,12 +0,0 @@
1
- class AddUserIdToUserCheckoutStat < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :user_checkout_stats, :user_id, :integer
4
- add_column :user_reserve_stats, :user_id, :integer
5
- add_column :manifestation_checkout_stats, :user_id, :integer
6
- add_column :manifestation_reserve_stats, :user_id, :integer
7
- add_index :user_checkout_stats, :user_id
8
- add_index :user_reserve_stats, :user_id
9
- add_index :manifestation_checkout_stats, :user_id
10
- add_index :manifestation_reserve_stats, :user_id
11
- end
12
- end
@@ -1,6 +0,0 @@
1
- class AddCheckoutIcalendarTokenToProfile < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :profiles, :checkout_icalendar_token, :string
4
- add_index :profiles, :checkout_icalendar_token, unique: true
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddSaveCheckoutHistoryToProfile < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :profiles, :save_checkout_history, :boolean, default: false, null: false
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddShareBookmarksToProfile < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :profiles, :share_bookmarks, :boolean
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddShelfIdToCheckout < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :checkouts, :shelf_id, :integer
4
- add_index :checkouts, :shelf_id
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- class AddLibraryIdToCheckout < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :checkouts, :library_id, :integer
4
- add_index :checkouts, :library_id
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- class CreateDemands < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :demands do |t|
4
- t.integer :user_id
5
- t.integer :item_id
6
- t.integer :message_id
7
-
8
- t.timestamps null: false
9
- end
10
- add_index :demands, :user_id
11
- add_index :demands, :item_id
12
- add_index :demands, :message_id
13
- end
14
- end
@@ -1,15 +0,0 @@
1
- class CreateIdentities < ActiveRecord::Migration[4.2]
2
- def change
3
- create_table :identities do |t|
4
- t.string :name
5
- t.string :email
6
- t.string :password_digest
7
- t.integer :profile_id
8
-
9
- t.timestamps null: false
10
- end
11
- add_index :identities, :name
12
- add_index :identities, :email
13
- add_index :identities, :profile_id
14
- end
15
- end
@@ -1,5 +0,0 @@
1
- class AddProviderToIdentity < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :identities, :provider, :string
4
- end
5
- end
@@ -1,9 +0,0 @@
1
- class AddMostRecentToReserveTransitions < ActiveRecord::Migration[4.2]
2
- def up
3
- add_column :reserve_transitions, :most_recent, :boolean, null: true
4
- end
5
-
6
- def down
7
- remove_column :reserve_transitions, :most_recent
8
- end
9
- end