enju_biblio 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/agent_import_file.rb +1 -1
- data/app/models/agent_import_file_transition.rb +1 -1
- data/app/models/import_request.rb +1 -1
- data/app/models/import_request_transition.rb +1 -1
- data/app/models/resource_export_file.rb +1 -1
- data/app/models/resource_export_file_transition.rb +1 -1
- data/app/models/resource_import_file.rb +1 -1
- data/app/models/resource_import_file_transition.rb +1 -1
- data/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
- data/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
- data/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
- data/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/dummy/db/migrate/059_create_libraries.rb +7 -9
- data/spec/dummy/db/migrate/069_create_shelves.rb +3 -4
- data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -3
- data/spec/dummy/db/migrate/120_create_baskets.rb +2 -3
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -7
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -5
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +19 -6
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
- data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
- data/spec/dummy/db/schema.rb +28 -10
- metadata +19 -8
- data/lib/generators/enju_biblio/update/update_generator.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 602b8c263c907d28748c84402650976d1146392e
|
4
|
+
data.tar.gz: baa96bc8efbf265dad0ea1164de3b5113838720d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91eb7ab31bc0e35f5f7d3403d599b9e1f0b01ed7a800d15ca798ff71b6327bd0f6bcc263909e2cb3361d4553a7c10dfc05455c74f61a638a57b1b0ea27ad7c5b
|
7
|
+
data.tar.gz: 88d933b451e126316fedf8fe2991910dfbb2a519f7da841a25c912379bf34824693842eb5724d2f5fb8c046d59f9fef3ccf8fb1f35bd60901c406678c8771f06
|
@@ -10,7 +10,7 @@ class ImportRequest < ActiveRecord::Base
|
|
10
10
|
enju_ndl_ndl_search if defined?(EnjuNdl)
|
11
11
|
enju_nii_cinii_books if defined?(EnjuNii)
|
12
12
|
|
13
|
-
has_many :import_request_transitions
|
13
|
+
has_many :import_request_transitions, autosave: false
|
14
14
|
|
15
15
|
def state_machine
|
16
16
|
ImportRequestStateMachine.new(self, transition_class: ImportRequestTransition)
|
@@ -18,7 +18,7 @@ class ResourceExportFile < ActiveRecord::Base
|
|
18
18
|
end
|
19
19
|
validates_attachment_content_type :resource_export, content_type: /\Atext\/plain\Z/
|
20
20
|
|
21
|
-
has_many :resource_export_file_transitions
|
21
|
+
has_many :resource_export_file_transitions, autosave: false
|
22
22
|
|
23
23
|
def state_machine
|
24
24
|
ResourceExportFileStateMachine.new(self, transition_class: ResourceExportFileTransition)
|
@@ -32,7 +32,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
32
32
|
belongs_to :user, validate: true
|
33
33
|
belongs_to :default_shelf, class_name: 'Shelf'
|
34
34
|
has_many :resource_import_results
|
35
|
-
has_many :resource_import_file_transitions
|
35
|
+
has_many :resource_import_file_transitions, autosave: false
|
36
36
|
|
37
37
|
attr_accessor :mode, :library_id
|
38
38
|
|
data/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :agent_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :agent_import_file_transitions, name: "index_agent_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :agent_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :resource_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :resource_import_file_transitions, name: "index_resource_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :resource_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :resource_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :resource_export_file_transitions, name: "index_resource_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :resource_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :import_request_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :import_request_transitions, name: "index_import_request_transitions_parent_most_recent"
|
11
|
+
change_column_null :import_request_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/lib/enju_biblio/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class CreateLibraries < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :libraries do |t|
|
4
|
-
t.string :name, :null
|
4
|
+
t.string :name, index: true, null: false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_display_name, :
|
6
|
+
t.string :short_display_name, null: false
|
7
7
|
t.string :zip_code
|
8
8
|
t.text :street
|
9
9
|
t.text :locality
|
@@ -12,17 +12,15 @@ class CreateLibraries < ActiveRecord::Migration
|
|
12
12
|
t.string :telephone_number_2
|
13
13
|
t.string :fax_number
|
14
14
|
t.text :note
|
15
|
-
t.integer :call_number_rows, :
|
16
|
-
t.string :call_number_delimiter, :
|
17
|
-
t.
|
18
|
-
t.integer :users_count, :
|
15
|
+
t.integer :call_number_rows, default: 1, null: false
|
16
|
+
t.string :call_number_delimiter, default: "|", null: false
|
17
|
+
t.references :library_group, index: true, null: false
|
18
|
+
t.integer :users_count, default: 0, null: false
|
19
19
|
t.integer :position
|
20
|
-
t.
|
20
|
+
t.references :country
|
21
21
|
|
22
22
|
t.timestamps
|
23
23
|
t.datetime :deleted_at
|
24
24
|
end
|
25
|
-
add_index :libraries, :library_group_id
|
26
|
-
add_index :libraries, :name, :unique => true
|
27
25
|
end
|
28
26
|
end
|
@@ -1,15 +1,14 @@
|
|
1
1
|
class CreateShelves < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :shelves do |t|
|
4
|
-
t.string :name, :
|
4
|
+
t.string :name, null: false
|
5
5
|
t.text :display_name
|
6
6
|
t.text :note
|
7
|
-
t.
|
8
|
-
t.integer :items_count, :
|
7
|
+
t.references :library, index: true, null: false
|
8
|
+
t.integer :items_count, default: 0, null: false
|
9
9
|
t.integer :position
|
10
10
|
t.timestamps
|
11
11
|
t.datetime :deleted_at
|
12
12
|
end
|
13
|
-
add_index :shelves, :library_id
|
14
13
|
end
|
15
14
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class CreateLibraryGroups < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :library_groups do |t|
|
4
|
-
t.string :name, :
|
4
|
+
t.string :name, null: false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_name, :null
|
6
|
+
t.string :short_name, index: true, null: false
|
7
7
|
t.text :my_networks
|
8
8
|
t.text :login_banner
|
9
9
|
t.text :note
|
@@ -12,6 +12,5 @@ class CreateLibraryGroups < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
|
-
add_index :library_groups, :short_name
|
16
15
|
end
|
17
16
|
end
|
@@ -1,12 +1,11 @@
|
|
1
1
|
class CreateBaskets < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :baskets do |t|
|
4
|
-
t.
|
4
|
+
t.references :user, index: true
|
5
5
|
t.text :note
|
6
|
-
t.integer :lock_version, :
|
6
|
+
t.integer :lock_version, default: 0, null: false
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :baskets, :user_id
|
11
10
|
end
|
12
11
|
end
|
@@ -1,17 +1,14 @@
|
|
1
1
|
class CreateSubscriptions < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscriptions do |t|
|
4
|
-
t.text :title, :
|
4
|
+
t.text :title, null: false
|
5
5
|
t.text :note
|
6
|
-
|
7
|
-
t.
|
8
|
-
t.integer :order_list_id
|
6
|
+
t.references :user, index: true
|
7
|
+
t.references :order_list, index: true
|
9
8
|
t.datetime :deleted_at
|
10
|
-
t.integer :subscribes_count, :
|
9
|
+
t.integer :subscribes_count, default: 0, null: false
|
11
10
|
|
12
11
|
t.timestamps
|
13
12
|
end
|
14
|
-
add_index :subscriptions, :user_id
|
15
|
-
add_index :subscriptions, :order_list_id
|
16
13
|
end
|
17
14
|
end
|
@@ -1,14 +1,13 @@
|
|
1
1
|
class CreateSubscribes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscribes do |t|
|
4
|
-
t.
|
5
|
-
t.integer :work_id, :
|
6
|
-
t.datetime :start_at, :
|
7
|
-
t.datetime :end_at, :
|
4
|
+
t.references :subscription, index: true, null: false
|
5
|
+
t.integer :work_id, null: false
|
6
|
+
t.datetime :start_at, null: false
|
7
|
+
t.datetime :end_at, null: false
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
add_index :subscribes, :subscription_id
|
12
11
|
add_index :subscribes, :work_id
|
13
12
|
end
|
14
13
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
class CreateAccepts < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :accepts do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
|
11
|
-
add_index :accepts, :basket_id
|
12
|
-
add_index :accepts, :item_id
|
13
10
|
end
|
14
11
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateUserImportResults < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :user_import_results do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :user_import_file, index: true
|
5
|
+
t.references :user, index: true
|
6
6
|
t.text :body
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -8,11 +8,10 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
|
|
8
8
|
t.text :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
|
-
t.
|
11
|
+
t.references :user_import_file, index: true
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions, :user_import_file_id
|
16
15
|
add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
17
16
|
end
|
18
17
|
end
|
@@ -1,14 +1,12 @@
|
|
1
1
|
class CreateColors < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :colors do |t|
|
4
|
-
t.
|
4
|
+
t.references :library_group, index: true
|
5
5
|
t.string :property
|
6
6
|
t.string :code
|
7
7
|
t.integer :position
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
|
12
|
-
add_index :colors, :library_group_id
|
13
11
|
end
|
14
12
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
class CreateWithdraws < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :withdraws do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps null: false
|
9
9
|
end
|
10
|
-
add_index :withdraws, :basket_id
|
11
|
-
add_index :withdraws, :item_id
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,26 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213070943)
|
1
2
|
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
|
2
3
|
def up
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.create_translation_table!({
|
6
|
+
login_banner: :text
|
7
|
+
}, {
|
8
|
+
migrate_data: true
|
9
|
+
})
|
10
|
+
end
|
11
|
+
|
12
|
+
if defined?(AwesomeHstoreTranslate)
|
13
|
+
add_column :library_groups, :login_banner, :hstore
|
14
|
+
end
|
8
15
|
end
|
9
16
|
|
10
17
|
def down
|
11
|
-
|
18
|
+
if defined?(Globalize)
|
19
|
+
LibraryGroup.drop_translation_table! migrate_data: true
|
20
|
+
end
|
21
|
+
|
22
|
+
if defined?(AwesomeHstoreTranslate)
|
23
|
+
remove_column :library_groups, :login_banner
|
24
|
+
end
|
12
25
|
end
|
13
26
|
end
|
@@ -1,9 +1,22 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213072705)
|
1
2
|
class AddFooterBannerToLibraryGroup < ActiveRecord::Migration
|
2
3
|
def up
|
3
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.add_translation_fields! footer_banner: :text
|
6
|
+
end
|
7
|
+
|
8
|
+
if defined?(AwesomeHstoreTranslate)
|
9
|
+
add_column :library_groups, :footer_banner, :hstore
|
10
|
+
end
|
4
11
|
end
|
5
12
|
|
6
13
|
def down
|
7
|
-
|
14
|
+
if defined?(Globalize)
|
15
|
+
remove_column :library_group_translations, :footer_banner
|
16
|
+
end
|
17
|
+
|
18
|
+
if defined?(AwesomeHstoreTranslate)
|
19
|
+
remove_column :library_groups, :footer_banner
|
20
|
+
end
|
8
21
|
end
|
9
22
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_import_file_transitions, [:user_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_import_file_transitions, name: "index_user_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_export_file_transitions, name: "index_user_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20180107161410) do
|
15
15
|
|
16
16
|
create_table "accepts", force: :cascade do |t|
|
17
17
|
t.integer "basket_id"
|
@@ -23,6 +23,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
23
23
|
|
24
24
|
add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
|
25
25
|
add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
|
26
|
+
add_index "accepts", ["librarian_id"], name: "index_accepts_on_librarian_id"
|
26
27
|
|
27
28
|
create_table "agent_import_file_transitions", force: :cascade do |t|
|
28
29
|
t.string "to_state"
|
@@ -31,9 +32,10 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
31
32
|
t.integer "agent_import_file_id"
|
32
33
|
t.datetime "created_at"
|
33
34
|
t.datetime "updated_at"
|
34
|
-
t.boolean "most_recent"
|
35
|
+
t.boolean "most_recent", null: false
|
35
36
|
end
|
36
37
|
|
38
|
+
add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
|
37
39
|
add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
38
40
|
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
39
41
|
|
@@ -596,9 +598,10 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
596
598
|
t.integer "import_request_id"
|
597
599
|
t.datetime "created_at"
|
598
600
|
t.datetime "updated_at"
|
599
|
-
t.boolean "most_recent"
|
601
|
+
t.boolean "most_recent", null: false
|
600
602
|
end
|
601
603
|
|
604
|
+
add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
|
602
605
|
add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
603
606
|
add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
604
607
|
|
@@ -731,7 +734,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
731
734
|
t.text "note"
|
732
735
|
t.integer "call_number_rows", default: 1, null: false
|
733
736
|
t.string "call_number_delimiter", default: "|", null: false
|
734
|
-
t.integer "library_group_id",
|
737
|
+
t.integer "library_group_id", null: false
|
735
738
|
t.integer "users_count", default: 0, null: false
|
736
739
|
t.integer "position"
|
737
740
|
t.integer "country_id"
|
@@ -745,7 +748,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
745
748
|
end
|
746
749
|
|
747
750
|
add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
|
748
|
-
add_index "libraries", ["name"], name: "index_libraries_on_name"
|
751
|
+
add_index "libraries", ["name"], name: "index_libraries_on_name"
|
749
752
|
|
750
753
|
create_table "library_group_translations", force: :cascade do |t|
|
751
754
|
t.integer "library_group_id", null: false
|
@@ -781,10 +784,12 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
781
784
|
t.string "screenshot_generator"
|
782
785
|
t.integer "pub_year_facet_range_interval", default: 10
|
783
786
|
t.integer "user_id"
|
787
|
+
t.boolean "csv_charset_conversion", default: false, null: false
|
784
788
|
t.string "header_logo_file_name"
|
785
789
|
t.string "header_logo_content_type"
|
786
790
|
t.integer "header_logo_file_size"
|
787
791
|
t.datetime "header_logo_updated_at"
|
792
|
+
t.text "header_logo_meta"
|
788
793
|
end
|
789
794
|
|
790
795
|
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
@@ -1208,9 +1213,10 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1208
1213
|
t.integer "resource_export_file_id"
|
1209
1214
|
t.datetime "created_at"
|
1210
1215
|
t.datetime "updated_at"
|
1211
|
-
t.boolean "most_recent"
|
1216
|
+
t.boolean "most_recent", null: false
|
1212
1217
|
end
|
1213
1218
|
|
1219
|
+
add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
|
1214
1220
|
add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1215
1221
|
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1216
1222
|
|
@@ -1232,9 +1238,10 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1232
1238
|
t.integer "resource_import_file_id"
|
1233
1239
|
t.datetime "created_at"
|
1234
1240
|
t.datetime "updated_at"
|
1235
|
-
t.boolean "most_recent"
|
1241
|
+
t.boolean "most_recent", null: false
|
1236
1242
|
end
|
1237
1243
|
|
1244
|
+
add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
|
1238
1245
|
add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1239
1246
|
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1240
1247
|
|
@@ -1344,7 +1351,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1344
1351
|
t.string "name", null: false
|
1345
1352
|
t.text "display_name"
|
1346
1353
|
t.text "note"
|
1347
|
-
t.integer "library_id",
|
1354
|
+
t.integer "library_id", null: false
|
1348
1355
|
t.integer "items_count", default: 0, null: false
|
1349
1356
|
t.integer "position"
|
1350
1357
|
t.datetime "created_at"
|
@@ -1486,11 +1493,13 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1486
1493
|
t.integer "user_export_file_id"
|
1487
1494
|
t.datetime "created_at"
|
1488
1495
|
t.datetime "updated_at"
|
1489
|
-
t.boolean "most_recent"
|
1496
|
+
t.boolean "most_recent", null: false
|
1490
1497
|
end
|
1491
1498
|
|
1492
1499
|
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1500
|
+
add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
|
1493
1501
|
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1502
|
+
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
1494
1503
|
|
1495
1504
|
create_table "user_export_files", force: :cascade do |t|
|
1496
1505
|
t.integer "user_id"
|
@@ -1503,6 +1512,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1503
1512
|
t.datetime "updated_at"
|
1504
1513
|
end
|
1505
1514
|
|
1515
|
+
add_index "user_export_files", ["user_id"], name: "index_user_export_files_on_user_id"
|
1516
|
+
|
1506
1517
|
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
1507
1518
|
t.integer "user_group_id", null: false
|
1508
1519
|
t.integer "checkout_type_id", null: false
|
@@ -1555,10 +1566,11 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1555
1566
|
t.integer "user_import_file_id"
|
1556
1567
|
t.datetime "created_at"
|
1557
1568
|
t.datetime "updated_at"
|
1558
|
-
t.boolean "most_recent"
|
1569
|
+
t.boolean "most_recent", null: false
|
1559
1570
|
end
|
1560
1571
|
|
1561
1572
|
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1573
|
+
add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
|
1562
1574
|
add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1563
1575
|
|
1564
1576
|
create_table "user_import_files", force: :cascade do |t|
|
@@ -1579,6 +1591,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1579
1591
|
t.integer "default_user_group_id"
|
1580
1592
|
end
|
1581
1593
|
|
1594
|
+
add_index "user_import_files", ["user_id"], name: "index_user_import_files_on_user_id"
|
1595
|
+
|
1582
1596
|
create_table "user_import_results", force: :cascade do |t|
|
1583
1597
|
t.integer "user_import_file_id"
|
1584
1598
|
t.integer "user_id"
|
@@ -1588,6 +1602,9 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1588
1602
|
t.text "error_message"
|
1589
1603
|
end
|
1590
1604
|
|
1605
|
+
add_index "user_import_results", ["user_id"], name: "index_user_import_results_on_user_id"
|
1606
|
+
add_index "user_import_results", ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1607
|
+
|
1591
1608
|
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
1592
1609
|
t.string "to_state"
|
1593
1610
|
t.text "metadata", default: "{}"
|
@@ -1665,5 +1682,6 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1665
1682
|
|
1666
1683
|
add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
|
1667
1684
|
add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
|
1685
|
+
add_index "withdraws", ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1668
1686
|
|
1669
1687
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_biblio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
@@ -170,42 +170,42 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.2.
|
173
|
+
version: 0.2.2
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.2.
|
180
|
+
version: 0.2.2
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: enju_event
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.2.
|
187
|
+
version: 0.2.3
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.2.
|
194
|
+
version: 0.2.3
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: enju_circulation
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.2.
|
201
|
+
version: 0.2.5
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0.2.
|
208
|
+
version: 0.2.5
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: enju_ndl
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -986,6 +986,10 @@ files:
|
|
986
986
|
- db/migrate/20160811102604_add_picture_width_to_picture_file.rb
|
987
987
|
- db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb
|
988
988
|
- db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
|
989
|
+
- db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
|
990
|
+
- db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb
|
991
|
+
- db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb
|
992
|
+
- db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
|
989
993
|
- lib/enju_biblio.rb
|
990
994
|
- lib/enju_biblio/biblio_helper.rb
|
991
995
|
- lib/enju_biblio/engine.rb
|
@@ -1011,7 +1015,6 @@ files:
|
|
1011
1015
|
- lib/generators/enju_biblio/setup/templates/db/fixtures/manifestation_relationship_types.yml
|
1012
1016
|
- lib/generators/enju_biblio/setup/templates/db/fixtures/produce_types.yml
|
1013
1017
|
- lib/generators/enju_biblio/setup/templates/db/fixtures/realize_types.yml
|
1014
|
-
- lib/generators/enju_biblio/update/update_generator.rb
|
1015
1018
|
- lib/tasks/agent_type.rb
|
1016
1019
|
- lib/tasks/carrier_type.rb
|
1017
1020
|
- lib/tasks/content_type.rb
|
@@ -1248,9 +1251,13 @@ files:
|
|
1248
1251
|
- spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb
|
1249
1252
|
- spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
|
1250
1253
|
- spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
|
1254
|
+
- spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
|
1251
1255
|
- spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb
|
1252
1256
|
- spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb
|
1253
1257
|
- spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb
|
1258
|
+
- spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
|
1259
|
+
- spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
|
1260
|
+
- spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
|
1254
1261
|
- spec/dummy/db/schema.rb
|
1255
1262
|
- spec/dummy/public/404.html
|
1256
1263
|
- spec/dummy/public/422.html
|
@@ -1579,6 +1586,7 @@ test_files:
|
|
1579
1586
|
- spec/dummy/public/500.html
|
1580
1587
|
- spec/dummy/public/404.html
|
1581
1588
|
- spec/dummy/db/schema.rb
|
1589
|
+
- spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
|
1582
1590
|
- spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb
|
1583
1591
|
- spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb
|
1584
1592
|
- spec/dummy/db/migrate/20140709113413_create_user_export_files.rb
|
@@ -1603,6 +1611,7 @@ test_files:
|
|
1603
1611
|
- spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb
|
1604
1612
|
- spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb
|
1605
1613
|
- spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
|
1614
|
+
- spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
|
1606
1615
|
- spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb
|
1607
1616
|
- spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb
|
1608
1617
|
- spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb
|
@@ -1682,6 +1691,7 @@ test_files:
|
|
1682
1691
|
- spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb
|
1683
1692
|
- spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb
|
1684
1693
|
- spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb
|
1694
|
+
- spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
|
1685
1695
|
- spec/dummy/db/migrate/20100925074639_create_event_import_results.rb
|
1686
1696
|
- spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb
|
1687
1697
|
- spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb
|
@@ -1689,6 +1699,7 @@ test_files:
|
|
1689
1699
|
- spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb
|
1690
1700
|
- spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
|
1691
1701
|
- spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb
|
1702
|
+
- spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
|
1692
1703
|
- spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb
|
1693
1704
|
- spec/dummy/db/migrate/032_create_checkins.rb
|
1694
1705
|
- spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class EnjuBiblio::UpdateGenerator < Rails::Generators::Base
|
2
|
-
source_root File.expand_path('../templates', __FILE__)
|
3
|
-
desc "Create files for updating Next-L Enju"
|
4
|
-
|
5
|
-
def copy_migration_files
|
6
|
-
generate('statesman:add_constraints_to_most_recent', 'ImportRequest', 'ImportRequestTransition')
|
7
|
-
generate('statesman:add_constraints_to_most_recent', 'AgentImportFile', 'AgentImportFileTransition')
|
8
|
-
generate('statesman:add_constraints_to_most_recent', 'ResourceImportFile', 'ResourceImportFileTransition')
|
9
|
-
generate('statesman:add_constraints_to_most_recent', 'ResourceExportFile', 'ResourceExportFileTransition')
|
10
|
-
end
|
11
|
-
end
|