Skip to content

Commit

Permalink
Add guard clause to iiif_print_ingest_file_relations table
Browse files Browse the repository at this point in the history
  • Loading branch information
Shana Moore committed Jan 23, 2024
1 parent b5b1eae commit 4096fe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This migration comes from iiif_print (originally 20181214181358)
class CreateIiifPrintDerivativeAttachments < ActiveRecord::Migration[5.0]
def change
unless unless table_exists?(:iiif_print_derivative_attachments)
unless table_exists?(:iiif_print_derivative_attachments)
create_table :iiif_print_derivative_attachments do |t|
t.string :fileset_id
t.string :path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# This migration comes from iiif_print (originally 20190107165909)
class CreateIiifPrintIngestFileRelations < ActiveRecord::Migration[5.0]
def change
create_table :iiif_print_ingest_file_relations do |t|
t.string :file_path
t.string :derivative_path
unless table_exists?(:iiif_print_ingest_file_relations)
create_table :iiif_print_ingest_file_relations do |t|
t.string :file_path
t.string :derivative_path

t.timestamps
t.timestamps
end
add_index :iiif_print_ingest_file_relations, :file_path
end
add_index :iiif_print_ingest_file_relations, :file_path
end
end

0 comments on commit 4096fe9

Please sign in to comment.