eBooru/db/migrate/20221014085948_add_mascot_table.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

19 lines
620 B
Ruby

# frozen_string_literal: true
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
t.boolean :active, default: true, null: false
t.timestamps
end
end
end