enju_oai 0.1.0.pre10 → 0.1.0.pre11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/mime_types.rb +1 -1
- data/lib/enju_oai/version.rb +1 -1
- data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +9 -8
- data/spec/dummy/db/migrate/002_devise_create_users.rb +0 -35
- data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -18
- data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
- data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -3
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
- data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -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 +0 -2
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_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/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 +26 -0
- data/spec/dummy/db/migrate/{20100502171926_add_latitude_and_longitude_to_library.rb → 20130412083556_add_latitude_and_longitude_to_library.rb} +1 -6
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +1 -0
- data/spec/dummy/db/schema.rb +172 -216
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/conf/schema.xml +1 -0
- data/spec/dummy/solr/data/test/index/{_43.frq → _r.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_43.nrm → _r.nrm} +1 -1
- data/spec/dummy/solr/data/test/index/{_43.prx → _r.prx} +0 -0
- data/spec/dummy/solr/data/test/index/_r.tii +0 -0
- data/spec/dummy/solr/data/test/index/{_43.tis → _r.tis} +0 -0
- data/spec/dummy/solr/data/test/index/{_44.frq → _s.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_44.prx → _s.prx} +0 -0
- data/spec/dummy/solr/data/test/index/_s.tii +0 -0
- data/spec/dummy/solr/data/test/index/{_44.tis → _s.tis} +0 -0
- data/spec/dummy/solr/data/test/index/{_45.fnm → _t.fnm} +3 -2
- data/spec/dummy/solr/data/test/index/_t.frq +0 -0
- data/spec/dummy/solr/data/test/index/{_45.nrm → _t.nrm} +1 -1
- data/spec/dummy/solr/data/test/index/_t.prx +0 -0
- data/spec/dummy/solr/data/test/index/_t.tii +0 -0
- data/spec/dummy/solr/data/test/index/_t.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_15 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/fixtures/{patron_import_files.yml → agent_import_files.yml} +18 -18
- data/spec/fixtures/{patron_import_results.yml → agent_import_results.yml} +7 -7
- data/spec/fixtures/{patron_relationship_types.yml → agent_relationship_types.yml} +4 -4
- data/spec/fixtures/{patron_relationships.yml → agent_relationships.yml} +4 -4
- data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
- data/spec/fixtures/{patrons.yml → agents.yml} +46 -46
- data/spec/fixtures/creates.yml +8 -8
- data/spec/fixtures/donates.yml +4 -4
- data/spec/fixtures/manifestations.yml +25 -162
- data/spec/fixtures/owns.yml +3 -3
- data/spec/fixtures/produces.yml +20 -20
- data/spec/fixtures/realizes.yml +11 -11
- data/spec/fixtures/user_groups.yml +0 -7
- metadata +101 -139
- data/spec/dummy/app/models/role.rb +0 -46
- data/spec/dummy/app/models/user_has_role.rb +0 -4
- data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
- data/spec/dummy/db/migrate/20100326024214_add_date_index_to_resource.rb +0 -11
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
- data/spec/dummy/db/migrate/20100627193848_add_enju_access_key_to_user.rb +0 -10
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
- data/spec/dummy/db/migrate/20100919121500_drop_user_email_unique_index.rb +0 -11
- data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
- data/spec/dummy/db/migrate/20101103090330_add_title_to_patron.rb +0 -9
- data/spec/dummy/db/migrate/20101103090457_rename_manifestation_identifier_to_identifier.rb +0 -9
- data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.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/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/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +0 -13
- 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/20110927135845_add_missing_since_to_item.rb +0 -9
- data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20111103221239_rename_manifestation_identifier_to_manifestation_identifier.rb +0 -9
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_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/20120413225628_add_fingerprint_to_manifestation.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/20120426034355_add_unique_index_to_item_identifier.rb +0 -11
- data/spec/dummy/db/migrate/20120426042730_add_unique_index_to_manifestation_identifier.rb +0 -11
- data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +0 -6
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120728204337_create_series_statement_relationships.rb +0 -11
- data/spec/dummy/solr/data/test/index/_43.tii +0 -0
- data/spec/dummy/solr/data/test/index/_44.tii +0 -0
- data/spec/dummy/solr/data/test/index/_45.frq +0 -0
- data/spec/dummy/solr/data/test/index/_45.prx +0 -0
- data/spec/dummy/solr/data/test/index/_45.tii +0 -0
- data/spec/dummy/solr/data/test/index/_45.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_5v +0 -0
- /data/spec/dummy/solr/data/test/index/{_43.fdt → _r.fdt} +0 -0
- /data/spec/dummy/solr/data/test/index/{_43.fdx → _r.fdx} +0 -0
- /data/spec/dummy/solr/data/test/index/{_43.fnm → _r.fnm} +0 -0
- /data/spec/dummy/solr/data/test/index/{_44.fdt → _s.fdt} +0 -0
- /data/spec/dummy/solr/data/test/index/{_44.fdx → _s.fdx} +0 -0
- /data/spec/dummy/solr/data/test/index/{_44.fnm → _s.fnm} +0 -0
- /data/spec/dummy/solr/data/test/index/{_44.nrm → _s.nrm} +0 -0
- /data/spec/dummy/solr/data/test/index/{_45.fdt → _t.fdt} +0 -0
- /data/spec/dummy/solr/data/test/index/{_45.fdx → _t.fdx} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e27ed05477f34a2a50bba4f28cb5f74525cd1a90
|
4
|
+
data.tar.gz: 4b42cf4979f3ec2214f938b1f7a421caee074b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71ef724fe39025a925130321b7bc741bd1829ab32c8927f8571d32d95e9d0db5cd4b10c8e0427427d7eb2cff703fff756c503595ab1e2c2e93e0ecb4a9ca317b
|
7
|
+
data.tar.gz: cfc6573daf2d8d33da679540dee31c4e04355879579b03bd2a52b2c6c8db8d9dc32207fcf19f45fcd00cde54624f7943005952d3a586ac2783f6066c1c2360a5
|
data/lib/enju_oai/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class CreateAgents < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
create_table :
|
3
|
+
create_table :agents do |t|
|
4
4
|
t.integer :user_id
|
5
5
|
t.string :last_name
|
6
6
|
t.string :middle_name
|
@@ -27,6 +27,7 @@ class CreatePatrons < ActiveRecord::Migration
|
|
27
27
|
t.string :fax_number_2
|
28
28
|
t.text :other_designation
|
29
29
|
t.text :place
|
30
|
+
t.string :postal_code
|
30
31
|
t.text :street
|
31
32
|
t.text :locality
|
32
33
|
t.text :region
|
@@ -34,7 +35,7 @@ class CreatePatrons < ActiveRecord::Migration
|
|
34
35
|
t.datetime :date_of_death
|
35
36
|
t.integer :language_id, :default => 1, :null => false
|
36
37
|
t.integer :country_id, :default => 1, :null => false
|
37
|
-
t.integer :
|
38
|
+
t.integer :agent_type_id, :default => 1, :null => false
|
38
39
|
t.integer :lock_version, :default => 0, :null => false
|
39
40
|
t.text :note
|
40
41
|
t.integer :required_role_id, :default => 1, :null => false
|
@@ -43,10 +44,10 @@ class CreatePatrons < ActiveRecord::Migration
|
|
43
44
|
t.text :email
|
44
45
|
t.text :url
|
45
46
|
end
|
46
|
-
add_index :
|
47
|
-
add_index :
|
48
|
-
add_index :
|
49
|
-
add_index :
|
50
|
-
add_index :
|
47
|
+
add_index :agents, :user_id, :unique => true
|
48
|
+
add_index :agents, :language_id
|
49
|
+
add_index :agents, :country_id
|
50
|
+
add_index :agents, :required_role_id
|
51
|
+
add_index :agents, :full_name
|
51
52
|
end
|
52
53
|
end
|
@@ -22,50 +22,15 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
|
22
22
|
## Encryptable
|
23
23
|
t.string :password_salt
|
24
24
|
|
25
|
-
## Confirmable
|
26
|
-
t.string :confirmation_token
|
27
|
-
t.datetime :confirmed_at
|
28
|
-
t.datetime :confirmation_sent_at
|
29
|
-
t.string :unconfirmed_email # Only if using reconfirmable
|
30
|
-
|
31
|
-
## Lockable
|
32
|
-
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
33
|
-
t.string :unlock_token # Only if unlock strategy is :email or :both
|
34
|
-
t.datetime :locked_at
|
35
|
-
|
36
25
|
# Token authenticatable
|
37
26
|
t.string :authentication_token
|
38
27
|
|
39
28
|
|
40
29
|
t.timestamps
|
41
|
-
|
42
|
-
t.datetime :deleted_at
|
43
|
-
|
44
|
-
t.string :username, :null => false
|
45
|
-
t.integer :library_id, :default => 1, :null => false
|
46
|
-
t.integer :user_group_id, :default => 1, :null => false
|
47
|
-
t.datetime :expired_at
|
48
|
-
t.integer :required_role_id, :default => 1, :null => false
|
49
|
-
t.text :note
|
50
|
-
t.text :keyword_list
|
51
|
-
t.string :user_number
|
52
|
-
t.string :state
|
53
|
-
#t.integer :required_score, :default => 0, :null => false
|
54
|
-
t.string :locale
|
55
|
-
|
56
|
-
#t.integer :bookmarks_count, :default => 0, :null => false
|
57
|
-
#t.boolean :share_bookmarks, :default => false, :null => false
|
58
|
-
#t.boolean :save_search_history, :default => false, :null => false
|
59
30
|
end
|
60
31
|
add_index :users, :email, :unique => true
|
61
32
|
add_index :users, :reset_password_token, :unique => true
|
62
|
-
add_index :users, :confirmation_token, :unique => true
|
63
|
-
add_index :users, :unlock_token, :unique => true
|
64
33
|
add_index :users, :authentication_token, :unique => true
|
65
|
-
add_index :users, :username, :unique => true
|
66
|
-
add_index :users, :user_group_id
|
67
|
-
add_index :users, :required_role_id
|
68
|
-
add_index :users, :user_number, :unique => true
|
69
34
|
end
|
70
35
|
|
71
36
|
end
|
@@ -19,18 +19,11 @@ class CreateManifestations < ActiveRecord::Migration
|
|
19
19
|
t.integer :height
|
20
20
|
t.integer :width
|
21
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
22
|
t.integer :price # TODO: 通貨単位
|
30
23
|
t.text :fulltext
|
31
|
-
t.string :
|
32
|
-
t.string :
|
33
|
-
t.string :
|
24
|
+
t.string :volume_number_string
|
25
|
+
t.string :issue_number_string
|
26
|
+
t.string :serial_number_string
|
34
27
|
t.integer :edition
|
35
28
|
t.text :note
|
36
29
|
t.boolean :repository_content, :default => false, :null => false
|
@@ -41,16 +34,12 @@ class CreateManifestations < ActiveRecord::Migration
|
|
41
34
|
t.integer :frequency_id, :default => 1, :null => false
|
42
35
|
t.boolean :subscription_master, :default => false, :null => false
|
43
36
|
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
|
37
|
+
#add_index :manifestations, :carrier_type_id
|
38
|
+
#add_index :manifestations, :required_role_id
|
51
39
|
add_index :manifestations, :access_address
|
52
|
-
add_index :manifestations, :frequency_id
|
40
|
+
#add_index :manifestations, :frequency_id
|
53
41
|
add_index :manifestations, :manifestation_identifier
|
54
42
|
add_index :manifestations, :updated_at
|
43
|
+
add_index :manifestations, :date_of_publication
|
55
44
|
end
|
56
45
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateOwns < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :owns do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :item, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :owns, :
|
9
|
+
add_index :owns, :agent_id
|
10
10
|
add_index :owns, :item_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateCreates < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :creates do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :work, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :creates, :
|
9
|
+
add_index :creates, :agent_id
|
10
10
|
add_index :creates, :work_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateProduces < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :produces do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :manifestation, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :produces, :
|
9
|
+
add_index :produces, :agent_id
|
10
10
|
add_index :produces, :manifestation_id
|
11
11
|
end
|
12
12
|
end
|
@@ -6,12 +6,10 @@ class CreateLibraryGroups < ActiveRecord::Migration
|
|
6
6
|
t.string :short_name, :null => false
|
7
7
|
t.string :email
|
8
8
|
t.text :my_networks
|
9
|
-
t.boolean :use_dsbl, :default => false, :null => false
|
10
|
-
t.text :dsbl_list
|
11
9
|
t.text :login_banner
|
12
10
|
t.text :note
|
13
|
-
t.integer :valid_period_for_new_user, :default => 365, :null => false
|
14
11
|
t.integer :country_id
|
12
|
+
t.integer :position
|
15
13
|
|
16
14
|
t.timestamps
|
17
15
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateDonates < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :donates do |t|
|
4
|
-
t.integer :
|
4
|
+
t.integer :agent_id, :null => false
|
5
5
|
t.integer :item_id, :null => false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :donates, :
|
9
|
+
add_index :donates, :agent_id
|
10
10
|
add_index :donates, :item_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateRealizes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :realizes do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :expression, :null => false
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :realizes, :
|
10
|
+
add_index :realizes, :agent_id
|
11
11
|
add_index :realizes, :expression_id
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1,22 @@
|
|
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 :state
|
11
|
+
t.string :agent_import_file_name
|
12
|
+
t.string :agent_import_content_type
|
13
|
+
t.integer :agent_import_file_size
|
14
|
+
t.datetime :agent_import_updated_at
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
add_index :agent_import_files, :parent_id
|
19
|
+
add_index :agent_import_files, :user_id
|
20
|
+
add_index :agent_import_files, :state
|
21
|
+
end
|
22
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class CreateAgentRelationshipTypes < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
create_table :
|
3
|
+
create_table :agent_relationship_types do |t|
|
4
4
|
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
6
6
|
t.text :note
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AddDcndlSchema < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
3
|
add_column :manifestations, :title_alternative_transcription, :text
|
4
|
-
add_column :
|
4
|
+
add_column :agents, :full_name_alternative_transcription, :text
|
5
5
|
add_column :manifestations, :description, :text
|
6
6
|
add_column :manifestations, :abstract, :text
|
7
7
|
add_column :manifestations, :available_at, :timestamp
|
@@ -14,7 +14,7 @@ class AddDcndlSchema < ActiveRecord::Migration
|
|
14
14
|
|
15
15
|
def self.down
|
16
16
|
remove_column :manifestations, :title_alternative_transcription
|
17
|
-
remove_column :
|
17
|
+
remove_column :agents, :full_name_alternative_transcription
|
18
18
|
remove_column :manifestations, :description
|
19
19
|
remove_column :manifestations, :abstract
|
20
20
|
remove_column :manifestations, :available_at
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateAgentRelationships < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_relationships do |t|
|
4
|
+
t.integer :parent_id
|
5
|
+
t.integer :child_id
|
6
|
+
t.integer :agent_relationship_type_id
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :agent_relationships, :parent_id
|
11
|
+
add_index :agent_relationships, :child_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddPositionToAgentRelationship < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestation_relationships, :position, :integer
|
4
|
+
add_column :agent_relationships, :position, :integer
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :agent_relationships, :position
|
9
|
+
remove_column :manifestation_relationships, :position
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddBirthDateAndDeathDateToAgent < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :agents, :birth_date, :string
|
4
|
+
add_column :agents, :death_date, :string
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :agents, :death_date
|
9
|
+
remove_column :agents, :birth_date
|
10
|
+
end
|
11
|
+
end
|
@@ -2,12 +2,10 @@ class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
3
3
|
add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
4
4
|
add_column :user_groups, :expired_at, :timestamp
|
5
|
-
remove_column :library_groups, :valid_period_for_new_user
|
6
5
|
end
|
7
6
|
|
8
7
|
def self.down
|
9
8
|
remove_column :user_groups, :valid_period_for_new_user
|
10
9
|
remove_column :user_groups, :expired_at
|
11
|
-
add_column :library_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
12
10
|
end
|
13
11
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateAccepts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :accepts do |t|
|
4
|
+
t.integer :basket_id
|
5
|
+
t.integer :item_id
|
6
|
+
t.integer :librarian_id
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :accepts, :basket_id
|
12
|
+
add_index :accepts, :item_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class AddAdditionalAttributesToUser < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :users, :username, :string
|
4
|
+
add_column :users, :user_number, :string
|
5
|
+
add_column :users, :state, :string
|
6
|
+
add_column :users, :locale, :string
|
7
|
+
add_column :users, :deleted_at, :datetime
|
8
|
+
add_column :users, :expired_at, :datetime
|
9
|
+
add_column :users, :library_id, :integer, :default => 1, :null => false
|
10
|
+
add_column :users, :required_role_id, :integer, :default => 1, :null => false
|
11
|
+
add_column :users, :user_group_id, :integer, :default => 1, :null => false
|
12
|
+
add_column :users, :note, :text
|
13
|
+
add_column :users, :keyword_list, :text
|
14
|
+
|
15
|
+
add_column :users, :failed_attempts, :integer, :default => 0
|
16
|
+
add_column :users, :unlock_token, :string
|
17
|
+
add_column :users, :locked_at, :datetime
|
18
|
+
|
19
|
+
add_column :users, :confirmed_at, :datetime
|
20
|
+
|
21
|
+
add_index :users, :username, :unique => true
|
22
|
+
add_index :users, :user_group_id
|
23
|
+
add_index :users, :user_number, :unique => true
|
24
|
+
add_index :users, :unlock_token, :unique => true
|
25
|
+
end
|
26
|
+
end
|
@@ -1,11 +1,6 @@
|
|
1
1
|
class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration
|
2
|
-
def
|
2
|
+
def change
|
3
3
|
add_column :libraries, :latitude, :float
|
4
4
|
add_column :libraries, :longitude, :float
|
5
5
|
end
|
6
|
-
|
7
|
-
def self.down
|
8
|
-
remove_column :libraries, :longitude
|
9
|
-
remove_column :libraries, :latitude
|
10
|
-
end
|
11
6
|
end
|