enju_library 0.1.0.pre25 → 0.1.0.pre26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/baskets_controller.rb +109 -0
  3. data/app/views/baskets/edit.html.erb +30 -0
  4. data/app/views/baskets/index.html.erb +31 -0
  5. data/app/views/baskets/new.html.erb +29 -0
  6. data/app/views/baskets/show.html.erb +23 -0
  7. data/lib/enju_library/version.rb +1 -1
  8. data/spec/controllers/baskets_controller_spec.rb +379 -0
  9. data/spec/dummy/config/initializers/inflections.rb +3 -7
  10. data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
  11. data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
  12. data/spec/dummy/db/migrate/113_create_events.rb +23 -0
  13. data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
  14. data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
  15. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
  16. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
  17. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  18. data/spec/dummy/db/migrate/154_create_messages.rb +24 -0
  19. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +20 -0
  20. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +27 -0
  21. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
  22. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
  23. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
  24. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
  25. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
  26. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
  27. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
  28. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
  29. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
  30. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
  31. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +17 -0
  32. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
  33. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +15 -0
  34. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
  35. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
  36. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  37. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
  38. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
  39. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  40. data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +5 -0
  41. data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +5 -0
  42. data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +9 -0
  43. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
  44. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
  45. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
  46. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
  47. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
  48. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
  49. data/spec/dummy/db/schema.rb +393 -83
  50. data/spec/dummy/db/test.sqlite3 +0 -0
  51. data/spec/dummy/solr/conf/schema.xml +15 -2
  52. data/spec/dummy/solr/data/test/index/_2w.tis +0 -0
  53. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  54. data/spec/dummy/solr/data/test/index/{segments_18r → segments_6n} +0 -0
  55. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  56. data/spec/dummy/tmp/cache/assets/test/sprockets/169f4ead801f350c94685db6343b613a +0 -0
  57. data/spec/dummy/tmp/cache/assets/test/sprockets/254f2ef29215d4091bfe5949fe8f725f +0 -0
  58. data/spec/dummy/tmp/cache/assets/test/sprockets/5c6c9015e14271822fcfdcce5fca127d +0 -0
  59. data/spec/dummy/tmp/cache/assets/test/sprockets/82147708959cf940a0db9210985926fd +0 -0
  60. data/spec/dummy/tmp/cache/assets/test/sprockets/b216037296f015f88a15e209c81fe1d3 +0 -0
  61. data/spec/dummy/tmp/cache/assets/test/sprockets/bbe2834cdae4786a530e40e14f846805 +0 -0
  62. data/spec/dummy/tmp/cache/assets/test/sprockets/c60042eb39c8ef7a95f8926ca5648a9d +0 -0
  63. data/spec/dummy/tmp/cache/assets/test/sprockets/d005c609dd44fbca49a45a652887a53d +0 -0
  64. data/spec/fixtures/agent_types.yml +35 -0
  65. data/spec/fixtures/agents.yml +338 -0
  66. data/spec/fixtures/carrier_type_has_checkout_types.yml +31 -0
  67. data/spec/fixtures/checked_items.yml +35 -0
  68. data/spec/fixtures/checkins.yml +55 -0
  69. data/spec/fixtures/checkout_stat_has_manifestations.yml +24 -0
  70. data/spec/fixtures/checkout_stat_has_users.yml +24 -0
  71. data/spec/fixtures/circulation_statuses.yml +14 -0
  72. data/spec/fixtures/event_categories.yml +55 -0
  73. data/spec/fixtures/events.yml +142 -0
  74. data/spec/fixtures/exemplifies.yml +19 -11
  75. data/spec/fixtures/item_has_use_restrictions.yml +61 -0
  76. data/spec/fixtures/items.yml +80 -9
  77. data/spec/fixtures/lending_policies.yml +99 -0
  78. data/spec/fixtures/libraries.yml +27 -25
  79. data/spec/fixtures/library_groups.yml +20 -20
  80. data/spec/fixtures/manifestation_checkout_stats.yml +31 -0
  81. data/spec/fixtures/manifestation_reserve_stats.yml +31 -0
  82. data/spec/fixtures/manifestations.yml +2 -137
  83. data/spec/fixtures/message_requests.yml +30 -0
  84. data/spec/fixtures/message_templates.yml +84 -0
  85. data/spec/fixtures/request_status_types.yml +4 -4
  86. data/spec/fixtures/request_types.yml +4 -4
  87. data/spec/fixtures/reserve_stat_has_manifestations.yml +24 -0
  88. data/spec/fixtures/reserve_stat_has_users.yml +24 -0
  89. data/spec/fixtures/reserves.yml +179 -0
  90. data/spec/fixtures/shelves.yml +6 -7
  91. data/spec/fixtures/use_restrictions.yml +93 -0
  92. data/spec/fixtures/user_checkout_stats.yml +31 -0
  93. data/spec/fixtures/user_group_has_checkout_types.yml +111 -0
  94. data/spec/fixtures/user_reserve_stats.yml +31 -0
  95. data/spec/fixtures/users.yml +14 -37
  96. data/spec/routing/baskets_routing_spec.rb +35 -0
  97. metadata +173 -26
  98. data/spec/dummy/solr/data/test/index/_j7.tis +0 -0
  99. /data/spec/dummy/solr/data/test/index/{_j7.fdt → _2w.fdt} +0 -0
  100. /data/spec/dummy/solr/data/test/index/{_j7.fdx → _2w.fdx} +0 -0
  101. /data/spec/dummy/solr/data/test/index/{_j7.fnm → _2w.fnm} +0 -0
  102. /data/spec/dummy/solr/data/test/index/{_j7.frq → _2w.frq} +0 -0
  103. /data/spec/dummy/solr/data/test/index/{_j7.nrm → _2w.nrm} +0 -0
  104. /data/spec/dummy/solr/data/test/index/{_j7.prx → _2w.prx} +0 -0
  105. /data/spec/dummy/solr/data/test/index/{_j7.tii → _2w.tii} +0 -0
@@ -0,0 +1,23 @@
1
+ class CreateEvents < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :events do |t|
4
+ t.integer :library_id, :default => 1, :null => false
5
+ t.integer :event_category_id, :default => 1, :null => false
6
+ t.string :name
7
+ t.text :note
8
+ t.datetime :start_at
9
+ t.datetime :end_at
10
+ t.boolean :all_day, :default => false, :null => false
11
+ t.datetime :deleted_at
12
+ t.text :display_name
13
+
14
+ t.timestamps
15
+ end
16
+ add_index :events, :library_id
17
+ add_index :events, :event_category_id
18
+ end
19
+
20
+ def self.down
21
+ drop_table :events
22
+ end
23
+ end
@@ -0,0 +1,16 @@
1
+ class CreateEventCategories < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :event_categories do |t|
4
+ t.string :name, :null => false
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :event_categories
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ class CreateCheckedItems < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :checked_items do |t|
4
+ t.integer :item_id, :null => false
5
+ t.integer :basket_id, :null => false
6
+ t.datetime :due_date, :null => false
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :checked_items, :item_id
11
+ add_index :checked_items, :basket_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :checked_items
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ class CreateUseRestrictions < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :use_restrictions do |t|
4
+ t.string :name, :null => false
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :use_restrictions
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreateItemHasUseRestrictions < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :item_has_use_restrictions do |t|
4
+ t.integer :item_id, :null => false
5
+ t.integer :use_restriction_id, :null => false
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :item_has_use_restrictions, :item_id
10
+ add_index :item_has_use_restrictions, :use_restriction_id
11
+ end
12
+
13
+ def self.down
14
+ drop_table :item_has_use_restrictions
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMessageTemplates < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :message_templates do |t|
4
+ t.string :status, :null => false
5
+ t.text :title, :null => false
6
+ t.text :body, :null => false
7
+ t.integer :position
8
+ t.string :locale, :default => I18n.default_locale.to_s
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :message_templates, :status, :unique => true
13
+ end
14
+
15
+ def self.down
16
+ drop_table :message_templates
17
+ end
18
+ end
@@ -0,0 +1,24 @@
1
+ class CreateMessages < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :messages, :force => true do |t|
4
+ t.datetime :read_at
5
+ t.integer :receiver_id, :sender_id
6
+ t.string :subject, :null => false
7
+ t.text :body
8
+ t.integer :message_request_id
9
+ t.string :state
10
+ t.integer :parent_id
11
+
12
+ t.timestamps
13
+ end
14
+
15
+ add_index :messages, :sender_id
16
+ add_index :messages, :receiver_id
17
+ add_index :messages, :message_request_id
18
+ add_index :messages, :parent_id
19
+ end
20
+
21
+ def self.down
22
+ drop_table :messages
23
+ end
24
+ end
@@ -0,0 +1,20 @@
1
+ class CreateMessageRequests < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :message_requests do |t|
4
+ t.integer :sender_id
5
+ t.integer :receiver_id
6
+ t.integer :message_template_id
7
+ t.datetime :sent_at
8
+ t.datetime :deleted_at
9
+ t.text :body
10
+ t.string :state
11
+
12
+ t.timestamps
13
+ end
14
+ add_index :message_requests, :state
15
+ end
16
+
17
+ def self.down
18
+ drop_table :message_requests
19
+ end
20
+ end
@@ -0,0 +1,27 @@
1
+ class CreateEventImportFiles < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :event_import_files do |t|
4
+ t.integer :parent_id
5
+ t.string :content_type
6
+ t.integer :size
7
+ t.integer :user_id
8
+ t.text :note
9
+ t.datetime :imported_at
10
+ t.string :state
11
+ t.string :event_import_file_name
12
+ t.string :event_import_content_type
13
+ t.integer :event_import_file_size
14
+ t.datetime :event_import_updated_at
15
+ t.string :edit_mode
16
+
17
+ t.timestamps
18
+ end
19
+ add_index :event_import_files, :parent_id
20
+ add_index :event_import_files, :user_id
21
+ add_index :event_import_files, :state
22
+ end
23
+
24
+ def self.down
25
+ drop_table :event_import_files
26
+ end
27
+ end
@@ -0,0 +1,18 @@
1
+ class CreateCarrierTypeHasCheckoutTypes < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :carrier_type_has_checkout_types do |t|
4
+ t.integer :carrier_type_id, :null => false
5
+ t.integer :checkout_type_id, :null => false
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ add_index :carrier_type_has_checkout_types, :carrier_type_id, :name => 'index_carrier_type_has_checkout_types_on_m_form_id'
12
+ add_index :carrier_type_has_checkout_types, :checkout_type_id
13
+ end
14
+
15
+ def self.down
16
+ drop_table :carrier_type_has_checkout_types
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ class CreateCheckoutStatHasManifestations < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :checkout_stat_has_manifestations do |t|
4
+ t.integer :manifestation_checkout_stat_id, :null => false
5
+ t.integer :manifestation_id, :null => false
6
+ t.integer :checkouts_count
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :checkout_stat_has_manifestations, :manifestation_checkout_stat_id, :name => 'index_checkout_stat_has_manifestations_on_checkout_stat_id'
11
+ add_index :checkout_stat_has_manifestations, :manifestation_id, :name => 'index_checkout_stat_has_manifestations_on_manifestation_id'
12
+ end
13
+
14
+ def self.down
15
+ drop_table :checkout_stat_has_manifestations
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ class CreateManifestationCheckoutStats < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :manifestation_checkout_stats do |t|
4
+ t.datetime :start_date
5
+ t.datetime :end_date
6
+ t.text :note
7
+ t.string :state
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :manifestation_checkout_stats
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreateUserCheckoutStats < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :user_checkout_stats do |t|
4
+ t.datetime :start_date
5
+ t.datetime :end_date
6
+ t.text :note
7
+ t.string :state
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :user_checkout_stats
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ class CreateCheckoutStatHasUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :checkout_stat_has_users do |t|
4
+ t.integer :user_checkout_stat_id, :null => false
5
+ t.integer :user_id, :null => false
6
+ t.integer :checkouts_count, :default => 0, :null => false
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :checkout_stat_has_users, :user_checkout_stat_id
11
+ add_index :checkout_stat_has_users, :user_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :checkout_stat_has_users
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ class CreateReserveStatHasManifestations < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :reserve_stat_has_manifestations do |t|
4
+ t.integer :manifestation_reserve_stat_id, :null => false
5
+ t.integer :manifestation_id, :null => false
6
+ t.integer :reserves_count
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :reserve_stat_has_manifestations, :manifestation_reserve_stat_id, :name => 'index_reserve_stat_has_manifestations_on_m_reserve_stat_id'
11
+ add_index :reserve_stat_has_manifestations, :manifestation_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :reserve_stat_has_manifestations
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ class CreateManifestationReserveStats < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :manifestation_reserve_stats do |t|
4
+ t.datetime :start_date
5
+ t.datetime :end_date
6
+ t.text :note
7
+ t.string :state
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :manifestation_reserve_stats
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreateUserReserveStats < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :user_reserve_stats do |t|
4
+ t.datetime :start_date
5
+ t.datetime :end_date
6
+ t.text :note
7
+ t.string :state
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :user_reserve_stats
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ class CreateReserveStatHasUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :reserve_stat_has_users do |t|
4
+ t.integer :user_reserve_stat_id, :null => false
5
+ t.integer :user_id, :null => false
6
+ t.integer :reserves_count
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :reserve_stat_has_users, :user_reserve_stat_id
11
+ add_index :reserve_stat_has_users, :user_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :reserve_stat_has_users
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ class AddCompletedAtToUserCheckoutStat < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :user_checkout_stats, :started_at, :datetime
4
+ add_column :user_checkout_stats, :completed_at, :datetime
5
+ add_index :user_checkout_stats, :state
6
+ add_column :user_reserve_stats, :started_at, :datetime
7
+ add_column :user_reserve_stats, :completed_at, :datetime
8
+ add_index :user_reserve_stats, :state
9
+ add_column :manifestation_checkout_stats, :started_at, :datetime
10
+ add_column :manifestation_checkout_stats, :completed_at, :datetime
11
+ add_index :manifestation_checkout_stats, :state
12
+ add_column :manifestation_reserve_stats, :started_at, :datetime
13
+ add_column :manifestation_reserve_stats, :completed_at, :datetime
14
+ add_index :manifestation_reserve_stats, :state
15
+ end
16
+
17
+ def self.down
18
+ remove_column :user_checkout_stats, :started_at
19
+ remove_column :user_checkout_stats, :completed_at
20
+ remove_column :user_reserve_stats, :started_at
21
+ remove_column :user_reserve_stats, :completed_at
22
+ remove_column :manifestation_checkout_stats, :started_at
23
+ remove_column :manifestation_checkout_stats, :completed_at
24
+ remove_column :manifestation_reserve_stats, :started_at
25
+ remove_column :manifestation_reserve_stats, :completed_at
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ class CreateParticipates < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :participates do |t|
4
+ t.integer :agent_id, :null => false
5
+ t.integer :event_id, :null => false
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :participates, :event_id
11
+ add_index :participates, :agent_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :participates
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ class CreateLendingPolicies < ActiveRecord::Migration
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, [:item_id, :user_group_id], :unique => true
16
+ end
17
+
18
+ def self.down
19
+ drop_table :lending_policies
20
+ end
21
+ end
@@ -0,0 +1,15 @@
1
+ class CreateEventImportResults < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :event_import_results do |t|
4
+ t.integer :event_import_file_id
5
+ t.integer :event_id
6
+ t.text :body
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :event_import_results
14
+ end
15
+ end
@@ -0,0 +1,9 @@
1
+ class AddExpireDateToReserve < ActiveRecord::Migration
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
@@ -0,0 +1,9 @@
1
+ class RemoveExpireDateFromReserve < ActiveRecord::Migration
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
@@ -0,0 +1,11 @@
1
+ class AddLftAndRgtToMessage < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :messages, :lft, :integer
4
+ add_column :messages, :rgt, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :messages, :rgt
9
+ remove_column :messages, :lft
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddSaveCheckoutHistoryToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :save_checkout_history, :boolean, :default => false, :null => false
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddCheckoutIcalendarTokenToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :checkout_icalendar_token, :string
4
+ add_index :users, :checkout_icalendar_token, :unique => true
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddDepthToMessage < ActiveRecord::Migration
2
+ def change
3
+ add_column :messages, :depth, :integer
4
+
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddEventImportFingerprintToEventImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :event_import_files, :event_import_fingerprint, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToEventImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :event_import_files, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class RenameEventImportFileImportedAtToExecutedAt < ActiveRecord::Migration
2
+ def up
3
+ rename_column :event_import_files, :imported_at, :executed_at
4
+ end
5
+
6
+ def down
7
+ rename_column :event_import_files, :executed_at, :impored_at
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddLibrarianIdToCheckedItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :checked_items, :librarian_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddStateIndexToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_index :reserves, :state
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddRetainedAtToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :retained_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPostponedAtToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :postponed_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLockVersionToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :lock_version, :integer, :default => 0, :null => false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLockVersionToCheckin < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkins, :lock_version, :integer, :default => 0, :null => false
4
+ end
5
+ end