-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add guard clause to iiif_print_ingest_file_relations table
- Loading branch information
Shana Moore
committed
Jan 23, 2024
1 parent
3ad248d
commit d038e45
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
db/migrate/20221205210847_create_iiif_print_derivative_attachments.iiif_print.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
db/migrate/20221205210848_create_iiif_print_ingest_file_relations.iiif_print.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |