c33b489853
This is to ensure that migrations will still be consitent when we will upgrade to Rails 5 which default to `null: false` for timestamps columns. Fixes #23666. Signed-off-by: Rémy Coutable <remy@rymai.me>
15 lines
361 B
Ruby
15 lines
361 B
Ruby
# rubocop:disable all
|
|
class AddAwardEmoji < ActiveRecord::Migration
|
|
def change
|
|
create_table :award_emoji do |t|
|
|
t.string :name
|
|
t.references :user
|
|
t.references :awardable, polymorphic: true
|
|
|
|
t.timestamps null: true
|
|
end
|
|
|
|
add_index :award_emoji, :user_id
|
|
add_index :award_emoji, [:awardable_type, :awardable_id]
|
|
end
|
|
end
|