enju_leaf 1.3.0.beta.2 → 1.3.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +8 -8
- data/app/assets/javascripts/mobile.js +1 -1
- data/lib/enju_leaf/version.rb +1 -1
- data/spec/controllers/page_controller_spec.rb +11 -11
- data/spec/dummy/app/models/user.rb +2 -2
- data/spec/dummy/db/migrate/001_create_agents.rb +6 -6
- data/spec/dummy/db/migrate/002_devise_create_users.rb +5 -6
- data/spec/dummy/db/migrate/005_create_manifestations.rb +12 -12
- data/spec/dummy/db/migrate/006_create_items.rb +5 -5
- 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/032_create_checkins.rb +1 -1
- data/spec/dummy/db/migrate/033_create_checkouts.rb +4 -4
- data/spec/dummy/db/migrate/035_create_reserves.rb +5 -5
- data/spec/dummy/db/migrate/041_create_roles.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/055_create_bookmarks.rb +2 -2
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -1
- data/spec/dummy/db/migrate/090_create_search_histories.rb +3 -3
- data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
- data/spec/dummy/db/migrate/113_create_events.rb +3 -3
- data/spec/dummy/db/migrate/114_create_event_categories.rb +1 -1
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
- data/spec/dummy/db/migrate/121_create_checked_items.rb +3 -3
- data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -1
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +1 -1
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +2 -2
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
- data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
- data/spec/dummy/db/migrate/149_create_message_templates.rb +5 -5
- data/spec/dummy/db/migrate/154_create_messages.rb +2 -2
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +3 -3
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +5 -5
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +8 -9
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +5 -6
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +1 -1
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +8 -8
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +3 -3
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +4 -4
- data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +2 -2
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +3 -3
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +3 -3
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +2 -2
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +1 -1
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +1 -1
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +6 -6
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +3 -3
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +2 -2
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +3 -3
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -1
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +0 -1
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +0 -1
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +1 -2
- data/spec/dummy/db/migrate/20120418121539_add_save_search_history_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +3 -3
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +2 -2
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +3 -3
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +1 -1
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +1 -1
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +3 -4
- metadata +380 -380
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29cd8630cc6bcffaa909da9b0a3589a5e112a98a
|
4
|
+
data.tar.gz: 9eb44cece5c1c51e3f20d003f67b254c835d6a5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca96e7fdc07a47af1d5371add0b3f319005cba0c54147909b1398bb61052f2397220c935d006083d0ad119d2474536a74f0296fb95b603d70f90150d11d5e920
|
7
|
+
data.tar.gz: 9d955ea88f8aa18d14ba391471898796020d8ff01c553d43ad194f8885564002a522cd0d486fbac15ee9eed8ee3088625a529dadb969d9c1bfbccb63908cc571
|
data/README.rdoc
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
= Next-L Enju Leaf
|
2
|
-
{<img src="https://travis-ci.org/next-l/enju_leaf.svg?branch=1.
|
3
|
-
{<img src="https://coveralls.io/repos/next-l/enju_leaf/badge.svg?branch=1.
|
4
|
-
{<img src="https://hakiri.io/github/next-l/enju_leaf/1.
|
2
|
+
{<img src="https://travis-ci.org/next-l/enju_leaf.svg?branch=1.3" alt="Build Status" />}[https://travis-ci.org/next-l/enju_leaf]
|
3
|
+
{<img src="https://coveralls.io/repos/next-l/enju_leaf/badge.svg?branch=1.3&service=github" alt="Coverage Status" />}[https://coveralls.io/github/next-l/enju_leaf?branch=1.3]
|
4
|
+
{<img src="https://hakiri.io/github/next-l/enju_leaf/1.3.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_leaf/1.3]
|
5
5
|
|
6
|
-
Next-L Enju Leaf は、{Project Next-L}[
|
6
|
+
Next-L Enju Leaf は、{Project Next-L}[https://www.next-l.jp] で開発している図書館管理システムです。
|
7
7
|
|
8
|
-
Next-L Enju Leaf is an integrated library system developed by {Project Next-L}[
|
8
|
+
Next-L Enju Leaf is an integrated library system developed by {Project Next-L}[https://www.next-l.jp].
|
9
9
|
|
10
10
|
== Project Next-L とは (What is Project Next-L?)
|
11
|
-
{Project Next-L}[
|
11
|
+
{Project Next-L}[https://www.next-l.jp] とは、日本の図書館関係者有志の手で新しい図書館管理システムを作り上げるプロジェクトです。
|
12
12
|
|
13
|
-
{Project Next-L}[
|
13
|
+
{Project Next-L}[https://www.next-l.jp] is a project to build a new integrated library system maintained by Japanese volunteers interested in libraries.
|
14
14
|
|
15
15
|
== 動作デモ (Demonstration)
|
16
16
|
* http://enju.next-l.jp
|
@@ -24,4 +24,4 @@ Next-L Enju Leaf is an integrated library system developed by {Project Next-L}[h
|
|
24
24
|
|
25
25
|
== 製作者・貢献者 (Authors and contributors)
|
26
26
|
* {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
|
27
|
-
* {Project Next-L}[
|
27
|
+
* {Project Next-L}[https://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])
|
data/lib/enju_leaf/version.rb
CHANGED
@@ -9,17 +9,17 @@ describe PageController do
|
|
9
9
|
|
10
10
|
it "should get import" do
|
11
11
|
get :import
|
12
|
-
expect(response).to
|
12
|
+
expect(response).to be_successful
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should get configuration" do
|
16
16
|
get :configuration
|
17
|
-
expect(response).to
|
17
|
+
expect(response).to be_successful
|
18
18
|
end
|
19
19
|
|
20
20
|
it "should get system information" do
|
21
21
|
get :system_information
|
22
|
-
expect(response).to
|
22
|
+
expect(response).to be_successful
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ describe PageController do
|
|
28
28
|
|
29
29
|
it "should redirect to user" do
|
30
30
|
get :index
|
31
|
-
expect(response).to
|
31
|
+
expect(response).to be_successful
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should not get import" do
|
@@ -50,17 +50,17 @@ describe PageController do
|
|
50
50
|
describe "When not logged in" do
|
51
51
|
it "should get index" do
|
52
52
|
get :index
|
53
|
-
expect(response).to
|
53
|
+
expect(response).to be_successful
|
54
54
|
end
|
55
55
|
|
56
56
|
it "should get opensearch" do
|
57
57
|
get :opensearch, format: :xml
|
58
|
-
expect(response).to
|
58
|
+
expect(response).to be_successful
|
59
59
|
end
|
60
60
|
|
61
61
|
it "should get msie_accelerator" do
|
62
62
|
get :msie_accelerator, format: :xml
|
63
|
-
expect(response).to
|
63
|
+
expect(response).to be_successful
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should get routing_error" do
|
@@ -71,23 +71,23 @@ describe PageController do
|
|
71
71
|
|
72
72
|
it "should get advanced_search" do
|
73
73
|
get :advanced_search
|
74
|
-
expect(response).to
|
74
|
+
expect(response).to be_successful
|
75
75
|
expect(assigns(:libraries)).to eq Library.order(:position)
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should get about" do
|
79
79
|
get :about
|
80
|
-
expect(response).to
|
80
|
+
expect(response).to be_successful
|
81
81
|
end
|
82
82
|
|
83
83
|
it "should get add_on" do
|
84
84
|
get :add_on
|
85
|
-
expect(response).to
|
85
|
+
expect(response).to be_successful
|
86
86
|
end
|
87
87
|
|
88
88
|
it "should get statistics" do
|
89
89
|
get :statistics
|
90
|
-
expect(response).to
|
90
|
+
expect(response).to be_successful
|
91
91
|
end
|
92
92
|
|
93
93
|
it "should not get import" do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class User < ActiveRecord::Base
|
2
2
|
devise :database_authenticatable, #:registerable,
|
3
|
-
|
4
|
-
|
3
|
+
:recoverable, :rememberable, :trackable, # , :validatable
|
4
|
+
:lockable, lock_strategy: :none, unlock_strategy: :none
|
5
5
|
|
6
6
|
include EnjuSeed::EnjuUser
|
7
7
|
end
|
@@ -32,13 +32,13 @@ class CreateAgents < ActiveRecord::Migration[4.2]
|
|
32
32
|
t.text :region
|
33
33
|
t.datetime :date_of_birth
|
34
34
|
t.datetime :date_of_death
|
35
|
-
t.integer :language_id, :
|
36
|
-
t.integer :country_id, :
|
37
|
-
t.integer :agent_type_id, :
|
38
|
-
t.integer :lock_version, :
|
35
|
+
t.integer :language_id, default: 1, null: false
|
36
|
+
t.integer :country_id, default: 1, null: false
|
37
|
+
t.integer :agent_type_id, default: 1, null: false
|
38
|
+
t.integer :lock_version, default: 0, null: false
|
39
39
|
t.text :note
|
40
|
-
t.integer :required_role_id, :
|
41
|
-
t.integer :required_score, :
|
40
|
+
t.integer :required_role_id, default: 1, null: false
|
41
|
+
t.integer :required_score, default: 0, null: false
|
42
42
|
t.text :email
|
43
43
|
t.text :url
|
44
44
|
end
|
@@ -2,8 +2,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[4.2]
|
|
2
2
|
def change
|
3
3
|
create_table(:users) do |t|
|
4
4
|
## Database authenticatable
|
5
|
-
t.string :email, :
|
6
|
-
t.string :encrypted_password, :
|
5
|
+
t.string :email, null: false, default: ""
|
6
|
+
t.string :encrypted_password, null: false, default: ""
|
7
7
|
|
8
8
|
## Recoverable
|
9
9
|
t.string :reset_password_token
|
@@ -13,7 +13,7 @@ class DeviseCreateUsers < ActiveRecord::Migration[4.2]
|
|
13
13
|
t.datetime :remember_created_at
|
14
14
|
|
15
15
|
## Trackable
|
16
|
-
t.integer :sign_in_count, :
|
16
|
+
t.integer :sign_in_count, default: 0
|
17
17
|
t.datetime :current_sign_in_at
|
18
18
|
t.datetime :last_sign_in_at
|
19
19
|
t.string :current_sign_in_ip
|
@@ -33,12 +33,11 @@ class DeviseCreateUsers < ActiveRecord::Migration[4.2]
|
|
33
33
|
## Token authenticatable
|
34
34
|
# t.string :authentication_token
|
35
35
|
|
36
|
-
|
37
36
|
t.timestamps
|
38
37
|
end
|
39
38
|
|
40
|
-
add_index :users, :email, :
|
41
|
-
add_index :users, :reset_password_token, :
|
39
|
+
add_index :users, :email, unique: true
|
40
|
+
add_index :users, :reset_password_token, unique: true
|
42
41
|
# add_index :users, :confirmation_token, :unique => true
|
43
42
|
# add_index :users, :unlock_token, :unique => true
|
44
43
|
# add_index :users, :authentication_token, :unique => true
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CreateManifestations < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :manifestations do |t|
|
4
|
-
t.text :original_title, :
|
4
|
+
t.text :original_title, null: false
|
5
5
|
t.text :title_alternative
|
6
6
|
t.text :title_transcription
|
7
7
|
t.string :classification_number
|
@@ -11,8 +11,8 @@ class CreateManifestations < ActiveRecord::Migration[4.2]
|
|
11
11
|
t.timestamps
|
12
12
|
t.datetime :deleted_at
|
13
13
|
t.string :access_address
|
14
|
-
t.integer :language_id, :
|
15
|
-
t.integer :carrier_type_id, :
|
14
|
+
t.integer :language_id, default: 1, null: false
|
15
|
+
t.integer :carrier_type_id, default: 1, null: false
|
16
16
|
t.integer :start_page
|
17
17
|
t.integer :end_page
|
18
18
|
t.integer :height
|
@@ -25,17 +25,17 @@ class CreateManifestations < ActiveRecord::Migration[4.2]
|
|
25
25
|
t.string :serial_number_string
|
26
26
|
t.integer :edition
|
27
27
|
t.text :note
|
28
|
-
t.boolean :repository_content, :
|
29
|
-
t.integer :lock_version, :
|
30
|
-
t.integer :required_role_id, :
|
31
|
-
t.integer :required_score, :
|
32
|
-
t.integer :frequency_id, :
|
33
|
-
t.boolean :subscription_master, :
|
28
|
+
t.boolean :repository_content, default: false, null: false
|
29
|
+
t.integer :lock_version, default: 0, null: false
|
30
|
+
t.integer :required_role_id, default: 1, null: false
|
31
|
+
t.integer :required_score, default: 0, null: false
|
32
|
+
t.integer :frequency_id, default: 1, null: false
|
33
|
+
t.boolean :subscription_master, default: false, null: false
|
34
34
|
end
|
35
|
-
#add_index :manifestations, :carrier_type_id
|
36
|
-
#add_index :manifestations, :required_role_id
|
35
|
+
# add_index :manifestations, :carrier_type_id
|
36
|
+
# add_index :manifestations, :required_role_id
|
37
37
|
add_index :manifestations, :access_address
|
38
|
-
#add_index :manifestations, :frequency_id
|
38
|
+
# add_index :manifestations, :frequency_id
|
39
39
|
add_index :manifestations, :manifestation_identifier
|
40
40
|
add_index :manifestations, :updated_at
|
41
41
|
add_index :manifestations, :date_of_publication
|
@@ -5,14 +5,14 @@ class CreateItems < ActiveRecord::Migration[4.2]
|
|
5
5
|
t.string :item_identifier
|
6
6
|
t.timestamps
|
7
7
|
t.datetime :deleted_at
|
8
|
-
t.integer :shelf_id, :
|
9
|
-
t.boolean :include_supplements, :
|
8
|
+
t.integer :shelf_id, default: 1, null: false
|
9
|
+
t.boolean :include_supplements, default: false, null: false
|
10
10
|
t.text :note
|
11
11
|
t.string :url
|
12
12
|
t.integer :price
|
13
|
-
t.integer :lock_version, :
|
14
|
-
t.integer :required_role_id, :
|
15
|
-
t.integer :required_score, :
|
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
16
|
end
|
17
17
|
add_index :items, :shelf_id
|
18
18
|
add_index :items, :item_identifier
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateOwns < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :owns do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :item, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :item, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateCreates < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :creates do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :work, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :work, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -2,19 +2,19 @@ class CreateCheckouts < ActiveRecord::Migration[4.2]
|
|
2
2
|
def self.up
|
3
3
|
create_table :checkouts do |t|
|
4
4
|
t.integer :user_id
|
5
|
-
t.integer :item_id, :
|
5
|
+
t.integer :item_id, null: false
|
6
6
|
t.integer :checkin_id
|
7
7
|
t.integer :librarian_id
|
8
8
|
t.integer :basket_id
|
9
9
|
t.datetime :due_date
|
10
|
-
t.integer :checkout_renewal_count, :
|
11
|
-
t.integer :lock_version, :
|
10
|
+
t.integer :checkout_renewal_count, default: 0, null: false
|
11
|
+
t.integer :lock_version, default: 0, null: false
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
add_index :checkouts, :user_id
|
15
15
|
add_index :checkouts, :item_id
|
16
16
|
add_index :checkouts, :basket_id
|
17
|
-
add_index :checkouts, [
|
17
|
+
add_index :checkouts, %i[item_id basket_id], unique: true
|
18
18
|
add_index :checkouts, :librarian_id
|
19
19
|
add_index :checkouts, :checkin_id
|
20
20
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
class CreateReserves < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
3
|
create_table :reserves do |t|
|
4
|
-
t.integer :user_id, :
|
5
|
-
t.integer :manifestation_id, :
|
4
|
+
t.integer :user_id, null: false
|
5
|
+
t.integer :manifestation_id, null: false
|
6
6
|
t.integer :item_id
|
7
|
-
t.integer :request_status_type_id, :
|
7
|
+
t.integer :request_status_type_id, null: false
|
8
8
|
t.datetime :checked_out_at
|
9
9
|
t.timestamps
|
10
10
|
t.datetime :canceled_at
|
11
11
|
t.datetime :expired_at
|
12
12
|
t.datetime :deleted_at
|
13
|
-
t.boolean :expiration_notice_to_patron, :
|
14
|
-
t.boolean :expiration_notice_to_library, :
|
13
|
+
t.boolean :expiration_notice_to_patron, default: false
|
14
|
+
t.boolean :expiration_notice_to_library, default: false
|
15
15
|
end
|
16
16
|
|
17
17
|
add_index :reserves, :user_id
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateRoles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table "roles" do |t|
|
4
|
-
t.column :name, :string, :
|
4
|
+
t.column :name, :string, null: false
|
5
5
|
t.column :display_name, :string
|
6
6
|
t.column :note, :text
|
7
7
|
t.column :created_at, :datetime
|
8
8
|
t.column :updated_at, :datetime
|
9
|
-
t.integer :score, :
|
9
|
+
t.integer :score, default: 0, null: false
|
10
10
|
t.integer :position
|
11
11
|
end
|
12
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateProduces < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :produces do |t|
|
4
|
-
t.references :agent, :
|
5
|
-
t.references :manifestation, :
|
4
|
+
t.references :agent, null: false
|
5
|
+
t.references :manifestation, null: false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CreateBookmarks < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
|
-
create_table :bookmarks, :
|
4
|
-
t.integer :user_id, :
|
3
|
+
create_table :bookmarks, force: true do |t|
|
4
|
+
t.integer :user_id, null: false
|
5
5
|
t.integer :manifestation_id
|
6
6
|
t.text :title
|
7
7
|
t.string :url
|
@@ -2,8 +2,8 @@ class CreateSearchHistories < ActiveRecord::Migration[4.2]
|
|
2
2
|
def self.up
|
3
3
|
create_table :search_histories do |t|
|
4
4
|
t.integer :user_id
|
5
|
-
t.string :operation, :
|
6
|
-
t.float :version, :
|
5
|
+
t.string :operation, default: 'searchRetrieve'
|
6
|
+
t.float :version, default: 1.2
|
7
7
|
t.string :query
|
8
8
|
t.integer :start_record
|
9
9
|
t.integer :maximum_records
|
@@ -12,7 +12,7 @@ class CreateSearchHistories < ActiveRecord::Migration[4.2]
|
|
12
12
|
t.integer :result_set_ttl
|
13
13
|
t.string :stylesheet
|
14
14
|
t.string :extra_request_data
|
15
|
-
t.integer :number_of_records, :
|
15
|
+
t.integer :number_of_records, default: 0
|
16
16
|
t.string :result_set_id
|
17
17
|
t.integer :result_set_idle_time
|
18
18
|
t.text :records
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateEvents < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
3
|
create_table :events do |t|
|
4
|
-
t.integer :library_id, :
|
5
|
-
t.integer :event_category_id, :
|
4
|
+
t.integer :library_id, default: 1, null: false
|
5
|
+
t.integer :event_category_id, default: 1, null: false
|
6
6
|
t.string :name
|
7
7
|
t.text :note
|
8
8
|
t.datetime :start_at
|
9
9
|
t.datetime :end_at
|
10
|
-
t.boolean :all_day, :
|
10
|
+
t.boolean :all_day, default: false, null: false
|
11
11
|
t.datetime :deleted_at
|
12
12
|
t.text :display_name
|
13
13
|
|