Websites/db/migrate/20231116040717_create_e621_thumbnails.rb

19 lines
560 B
Ruby
Raw Permalink Normal View History

2024-05-03 03:04:43 +00:00
# frozen_string_literal: true
class CreateE621Thumbnails < ActiveRecord::Migration[7.1]
def change
create_table(:e621_thumbnails) do |t|
t.references(:creator, foreign_key: { to_table: :api_users }, null: false)
t.references(:api_key)
t.inet(:creator_ip_addr, null: false)
t.integer(:post_id, null: false)
t.uuid(:md5, null: false)
t.string(:status, null: false, default: "pending")
t.string(:filetype, null: false)
t.string(:error_code)
t.datetime(:expires_at)
t.timestamps
end
end
end