enju_inventory 0.1.11.pre9 → 0.1.11.pre10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/inventories_controller.rb +73 -3
- data/app/views/inventories/edit.html.erb +2 -2
- data/app/views/inventories/index.html.erb +2 -2
- data/app/views/inventories/new.html.erb +2 -2
- data/app/views/inventories/show.html.erb +2 -2
- data/app/views/inventory_files/edit.html.erb +2 -2
- data/app/views/inventory_files/index.html.erb +3 -3
- data/app/views/inventory_files/new.html.erb +2 -2
- data/app/views/inventory_files/show.html.erb +3 -3
- data/lib/enju_inventory/engine.rb +1 -2
- data/lib/enju_inventory/version.rb +1 -1
- data/spec/controllers/inventories_controller_spec.rb +40 -37
- data/spec/controllers/inventory_files_controller_spec.rb +56 -62
- data/spec/dummy/app/models/user.rb +5 -25
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +50 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +46 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +44 -0
- data/spec/dummy/db/migrate/006_create_items.rb +1 -12
- data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
- data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +0 -1
- data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +12 -0
- 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/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +14 -0
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -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/20100606073747_create_agent_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/{20111201121844_create_roles.rb → 20111124110059_create_create_types.rb} +2 -2
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -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/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.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/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/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/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 +860 -28
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/inventory_files/inventories/000/000/001/original/inventory_file_sample.tsv +7 -0
- data/spec/factories/user.rb +6 -0
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/library_groups.yml +15 -18
- data/spec/fixtures/profiles.yml +98 -0
- data/spec/fixtures/users.yml +3 -21
- data/spec/models/inventory_file_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -1
- metadata +297 -36
- data/app/models/setting.rb +0 -4
- data/spec/dummy/app/models/ability.rb +0 -20
- data/spec/dummy/app/views/page/403.html.erb +0 -9
- data/spec/dummy/app/views/page/403.mobile.erb +0 -5
- data/spec/dummy/app/views/page/403.xml.erb +0 -4
- data/spec/dummy/app/views/page/404.html.erb +0 -9
- data/spec/dummy/app/views/page/404.mobile.erb +0 -5
- data/spec/dummy/app/views/page/404.xml.erb +0 -4
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -13
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -52
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateResourceImportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :resource_import_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :resource_import_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
|
12
|
+
add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateImportRequestTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :import_request_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :import_request_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :import_request_transitions, :import_request_id
|
12
|
+
add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateAgentImportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_import_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :agent_import_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :agent_import_file_transitions, :agent_import_file_id
|
12
|
+
add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_import_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateUserImportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :user_import_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :user_import_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :user_import_file_transitions, :user_import_file_id
|
12
|
+
add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateResourceExportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :resource_export_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :resource_export_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :resource_export_file_transitions, :resource_export_file_id, name: "index_resource_export_file_transitions_on_file_id"
|
12
|
+
add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name: "index_resource_export_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateUserExportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :user_export_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :user_export_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :user_export_file_transitions, :user_export_file_id, name: "index_user_export_file_transitions_on_file_id"
|
12
|
+
add_index :user_export_file_transitions, [:sort_key, :user_export_file_id], unique: true, name: "index_user_export_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddBindingItemIdentifierToItem < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :items, :binding_item_identifier, :string
|
4
|
+
add_column :items, :binding_call_number, :string
|
5
|
+
add_column :items, :binded_at, :datetime
|
6
|
+
add_index :items, :binding_item_identifier
|
7
|
+
end
|
8
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,325 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20140813182425) do
|
15
|
+
|
16
|
+
create_table "accepts", :force => true do |t|
|
17
|
+
t.integer "basket_id"
|
18
|
+
t.integer "item_id"
|
19
|
+
t.integer "librarian_id"
|
20
|
+
t.datetime "created_at", :null => false
|
21
|
+
t.datetime "updated_at", :null => false
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
|
25
|
+
add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
|
26
|
+
|
27
|
+
create_table "agent_import_file_transitions", :force => true do |t|
|
28
|
+
t.string "to_state"
|
29
|
+
t.text "metadata", :default => "{}"
|
30
|
+
t.integer "sort_key"
|
31
|
+
t.integer "agent_import_file_id"
|
32
|
+
t.datetime "created_at", :null => false
|
33
|
+
t.datetime "updated_at", :null => false
|
34
|
+
end
|
35
|
+
|
36
|
+
add_index "agent_import_file_transitions", ["agent_import_file_id"], :name => "index_agent_import_file_transitions_on_agent_import_file_id"
|
37
|
+
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], :name => "index_agent_import_file_transitions_on_sort_key_and_file_id", :unique => true
|
38
|
+
|
39
|
+
create_table "agent_import_files", :force => true do |t|
|
40
|
+
t.integer "parent_id"
|
41
|
+
t.string "content_type"
|
42
|
+
t.integer "size"
|
43
|
+
t.integer "user_id"
|
44
|
+
t.text "note"
|
45
|
+
t.datetime "executed_at"
|
46
|
+
t.string "agent_import_file_name"
|
47
|
+
t.string "agent_import_content_type"
|
48
|
+
t.integer "agent_import_file_size"
|
49
|
+
t.datetime "agent_import_updated_at"
|
50
|
+
t.datetime "created_at", :null => false
|
51
|
+
t.datetime "updated_at", :null => false
|
52
|
+
t.string "agent_import_fingerprint"
|
53
|
+
t.text "error_message"
|
54
|
+
t.string "edit_mode"
|
55
|
+
t.string "user_encoding"
|
56
|
+
end
|
57
|
+
|
58
|
+
add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
|
59
|
+
add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
|
60
|
+
|
61
|
+
create_table "agent_import_results", :force => true do |t|
|
62
|
+
t.integer "agent_import_file_id"
|
63
|
+
t.integer "agent_id"
|
64
|
+
t.text "body"
|
65
|
+
t.datetime "created_at", :null => false
|
66
|
+
t.datetime "updated_at", :null => false
|
67
|
+
end
|
68
|
+
|
69
|
+
create_table "agent_relationship_types", :force => true do |t|
|
70
|
+
t.string "name", :null => false
|
71
|
+
t.text "display_name"
|
72
|
+
t.text "note"
|
73
|
+
t.integer "position"
|
74
|
+
t.datetime "created_at", :null => false
|
75
|
+
t.datetime "updated_at", :null => false
|
76
|
+
end
|
77
|
+
|
78
|
+
create_table "agent_relationships", :force => true do |t|
|
79
|
+
t.integer "parent_id"
|
80
|
+
t.integer "child_id"
|
81
|
+
t.integer "agent_relationship_type_id"
|
82
|
+
t.datetime "created_at", :null => false
|
83
|
+
t.datetime "updated_at", :null => false
|
84
|
+
t.integer "position"
|
85
|
+
end
|
86
|
+
|
87
|
+
add_index "agent_relationships", ["child_id"], :name => "index_agent_relationships_on_child_id"
|
88
|
+
add_index "agent_relationships", ["parent_id"], :name => "index_agent_relationships_on_parent_id"
|
89
|
+
|
90
|
+
create_table "agent_types", :force => true do |t|
|
91
|
+
t.string "name", :null => false
|
92
|
+
t.text "display_name"
|
93
|
+
t.text "note"
|
94
|
+
t.integer "position"
|
95
|
+
t.datetime "created_at", :null => false
|
96
|
+
t.datetime "updated_at", :null => false
|
97
|
+
end
|
98
|
+
|
99
|
+
create_table "agents", :force => true do |t|
|
100
|
+
t.string "last_name"
|
101
|
+
t.string "middle_name"
|
102
|
+
t.string "first_name"
|
103
|
+
t.string "last_name_transcription"
|
104
|
+
t.string "middle_name_transcription"
|
105
|
+
t.string "first_name_transcription"
|
106
|
+
t.string "corporate_name"
|
107
|
+
t.string "corporate_name_transcription"
|
108
|
+
t.string "full_name"
|
109
|
+
t.text "full_name_transcription"
|
110
|
+
t.text "full_name_alternative"
|
111
|
+
t.datetime "created_at", :null => false
|
112
|
+
t.datetime "updated_at", :null => false
|
113
|
+
t.datetime "deleted_at"
|
114
|
+
t.string "zip_code_1"
|
115
|
+
t.string "zip_code_2"
|
116
|
+
t.text "address_1"
|
117
|
+
t.text "address_2"
|
118
|
+
t.text "address_1_note"
|
119
|
+
t.text "address_2_note"
|
120
|
+
t.string "telephone_number_1"
|
121
|
+
t.string "telephone_number_2"
|
122
|
+
t.string "fax_number_1"
|
123
|
+
t.string "fax_number_2"
|
124
|
+
t.text "other_designation"
|
125
|
+
t.text "place"
|
126
|
+
t.string "postal_code"
|
127
|
+
t.text "street"
|
128
|
+
t.text "locality"
|
129
|
+
t.text "region"
|
130
|
+
t.datetime "date_of_birth"
|
131
|
+
t.datetime "date_of_death"
|
132
|
+
t.integer "language_id", :default => 1, :null => false
|
133
|
+
t.integer "country_id", :default => 1, :null => false
|
134
|
+
t.integer "agent_type_id", :default => 1, :null => false
|
135
|
+
t.integer "lock_version", :default => 0, :null => false
|
136
|
+
t.text "note"
|
137
|
+
t.integer "required_role_id", :default => 1, :null => false
|
138
|
+
t.integer "required_score", :default => 0, :null => false
|
139
|
+
t.text "email"
|
140
|
+
t.text "url"
|
141
|
+
t.text "full_name_alternative_transcription"
|
142
|
+
t.string "birth_date"
|
143
|
+
t.string "death_date"
|
144
|
+
t.string "agent_identifier"
|
145
|
+
end
|
146
|
+
|
147
|
+
add_index "agents", ["agent_identifier"], :name => "index_agents_on_agent_identifier"
|
148
|
+
add_index "agents", ["country_id"], :name => "index_agents_on_country_id"
|
149
|
+
add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
|
150
|
+
add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
|
151
|
+
add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
|
152
|
+
|
153
|
+
create_table "baskets", :force => true do |t|
|
154
|
+
t.integer "user_id"
|
155
|
+
t.text "note"
|
156
|
+
t.integer "lock_version", :default => 0, :null => false
|
157
|
+
t.datetime "created_at", :null => false
|
158
|
+
t.datetime "updated_at", :null => false
|
159
|
+
end
|
160
|
+
|
161
|
+
add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
|
162
|
+
|
163
|
+
create_table "bookstores", :force => true do |t|
|
164
|
+
t.text "name", :null => false
|
165
|
+
t.string "zip_code"
|
166
|
+
t.text "address"
|
167
|
+
t.text "note"
|
168
|
+
t.string "telephone_number"
|
169
|
+
t.string "fax_number"
|
170
|
+
t.string "url"
|
171
|
+
t.integer "position"
|
172
|
+
t.datetime "deleted_at"
|
173
|
+
t.datetime "created_at", :null => false
|
174
|
+
t.datetime "updated_at", :null => false
|
175
|
+
end
|
176
|
+
|
177
|
+
create_table "budget_types", :force => true do |t|
|
178
|
+
t.string "name"
|
179
|
+
t.text "display_name"
|
180
|
+
t.text "note"
|
181
|
+
t.integer "position"
|
182
|
+
t.datetime "created_at", :null => false
|
183
|
+
t.datetime "updated_at", :null => false
|
184
|
+
end
|
185
|
+
|
186
|
+
create_table "carrier_types", :force => true do |t|
|
187
|
+
t.string "name", :null => false
|
188
|
+
t.text "display_name"
|
189
|
+
t.text "note"
|
190
|
+
t.integer "position"
|
191
|
+
t.datetime "created_at", :null => false
|
192
|
+
t.datetime "updated_at", :null => false
|
193
|
+
end
|
194
|
+
|
195
|
+
create_table "content_types", :force => true do |t|
|
196
|
+
t.string "name", :null => false
|
197
|
+
t.text "display_name"
|
198
|
+
t.text "note"
|
199
|
+
t.integer "position"
|
200
|
+
t.datetime "created_at", :null => false
|
201
|
+
t.datetime "updated_at", :null => false
|
202
|
+
end
|
203
|
+
|
204
|
+
create_table "countries", :force => true do |t|
|
205
|
+
t.string "name", :null => false
|
206
|
+
t.text "display_name"
|
207
|
+
t.string "alpha_2"
|
208
|
+
t.string "alpha_3"
|
209
|
+
t.string "numeric_3"
|
210
|
+
t.text "note"
|
211
|
+
t.integer "position"
|
212
|
+
end
|
213
|
+
|
214
|
+
add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
|
215
|
+
add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
|
216
|
+
add_index "countries", ["name"], :name => "index_countries_on_name"
|
217
|
+
add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
|
218
|
+
|
219
|
+
create_table "create_types", :force => true do |t|
|
220
|
+
t.string "name"
|
221
|
+
t.text "display_name"
|
222
|
+
t.text "note"
|
223
|
+
t.integer "position"
|
224
|
+
t.datetime "created_at", :null => false
|
225
|
+
t.datetime "updated_at", :null => false
|
226
|
+
end
|
227
|
+
|
228
|
+
create_table "creates", :force => true do |t|
|
229
|
+
t.integer "agent_id", :null => false
|
230
|
+
t.integer "work_id", :null => false
|
231
|
+
t.integer "position"
|
232
|
+
t.datetime "created_at", :null => false
|
233
|
+
t.datetime "updated_at", :null => false
|
234
|
+
t.integer "create_type_id"
|
235
|
+
end
|
236
|
+
|
237
|
+
add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
|
238
|
+
add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
|
239
|
+
|
240
|
+
create_table "donates", :force => true do |t|
|
241
|
+
t.integer "agent_id", :null => false
|
242
|
+
t.integer "item_id", :null => false
|
243
|
+
t.datetime "created_at", :null => false
|
244
|
+
t.datetime "updated_at", :null => false
|
245
|
+
end
|
246
|
+
|
247
|
+
add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
|
248
|
+
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
249
|
+
|
250
|
+
create_table "exemplifies", :force => true do |t|
|
251
|
+
t.integer "manifestation_id", :null => false
|
252
|
+
t.integer "item_id", :null => false
|
253
|
+
t.integer "position"
|
254
|
+
t.datetime "created_at", :null => false
|
255
|
+
t.datetime "updated_at", :null => false
|
256
|
+
end
|
257
|
+
|
258
|
+
add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
|
259
|
+
add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
|
260
|
+
|
261
|
+
create_table "extents", :force => true do |t|
|
262
|
+
t.string "name", :null => false
|
263
|
+
t.text "display_name"
|
264
|
+
t.text "note"
|
265
|
+
t.integer "position"
|
266
|
+
t.datetime "created_at", :null => false
|
267
|
+
t.datetime "updated_at", :null => false
|
268
|
+
end
|
269
|
+
|
270
|
+
create_table "form_of_works", :force => true do |t|
|
271
|
+
t.string "name", :null => false
|
272
|
+
t.text "display_name"
|
273
|
+
t.text "note"
|
274
|
+
t.integer "position"
|
275
|
+
t.datetime "created_at", :null => false
|
276
|
+
t.datetime "updated_at", :null => false
|
277
|
+
end
|
278
|
+
|
279
|
+
create_table "frequencies", :force => true do |t|
|
280
|
+
t.string "name", :null => false
|
281
|
+
t.text "display_name"
|
282
|
+
t.text "note"
|
283
|
+
t.integer "position"
|
284
|
+
t.datetime "created_at", :null => false
|
285
|
+
t.datetime "updated_at", :null => false
|
286
|
+
end
|
287
|
+
|
288
|
+
create_table "identifier_types", :force => true do |t|
|
289
|
+
t.string "name"
|
290
|
+
t.text "display_name"
|
291
|
+
t.text "note"
|
292
|
+
t.integer "position"
|
293
|
+
t.datetime "created_at", :null => false
|
294
|
+
t.datetime "updated_at", :null => false
|
295
|
+
end
|
296
|
+
|
297
|
+
create_table "identifiers", :force => true do |t|
|
298
|
+
t.string "body", :null => false
|
299
|
+
t.integer "identifier_type_id", :null => false
|
300
|
+
t.integer "manifestation_id"
|
301
|
+
t.boolean "primary"
|
302
|
+
t.integer "position"
|
303
|
+
t.datetime "created_at", :null => false
|
304
|
+
t.datetime "updated_at", :null => false
|
305
|
+
end
|
306
|
+
|
307
|
+
add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
|
308
|
+
add_index "identifiers", ["manifestation_id"], :name => "index_identifiers_on_manifestation_id"
|
309
|
+
|
310
|
+
create_table "import_request_transitions", :force => true do |t|
|
311
|
+
t.string "to_state"
|
312
|
+
t.text "metadata", :default => "{}"
|
313
|
+
t.integer "sort_key"
|
314
|
+
t.integer "import_request_id"
|
315
|
+
t.datetime "created_at", :null => false
|
316
|
+
t.datetime "updated_at", :null => false
|
317
|
+
end
|
318
|
+
|
319
|
+
add_index "import_request_transitions", ["import_request_id"], :name => "index_import_request_transitions_on_import_request_id"
|
320
|
+
add_index "import_request_transitions", ["sort_key", "import_request_id"], :name => "index_import_request_transitions_on_sort_key_and_request_id", :unique => true
|
321
|
+
|
322
|
+
create_table "import_requests", :force => true do |t|
|
323
|
+
t.string "isbn"
|
324
|
+
t.integer "manifestation_id"
|
325
|
+
t.integer "user_id"
|
326
|
+
t.datetime "created_at", :null => false
|
327
|
+
t.datetime "updated_at", :null => false
|
328
|
+
end
|
329
|
+
|
330
|
+
add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
|
331
|
+
add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
|
332
|
+
add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
|
15
333
|
|
16
334
|
create_table "inventories", :force => true do |t|
|
17
335
|
t.integer "item_id"
|
@@ -44,33 +362,83 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
44
362
|
create_table "items", :force => true do |t|
|
45
363
|
t.string "call_number"
|
46
364
|
t.string "item_identifier"
|
47
|
-
t.datetime "created_at",
|
48
|
-
t.datetime "updated_at",
|
365
|
+
t.datetime "created_at", :null => false
|
366
|
+
t.datetime "updated_at", :null => false
|
49
367
|
t.datetime "deleted_at"
|
50
|
-
t.integer "shelf_id",
|
51
|
-
t.
|
52
|
-
t.boolean "include_supplements", :default => false, :null => false
|
53
|
-
t.integer "checkouts_count", :default => 0, :null => false
|
54
|
-
t.integer "owns_count", :default => 0, :null => false
|
55
|
-
t.integer "resource_has_subjects_count", :default => 0, :null => false
|
368
|
+
t.integer "shelf_id", :default => 1, :null => false
|
369
|
+
t.boolean "include_supplements", :default => false, :null => false
|
56
370
|
t.text "note"
|
57
371
|
t.string "url"
|
58
372
|
t.integer "price"
|
59
|
-
t.integer "lock_version",
|
60
|
-
t.integer "required_role_id",
|
61
|
-
t.
|
62
|
-
t.
|
373
|
+
t.integer "lock_version", :default => 0, :null => false
|
374
|
+
t.integer "required_role_id", :default => 1, :null => false
|
375
|
+
t.integer "required_score", :default => 0, :null => false
|
376
|
+
t.datetime "acquired_at"
|
377
|
+
t.integer "bookstore_id"
|
378
|
+
t.integer "budget_type_id"
|
379
|
+
t.string "binding_item_identifier"
|
380
|
+
t.string "binding_call_number"
|
381
|
+
t.datetime "binded_at"
|
382
|
+
t.integer "manifestation_id"
|
63
383
|
end
|
64
384
|
|
385
|
+
add_index "items", ["binding_item_identifier"], :name => "index_items_on_binding_item_identifier"
|
386
|
+
add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
|
65
387
|
add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
|
388
|
+
add_index "items", ["manifestation_id"], :name => "index_items_on_manifestation_id"
|
66
389
|
add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
|
67
390
|
add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
|
68
391
|
|
392
|
+
create_table "languages", :force => true do |t|
|
393
|
+
t.string "name", :null => false
|
394
|
+
t.string "native_name"
|
395
|
+
t.text "display_name"
|
396
|
+
t.string "iso_639_1"
|
397
|
+
t.string "iso_639_2"
|
398
|
+
t.string "iso_639_3"
|
399
|
+
t.text "note"
|
400
|
+
t.integer "position"
|
401
|
+
end
|
402
|
+
|
403
|
+
add_index "languages", ["iso_639_1"], :name => "index_languages_on_iso_639_1"
|
404
|
+
add_index "languages", ["iso_639_2"], :name => "index_languages_on_iso_639_2"
|
405
|
+
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
406
|
+
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
407
|
+
|
408
|
+
create_table "libraries", :force => true do |t|
|
409
|
+
t.string "name", :null => false
|
410
|
+
t.text "display_name"
|
411
|
+
t.string "short_display_name", :null => false
|
412
|
+
t.string "zip_code"
|
413
|
+
t.text "street"
|
414
|
+
t.text "locality"
|
415
|
+
t.text "region"
|
416
|
+
t.string "telephone_number_1"
|
417
|
+
t.string "telephone_number_2"
|
418
|
+
t.string "fax_number"
|
419
|
+
t.text "note"
|
420
|
+
t.integer "call_number_rows", :default => 1, :null => false
|
421
|
+
t.string "call_number_delimiter", :default => "|", :null => false
|
422
|
+
t.integer "library_group_id", :default => 1, :null => false
|
423
|
+
t.integer "users_count", :default => 0, :null => false
|
424
|
+
t.integer "position"
|
425
|
+
t.integer "country_id"
|
426
|
+
t.datetime "created_at", :null => false
|
427
|
+
t.datetime "updated_at", :null => false
|
428
|
+
t.datetime "deleted_at"
|
429
|
+
t.text "opening_hour"
|
430
|
+
t.string "isil"
|
431
|
+
t.float "latitude"
|
432
|
+
t.float "longitude"
|
433
|
+
end
|
434
|
+
|
435
|
+
add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
|
436
|
+
add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
|
437
|
+
|
69
438
|
create_table "library_groups", :force => true do |t|
|
70
439
|
t.string "name", :null => false
|
71
440
|
t.text "display_name"
|
72
441
|
t.string "short_name", :null => false
|
73
|
-
t.string "email"
|
74
442
|
t.text "my_networks"
|
75
443
|
t.text "login_banner"
|
76
444
|
t.text "note"
|
@@ -84,7 +452,143 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
84
452
|
|
85
453
|
add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
|
86
454
|
|
87
|
-
create_table "
|
455
|
+
create_table "licenses", :force => true do |t|
|
456
|
+
t.string "name", :null => false
|
457
|
+
t.string "display_name"
|
458
|
+
t.text "note"
|
459
|
+
t.integer "position"
|
460
|
+
t.datetime "created_at", :null => false
|
461
|
+
t.datetime "updated_at", :null => false
|
462
|
+
end
|
463
|
+
|
464
|
+
create_table "manifestation_relationship_types", :force => true do |t|
|
465
|
+
t.string "name", :null => false
|
466
|
+
t.text "display_name"
|
467
|
+
t.text "note"
|
468
|
+
t.integer "position"
|
469
|
+
t.datetime "created_at", :null => false
|
470
|
+
t.datetime "updated_at", :null => false
|
471
|
+
end
|
472
|
+
|
473
|
+
create_table "manifestation_relationships", :force => true do |t|
|
474
|
+
t.integer "parent_id"
|
475
|
+
t.integer "child_id"
|
476
|
+
t.integer "manifestation_relationship_type_id"
|
477
|
+
t.datetime "created_at", :null => false
|
478
|
+
t.datetime "updated_at", :null => false
|
479
|
+
t.integer "position"
|
480
|
+
end
|
481
|
+
|
482
|
+
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
483
|
+
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
484
|
+
|
485
|
+
create_table "manifestations", :force => true do |t|
|
486
|
+
t.text "original_title", :null => false
|
487
|
+
t.text "title_alternative"
|
488
|
+
t.text "title_transcription"
|
489
|
+
t.string "classification_number"
|
490
|
+
t.string "manifestation_identifier"
|
491
|
+
t.datetime "date_of_publication"
|
492
|
+
t.datetime "date_copyrighted"
|
493
|
+
t.datetime "created_at", :null => false
|
494
|
+
t.datetime "updated_at", :null => false
|
495
|
+
t.datetime "deleted_at"
|
496
|
+
t.string "access_address"
|
497
|
+
t.integer "language_id", :default => 1, :null => false
|
498
|
+
t.integer "carrier_type_id", :default => 1, :null => false
|
499
|
+
t.integer "extent_id", :default => 1, :null => false
|
500
|
+
t.integer "start_page"
|
501
|
+
t.integer "end_page"
|
502
|
+
t.integer "height"
|
503
|
+
t.integer "width"
|
504
|
+
t.integer "depth"
|
505
|
+
t.integer "price"
|
506
|
+
t.text "fulltext"
|
507
|
+
t.string "volume_number_string"
|
508
|
+
t.string "issue_number_string"
|
509
|
+
t.string "serial_number_string"
|
510
|
+
t.integer "edition"
|
511
|
+
t.text "note"
|
512
|
+
t.boolean "repository_content", :default => false, :null => false
|
513
|
+
t.integer "lock_version", :default => 0, :null => false
|
514
|
+
t.integer "required_role_id", :default => 1, :null => false
|
515
|
+
t.integer "required_score", :default => 0, :null => false
|
516
|
+
t.integer "frequency_id", :default => 1, :null => false
|
517
|
+
t.boolean "subscription_master", :default => false, :null => false
|
518
|
+
t.string "attachment_file_name"
|
519
|
+
t.string "attachment_content_type"
|
520
|
+
t.integer "attachment_file_size"
|
521
|
+
t.datetime "attachment_updated_at"
|
522
|
+
t.text "title_alternative_transcription"
|
523
|
+
t.text "description"
|
524
|
+
t.text "abstract"
|
525
|
+
t.datetime "available_at"
|
526
|
+
t.datetime "valid_until"
|
527
|
+
t.datetime "date_submitted"
|
528
|
+
t.datetime "date_accepted"
|
529
|
+
t.datetime "date_caputured"
|
530
|
+
t.string "pub_date"
|
531
|
+
t.string "edition_string"
|
532
|
+
t.integer "volume_number"
|
533
|
+
t.integer "issue_number"
|
534
|
+
t.integer "serial_number"
|
535
|
+
t.integer "content_type_id", :default => 1
|
536
|
+
t.integer "year_of_publication"
|
537
|
+
t.text "attachment_meta"
|
538
|
+
t.integer "month_of_publication"
|
539
|
+
t.boolean "fulltext_content"
|
540
|
+
t.string "doi"
|
541
|
+
t.boolean "periodical"
|
542
|
+
t.text "statement_of_responsibility"
|
543
|
+
t.text "publication_place"
|
544
|
+
end
|
545
|
+
|
546
|
+
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
547
|
+
add_index "manifestations", ["date_of_publication"], :name => "index_manifestations_on_date_of_publication"
|
548
|
+
add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
|
549
|
+
add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
|
550
|
+
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
551
|
+
|
552
|
+
create_table "medium_of_performances", :force => true do |t|
|
553
|
+
t.string "name", :null => false
|
554
|
+
t.text "display_name"
|
555
|
+
t.text "note"
|
556
|
+
t.integer "position"
|
557
|
+
t.datetime "created_at", :null => false
|
558
|
+
t.datetime "updated_at", :null => false
|
559
|
+
end
|
560
|
+
|
561
|
+
create_table "owns", :force => true do |t|
|
562
|
+
t.integer "agent_id", :null => false
|
563
|
+
t.integer "item_id", :null => false
|
564
|
+
t.integer "position"
|
565
|
+
t.datetime "created_at", :null => false
|
566
|
+
t.datetime "updated_at", :null => false
|
567
|
+
end
|
568
|
+
|
569
|
+
add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
|
570
|
+
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
571
|
+
|
572
|
+
create_table "picture_files", :force => true do |t|
|
573
|
+
t.integer "picture_attachable_id"
|
574
|
+
t.string "picture_attachable_type"
|
575
|
+
t.string "content_type"
|
576
|
+
t.text "title"
|
577
|
+
t.string "thumbnail"
|
578
|
+
t.integer "position"
|
579
|
+
t.datetime "created_at", :null => false
|
580
|
+
t.datetime "updated_at", :null => false
|
581
|
+
t.string "picture_file_name"
|
582
|
+
t.string "picture_content_type"
|
583
|
+
t.integer "picture_file_size"
|
584
|
+
t.datetime "picture_updated_at"
|
585
|
+
t.text "picture_meta"
|
586
|
+
t.string "picture_fingerprint"
|
587
|
+
end
|
588
|
+
|
589
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
590
|
+
|
591
|
+
create_table "produce_types", :force => true do |t|
|
88
592
|
t.string "name"
|
89
593
|
t.text "display_name"
|
90
594
|
t.text "note"
|
@@ -93,6 +597,287 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
93
597
|
t.datetime "updated_at", :null => false
|
94
598
|
end
|
95
599
|
|
600
|
+
create_table "produces", :force => true do |t|
|
601
|
+
t.integer "agent_id", :null => false
|
602
|
+
t.integer "manifestation_id", :null => false
|
603
|
+
t.integer "position"
|
604
|
+
t.datetime "created_at", :null => false
|
605
|
+
t.datetime "updated_at", :null => false
|
606
|
+
t.integer "produce_type_id"
|
607
|
+
end
|
608
|
+
|
609
|
+
add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
|
610
|
+
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
611
|
+
|
612
|
+
create_table "profiles", :force => true do |t|
|
613
|
+
t.integer "user_id"
|
614
|
+
t.integer "user_group_id"
|
615
|
+
t.integer "library_id"
|
616
|
+
t.string "locale"
|
617
|
+
t.string "user_number"
|
618
|
+
t.text "full_name"
|
619
|
+
t.text "note"
|
620
|
+
t.text "keyword_list"
|
621
|
+
t.integer "required_role_id"
|
622
|
+
t.datetime "created_at", :null => false
|
623
|
+
t.datetime "updated_at", :null => false
|
624
|
+
t.datetime "expired_at"
|
625
|
+
end
|
626
|
+
|
627
|
+
add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"
|
628
|
+
add_index "profiles", ["user_number"], :name => "index_profiles_on_user_number", :unique => true
|
629
|
+
|
630
|
+
create_table "realize_types", :force => true do |t|
|
631
|
+
t.string "name"
|
632
|
+
t.text "display_name"
|
633
|
+
t.text "note"
|
634
|
+
t.integer "position"
|
635
|
+
t.datetime "created_at", :null => false
|
636
|
+
t.datetime "updated_at", :null => false
|
637
|
+
end
|
638
|
+
|
639
|
+
create_table "realizes", :force => true do |t|
|
640
|
+
t.integer "agent_id", :null => false
|
641
|
+
t.integer "expression_id", :null => false
|
642
|
+
t.integer "position"
|
643
|
+
t.datetime "created_at", :null => false
|
644
|
+
t.datetime "updated_at", :null => false
|
645
|
+
t.integer "realize_type_id"
|
646
|
+
end
|
647
|
+
|
648
|
+
add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
|
649
|
+
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
650
|
+
|
651
|
+
create_table "request_status_types", :force => true do |t|
|
652
|
+
t.string "name", :null => false
|
653
|
+
t.text "display_name"
|
654
|
+
t.text "note"
|
655
|
+
t.integer "position"
|
656
|
+
t.datetime "created_at", :null => false
|
657
|
+
t.datetime "updated_at", :null => false
|
658
|
+
end
|
659
|
+
|
660
|
+
create_table "request_types", :force => true do |t|
|
661
|
+
t.string "name", :null => false
|
662
|
+
t.text "display_name"
|
663
|
+
t.text "note"
|
664
|
+
t.integer "position"
|
665
|
+
t.datetime "created_at", :null => false
|
666
|
+
t.datetime "updated_at", :null => false
|
667
|
+
end
|
668
|
+
|
669
|
+
create_table "resource_export_file_transitions", :force => true do |t|
|
670
|
+
t.string "to_state"
|
671
|
+
t.text "metadata", :default => "{}"
|
672
|
+
t.integer "sort_key"
|
673
|
+
t.integer "resource_export_file_id"
|
674
|
+
t.datetime "created_at", :null => false
|
675
|
+
t.datetime "updated_at", :null => false
|
676
|
+
end
|
677
|
+
|
678
|
+
add_index "resource_export_file_transitions", ["resource_export_file_id"], :name => "index_resource_export_file_transitions_on_file_id"
|
679
|
+
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], :name => "index_resource_export_file_transitions_on_sort_key_and_file_id", :unique => true
|
680
|
+
|
681
|
+
create_table "resource_export_files", :force => true do |t|
|
682
|
+
t.integer "user_id"
|
683
|
+
t.string "resource_export_file_name"
|
684
|
+
t.string "resource_export_content_type"
|
685
|
+
t.integer "resource_export_file_size"
|
686
|
+
t.datetime "resource_export_updated_at"
|
687
|
+
t.datetime "executed_at"
|
688
|
+
t.datetime "created_at", :null => false
|
689
|
+
t.datetime "updated_at", :null => false
|
690
|
+
end
|
691
|
+
|
692
|
+
create_table "resource_import_file_transitions", :force => true do |t|
|
693
|
+
t.string "to_state"
|
694
|
+
t.text "metadata", :default => "{}"
|
695
|
+
t.integer "sort_key"
|
696
|
+
t.integer "resource_import_file_id"
|
697
|
+
t.datetime "created_at", :null => false
|
698
|
+
t.datetime "updated_at", :null => false
|
699
|
+
end
|
700
|
+
|
701
|
+
add_index "resource_import_file_transitions", ["resource_import_file_id"], :name => "index_resource_import_file_transitions_on_file_id"
|
702
|
+
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], :name => "index_resource_import_file_transitions_on_sort_key_and_file_id", :unique => true
|
703
|
+
|
704
|
+
create_table "resource_import_files", :force => true do |t|
|
705
|
+
t.integer "parent_id"
|
706
|
+
t.string "content_type"
|
707
|
+
t.integer "size"
|
708
|
+
t.integer "user_id"
|
709
|
+
t.text "note"
|
710
|
+
t.datetime "executed_at"
|
711
|
+
t.string "resource_import_file_name"
|
712
|
+
t.string "resource_import_content_type"
|
713
|
+
t.integer "resource_import_file_size"
|
714
|
+
t.datetime "resource_import_updated_at"
|
715
|
+
t.datetime "created_at", :null => false
|
716
|
+
t.datetime "updated_at", :null => false
|
717
|
+
t.string "edit_mode"
|
718
|
+
t.string "resource_import_fingerprint"
|
719
|
+
t.text "error_message"
|
720
|
+
t.string "user_encoding"
|
721
|
+
t.integer "default_shelf_id"
|
722
|
+
end
|
723
|
+
|
724
|
+
add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
|
725
|
+
add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
|
726
|
+
|
727
|
+
create_table "resource_import_results", :force => true do |t|
|
728
|
+
t.integer "resource_import_file_id"
|
729
|
+
t.integer "manifestation_id"
|
730
|
+
t.integer "item_id"
|
731
|
+
t.text "body"
|
732
|
+
t.datetime "created_at", :null => false
|
733
|
+
t.datetime "updated_at", :null => false
|
734
|
+
end
|
735
|
+
|
736
|
+
add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
|
737
|
+
add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
|
738
|
+
add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
|
739
|
+
|
740
|
+
create_table "roles", :force => true do |t|
|
741
|
+
t.string "name", :null => false
|
742
|
+
t.string "display_name"
|
743
|
+
t.text "note"
|
744
|
+
t.datetime "created_at"
|
745
|
+
t.datetime "updated_at"
|
746
|
+
t.integer "score", :default => 0, :null => false
|
747
|
+
t.integer "position"
|
748
|
+
end
|
749
|
+
|
750
|
+
create_table "search_engines", :force => true do |t|
|
751
|
+
t.string "name", :null => false
|
752
|
+
t.text "display_name"
|
753
|
+
t.string "url", :null => false
|
754
|
+
t.text "base_url", :null => false
|
755
|
+
t.text "http_method", :null => false
|
756
|
+
t.text "query_param", :null => false
|
757
|
+
t.text "additional_param"
|
758
|
+
t.text "note"
|
759
|
+
t.integer "position"
|
760
|
+
t.datetime "created_at", :null => false
|
761
|
+
t.datetime "updated_at", :null => false
|
762
|
+
end
|
763
|
+
|
764
|
+
create_table "series_statement_merge_lists", :force => true do |t|
|
765
|
+
t.string "title"
|
766
|
+
t.datetime "created_at", :null => false
|
767
|
+
t.datetime "updated_at", :null => false
|
768
|
+
end
|
769
|
+
|
770
|
+
create_table "series_statement_merges", :force => true do |t|
|
771
|
+
t.integer "series_statement_id", :null => false
|
772
|
+
t.integer "series_statement_merge_list_id", :null => false
|
773
|
+
t.datetime "created_at", :null => false
|
774
|
+
t.datetime "updated_at", :null => false
|
775
|
+
end
|
776
|
+
|
777
|
+
add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
|
778
|
+
add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
|
779
|
+
|
780
|
+
create_table "series_statements", :force => true do |t|
|
781
|
+
t.text "original_title"
|
782
|
+
t.text "numbering"
|
783
|
+
t.text "title_subseries"
|
784
|
+
t.text "numbering_subseries"
|
785
|
+
t.integer "position"
|
786
|
+
t.datetime "created_at", :null => false
|
787
|
+
t.datetime "updated_at", :null => false
|
788
|
+
t.text "title_transcription"
|
789
|
+
t.text "title_alternative"
|
790
|
+
t.string "series_statement_identifier"
|
791
|
+
t.integer "manifestation_id"
|
792
|
+
t.text "note"
|
793
|
+
t.text "title_subseries_transcription"
|
794
|
+
t.text "creator_string"
|
795
|
+
t.text "volume_number_string"
|
796
|
+
t.text "volume_number_transcription_string"
|
797
|
+
t.boolean "series_master"
|
798
|
+
t.integer "root_manifestation_id"
|
799
|
+
end
|
800
|
+
|
801
|
+
add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
802
|
+
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
|
803
|
+
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
804
|
+
|
805
|
+
create_table "shelves", :force => true do |t|
|
806
|
+
t.string "name", :null => false
|
807
|
+
t.text "display_name"
|
808
|
+
t.text "note"
|
809
|
+
t.integer "library_id", :default => 1, :null => false
|
810
|
+
t.integer "items_count", :default => 0, :null => false
|
811
|
+
t.integer "position"
|
812
|
+
t.datetime "created_at", :null => false
|
813
|
+
t.datetime "updated_at", :null => false
|
814
|
+
t.datetime "deleted_at"
|
815
|
+
t.boolean "closed", :default => false, :null => false
|
816
|
+
end
|
817
|
+
|
818
|
+
add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
|
819
|
+
|
820
|
+
create_table "subscribes", :force => true do |t|
|
821
|
+
t.integer "subscription_id", :null => false
|
822
|
+
t.integer "work_id", :null => false
|
823
|
+
t.datetime "start_at", :null => false
|
824
|
+
t.datetime "end_at", :null => false
|
825
|
+
t.datetime "created_at", :null => false
|
826
|
+
t.datetime "updated_at", :null => false
|
827
|
+
end
|
828
|
+
|
829
|
+
add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
|
830
|
+
add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
|
831
|
+
|
832
|
+
create_table "subscriptions", :force => true do |t|
|
833
|
+
t.text "title", :null => false
|
834
|
+
t.text "note"
|
835
|
+
t.integer "user_id"
|
836
|
+
t.integer "order_list_id"
|
837
|
+
t.datetime "deleted_at"
|
838
|
+
t.integer "subscribes_count", :default => 0, :null => false
|
839
|
+
t.datetime "created_at", :null => false
|
840
|
+
t.datetime "updated_at", :null => false
|
841
|
+
end
|
842
|
+
|
843
|
+
add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
|
844
|
+
add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
|
845
|
+
|
846
|
+
create_table "user_export_file_transitions", :force => true do |t|
|
847
|
+
t.string "to_state"
|
848
|
+
t.text "metadata", :default => "{}"
|
849
|
+
t.integer "sort_key"
|
850
|
+
t.integer "user_export_file_id"
|
851
|
+
t.datetime "created_at", :null => false
|
852
|
+
t.datetime "updated_at", :null => false
|
853
|
+
end
|
854
|
+
|
855
|
+
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], :name => "index_user_export_file_transitions_on_sort_key_and_file_id", :unique => true
|
856
|
+
add_index "user_export_file_transitions", ["user_export_file_id"], :name => "index_user_export_file_transitions_on_file_id"
|
857
|
+
|
858
|
+
create_table "user_export_files", :force => true do |t|
|
859
|
+
t.integer "user_id"
|
860
|
+
t.string "user_export_file_name"
|
861
|
+
t.string "user_export_content_type"
|
862
|
+
t.integer "user_export_file_size"
|
863
|
+
t.datetime "user_export_updated_at"
|
864
|
+
t.datetime "executed_at"
|
865
|
+
t.datetime "created_at", :null => false
|
866
|
+
t.datetime "updated_at", :null => false
|
867
|
+
end
|
868
|
+
|
869
|
+
create_table "user_groups", :force => true do |t|
|
870
|
+
t.string "name"
|
871
|
+
t.text "display_name"
|
872
|
+
t.text "note"
|
873
|
+
t.integer "position"
|
874
|
+
t.datetime "created_at", :null => false
|
875
|
+
t.datetime "updated_at", :null => false
|
876
|
+
t.datetime "deleted_at"
|
877
|
+
t.integer "valid_period_for_new_user", :default => 0, :null => false
|
878
|
+
t.datetime "expired_at"
|
879
|
+
end
|
880
|
+
|
96
881
|
create_table "user_has_roles", :force => true do |t|
|
97
882
|
t.integer "user_id"
|
98
883
|
t.integer "role_id"
|
@@ -100,14 +885,48 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
100
885
|
t.datetime "updated_at", :null => false
|
101
886
|
end
|
102
887
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
888
|
+
add_index "user_has_roles", ["role_id"], :name => "index_user_has_roles_on_role_id"
|
889
|
+
add_index "user_has_roles", ["user_id"], :name => "index_user_has_roles_on_user_id"
|
890
|
+
|
891
|
+
create_table "user_import_file_transitions", :force => true do |t|
|
892
|
+
t.string "to_state"
|
893
|
+
t.text "metadata", :default => "{}"
|
894
|
+
t.integer "sort_key"
|
895
|
+
t.integer "user_import_file_id"
|
896
|
+
t.datetime "created_at", :null => false
|
897
|
+
t.datetime "updated_at", :null => false
|
898
|
+
end
|
899
|
+
|
900
|
+
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], :name => "index_user_import_file_transitions_on_sort_key_and_file_id", :unique => true
|
901
|
+
add_index "user_import_file_transitions", ["user_import_file_id"], :name => "index_user_import_file_transitions_on_user_import_file_id"
|
902
|
+
|
903
|
+
create_table "user_import_files", :force => true do |t|
|
904
|
+
t.integer "user_id"
|
107
905
|
t.text "note"
|
108
|
-
t.
|
109
|
-
t.
|
110
|
-
t.
|
906
|
+
t.datetime "executed_at"
|
907
|
+
t.string "user_import_file_name"
|
908
|
+
t.string "user_import_content_type"
|
909
|
+
t.string "user_import_file_size"
|
910
|
+
t.datetime "user_import_updated_at"
|
911
|
+
t.string "user_import_fingerprint"
|
912
|
+
t.string "edit_mode"
|
913
|
+
t.text "error_message"
|
914
|
+
t.datetime "created_at", :null => false
|
915
|
+
t.datetime "updated_at", :null => false
|
916
|
+
t.string "user_encoding"
|
917
|
+
t.integer "default_library_id"
|
918
|
+
t.integer "default_user_group_id"
|
919
|
+
end
|
920
|
+
|
921
|
+
create_table "user_import_results", :force => true do |t|
|
922
|
+
t.integer "user_import_file_id"
|
923
|
+
t.integer "user_id"
|
924
|
+
t.text "body"
|
925
|
+
t.datetime "created_at", :null => false
|
926
|
+
t.datetime "updated_at", :null => false
|
927
|
+
end
|
928
|
+
|
929
|
+
create_table "users", :force => true do |t|
|
111
930
|
t.string "email", :default => "", :null => false
|
112
931
|
t.string "encrypted_password", :default => "", :null => false
|
113
932
|
t.string "reset_password_token"
|
@@ -118,18 +937,31 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
118
937
|
t.datetime "last_sign_in_at"
|
119
938
|
t.string "current_sign_in_ip"
|
120
939
|
t.string "last_sign_in_ip"
|
121
|
-
t.
|
122
|
-
t.
|
123
|
-
t.
|
124
|
-
t.datetime "
|
125
|
-
t.
|
940
|
+
t.datetime "created_at", :null => false
|
941
|
+
t.datetime "updated_at", :null => false
|
942
|
+
t.string "username"
|
943
|
+
t.datetime "deleted_at"
|
944
|
+
t.datetime "expired_at"
|
126
945
|
t.integer "failed_attempts", :default => 0
|
127
946
|
t.string "unlock_token"
|
128
947
|
t.datetime "locked_at"
|
129
|
-
t.
|
948
|
+
t.datetime "confirmed_at"
|
130
949
|
end
|
131
950
|
|
132
951
|
add_index "users", ["email"], :name => "index_users_on_email"
|
133
952
|
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
953
|
+
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
|
954
|
+
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
955
|
+
|
956
|
+
create_table "versions", :force => true do |t|
|
957
|
+
t.string "item_type", :null => false
|
958
|
+
t.integer "item_id", :null => false
|
959
|
+
t.string "event", :null => false
|
960
|
+
t.string "whodunnit"
|
961
|
+
t.text "object"
|
962
|
+
t.datetime "created_at"
|
963
|
+
end
|
964
|
+
|
965
|
+
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
134
966
|
|
135
967
|
end
|