enju_inter_library_loan 0.1.0.pre9 → 0.1.0.pre10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/inter_library_loan.rb +33 -51
- data/app/models/inter_library_loan_state_machine.rb +32 -0
- data/app/models/inter_library_loan_transition.rb +20 -0
- data/db/migrate/148_create_inter_library_loans.rb +0 -1
- data/db/migrate/20140607100507_create_inter_library_loan_transitions.rb +14 -0
- data/lib/enju_inter_library_loan/engine.rb +2 -2
- data/lib/enju_inter_library_loan/version.rb +1 -1
- data/spec/dummy/app/models/user.rb +3 -17
- data/spec/dummy/config/initializers/statesman.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -3
- data/spec/dummy/db/migrate/{20111201155513_add_devise_to_users.rb → 002_devise_create_users.rb} +18 -16
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
- data/spec/dummy/db/migrate/006_create_items.rb +0 -3
- data/spec/dummy/db/migrate/035_create_reserves.rb +1 -2
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +3 -7
- data/spec/dummy/db/migrate/080_create_library_groups.rb +0 -1
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -2
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +16 -0
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +12 -0
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +305 -362
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/user.rb +21 -6
- data/spec/fixtures/agents.yml +0 -12
- data/spec/fixtures/inter_library_loan_transitions.yml +48 -0
- data/spec/fixtures/inter_library_loans.yml +0 -8
- data/spec/fixtures/library_groups.yml +0 -2
- data/spec/fixtures/users.yml +3 -21
- data/spec/models/inter_library_loan_spec.rb +0 -2
- data/spec/spec_helper.rb +5 -0
- metadata +146 -97
- data/spec/dummy/db/migrate/029_create_subjects.rb +0 -27
- data/spec/dummy/db/migrate/055_create_bookmarks.rb +0 -22
- data/spec/dummy/db/migrate/113_create_events.rb +0 -23
- data/spec/dummy/db/migrate/114_create_event_categories.rb +0 -16
- data/spec/dummy/db/migrate/142_create_classifications.rb +0 -19
- data/spec/dummy/db/migrate/144_create_classification_types.rb +0 -16
- data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +0 -16
- data/spec/dummy/db/migrate/146_create_subject_types.rb +0 -16
- data/spec/dummy/db/migrate/149_create_message_templates.rb +0 -18
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -24
- data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +0 -18
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -20
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +0 -27
- data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +0 -18
- data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +0 -17
- data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -16
- data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +0 -13
- data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +0 -16
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +0 -17
- data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +0 -15
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +0 -30
- data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +0 -15
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
- data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +0 -11
- data/spec/dummy/db/migrate/20111201121844_create_roles.rb +0 -12
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -16
- data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20120105101944_add_queue_to_delayed_jobs.rb +0 -9
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -6
- data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +0 -5
- data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +0 -6
- data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +0 -6
- data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +0 -5
@@ -1,27 +0,0 @@
|
|
1
|
-
class CreateSubjects < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :subjects do |t|
|
4
|
-
t.integer :parent_id
|
5
|
-
t.integer :use_term_id
|
6
|
-
t.string :term
|
7
|
-
t.text :term_transcription
|
8
|
-
t.integer :subject_type_id, :null => false
|
9
|
-
t.text :scope_note
|
10
|
-
t.text :note
|
11
|
-
t.integer :required_role_id, :default => 1, :null => false
|
12
|
-
t.integer :lock_version, :default => 0, :null => false
|
13
|
-
t.datetime :created_at
|
14
|
-
t.datetime :updated_at
|
15
|
-
t.datetime :deleted_at
|
16
|
-
end
|
17
|
-
add_index :subjects, :term
|
18
|
-
add_index :subjects, :parent_id
|
19
|
-
add_index :subjects, :use_term_id
|
20
|
-
add_index :subjects, :subject_type_id
|
21
|
-
add_index :subjects, :required_role_id
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.down
|
25
|
-
drop_table :subjects
|
26
|
-
end
|
27
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class CreateBookmarks < ActiveRecord::Migration
|
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,23 +0,0 @@
|
|
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
|
@@ -1,16 +0,0 @@
|
|
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
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class CreateClassifications < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :classifications do |t|
|
4
|
-
t.integer :parent_id
|
5
|
-
t.string :category, :null => false
|
6
|
-
t.text :note
|
7
|
-
t.integer :classification_type_id, :null => false
|
8
|
-
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :classifications, :parent_id
|
12
|
-
add_index :classifications, :category
|
13
|
-
add_index :classifications, :classification_type_id
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.down
|
17
|
-
drop_table :classifications
|
18
|
-
end
|
19
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateClassificationTypes < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :classification_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
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :classification_types
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateSubjectHeadingTypes < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :subject_heading_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
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :subject_heading_types
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateSubjectTypes < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :subject_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
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :subject_types
|
15
|
-
end
|
16
|
-
end
|
@@ -1,18 +0,0 @@
|
|
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
|
@@ -1,24 +0,0 @@
|
|
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
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateWorkHasSubjects < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :work_has_subjects do |t|
|
4
|
-
t.references :subject, :polymorphic => true
|
5
|
-
#t.references :subjectable, :polymorphic => true
|
6
|
-
t.integer :work_id #, :null => false
|
7
|
-
t.integer :position
|
8
|
-
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :work_has_subjects, :subject_id
|
12
|
-
add_index :work_has_subjects, :work_id
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.down
|
16
|
-
drop_table :work_has_subjects
|
17
|
-
end
|
18
|
-
end
|
@@ -1,20 +0,0 @@
|
|
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
|
@@ -1,27 +0,0 @@
|
|
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
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateInventoryFiles < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :inventory_files do |t|
|
4
|
-
t.string :filename
|
5
|
-
t.string :content_type
|
6
|
-
t.integer :size
|
7
|
-
t.integer :user_id
|
8
|
-
t.text :note
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
add_index :inventory_files, :user_id
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.down
|
16
|
-
drop_table :inventory_files
|
17
|
-
end
|
18
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateInventories < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :inventories do |t|
|
4
|
-
t.integer :item_id
|
5
|
-
t.integer :inventory_file_id
|
6
|
-
t.text :note
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_index :inventories, :item_id
|
11
|
-
add_index :inventories, :inventory_file_id
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :inventories
|
16
|
-
end
|
17
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class CreateBookmarkStats < ActiveRecord::Migration
|
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
|
-
t.string :state
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
add_index :bookmark_stats, :state
|
15
|
-
end
|
16
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class CreateBookmarkStatHasManifestations < ActiveRecord::Migration
|
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,16 +0,0 @@
|
|
1
|
-
class CreateSubjectHeadingTypeHasSubjects < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :subject_heading_type_has_subjects do |t|
|
4
|
-
t.integer :subject_id, :null => false
|
5
|
-
t.string :subject_type
|
6
|
-
t.integer :subject_heading_type_id, :null => false
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_index :subject_heading_type_has_subjects, :subject_id
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :subject_heading_type_has_subjects
|
15
|
-
end
|
16
|
-
end
|
@@ -1,17 +0,0 @@
|
|
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
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class AddAttachmentsInventoryToInventoryFile < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :inventory_files, :inventory_file_name, :string
|
4
|
-
add_column :inventory_files, :inventory_content_type, :string
|
5
|
-
add_column :inventory_files, :inventory_file_size, :integer
|
6
|
-
add_column :inventory_files, :inventory_updated_at, :datetime
|
7
|
-
end
|
8
|
-
|
9
|
-
def self.down
|
10
|
-
remove_column :inventory_files, :inventory_file_name
|
11
|
-
remove_column :inventory_files, :inventory_content_type
|
12
|
-
remove_column :inventory_files, :inventory_file_size
|
13
|
-
remove_column :inventory_files, :inventory_updated_at
|
14
|
-
end
|
15
|
-
end
|
data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
class AddAllowBookmarkExternalUrlToLibraryGroup < ActiveRecord::Migration
|
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,30 +0,0 @@
|
|
1
|
-
class ActsAsTaggableOnMigration < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :tags do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :name_transcription
|
6
|
-
t.timestamps
|
7
|
-
end
|
8
|
-
|
9
|
-
create_table :taggings do |t|
|
10
|
-
t.references :tag
|
11
|
-
|
12
|
-
# You should make sure that the column created is
|
13
|
-
# long enough to store the required class names.
|
14
|
-
t.references :taggable, :polymorphic => true
|
15
|
-
t.references :tagger, :polymorphic => true
|
16
|
-
|
17
|
-
t.string :context
|
18
|
-
|
19
|
-
t.datetime :created_at
|
20
|
-
end
|
21
|
-
|
22
|
-
add_index :taggings, :tag_id
|
23
|
-
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.down
|
27
|
-
drop_table :taggings
|
28
|
-
drop_table :tags
|
29
|
-
end
|
30
|
-
end
|