enju_seed 0.3.0.beta.1 → 0.3.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +9 -1
- data/db/migrate/20140122054321_create_profiles.rb +6 -1
- data/lib/enju_seed/version.rb +1 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +6 -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/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/059_create_libraries.rb +7 -7
- data/spec/dummy/db/migrate/069_create_shelves.rb +3 -3
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -2
- data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
- data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
- 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/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/133_create_agent_merges.rb +1 -1
- 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/20081006090811_create_subscriptions.rb +3 -3
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -4
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +5 -5
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +9 -8
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -5
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.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/20091025080447_create_licenses.rb +1 -1
- 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 +3 -3
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +2 -2
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20161114083857_add_image_data_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184747_add_attachment_data_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184756_add_attachment_data_to_user_export_file.rb +5 -0
- data/spec/dummy/db/schema.rb +1423 -1417
- metadata +264 -254
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b31d26672c8844701cfdbec37fc2675a81a78c
|
4
|
+
data.tar.gz: 7464aa8b393cce0ee2b65f25b23df7854dcbfe84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af5c9d7deddcb3bc31ab7d907aaa9b8e8c2caee1aaef4dec4c2a18b58fab80390524358b066df1a881cba048c63f9318b206d301b1877b2f1047d8ad0e388e88
|
7
|
+
data.tar.gz: 92acef3d30732debbfb63d4829f908a670c79cf6e037eb8e30b72e444912bb4482de8fe8b3013e17902356f379c807ea2f554088845ba607a1d241ce5f33759a
|
data/README.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
1
|
= EnjuSeed
|
2
|
+
{<img src="https://travis-ci.org/next-l/enju_seed.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/next-l/enju_seed]
|
3
|
+
{<img src="https://codeclimate.com/github/next-l/enju_seed/badges/gpa.svg" />}[https://codeclimate.com/github/next-l/enju_seed]
|
4
|
+
{<img src="https://codeclimate.com/github/next-l/enju_seed/badges/coverage.svg" />}[https://codeclimate.com/github/next-l/enju_seed/coverage]
|
5
|
+
{<img src="https://hakiri.io/github/next-l/enju_seed/master.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_seed/master]
|
2
6
|
|
3
|
-
This project rocks and uses MIT-LICENSE.
|
7
|
+
This project rocks and uses MIT-LICENSE.
|
8
|
+
|
9
|
+
== 製作者・貢献者 (Authors and contributors)
|
10
|
+
* {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
|
11
|
+
* {Project Next-L}[http://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])
|
@@ -1,6 +1,11 @@
|
|
1
1
|
class CreateProfiles < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
|
3
|
+
if ENV['ENJU_ID_TYPE'] == 'uuid'
|
4
|
+
options = {id: :uuid, default: 'gen_random_uuid()'}
|
5
|
+
else
|
6
|
+
options = {}
|
7
|
+
end
|
8
|
+
create_table :profiles, options do |t|
|
4
9
|
t.references :user, index: true, foreign_key: true
|
5
10
|
t.references :user_group, index: true
|
6
11
|
t.references :library, index: true
|
data/lib/enju_seed/version.rb
CHANGED
@@ -32,13 +32,13 @@ class CreateAgents < ActiveRecord::Migration
|
|
32
32
|
t.text :region
|
33
33
|
t.datetime :date_of_birth
|
34
34
|
t.datetime :date_of_death
|
35
|
-
t.integer :language_id, default
|
36
|
-
t.integer :country_id, default
|
37
|
-
t.integer :agent_type_id, default
|
38
|
-
t.integer :lock_version, default
|
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, default
|
41
|
-
t.integer :required_score, default
|
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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CreateManifestations < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :manifestations do |t|
|
4
|
-
t.text :original_title, null
|
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
|
|
11
11
|
t.timestamps
|
12
12
|
t.datetime :deleted_at
|
13
13
|
t.string :access_address
|
14
|
-
t.integer :language_id, default
|
15
|
-
t.integer :carrier_type_id, default
|
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
|
|
25
25
|
t.string :serial_number_string
|
26
26
|
t.integer :edition
|
27
27
|
t.text :note
|
28
|
-
t.boolean :repository_content, default
|
29
|
-
t.integer :lock_version, default
|
30
|
-
t.integer :required_role_id, default
|
31
|
-
t.integer :required_score, default
|
32
|
-
t.integer :frequency_id, default
|
33
|
-
t.boolean :subscription_master, default
|
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
|
-
#
|
36
|
-
#
|
35
|
+
#add_index :manifestations, :carrier_type_id
|
36
|
+
#add_index :manifestations, :required_role_id
|
37
37
|
add_index :manifestations, :access_address
|
38
|
-
#
|
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
|
|
5
5
|
t.string :item_identifier
|
6
6
|
t.timestamps
|
7
7
|
t.datetime :deleted_at
|
8
|
-
t.integer :shelf_id, default
|
9
|
-
t.boolean :include_supplements, default
|
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, default
|
14
|
-
t.integer :required_role_id, default
|
15
|
-
t.integer :required_score, default
|
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
|
2
2
|
def change
|
3
3
|
create_table :owns do |t|
|
4
|
-
t.references :agent, null
|
5
|
-
t.references :item, null
|
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
|
2
2
|
def change
|
3
3
|
create_table :creates do |t|
|
4
|
-
t.references :agent, null
|
5
|
-
t.references :work, null
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :work, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateProduces < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :produces do |t|
|
4
|
-
t.references :agent, null
|
5
|
-
t.references :manifestation, null
|
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,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, :null => false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_display_name, null
|
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,10 +12,10 @@ 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, default
|
16
|
-
t.string :call_number_delimiter, default
|
17
|
-
t.integer :library_group_id, default
|
18
|
-
t.integer :users_count, default
|
15
|
+
t.integer :call_number_rows, :default => 1, :null => false
|
16
|
+
t.string :call_number_delimiter, :default => "|", :null => false
|
17
|
+
t.integer :library_group_id, :default => 1, :null => false
|
18
|
+
t.integer :users_count, :default => 0, :null => false
|
19
19
|
t.integer :position
|
20
20
|
t.integer :country_id
|
21
21
|
|
@@ -23,6 +23,6 @@ class CreateLibraries < ActiveRecord::Migration
|
|
23
23
|
t.datetime :deleted_at
|
24
24
|
end
|
25
25
|
add_index :libraries, :library_group_id
|
26
|
-
add_index :libraries, :name, unique
|
26
|
+
add_index :libraries, :name, :unique => true
|
27
27
|
end
|
28
28
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class CreateShelves < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :shelves do |t|
|
4
|
-
t.string :name, null
|
4
|
+
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
6
6
|
t.text :note
|
7
|
-
t.integer :library_id, default
|
8
|
-
t.integer :items_count, default
|
7
|
+
t.integer :library_id, :default => 1, :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
|
@@ -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, null
|
4
|
+
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :short_name, null
|
6
|
+
t.string :short_name, :null => false
|
7
7
|
t.text :my_networks
|
8
8
|
t.text :login_banner
|
9
9
|
t.text :note
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateRealizes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :realizes do |t|
|
4
|
-
t.references :agent, null
|
5
|
-
t.references :expression, null
|
4
|
+
t.references :agent, :null => false
|
5
|
+
t.references :expression, :null => false
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateExemplifies < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :exemplifies do |t|
|
4
|
-
t.integer :manifestation_id, null
|
5
|
-
t.integer :item_id, null
|
4
|
+
t.integer :manifestation_id, :null => false
|
5
|
+
t.integer :item_id, :null => false
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
10
|
add_index :exemplifies, :manifestation_id
|
11
|
-
add_index :exemplifies, :item_id, unique
|
11
|
+
add_index :exemplifies, :item_id, :unique => true
|
12
12
|
end
|
13
13
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateSubscriptions < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscriptions do |t|
|
4
|
-
t.text :title, null
|
4
|
+
t.text :title, :null => false
|
5
5
|
t.text :note
|
6
|
-
#
|
6
|
+
#t.integer :subscription_list_id, :integer
|
7
7
|
t.integer :user_id
|
8
8
|
t.integer :order_list_id
|
9
9
|
t.datetime :deleted_at
|
10
|
-
t.integer :subscribes_count, default
|
10
|
+
t.integer :subscribes_count, :default => 0, :null => false
|
11
11
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class CreateSubscribes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :subscribes do |t|
|
4
|
-
t.integer :subscription_id, null
|
5
|
-
t.integer :work_id, null
|
6
|
-
t.datetime :start_at, null
|
7
|
-
t.datetime :end_at, null
|
4
|
+
t.integer :subscription_id, :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
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateSearchEngines < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :search_engines do |t|
|
4
|
-
t.string :name, null
|
4
|
+
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
6
|
-
t.string :url, null
|
7
|
-
t.text :base_url, null
|
8
|
-
t.text :http_method, null
|
9
|
-
t.text :query_param, null
|
6
|
+
t.string :url, :null => false
|
7
|
+
t.text :base_url, :null => false
|
8
|
+
t.text :http_method, :null => false
|
9
|
+
t.text :query_param, :null => false
|
10
10
|
t.text :additional_param
|
11
11
|
t.text :note
|
12
12
|
t.integer :position
|
@@ -1,21 +1,22 @@
|
|
1
1
|
class CreateCountries < ActiveRecord::Migration
|
2
|
+
|
2
3
|
# ISO 3166 is the International Standard for country codes.
|
3
4
|
#
|
4
|
-
# ISO 3166-1:2006 Codes for the representation of names of countries and their subdivisions - Part 1:
|
5
|
-
# Country codes which is what most users know as ISO's country codes. First published in 1974, it is has since
|
6
|
-
# then become one of the world's most popular and most widely used standard solution for coding country names.
|
7
|
-
# It contains a two-letter code which is recommended as the general purpose code, a three-letter code which has
|
5
|
+
# ISO 3166-1:2006 Codes for the representation of names of countries and their subdivisions - Part 1:
|
6
|
+
# Country codes which is what most users know as ISO's country codes. First published in 1974, it is has since
|
7
|
+
# then become one of the world's most popular and most widely used standard solution for coding country names.
|
8
|
+
# It contains a two-letter code which is recommended as the general purpose code, a three-letter code which has
|
8
9
|
# better mnenomic properties and a numeric-3 code which can be useful if script independence of the codes is important.
|
9
10
|
#
|
10
11
|
# http://www.iso.org/iso/country_codes/background_on_iso_3166/what_is_iso_3166.htm
|
11
12
|
|
12
13
|
def change
|
13
14
|
create_table :countries do |t|
|
14
|
-
t.string :name,
|
15
|
+
t.string :name, :size => 80, :null => false
|
15
16
|
t.text :display_name
|
16
|
-
t.string :alpha_2, size
|
17
|
-
t.string :alpha_3, size
|
18
|
-
t.string :numeric_3, size
|
17
|
+
t.string :alpha_2, :size => 2
|
18
|
+
t.string :alpha_3, :size => 3
|
19
|
+
t.string :numeric_3, :size => 3
|
19
20
|
t.text :note
|
20
21
|
t.integer :position
|
21
22
|
end
|