enju_manifestation_viewer 0.3.0 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +10 -0
- data/Rakefile +1 -1
- data/app/controllers/iiif_images_controller.rb +6 -0
- data/app/helpers/enju_manifestation_viewer/book_jacket_helper.rb +7 -7
- data/app/views/iiif_images/show.json.jbuilder +37 -0
- data/app/views/manifestations/_hanmotocom_thumbnail.html.erb +1 -1
- data/app/views/manifestations/_nicovideo.html.erb +2 -2
- data/app/views/manifestations/{_openbd_thumbnail_header.html → _openbd_thumbnail_header.html.erb} +0 -0
- data/config/routes.rb +1 -0
- data/lib/enju_manifestation_viewer/version.rb +1 -1
- data/spec/controllers/iiif_images_controller_spec.rb +19 -0
- data/spec/dummy/app/assets/images/icons/book.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +1 -0
- data/spec/dummy/app/helpers/application_helper.rb +1 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +12 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/database.yml +17 -22
- data/spec/dummy/config/initializers/assets.rb +1 -0
- data/spec/dummy/config/routes.rb +1 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -3
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +6 -5
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- 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 +1 -0
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.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/20140614141500_create_resource_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/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/migrate/20200425072340_create_manifestation_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +12 -0
- data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +12 -0
- data/spec/dummy/db/schema.rb +73 -6
- data/spec/factories/manifestation.rb +14 -0
- data/spec/fixtures/carrier_types.yml +54 -0
- data/spec/fixtures/content_types.yml +98 -0
- data/spec/fixtures/frequencies.yml +68 -0
- data/spec/fixtures/languages.yml +1900 -0
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/profiles.yml +78 -0
- data/spec/fixtures/roles.yml +21 -0
- data/spec/fixtures/user_groups.yml +45 -0
- data/spec/fixtures/user_has_roles.yml +40 -0
- data/spec/fixtures/users.yml +51 -0
- data/spec/helpers/application_helper_spec.rb +1 -1
- data/spec/helpers/book_jacket_helper_spec.rb +2 -2
- data/spec/models/manifestation_spec.rb +13 -0
- data/spec/rails_helper.rb +8 -0
- data/spec/support/devise.rb +2 -2
- data/spec/system/library_groups_spec.rb +21 -0
- data/spec/system/manifestations_spec.rb +39 -0
- metadata +167 -18
- data/README.rdoc +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cb833e65cb108463339ca8e5a7e39825a74fa0d0399a3d002e210706d5eadebb
|
4
|
+
data.tar.gz: d4280d4dd553a893672e6c3f4180961be8638ae01a6f448aa01545e0772d353e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a21cbc82b3922b9ea01d356bed04d8797cbc947c03db985f35893f5172504dfed5620b13b745f046c60c28e667bdd846e15941e564c350bcb7668fc7e2e7c6
|
7
|
+
data.tar.gz: 27fa80f8e27184e94b9c3c3fea4ce63e278b8f66a7adfbd300e8886474b1602efc302ee91ea217cdf124d942335de43234c1f2e37d8a424878f3f00802f55b94
|
data/README.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# EnjuManifestationViewer
|
2
|
+
[![Travis CI](https://travis-ci.com/next-l/enju_manifestation_viewer.svg?branch=1.3)](https://travis-ci.com/next-l/enju_manifestation_viewer)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/next-l/enju_enju_manifestation_viewer/badge.svg?branch=1.3)](https://coveralls.io/github/next-l/enju_enju_manifestation_viewer?branch=1.3)
|
4
|
+
[![security](https://hakiri.io/github/next-l/enju_enju_manifestation_viewer/1.3.svg)](https://hakiri.io/github/next-l/enju_enju_manifestation_viewer/1.3)
|
5
|
+
|
6
|
+
This project rocks and uses MIT-LICENSE.
|
7
|
+
|
8
|
+
## 製作者・貢献者 (Authors and contributors)
|
9
|
+
* [TANABE, Kosuke](https://github.com/nabeta) ([@nabeta](https://twitter.com/nabeta))
|
10
|
+
* [Project Next-L](https://www.next-l.jp) ([@ProjectNextL](https://twitter.com/ProjectNextL))
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
16
|
rdoc.rdoc_dir = 'rdoc'
|
17
17
|
rdoc.title = 'EnjuManifestationViewer'
|
18
18
|
rdoc.options << '--line-numbers'
|
19
|
-
rdoc.rdoc_files.include('README.
|
19
|
+
rdoc.rdoc_files.include('README.md')
|
20
20
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
21
|
end
|
22
22
|
|
@@ -27,7 +27,7 @@ module EnjuManifestationViewer
|
|
27
27
|
|
28
28
|
case generator
|
29
29
|
when "mozshot"
|
30
|
-
link_to image_tag("
|
30
|
+
link_to image_tag("https://blinky.nemui.org/shot?#{manifestation.access_address}", width: 128, height: 128, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
|
31
31
|
when "simpleapi"
|
32
32
|
link_to image_tag("http://img.simpleapi.net/small/#{manifestation.access_address}", width: 128, height: 128, alt: manifestation.original_title, border: 0, itemprop: 'image'), manifestation.access_address
|
33
33
|
when "heartrails"
|
@@ -46,7 +46,7 @@ module EnjuManifestationViewer
|
|
46
46
|
|
47
47
|
book_jacket = manifestation.amazon_book_jacket
|
48
48
|
if book_jacket
|
49
|
-
link_to image_tag(book_jacket[:url], width: book_jacket[:width], height: book_jacket[:height], alt: manifestation.original_title, class: 'book_jacket', itemprop: 'image'), "
|
49
|
+
link_to image_tag(book_jacket[:url], width: book_jacket[:width], height: book_jacket[:height], alt: manifestation.original_title, class: 'book_jacket', itemprop: 'image'), "https://#{LibraryGroup.site_config.settings[:amazon_hostname]}/dp/#{book_jacket[:asin]}"
|
50
50
|
end
|
51
51
|
when "google"
|
52
52
|
render partial: 'manifestations/google_book_thumbnail', locals: {manifestation: manifestation}
|
@@ -60,15 +60,15 @@ module EnjuManifestationViewer
|
|
60
60
|
def amazon_link(asin, hostname = LibraryGroup.site_config.settings[:amazon_hostname])
|
61
61
|
return nil if asin.blank?
|
62
62
|
|
63
|
-
"
|
63
|
+
"https://#{hostname}/dp/#{asin}"
|
64
64
|
end
|
65
65
|
|
66
66
|
def book_jacket_source_link(source = LibraryGroup.site_config.book_jacket_source)
|
67
67
|
case source
|
68
68
|
when "google"
|
69
|
-
link_to "Google Books", "
|
69
|
+
link_to "Google Books", "https://books.google.com/"
|
70
70
|
when "amazon"
|
71
|
-
link_to "Amazon Web Services", "
|
71
|
+
link_to "Amazon Web Services", "https://aws.amazon.com/"
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -87,13 +87,13 @@ module EnjuManifestationViewer
|
|
87
87
|
def screenshot_generator_link(generator = LibraryGroup.site_config.screenshot_generator)
|
88
88
|
case generator
|
89
89
|
when "mozshot"
|
90
|
-
link_to "MozShot", "
|
90
|
+
link_to "MozShot", "https://blinky.nemui.org/"
|
91
91
|
when "simpleapi"
|
92
92
|
link_to "SimpleAPI", "http://img.simpleapi.net/"
|
93
93
|
when "heartrails"
|
94
94
|
link_to "HeartRails Capture", "http://capture.heartrails.com/"
|
95
95
|
when "thumbalizr"
|
96
|
-
link_to "thumbalizr", "
|
96
|
+
link_to "thumbalizr", "https://www.thumbalizr.com/"
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
json.set!('@context', 'http://iiif.io/api/presentation/2/context.json')
|
2
|
+
json.set!('@type', 'sc:Manifest')
|
3
|
+
json.set!('@id', iiif_image_url(@manifestation.id, format: :json))
|
4
|
+
json.label @manifestation.original_title
|
5
|
+
json.seeAlso manifestation_url(@manifestation, format: :download)
|
6
|
+
#json.thumbnail "https://dev.next-l.jp/image-service/#{@manifestation.id}"
|
7
|
+
json.sequences do
|
8
|
+
json.array! [0] do |a|
|
9
|
+
json.set!('@type', 'sc:Sequence')
|
10
|
+
json.viewingHint 'individuals'
|
11
|
+
json.canvases do
|
12
|
+
json.array! [0] do
|
13
|
+
json.set!('@id', manifestation_url(@manifestation))
|
14
|
+
json.set!('@type', 'sc:Canvas')
|
15
|
+
json.label @manifestation.attachment_file_name
|
16
|
+
json.width 1024
|
17
|
+
json.height 1024
|
18
|
+
json.images do
|
19
|
+
json.array! [0] do
|
20
|
+
json.set!('@type', 'oa:Annotation')
|
21
|
+
json.on manifestation_url(@manifestation)
|
22
|
+
json.motivation 'sc:painting'
|
23
|
+
json.resource do
|
24
|
+
json.set!('@id', manifestation_url(@manifestation, format: :download))
|
25
|
+
json.set!('@type', 'dctypes:Image')
|
26
|
+
json.service do
|
27
|
+
json.set!('@context', 'http://iiif.io/api.image/2/context.json')
|
28
|
+
json.set!('@id', "https://dev.next-l.jp/image-service/#{@manifestation.id}")
|
29
|
+
json.profile 'http://iiif.io/api/image/2/level1.json'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% unless manifestation.identifier_contents(:isbn).empty? %>
|
2
2
|
<div id="gbsthumbnail<%= manifestation.id %>" class="book_jacket"></div>
|
3
|
-
<%= image_tag("
|
3
|
+
<%= image_tag("https://www.hanmoto.com/bd/img/#{ Lisbn.new(manifestation.identifier_contents(:isbn).first).isbn13 }.jpg") %>
|
4
4
|
<% else %>
|
5
5
|
<% if @library_group.settings[:book_jacket_unknown_resource] %>
|
6
6
|
<%= @library_group.settings[:book_jacket_unknown_resource] %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<tr>
|
2
2
|
<td style="width: 200px"><%= t('page.video') -%>:</td>
|
3
|
-
<td style="width: 500px">
|
4
|
-
<script type="
|
3
|
+
<td style="width: 500px">a
|
4
|
+
<script type="application/javascript" src="https://embed.nicovideo.jp/watch/<%= manifestation.nicovideo_id %>/script?w=480&h=320"></script><noscript><a href="https://www.nicovideo.jp/watch/<%= manifestation.nicovideo_id %>"><%= manifestation.original_title %></a></noscript>
|
5
5
|
</td>
|
6
6
|
</tr>
|
data/app/views/manifestations/{_openbd_thumbnail_header.html → _openbd_thumbnail_header.html.erb}
RENAMED
File without changes
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe IiifImagesController, type: :controller do
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
describe 'GET show' do
|
7
|
+
before(:each) do
|
8
|
+
@manifestation = manifestations(:manifestation_00001)
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'When not logged in' do
|
12
|
+
it 'assigns the requested agent as @agent' do
|
13
|
+
get :show, params: { id: @manifestation.id }, format: :json
|
14
|
+
expect(assigns(:manifestation)).to eq(@manifestation)
|
15
|
+
expect(response).to be_successful
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class User < ActiveRecord::Base
|
2
|
+
# Include default devise modules. Others available are:
|
3
|
+
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
|
4
|
+
devise :database_authenticatable, #:registerable,
|
5
|
+
:recoverable, :rememberable, :trackable, :validatable
|
6
|
+
|
7
|
+
# Setup accessible (or protected) attributes for your model
|
8
|
+
|
9
|
+
include EnjuSeed::EnjuUser
|
10
|
+
end
|
11
|
+
|
12
|
+
Item.include(EnjuLibrary::EnjuItem)
|
@@ -1,30 +1,25 @@
|
|
1
|
-
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
2
8
|
adapter: sqlite3
|
3
|
-
|
4
|
-
|
5
|
-
mysql: &mysql
|
6
|
-
adapter: mysql2
|
7
|
-
username: root
|
8
|
-
password:
|
9
|
-
database: enju_<%= Rails.env %>
|
10
|
-
|
11
|
-
postgresql: &postgresql
|
12
|
-
adapter: postgresql
|
13
|
-
username: postgres
|
14
|
-
password:
|
15
|
-
database: enju_<%= Rails.env %>
|
16
|
-
|
17
|
-
defaults: &defaults
|
18
|
-
pool: 5
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
19
10
|
timeout: 5000
|
20
|
-
host: localhost
|
21
|
-
<<: *<%= ENV['DB'] || "sqlite" %>
|
22
11
|
|
23
12
|
development:
|
24
|
-
<<: *
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
25
15
|
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
26
19
|
test:
|
27
|
-
<<: *
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
28
22
|
|
29
23
|
production:
|
30
|
-
<<: *
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -12,3 +12,4 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
|
12
12
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
13
13
|
# folder are already added.
|
14
14
|
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
15
|
+
Rails.application.config.assets.precompile += %w( icons/page_white_text.png unknown_resource.png )
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -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,17 +1,18 @@
|
|
1
1
|
class CreateCountries < ActiveRecord::Migration[4.2]
|
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
17
|
t.string :alpha_2, size: 2
|
17
18
|
t.string :alpha_3, size: 3
|
@@ -1,4 +1,5 @@
|
|
1
1
|
class CreateLanguages < ActiveRecord::Migration[4.2]
|
2
|
+
|
2
3
|
# ISO 639 is the set of international standards that lists short codes for language names.
|
3
4
|
# Note this doesn't include macrolanguages (dialects)
|
4
5
|
# Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage
|
@@ -10,6 +10,6 @@ class CreatePictureFiles < ActiveRecord::Migration[4.2]
|
|
10
10
|
|
11
11
|
t.timestamps
|
12
12
|
end
|
13
|
-
add_index :picture_files,
|
13
|
+
add_index :picture_files, [:picture_attachable_id, :picture_attachable_type], name: "index_picture_files_on_picture_attachable_id_and_type"
|
14
14
|
end
|
15
15
|
end
|
@@ -13,6 +13,6 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
|
16
|
-
add_index :resource_import_file_transitions,
|
16
|
+
add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateImportRequestTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :import_request_transitions, :import_request_id
|
16
|
-
add_index :import_request_transitions,
|
16
|
+
add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :agent_import_file_transitions, :agent_import_file_id
|
16
|
-
add_index :agent_import_file_transitions,
|
16
|
+
add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_import_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -13,6 +13,6 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration[4.2]
|
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :resource_export_file_transitions, :resource_export_file_id, name: "index_resource_export_file_transitions_on_file_id"
|
16
|
-
add_index :resource_export_file_transitions,
|
16
|
+
add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name: "index_resource_export_file_transitions_on_sort_key_and_file_id"
|
17
17
|
end
|
18
18
|
end
|
@@ -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,
|
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,
|
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,
|
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,
|
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
|
|