enju_leaf 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +38 -0
- data/Rakefile +9 -1
- data/app/assets/javascripts/enju_leaf.js +1 -1
- data/app/assets/javascripts/{enju.menu.js → menu.js} +0 -0
- data/app/assets/javascripts/mobile.js +2 -2
- data/app/assets/stylesheets/enju.css +2 -0
- data/app/views/page/opensearch.xml.builder +1 -0
- data/app/views/page/system_information.html.erb +7 -1
- data/lib/enju_leaf.rb +0 -1
- data/lib/enju_leaf/version.rb +1 -1
- data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +2 -19
- data/lib/generators/enju_leaf/seed/seed_generator.rb +29 -0
- data/lib/generators/enju_leaf/setup/setup_generator.rb +0 -1
- data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +9 -12
- data/lib/tasks/enju_leaf_tasks.rake +2 -1
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/db/schema.rb +0 -390
- metadata +323 -516
- data/README.rdoc +0 -30
- data/config/locales/en.yml +0 -214
- data/config/locales/ja.yml +0 -204
- data/lib/generators/enju_leaf/setup/templates/db/fixtures/roles.yml +0 -29
- data/lib/generators/enju_leaf/setup/templates/db/fixtures/user_groups.yml +0 -7
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/db/migrate/032_create_checkins.rb +0 -17
- data/spec/dummy/db/migrate/033_create_checkouts.rb +0 -25
- data/spec/dummy/db/migrate/035_create_reserves.rb +0 -26
- data/spec/dummy/db/migrate/055_create_bookmarks.rb +0 -22
- data/spec/dummy/db/migrate/121_create_checked_items.rb +0 -17
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +0 -16
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +0 -17
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +0 -25
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +0 -18
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +0 -17
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -13
- data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +0 -13
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +0 -17
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +0 -17
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +0 -17
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -23
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +0 -15
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +0 -9
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +0 -9
- data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +0 -9
- data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +0 -6
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
- data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +0 -5
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +0 -8
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +0 -5
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +0 -12
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +0 -6
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +0 -5
- data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +0 -5
- data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +0 -6
- data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +0 -6
- data/spec/dummy/db/migrate/20150106001709_create_demands.rb +0 -14
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -15
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
- data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +0 -11
- data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +0 -5
- data/spec/fixtures/agent_import_files.yml +0 -44
- data/spec/fixtures/agent_import_results.yml +0 -26
- data/spec/fixtures/agent_relationship_types.yml +0 -34
- data/spec/fixtures/agent_relationships.yml +0 -25
- data/spec/fixtures/agent_types.yml +0 -35
- data/spec/fixtures/agents.yml +0 -326
- data/spec/fixtures/baskets.yml +0 -80
- data/spec/fixtures/carrier_type_has_checkout_types.yml +0 -30
- data/spec/fixtures/checked_items.yml +0 -34
- data/spec/fixtures/checkins.yml +0 -54
- data/spec/fixtures/checkout_stat_has_manifestations.yml +0 -23
- data/spec/fixtures/checkout_stat_has_users.yml +0 -23
- data/spec/fixtures/checkout_types.yml +0 -33
- data/spec/fixtures/checkouts.yml +0 -162
- data/spec/fixtures/circulation_statuses.yml +0 -119
- data/spec/fixtures/create_types.yml +0 -47
- data/spec/fixtures/creates.yml +0 -66
- data/spec/fixtures/donates.yml +0 -31
- data/spec/fixtures/event_categories.yml +0 -55
- data/spec/fixtures/events.yml +0 -116
- data/spec/fixtures/exemplifies.yml +0 -168
- data/spec/fixtures/import_requests.yml +0 -25
- data/spec/fixtures/item_has_use_restrictions.yml +0 -60
- data/spec/fixtures/items.yml +0 -303
- data/spec/fixtures/lending_policies.yml +0 -98
- data/spec/fixtures/licenses.yml +0 -29
- data/spec/fixtures/manifestation_checkout_stats.yml +0 -27
- data/spec/fixtures/manifestation_relationship_types.yml +0 -29
- data/spec/fixtures/manifestation_relationships.yml +0 -30
- data/spec/fixtures/manifestation_reserve_stats.yml +0 -27
- data/spec/fixtures/medium_of_performances.yml +0 -29
- data/spec/fixtures/message_requests.yml +0 -27
- data/spec/fixtures/message_templates.yml +0 -105
- data/spec/fixtures/owns.yml +0 -27
- data/spec/fixtures/picture_files.yml +0 -64
- data/spec/fixtures/produce_types.yml +0 -31
- data/spec/fixtures/produces.yml +0 -150
- data/spec/fixtures/realize_types.yml +0 -39
- data/spec/fixtures/realizes.yml +0 -87
- data/spec/fixtures/request_status_types.yml +0 -63
- data/spec/fixtures/request_types.yml +0 -55
- data/spec/fixtures/reserve_stat_has_manifestations.yml +0 -23
- data/spec/fixtures/reserve_stat_has_users.yml +0 -23
- data/spec/fixtures/reserve_transitions.yml +0 -88
- data/spec/fixtures/reserves.yml +0 -162
- data/spec/fixtures/resource_import_files.yml +0 -44
- data/spec/fixtures/resource_import_results.yml +0 -29
- data/spec/fixtures/series_statements.yml +0 -45
- data/spec/fixtures/subscribes.yml +0 -45
- data/spec/fixtures/subscriptions.yml +0 -27
- data/spec/fixtures/use_restrictions.yml +0 -92
- data/spec/fixtures/user_checkout_stats.yml +0 -27
- data/spec/fixtures/user_group_has_checkout_types.yml +0 -110
@@ -1,29 +0,0 @@
|
|
1
|
-
---
|
2
|
-
role_00001:
|
3
|
-
name: Guest
|
4
|
-
display_name: Guest
|
5
|
-
id: 1
|
6
|
-
position: 1
|
7
|
-
score: 1
|
8
|
-
note:
|
9
|
-
role_00002:
|
10
|
-
name: User
|
11
|
-
display_name: User
|
12
|
-
id: 2
|
13
|
-
position: 2
|
14
|
-
score: 2
|
15
|
-
note:
|
16
|
-
role_00003:
|
17
|
-
name: Librarian
|
18
|
-
display_name: Librarian
|
19
|
-
id: 3
|
20
|
-
position: 3
|
21
|
-
score: 3
|
22
|
-
note:
|
23
|
-
role_00004:
|
24
|
-
name: Administrator
|
25
|
-
display_name: Administrator
|
26
|
-
id: 4
|
27
|
-
position: 4
|
28
|
-
score: 4
|
29
|
-
note:
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCheckins < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :checkins do |t|
|
4
|
-
t.integer :item_id, null: false
|
5
|
-
t.integer :librarian_id
|
6
|
-
t.integer :basket_id
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :checkins, :item_id
|
10
|
-
add_index :checkins, :librarian_id
|
11
|
-
add_index :checkins, :basket_id
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :checkins
|
16
|
-
end
|
17
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
class CreateCheckouts < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :checkouts do |t|
|
4
|
-
t.integer :user_id
|
5
|
-
t.integer :item_id, null: false
|
6
|
-
t.integer :checkin_id
|
7
|
-
t.integer :librarian_id
|
8
|
-
t.integer :basket_id
|
9
|
-
t.datetime :due_date
|
10
|
-
t.integer :checkout_renewal_count, default: 0, null: false
|
11
|
-
t.integer :lock_version, default: 0, null: false
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
add_index :checkouts, :user_id
|
15
|
-
add_index :checkouts, :item_id
|
16
|
-
add_index :checkouts, :basket_id
|
17
|
-
add_index :checkouts, %i[item_id basket_id], unique: true
|
18
|
-
add_index :checkouts, :librarian_id
|
19
|
-
add_index :checkouts, :checkin_id
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.down
|
23
|
-
drop_table :checkouts
|
24
|
-
end
|
25
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
class CreateReserves < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :reserves do |t|
|
4
|
-
t.integer :user_id, null: false
|
5
|
-
t.integer :manifestation_id, null: false
|
6
|
-
t.integer :item_id
|
7
|
-
t.integer :request_status_type_id, null: false
|
8
|
-
t.datetime :checked_out_at
|
9
|
-
t.timestamps
|
10
|
-
t.datetime :canceled_at
|
11
|
-
t.datetime :expired_at
|
12
|
-
t.datetime :deleted_at
|
13
|
-
t.boolean :expiration_notice_to_patron, default: false
|
14
|
-
t.boolean :expiration_notice_to_library, default: false
|
15
|
-
end
|
16
|
-
|
17
|
-
add_index :reserves, :user_id
|
18
|
-
add_index :reserves, :manifestation_id
|
19
|
-
add_index :reserves, :item_id
|
20
|
-
add_index :reserves, :request_status_type_id
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.down
|
24
|
-
drop_table :reserves
|
25
|
-
end
|
26
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class CreateBookmarks < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :bookmarks, force: true do |t|
|
4
|
-
t.integer :user_id, null: false
|
5
|
-
t.integer :manifestation_id
|
6
|
-
t.text :title
|
7
|
-
t.string :url
|
8
|
-
t.text :note
|
9
|
-
t.boolean :shared
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
add_index :bookmarks, :user_id
|
15
|
-
add_index :bookmarks, :manifestation_id
|
16
|
-
add_index :bookmarks, :url
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.down
|
20
|
-
drop_table :bookmarks
|
21
|
-
end
|
22
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCheckedItems < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateItemHasUseRestrictions < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCheckoutTypes < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :checkout_types 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
|
-
add_index :checkout_types, :name
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :checkout_types
|
16
|
-
end
|
17
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
class CreateUserGroupHasCheckoutTypes < ActiveRecord::Migration[4.2]
|
2
|
-
def self.up
|
3
|
-
create_table :user_group_has_checkout_types do |t|
|
4
|
-
t.integer :user_group_id, null: false
|
5
|
-
t.integer :checkout_type_id, null: false
|
6
|
-
t.integer :checkout_limit, default: 0, null: false
|
7
|
-
t.integer :checkout_period, default: 0, null: false
|
8
|
-
t.integer :checkout_renewal_limit, default: 0, null: false
|
9
|
-
t.integer :reservation_limit, default: 0, null: false
|
10
|
-
t.integer :reservation_expired_period, default: 7, null: false
|
11
|
-
t.boolean :set_due_date_before_closing_day, default: false, null: false
|
12
|
-
t.datetime :fixed_due_date
|
13
|
-
t.text :note
|
14
|
-
t.integer :position
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
18
|
-
add_index :user_group_has_checkout_types, :user_group_id
|
19
|
-
add_index :user_group_has_checkout_types, :checkout_type_id
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.down
|
23
|
-
drop_table :user_group_has_checkout_types
|
24
|
-
end
|
25
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateCarrierTypeHasCheckoutTypes < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCheckoutStatHasManifestations < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateManifestationCheckoutStats < ActiveRecord::Migration[4.2]
|
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
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :manifestation_checkout_stats
|
14
|
-
end
|
15
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class CreateBookmarkStats < ActiveRecord::Migration[4.2]
|
2
|
-
def change
|
3
|
-
create_table :bookmark_stats do |t|
|
4
|
-
t.datetime :start_date
|
5
|
-
t.datetime :end_date
|
6
|
-
t.datetime :started_at
|
7
|
-
t.datetime :completed_at
|
8
|
-
t.text :note
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class CreateBookmarkStatHasManifestations < ActiveRecord::Migration[4.2]
|
2
|
-
def change
|
3
|
-
create_table :bookmark_stat_has_manifestations do |t|
|
4
|
-
t.integer :bookmark_stat_id, null: false
|
5
|
-
t.integer :manifestation_id, null: false
|
6
|
-
t.integer :bookmarks_count
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_index :bookmark_stat_has_manifestations, :bookmark_stat_id
|
11
|
-
add_index :bookmark_stat_has_manifestations, :manifestation_id
|
12
|
-
end
|
13
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateUserCheckoutStats < ActiveRecord::Migration[4.2]
|
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
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :user_checkout_stats
|
14
|
-
end
|
15
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateCheckoutStatHasUsers < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateReserveStatHasManifestations < ActiveRecord::Migration[4.2]
|
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
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateManifestationReserveStats < ActiveRecord::Migration[4.2]
|
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
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :manifestation_reserve_stats
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateUserReserveStats < ActiveRecord::Migration[4.2]
|
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
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :user_reserve_stats
|
14
|
-
end
|
15
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateReserveStatHasUsers < ActiveRecord::Migration[4.2]
|
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
|
@@ -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
|