enju_message 0.1.14.pre16 → 0.1.14.pre17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/message_requests_controller.rb +3 -3
- data/app/controllers/message_templates_controller.rb +72 -6
- data/app/views/message_requests/index.html.erb +1 -0
- data/app/views/message_templates/index.html.erb +1 -0
- data/app/views/messages/index.html.erb +2 -0
- data/lib/enju_message/engine.rb +0 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/dummy/config/environments/test.rb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -1
- data/spec/dummy/db/migrate/005_create_manifestations.rb +44 -0
- data/spec/dummy/db/migrate/006_create_items.rb +21 -0
- 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/073_create_carrier_types.rb +11 -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/125_create_donates.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 +1 -5
- 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/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/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/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/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -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/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/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/20130221154434_add_additional_attributes_to_user.rb +1 -11
- 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/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/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/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/20140720140916_add_binding_item_identifier_to_item.rb +8 -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/20140813182425_add_publication_place_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +547 -50
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/_q3.fdt +0 -0
- data/spec/dummy/solr/default/data/index/{_oj.si → _q3.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_oj_Lucene41_0.tim → _q3_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_17z +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001572 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001573 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001574 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001575 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001576 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001577 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001578 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001579 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001580 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001581 +0 -0
- data/spec/factories/profile.rb +5 -1
- data/spec/factories/user.rb +0 -13
- data/spec/fixtures/library_groups.yml +0 -2
- metadata +216 -76
- data/spec/dummy/app/mailers/notifier.rb +0 -30
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
- data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
- data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
- data/spec/dummy/db/migrate/20111201121636_create_languages.rb +0 -16
- data/spec/dummy/solr/default/data/index/_oj.fdt +0 -0
- data/spec/dummy/solr/default/data/index/segments_14v +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001460 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001461 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001462 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001463 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001464 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001465 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001466 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001467 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001468 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001469 +0 -0
- /data/spec/dummy/db/migrate/{20111201155456_devise_create_users.rb → 002_devise_create_users.rb} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj.fdx → _q3.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj.fnm → _q3.fnm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj.nvd → _q3.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj.nvm → _q3.nvm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj_Lucene41_0.doc → _q3_Lucene41_0.doc} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj_Lucene41_0.pos → _q3_Lucene41_0.pos} +0 -0
- /data/spec/dummy/solr/default/data/index/{_oj_Lucene41_0.tip → _q3_Lucene41_0.tip} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d026a362a195930ade9034b51711807735049622
|
4
|
+
data.tar.gz: 88f36a0de95825af6e887e56c17f33fdf657bd32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb98a98ef094f9a53d594832cf587dcfdd34e4fd899161c70aea057e26e52c014166978301a03414042f9747258789f482377e310da7d90a49344b34c4a7f0f8
|
7
|
+
data.tar.gz: ffd0f41dca4f46a6e050beed10894a99ca262008028ec9b3ca19899b84bee083cfd9cb89dbff8305b179e07b95f8aa711ca69666dcd92f936a63a7e40dcdfb23
|
@@ -30,7 +30,7 @@ class MessageRequestsController < ApplicationController
|
|
30
30
|
|
31
31
|
# GET /message_requests/1/edit
|
32
32
|
def edit
|
33
|
-
@
|
33
|
+
@message_requests = MessageTemplate.all
|
34
34
|
end
|
35
35
|
|
36
36
|
# PUT /message_requests/1
|
@@ -42,7 +42,7 @@ class MessageRequestsController < ApplicationController
|
|
42
42
|
format.html { redirect_to(@message_request) }
|
43
43
|
format.json { head :no_content }
|
44
44
|
else
|
45
|
-
@
|
45
|
+
@message_requests = MessageTemplate.all
|
46
46
|
format.html { render action: "edit" }
|
47
47
|
format.json { render json: @message_request.errors, status: :unprocessable_entity }
|
48
48
|
end
|
@@ -55,7 +55,7 @@ class MessageRequestsController < ApplicationController
|
|
55
55
|
@message_request.destroy
|
56
56
|
|
57
57
|
respond_to do |format|
|
58
|
-
format.html { redirect_to message_requests_url }
|
58
|
+
format.html { redirect_to message_requests_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.message_request')) }
|
59
59
|
format.json { head :no_content }
|
60
60
|
end
|
61
61
|
end
|
@@ -1,17 +1,83 @@
|
|
1
|
-
class MessageTemplatesController <
|
2
|
-
respond_to :html, :json
|
1
|
+
class MessageTemplatesController < ApplicationController
|
3
2
|
load_and_authorize_resource
|
3
|
+
# GET /message_templates
|
4
|
+
# GET /message_templates.json
|
5
|
+
def index
|
6
|
+
@message_templates = MessageTemplate.page(params[:page])
|
7
|
+
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @message_templates }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /message_templates/1
|
15
|
+
# GET /message_templates/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @message_template }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /message_templates/new
|
24
|
+
# GET /message_templates/new.json
|
25
|
+
def new
|
26
|
+
@message_template = MessageTemplate.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @message_template }
|
31
|
+
end
|
32
|
+
end
|
4
33
|
|
34
|
+
# GET /message_templates/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /message_templates
|
39
|
+
# POST /message_templates.json
|
40
|
+
def create
|
41
|
+
@message_template = MessageTemplate.new(params[:message_template])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @message_template.save
|
45
|
+
format.html { redirect_to @message_template, notice: t('controller.successfully_created', model: t('activerecord.models.message_template')) }
|
46
|
+
format.json { render json: @message_template, status: :created, location: @message_template }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @message_template.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /message_templates/1
|
55
|
+
# PUT /message_templates/1.json
|
5
56
|
def update
|
6
|
-
@message_template = MessageTemplate.find(params[:id])
|
7
57
|
if params[:move]
|
8
58
|
move_position(@message_template, params[:move])
|
9
59
|
return
|
10
60
|
end
|
11
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @message_template.update_attributes(params[:message_template])
|
64
|
+
format.html { redirect_to @message_template, notice: t('controller.successfully_updated', model: t('activerecord.models.message_template')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @message_template.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
12
71
|
end
|
13
72
|
|
14
|
-
|
15
|
-
|
73
|
+
# DELETE /message_templates/1
|
74
|
+
# DELETE /message_templates/1.json
|
75
|
+
def destroy
|
76
|
+
@message_template.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to message_templates_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.message_template')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
16
82
|
end
|
17
83
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.message_request')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
4
5
|
|
5
6
|
<table class="table table-striped index">
|
6
7
|
<tr>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.message_template')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
4
5
|
|
5
6
|
<table class="table table-striped index">
|
6
7
|
<tr>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('activerecord.models.message') -%></h1>
|
3
3
|
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
4
6
|
<%= form_for :messages, url: messages_path, html: {method: 'get'} do -%>
|
5
7
|
<p>
|
6
8
|
<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
|
data/lib/enju_message/engine.rb
CHANGED
data/lib/enju_message/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,44 @@
|
|
1
|
+
class CreateManifestations < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :manifestations do |t|
|
4
|
+
t.text :original_title, :null => false
|
5
|
+
t.text :title_alternative
|
6
|
+
t.text :title_transcription
|
7
|
+
t.string :classification_number
|
8
|
+
t.string :manifestation_identifier
|
9
|
+
t.datetime :date_of_publication
|
10
|
+
t.datetime :copyright_date
|
11
|
+
t.timestamps
|
12
|
+
t.datetime :deleted_at
|
13
|
+
t.string :access_address
|
14
|
+
t.integer :language_id, :default => 1, :null => false
|
15
|
+
t.integer :carrier_type_id, :default => 1, :null => false
|
16
|
+
t.integer :extent_id, :default => 1, :null => false
|
17
|
+
t.integer :start_page
|
18
|
+
t.integer :end_page
|
19
|
+
t.integer :height
|
20
|
+
t.integer :width
|
21
|
+
t.integer :depth
|
22
|
+
t.integer :price # TODO: 通貨単位
|
23
|
+
t.text :fulltext
|
24
|
+
t.string :volume_number_string
|
25
|
+
t.string :issue_number_string
|
26
|
+
t.string :serial_number_string
|
27
|
+
t.integer :edition
|
28
|
+
t.text :note
|
29
|
+
t.boolean :repository_content, :default => false, :null => false
|
30
|
+
t.integer :lock_version, :default => 0, :null => false
|
31
|
+
t.integer :required_role_id, :default => 1, :null => false
|
32
|
+
t.integer :required_score, :default => 0, :null => false
|
33
|
+
t.integer :frequency_id, :default => 1, :null => false
|
34
|
+
t.boolean :subscription_master, :default => false, :null => false
|
35
|
+
end
|
36
|
+
#add_index :manifestations, :carrier_type_id
|
37
|
+
#add_index :manifestations, :required_role_id
|
38
|
+
add_index :manifestations, :access_address
|
39
|
+
#add_index :manifestations, :frequency_id
|
40
|
+
add_index :manifestations, :manifestation_identifier
|
41
|
+
add_index :manifestations, :updated_at
|
42
|
+
add_index :manifestations, :date_of_publication
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateItems < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :items do |t|
|
4
|
+
t.string :call_number
|
5
|
+
t.string :item_identifier
|
6
|
+
t.timestamps
|
7
|
+
t.datetime :deleted_at
|
8
|
+
t.integer :shelf_id, :default => 1, :null => false
|
9
|
+
t.boolean :include_supplements, :default => false, :null => false
|
10
|
+
t.text :note
|
11
|
+
t.string :url
|
12
|
+
t.integer :price
|
13
|
+
t.integer :lock_version, :default => 0, :null => false
|
14
|
+
t.integer :required_role_id, :default => 1, :null => false
|
15
|
+
t.integer :required_score, :default => 0, :null => false
|
16
|
+
end
|
17
|
+
add_index :items, :shelf_id
|
18
|
+
add_index :items, :item_identifier
|
19
|
+
add_index :items, :required_role_id
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateOwns < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :owns do |t|
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :item, :null => false
|
6
|
+
t.integer :position
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :owns, :agent_id
|
10
|
+
add_index :owns, :item_id
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateCreates < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :creates do |t|
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :work, :null => false
|
6
|
+
t.integer :position
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :creates, :agent_id
|
10
|
+
add_index :creates, :work_id
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateRoles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "roles" do |t|
|
4
|
+
t.column :name, :string, :null => false
|
5
|
+
t.column :display_name, :string
|
6
|
+
t.column :note, :text
|
7
|
+
t.column :created_at, :datetime
|
8
|
+
t.column :updated_at, :datetime
|
9
|
+
t.integer :score, :default => 0, :null => false
|
10
|
+
t.integer :position
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateProduces < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :produces do |t|
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :manifestation, :null => false
|
6
|
+
t.integer :position
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :produces, :agent_id
|
10
|
+
add_index :produces, :manifestation_id
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateDonates < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :donates do |t|
|
4
|
+
t.integer :agent_id, :null => false
|
5
|
+
t.integer :item_id, :null => false
|
6
|
+
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :donates, :agent_id
|
10
|
+
add_index :donates, :item_id
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateRealizes < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :realizes do |t|
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :expression, :null => false
|
6
|
+
t.integer :position
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :realizes, :agent_id
|
11
|
+
add_index :realizes, :expression_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateExemplifies < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :exemplifies do |t|
|
4
|
+
t.integer :manifestation_id, :null => false
|
5
|
+
t.integer :item_id, :null => false
|
6
|
+
t.integer :position
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :exemplifies, :manifestation_id
|
11
|
+
add_index :exemplifies, :item_id, :unique => true
|
12
|
+
end
|
13
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class CreateAgentTypes < ActiveRecord::Migration
|
2
|
-
def
|
2
|
+
def change
|
3
3
|
create_table :agent_types do |t|
|
4
4
|
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
@@ -9,8 +9,4 @@ class CreateAgentTypes < ActiveRecord::Migration
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :agent_types
|
15
|
-
end
|
16
12
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class CreateLanguages < ActiveRecord::Migration
|
2
|
+
|
3
|
+
# ISO 639 is the set of international standards that lists short codes for language names.
|
4
|
+
# Note this doesn't include macrolanguages (dialects)
|
5
|
+
# Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage
|
6
|
+
|
7
|
+
def change
|
8
|
+
create_table :languages do |t|
|
9
|
+
t.string :name, :null => false
|
10
|
+
t.string :native_name
|
11
|
+
t.text :display_name
|
12
|
+
t.string :iso_639_1, :size => 3
|
13
|
+
t.string :iso_639_2, :size => 3
|
14
|
+
t.string :iso_639_3, :size => 3
|
15
|
+
t.text :note
|
16
|
+
t.integer :position
|
17
|
+
end
|
18
|
+
add_index :languages, :name, :unique => true
|
19
|
+
add_index :languages, :iso_639_1
|
20
|
+
add_index :languages, :iso_639_2
|
21
|
+
add_index :languages, :iso_639_3
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreatePictureFiles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :picture_files do |t|
|
4
|
+
t.integer :picture_attachable_id
|
5
|
+
t.string :picture_attachable_type
|
6
|
+
t.string :content_type
|
7
|
+
t.text :title
|
8
|
+
t.string :thumbnail
|
9
|
+
t.integer :position
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateAgentImportFiles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_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 :executed_at
|
10
|
+
t.string :agent_import_file_name
|
11
|
+
t.string :agent_import_content_type
|
12
|
+
t.integer :agent_import_file_size
|
13
|
+
t.datetime :agent_import_updated_at
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
add_index :agent_import_files, :parent_id
|
18
|
+
add_index :agent_import_files, :user_id
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateResourceImportFiles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :resource_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 :executed_at
|
10
|
+
t.string :resource_import_file_name
|
11
|
+
t.string :resource_import_content_type
|
12
|
+
t.integer :resource_import_file_size
|
13
|
+
t.datetime :resource_import_updated_at
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
add_index :resource_import_files, :parent_id
|
18
|
+
add_index :resource_import_files, :user_id
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddAttachmentsPictureToPictureFile < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :picture_files, :picture_file_name, :string
|
4
|
+
add_column :picture_files, :picture_content_type, :string
|
5
|
+
add_column :picture_files, :picture_file_size, :integer
|
6
|
+
add_column :picture_files, :picture_updated_at, :datetime
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
remove_column :picture_files, :picture_file_name
|
11
|
+
remove_column :picture_files, :picture_content_type
|
12
|
+
remove_column :picture_files, :picture_file_size
|
13
|
+
remove_column :picture_files, :picture_updated_at
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddAttachmentsAttachmentToManifestation < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestations, :attachment_file_name, :string
|
4
|
+
add_column :manifestations, :attachment_content_type, :string
|
5
|
+
add_column :manifestations, :attachment_file_size, :integer
|
6
|
+
add_column :manifestations, :attachment_updated_at, :datetime
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
remove_column :manifestations, :attachment_file_name
|
11
|
+
remove_column :manifestations, :attachment_content_type
|
12
|
+
remove_column :manifestations, :attachment_file_size
|
13
|
+
remove_column :manifestations, :attachment_updated_at
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class AddDcndlSchema < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestations, :title_alternative_transcription, :text
|
4
|
+
add_column :agents, :full_name_alternative_transcription, :text
|
5
|
+
add_column :manifestations, :description, :text
|
6
|
+
add_column :manifestations, :abstract, :text
|
7
|
+
add_column :manifestations, :available_at, :timestamp
|
8
|
+
add_column :manifestations, :valid_until, :timestamp
|
9
|
+
add_column :manifestations, :date_submitted, :timestamp
|
10
|
+
add_column :manifestations, :date_accepted, :timestamp
|
11
|
+
add_column :manifestations, :date_caputured, :timestamp
|
12
|
+
rename_column :manifestations, :copyright_date, :date_copyrighted
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
remove_column :manifestations, :title_alternative_transcription
|
17
|
+
remove_column :agents, :full_name_alternative_transcription
|
18
|
+
remove_column :manifestations, :description
|
19
|
+
remove_column :manifestations, :abstract
|
20
|
+
remove_column :manifestations, :available_at
|
21
|
+
remove_column :manifestations, :valid_until
|
22
|
+
remove_column :manifestations, :date_submitted
|
23
|
+
remove_column :manifestations, :date_accepted
|
24
|
+
remove_column :manifestations, :date_caputured
|
25
|
+
rename_column :manifestations, :date_copyrighted, :copyright_date
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateSeriesStatements < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :series_statements do |t|
|
4
|
+
t.text :title
|
5
|
+
t.text :numbering
|
6
|
+
t.text :title_subseries
|
7
|
+
t.text :numbering_subseries
|
8
|
+
t.integer :position
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|