enju_event 0.0.27 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/Rakefile +1 -11
- data/app/controllers/calendar_controller.rb +1 -1
- data/app/controllers/event_categories_controller.rb +1 -1
- data/app/controllers/event_import_files_controller.rb +15 -15
- data/app/controllers/event_import_results_controller.rb +1 -1
- data/app/controllers/events_controller.rb +16 -16
- data/app/controllers/participates_controller.rb +3 -3
- data/app/models/event.rb +2 -4
- data/app/models/event_category.rb +0 -1
- data/app/models/event_import_file.rb +33 -106
- data/app/models/event_import_result.rb +0 -1
- data/app/models/participate.rb +0 -1
- data/app/views/event_categories/index.html.erb +2 -2
- data/app/views/event_import_files/index.html.erb +4 -4
- data/app/views/event_import_files/new.html.erb +2 -0
- data/app/views/event_import_files/show.html.erb +3 -8
- data/app/views/event_import_results/index.html.erb +2 -2
- data/app/views/events/_form.html.erb +1 -1
- data/app/views/events/index.html.erb +8 -8
- data/app/views/events/index.mobile.erb +6 -6
- data/app/views/events/index.rss.builder +2 -2
- data/app/views/participates/index.html.erb +2 -2
- data/config/locales/translation_en.yml +1 -2
- data/config/locales/translation_ja.yml +1 -2
- data/config/routes.rb +0 -3
- data/db/migrate/20120413051535_add_event_fingerprint_to_event_import_file.rb +5 -0
- data/lib/enju_event.rb +0 -17
- data/lib/enju_event/engine.rb +9 -2
- data/lib/enju_event/version.rb +1 -1
- data/spec/dummy/app/models/country.rb +44 -0
- data/spec/dummy/app/models/language.rb +4 -0
- data/spec/dummy/app/models/library.rb +128 -0
- data/spec/dummy/app/models/library_group.rb +86 -0
- data/spec/dummy/app/models/patron.rb +163 -0
- data/spec/dummy/app/models/patron_type.rb +19 -0
- data/spec/dummy/app/models/role.rb +1 -39
- data/spec/dummy/app/models/shelf.rb +54 -0
- data/spec/dummy/app/models/user.rb +10 -61
- data/spec/dummy/app/models/user_group.rb +0 -38
- data/spec/dummy/app/models/user_has_role.rb +0 -1
- data/spec/dummy/config/application.rb +1 -3
- data/spec/dummy/config/initializers/devise.rb +4 -0
- data/spec/dummy/config/initializers/mime_types.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_patrons.rb +10 -1
- data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +5 -1
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +5 -1
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +10 -31
- data/spec/dummy/db/schema.rb +20 -494
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/enju_leaf.rb +4 -0
- data/spec/dummy/lib/enju_leaf/import_file.rb +13 -0
- data/spec/dummy/lib/enju_leaf/localized_name.rb +13 -0
- data/spec/dummy/lib/enju_leaf/master_model.rb +41 -0
- data/spec/dummy/lib/enju_leaf/url_validator.rb +10 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv +1 -1
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv +1 -1
- data/spec/dummy/private/system/event_imports/4/original/event_import_file_sample1.tsv +1 -1
- data/spec/dummy/private/system/event_imports/4/original/event_import_file_sample2.tsv +1 -1
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
- data/spec/fixtures/event_import_files.yml +4 -6
- data/spec/models/event_import_file_spec.rb +4 -38
- metadata +123 -329
- data/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +0 -5
- data/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +0 -5
- data/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/controllers/calendar_controller_spec.rb +0 -57
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -56
- data/spec/dummy/db/migrate/006_create_items.rb +0 -28
- data/spec/dummy/db/migrate/012_create_owns.rb +0 -12
- data/spec/dummy/db/migrate/015_create_creates.rb +0 -12
- data/spec/dummy/db/migrate/047_create_produces.rb +0 -12
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +0 -11
- data/spec/dummy/db/migrate/112_create_frequencies.rb +0 -12
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +0 -12
- data/spec/dummy/db/migrate/125_create_donates.rb +0 -12
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +0 -13
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +0 -15
- data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +0 -22
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +0 -15
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +0 -15
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +0 -12
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +0 -12
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +0 -12
- data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +0 -12
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +0 -27
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +0 -12
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +0 -13
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -15
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +0 -13
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +0 -10
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +0 -13
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +0 -12
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +0 -15
- data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +0 -9
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
- data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +0 -11
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +0 -9
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +0 -12
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +0 -13
- data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +0 -10
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +0 -12
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +0 -12
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +0 -12
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +0 -7
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +0 -6
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +0 -6
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +0 -6
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv +0 -4
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_update_file.tsv +0 -4
- data/spec/dummy/private/system/event_imports/4/original/event_destroy_file.tsv +0 -4
- data/spec/dummy/private/system/event_imports/4/original/event_update_file.tsv +0 -4
- data/spec/dummy/solr/data/test/index/_5l.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_5l.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_5l.fnm +0 -4
- data/spec/dummy/solr/data/test/index/_5l.frq +0 -0
- data/spec/dummy/solr/data/test/index/_5l.nrm +0 -1
- data/spec/dummy/solr/data/test/index/_5l.prx +0 -0
- data/spec/dummy/solr/data/test/index/_5l.tii +0 -0
- data/spec/dummy/solr/data/test/index/_5l.tis +0 -0
- data/spec/dummy/solr/data/test/index/_5l_1.del +0 -0
- data/spec/dummy/solr/data/test/index/_5m.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_5m.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_5m.fnm +0 -4
- data/spec/dummy/solr/data/test/index/_5m.frq +0 -0
- data/spec/dummy/solr/data/test/index/_5m.nrm +0 -1
- data/spec/dummy/solr/data/test/index/_5m.prx +0 -0
- data/spec/dummy/solr/data/test/index/_5m.tii +0 -0
- data/spec/dummy/solr/data/test/index/_5m.tis +0 -0
- data/spec/dummy/solr/data/test/index/_5m_1.del +0 -0
- data/spec/dummy/solr/data/test/index/_5n.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_5n.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_5n.fnm +0 -4
- data/spec/dummy/solr/data/test/index/_5n.frq +0 -0
- data/spec/dummy/solr/data/test/index/_5n.nrm +0 -1
- data/spec/dummy/solr/data/test/index/_5n.prx +0 -0
- data/spec/dummy/solr/data/test/index/_5n.tii +0 -0
- data/spec/dummy/solr/data/test/index/_5n.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_6l +0 -0
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe CalendarController do
|
4
|
-
fixtures :all
|
5
|
-
|
6
|
-
describe "GET index", :solr => true do
|
7
|
-
describe "When logged in as Administrator" do
|
8
|
-
login_admin
|
9
|
-
|
10
|
-
it "assigns all event_stripss as @event_stripss" do
|
11
|
-
get :index
|
12
|
-
assigns(:event_strips).should_not be_empty
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "When not logged in" do
|
17
|
-
it "assigns all event_stripss as @event_stripss" do
|
18
|
-
get :index
|
19
|
-
assigns(:event_strips).should_not be_empty
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should get index when a year and a month are set" do
|
23
|
-
get :index, :year => 2010, :month => 3
|
24
|
-
response.should be_success
|
25
|
-
assigns(:event_strips).should_not be_empty
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should redirect to a new event if no event is present" do
|
29
|
-
get :show, :year => 2010, :month => 3, :day => 1
|
30
|
-
response.should redirect_to new_event_path(:date => '2010/03/01')
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should redirect to an existing event" do
|
34
|
-
get :show, :year => 2008, :month => 1, :day => 13
|
35
|
-
response.should redirect_to events_path(:date => '2008/01/13')
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe "GET show" do
|
41
|
-
describe "When logged in as Administrator" do
|
42
|
-
login_admin
|
43
|
-
|
44
|
-
it "should redirect to a new event" do
|
45
|
-
get :show, :year => '2011', :month => '1', :day => '1'
|
46
|
-
response.should redirect_to(new_event_path(:date => '2011/01/01'))
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
describe "When not logged in" do
|
51
|
-
it "should redirect to a new event" do
|
52
|
-
get :show, :year => '2011', :month => '1', :day => '1'
|
53
|
-
response.should redirect_to(new_event_path(:date => '2011/01/01'))
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,56 +0,0 @@
|
|
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.string :isbn
|
23
|
-
t.string :isbn10
|
24
|
-
t.string :wrong_isbn
|
25
|
-
t.string :nbn
|
26
|
-
t.string :lccn
|
27
|
-
t.string :oclc_number
|
28
|
-
t.string :issn
|
29
|
-
t.integer :price # TODO: 通貨単位
|
30
|
-
t.text :fulltext
|
31
|
-
t.string :volume_number_list
|
32
|
-
t.string :issue_number_list
|
33
|
-
t.string :serial_number_list
|
34
|
-
t.integer :edition
|
35
|
-
t.text :note
|
36
|
-
t.boolean :repository_content, :default => false, :null => false
|
37
|
-
t.integer :lock_version, :default => 0, :null => false
|
38
|
-
t.integer :required_role_id, :default => 1, :null => false
|
39
|
-
t.string :state
|
40
|
-
t.integer :required_score, :default => 0, :null => false
|
41
|
-
t.integer :frequency_id, :default => 1, :null => false
|
42
|
-
t.boolean :subscription_master, :default => false, :null => false
|
43
|
-
end
|
44
|
-
add_index :manifestations, :carrier_type_id
|
45
|
-
add_index :manifestations, :required_role_id
|
46
|
-
add_index :manifestations, :isbn
|
47
|
-
add_index :manifestations, :nbn
|
48
|
-
add_index :manifestations, :lccn
|
49
|
-
add_index :manifestations, :oclc_number
|
50
|
-
add_index :manifestations, :issn
|
51
|
-
add_index :manifestations, :access_address
|
52
|
-
add_index :manifestations, :frequency_id
|
53
|
-
add_index :manifestations, :manifestation_identifier
|
54
|
-
add_index :manifestations, :updated_at
|
55
|
-
end
|
56
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
class CreateItems < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :items do |t|
|
4
|
-
#t.integer :manifestation_id
|
5
|
-
t.string :call_number
|
6
|
-
t.string :item_identifier
|
7
|
-
t.integer :circulation_status_id, :default => 5, :null => false
|
8
|
-
t.integer :checkout_type_id, :default => 1, :null => false
|
9
|
-
t.timestamps
|
10
|
-
t.datetime :deleted_at
|
11
|
-
t.integer :shelf_id, :default => 1, :null => false
|
12
|
-
t.boolean :include_supplements, :default => false, :null => false
|
13
|
-
t.text :note
|
14
|
-
t.string :url
|
15
|
-
t.integer :price
|
16
|
-
t.integer :lock_version, :default => 0, :null => false
|
17
|
-
t.integer :required_role_id, :default => 1, :null => false
|
18
|
-
t.string :state
|
19
|
-
t.integer :required_score, :default => 0, :null => false
|
20
|
-
end
|
21
|
-
#add_index :items, :manifestation_id
|
22
|
-
add_index :items, :circulation_status_id
|
23
|
-
add_index :items, :checkout_type_id
|
24
|
-
add_index :items, :shelf_id
|
25
|
-
add_index :items, :item_identifier
|
26
|
-
add_index :items, :required_role_id
|
27
|
-
end
|
28
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class CreateOwns < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :owns do |t|
|
4
|
-
t.references :patron, :null => false
|
5
|
-
t.references :item, :null => false
|
6
|
-
t.integer :position
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :owns, :patron_id
|
10
|
-
add_index :owns, :item_id
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class CreateCreates < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :creates do |t|
|
4
|
-
t.references :patron, :null => false
|
5
|
-
t.references :work, :null => false
|
6
|
-
t.integer :position
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :creates, :patron_id
|
10
|
-
add_index :creates, :work_id
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class CreateProduces < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :produces do |t|
|
4
|
-
t.references :patron, :null => false
|
5
|
-
t.references :manifestation, :null => false
|
6
|
-
t.integer :position
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :produces, :patron_id
|
10
|
-
add_index :produces, :manifestation_id
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class CreateDonates < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :donates do |t|
|
4
|
-
t.integer :patron_id, :null => false
|
5
|
-
t.integer :item_id, :null => false
|
6
|
-
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
add_index :donates, :patron_id
|
10
|
-
add_index :donates, :item_id
|
11
|
-
end
|
12
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class CreateRealizes < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :realizes do |t|
|
4
|
-
t.references :patron, :null => false
|
5
|
-
t.references :expression, :null => false
|
6
|
-
t.integer :position
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_index :realizes, :patron_id
|
11
|
-
add_index :realizes, :expression_id
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
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,15 +0,0 @@
|
|
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
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class CreatePatronImportFiles < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :patron_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 :patron_import_file_name
|
12
|
-
t.string :patron_import_content_type
|
13
|
-
t.integer :patron_import_file_size
|
14
|
-
t.datetime :patron_import_updated_at
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
18
|
-
add_index :patron_import_files, :parent_id
|
19
|
-
add_index :patron_import_files, :user_id
|
20
|
-
add_index :patron_import_files, :state
|
21
|
-
end
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
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 :imported_at
|
10
|
-
t.string :state
|
11
|
-
t.string :resource_import_file_name
|
12
|
-
t.string :resource_import_content_type
|
13
|
-
t.integer :resource_import_file_size
|
14
|
-
t.datetime :resource_import_updated_at
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
18
|
-
add_index :resource_import_files, :parent_id
|
19
|
-
add_index :resource_import_files, :user_id
|
20
|
-
add_index :resource_import_files, :state
|
21
|
-
end
|
22
|
-
end
|
@@ -1,15 +0,0 @@
|
|
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
|
@@ -1,15 +0,0 @@
|
|
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
|