enju_message 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/app/models/message.rb +5 -5
- data/app/models/message_request.rb +3 -4
- data/app/models/message_request_transition.rb +3 -4
- data/app/models/message_template.rb +3 -3
- data/app/models/message_transition.rb +3 -4
- data/app/views/message_templates/_form.html.erb +1 -1
- data/app/views/messages/index.rss.builder +2 -2
- data/db/migrate/149_create_message_templates.rb +3 -8
- data/db/migrate/154_create_messages.rb +4 -8
- data/db/migrate/20080819181903_create_message_requests.rb +2 -7
- data/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +2 -7
- data/db/migrate/20120125050502_add_depth_to_message.rb +1 -2
- data/db/migrate/20140518111006_create_message_transitions.rb +3 -8
- data/db/migrate/20140518135713_create_message_request_transitions.rb +3 -8
- data/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
- data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
- data/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
- data/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
- data/lib/enju_message/version.rb +1 -1
- data/spec/controllers/messages_controller_spec.rb +7 -7
- data/spec/dummy/app/controllers/application_controller.rb +0 -1
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/setup +1 -3
- data/spec/dummy/bin/update +4 -2
- data/spec/dummy/bin/yarn +3 -3
- data/spec/dummy/config/environments/development.rb +9 -2
- data/spec/dummy/config/environments/production.rb +7 -4
- data/spec/dummy/config/environments/test.rb +5 -1
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -3
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +14 -0
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +5 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -8
- data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
- data/spec/dummy/db/migrate/20170114174536_add_profile_id_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
- data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20181026064038_add_login_banner_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +14 -0
- data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +14 -0
- data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +27 -0
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/schema.rb +125 -34
- data/spec/factories/message.rb +2 -2
- data/spec/factories/profile.rb +10 -7
- data/spec/factories/user.rb +22 -19
- data/spec/fixtures/message_request_transitions.yml +2 -2
- data/spec/fixtures/message_requests.yml +2 -3
- data/spec/fixtures/message_templates.yml +2 -2
- data/spec/fixtures/messages.yml +3 -3
- data/spec/models/message_request_spec.rb +2 -3
- data/spec/models/message_spec.rb +3 -3
- data/spec/models/message_template_spec.rb +2 -2
- data/spec/views/messages/index.html.erb_spec.rb +3 -9
- metadata +89 -17
- data/README.rdoc +0 -10
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
data/spec/dummy/bin/yarn
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
Dir.chdir(
|
2
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(APP_ROOT) do
|
4
4
|
begin
|
5
|
-
exec "yarnpkg
|
5
|
+
exec "yarnpkg", *ARGV
|
6
6
|
rescue Errno::ENOENT
|
7
7
|
$stderr.puts "Yarn executable was not detected in the system."
|
8
8
|
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
@@ -13,12 +13,13 @@ Rails.application.configure do
|
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
|
15
15
|
# Enable/disable caching. By default caching is disabled.
|
16
|
-
|
16
|
+
# Run rails dev:cache to toggle caching.
|
17
|
+
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
17
18
|
config.action_controller.perform_caching = true
|
18
19
|
|
19
20
|
config.cache_store = :memory_store
|
20
21
|
config.public_file_server.headers = {
|
21
|
-
'Cache-Control' => "public, max-age=#{2.days.
|
22
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
22
23
|
}
|
23
24
|
else
|
24
25
|
config.action_controller.perform_caching = false
|
@@ -26,6 +27,9 @@ Rails.application.configure do
|
|
26
27
|
config.cache_store = :null_store
|
27
28
|
end
|
28
29
|
|
30
|
+
# Store uploaded files on the local file system (see config/storage.yml for options)
|
31
|
+
config.active_storage.service = :local
|
32
|
+
|
29
33
|
# Don't care if the mailer can't send.
|
30
34
|
config.action_mailer.raise_delivery_errors = false
|
31
35
|
|
@@ -37,6 +41,9 @@ Rails.application.configure do
|
|
37
41
|
# Raise an error on page load if there are pending migrations.
|
38
42
|
config.active_record.migration_error = :page_load
|
39
43
|
|
44
|
+
# Highlight code that triggered database queries in logs.
|
45
|
+
config.active_record.verbose_query_logs = true
|
46
|
+
|
40
47
|
# Debug mode disables concatenation and preprocessing of assets.
|
41
48
|
# This option may cause significant delays in view rendering with a large
|
42
49
|
# number of complex assets.
|
@@ -14,10 +14,9 @@ Rails.application.configure do
|
|
14
14
|
config.consider_all_requests_local = false
|
15
15
|
config.action_controller.perform_caching = true
|
16
16
|
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
config.read_encrypted_secrets = true
|
17
|
+
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
18
|
+
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
19
|
+
# config.require_master_key = true
|
21
20
|
|
22
21
|
# Disable serving static files from the `/public` folder by default since
|
23
22
|
# Apache or NGINX already handles this.
|
@@ -39,6 +38,9 @@ Rails.application.configure do
|
|
39
38
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
40
39
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
41
40
|
|
41
|
+
# Store uploaded files on the local file system (see config/storage.yml for options)
|
42
|
+
config.active_storage.service = :local
|
43
|
+
|
42
44
|
# Mount Action Cable outside main process or domain
|
43
45
|
# config.action_cable.mount_path = nil
|
44
46
|
# config.action_cable.url = 'wss://example.com/cable'
|
@@ -60,6 +62,7 @@ Rails.application.configure do
|
|
60
62
|
# Use a real queuing backend for Active Job (and separate queues per environment)
|
61
63
|
# config.active_job.queue_adapter = :resque
|
62
64
|
# config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
|
65
|
+
|
63
66
|
config.action_mailer.perform_caching = false
|
64
67
|
|
65
68
|
# Ignore bad email addresses and do not raise email delivery errors.
|
@@ -15,7 +15,7 @@ Rails.application.configure do
|
|
15
15
|
# Configure public file server for tests with Cache-Control for performance.
|
16
16
|
config.public_file_server.enabled = true
|
17
17
|
config.public_file_server.headers = {
|
18
|
-
'Cache-Control' => "public, max-age=#{1.hour.
|
18
|
+
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
19
19
|
}
|
20
20
|
|
21
21
|
# Show full error reports and disable caching.
|
@@ -27,6 +27,10 @@ Rails.application.configure do
|
|
27
27
|
|
28
28
|
# Disable request forgery protection in test environment.
|
29
29
|
config.action_controller.allow_forgery_protection = false
|
30
|
+
|
31
|
+
# Store uploaded files on the local file system in a temporary directory
|
32
|
+
config.active_storage.service = :test
|
33
|
+
|
30
34
|
config.action_mailer.perform_caching = false
|
31
35
|
|
32
36
|
# Tell Action Mailer not to deliver emails to the real world.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
test:
|
2
|
+
service: Disk
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
+
|
5
|
+
local:
|
6
|
+
service: Disk
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
8
|
+
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
+
# amazon:
|
11
|
+
# service: S3
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
+
# region: us-east-1
|
15
|
+
# bucket: your_own_bucket
|
16
|
+
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
18
|
+
# google:
|
19
|
+
# service: GCS
|
20
|
+
# project: your_project
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
+
# bucket: your_own_bucket
|
23
|
+
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
+
# microsoft:
|
26
|
+
# service: AzureStorage
|
27
|
+
# storage_account_name: your_account_name
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
+
# container: your_container_name
|
30
|
+
|
31
|
+
# mirror:
|
32
|
+
# service: Mirror
|
33
|
+
# primary: local
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
@@ -32,10 +32,10 @@ class CreateManifestations < ActiveRecord::Migration[4.2]
|
|
32
32
|
t.integer :frequency_id, default: 1, null: false
|
33
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
|
@@ -1,12 +1,10 @@
|
|
1
1
|
class CreateUserHasRoles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :user_has_roles do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :user, index: true, foreign_key: true, null: false
|
5
|
+
t.references :role, index: true, foreign_key: true, null: false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :user_has_roles, :user_id
|
10
|
-
add_index :user_has_roles, :role_id
|
11
9
|
end
|
12
10
|
end
|
@@ -1,20 +1,19 @@
|
|
1
1
|
class CreateProfiles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :profiles do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :user, index: true, foreign_key: true
|
5
|
+
t.references :user_group, index: true
|
6
|
+
t.references :library, index: true
|
7
7
|
t.string :locale
|
8
8
|
t.string :user_number
|
9
9
|
t.text :full_name
|
10
10
|
t.text :note
|
11
11
|
t.text :keyword_list
|
12
|
-
t.
|
12
|
+
t.references :required_role, index: false
|
13
13
|
|
14
14
|
t.timestamps
|
15
15
|
end
|
16
16
|
|
17
|
-
add_index :profiles, :user_id
|
18
17
|
add_index :profiles, :user_number, unique: true
|
19
18
|
end
|
20
19
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateIdentities < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
create_table :identities do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :email
|
6
|
+
t.string :password_digest
|
7
|
+
t.references :profile, index: true
|
8
|
+
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
add_index :identities, :name
|
12
|
+
add_index :identities, :email
|
13
|
+
end
|
14
|
+
end
|
@@ -8,19 +8,11 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
8
8
|
migrate_data: true
|
9
9
|
})
|
10
10
|
end
|
11
|
-
|
12
|
-
if defined?(AwesomeHstoreTranslate)
|
13
|
-
add_column :library_groups, :login_banner, :hstore
|
14
|
-
end
|
15
11
|
end
|
16
12
|
|
17
13
|
def down
|
18
14
|
if defined?(Globalize)
|
19
15
|
LibraryGroup.drop_translation_table! migrate_data: true
|
20
16
|
end
|
21
|
-
|
22
|
-
if defined?(AwesomeHstoreTranslate)
|
23
|
-
remove_column :library_groups, :login_banner
|
24
|
-
end
|
25
17
|
end
|
26
18
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateIssnRecordAndManifestations < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :issn_record_and_manifestations do |t|
|
4
|
+
t.references :issn_record, foreign_key: true, on_delete: :cascade, null: false
|
5
|
+
t.references :manifestation, foreign_key: true, on_delete: :cascade, null: false
|
6
|
+
t.integer :position
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateIsbnRecordAndManifestations < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :isbn_record_and_manifestations do |t|
|
4
|
+
t.references :isbn_record, foreign_key: true, on_delete: :cascade, null: false
|
5
|
+
t.references :manifestation, foreign_key: true, null: false, on_delete: :cascade
|
6
|
+
t.integer :position
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :user_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Mig
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :user_export_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Mi
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :agent_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord:
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :resource_import_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord:
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :resource_export_file_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migr
|
|
2
2
|
disable_ddl_transaction!
|
3
3
|
|
4
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"
|
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
6
|
change_column_null :import_request_transitions, :most_recent, false
|
7
7
|
end
|
8
8
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
class AddLoginBannerToLibraryGroup < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
add_column :library_groups, :login_banner_translations, :jsonb, default: {}, null: false
|
4
|
+
add_column :library_groups, :footer_banner_translations, :jsonb, default: {}, null: false
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class AddNotNullToPositionOnCarrierType < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
change_column :carrier_types, :position, :integer, null: false, default: 1
|
4
|
+
change_column :content_types, :position, :integer, null: false, default: 1
|
5
|
+
change_column :frequencies, :position, :integer, null: false, default: 1
|
6
|
+
change_column :licenses, :position, :integer, null: false, default: 1
|
7
|
+
change_column :creates, :position, :integer, null: false, default: 1
|
8
|
+
change_column :realizes, :position, :integer, null: false, default: 1
|
9
|
+
change_column :produces, :position, :integer, null: false, default: 1
|
10
|
+
change_column :owns, :position, :integer, null: false, default: 1
|
11
|
+
change_column :form_of_works, :position, :integer, null: false, default: 1
|
12
|
+
change_column :agent_types, :position, :integer, null: false, default: 1
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class AddNotNullToPositionOnLibrary < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
change_column :libraries, :position, :integer, null: false, default: 1
|
4
|
+
change_column :shelves, :position, :integer, null: false, default: 1
|
5
|
+
change_column :library_groups, :position, :integer, null: false, default: 1
|
6
|
+
change_column :user_groups, :position, :integer, null: false, default: 1
|
7
|
+
change_column :bookstores, :position, :integer, null: false, default: 1
|
8
|
+
change_column :budget_types, :position, :integer, null: false, default: 1
|
9
|
+
change_column :colors, :position, :integer, null: false, default: 1
|
10
|
+
change_column :request_types, :position, :integer, null: false, default: 1
|
11
|
+
change_column :request_status_types, :position, :integer, null: false, default: 1
|
12
|
+
change_column :search_engines, :position, :integer, null: false, default: 1
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# This migration comes from active_storage (originally 20170806125915)
|
2
|
+
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
3
|
+
def change
|
4
|
+
create_table :active_storage_blobs do |t|
|
5
|
+
t.string :key, null: false
|
6
|
+
t.string :filename, null: false
|
7
|
+
t.string :content_type
|
8
|
+
t.text :metadata
|
9
|
+
t.bigint :byte_size, null: false
|
10
|
+
t.string :checksum, null: false
|
11
|
+
t.datetime :created_at, null: false
|
12
|
+
|
13
|
+
t.index [ :key ], unique: true
|
14
|
+
end
|
15
|
+
|
16
|
+
create_table :active_storage_attachments do |t|
|
17
|
+
t.string :name, null: false
|
18
|
+
t.references :record, null: false, polymorphic: true, index: false
|
19
|
+
t.references :blob, null: false
|
20
|
+
|
21
|
+
t.datetime :created_at, null: false
|
22
|
+
|
23
|
+
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
|
24
|
+
t.foreign_key :active_storage_blobs, column: :blob_id
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateCustomProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :custom_properties do |t|
|
4
|
+
t.integer :resource_id, null: false
|
5
|
+
t.string :resource_type, null: false
|
6
|
+
t.text :label, null: false
|
7
|
+
t.text :value
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|