eBooru/db/migrate/20221014085948_add_mascot_table.rb

19 lines
620 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2022-10-15 15:40:40 -04:00
class AddMascotTable < ActiveRecord::Migration[6.1]
def change
create_table :mascots do |t|
t.references :creator, foreign_key: { to_table: :users }, null: false
t.string :display_name, null: false
t.string :md5, index: { unique: true }, null: false
t.string :file_ext, null: false
t.string :background_color, null: false
t.string :artist_url, null: false
t.string :artist_name, null: false
t.boolean :safe_mode_only, default: false, null: false
2022-10-15 15:40:40 -04:00
t.boolean :active, default: true, null: false
t.timestamps
end
end
end