15 lines
490 B
Ruby
15 lines
490 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class CreateExternalAPIImages < ActiveRecord::Migration[7.1]
|
||
|
def change
|
||
|
create_table(:external_api_images) do |t|
|
||
|
t.references(:api_image, foreign_key: true, null: false, type: :uuid)
|
||
|
t.string(:site, null: false)
|
||
|
t.jsonb(:cached_data, null: false, default: {})
|
||
|
t.integer(:external_id, null: false)
|
||
|
t.datetime(:cache_last_updated_at, null: false, default: -> { "CURRENT_TIMESTAMP(3)" })
|
||
|
t.timestamps
|
||
|
end
|
||
|
end
|
||
|
end
|