retrospring/db/migrate/20211222165159_create_mute_rules.rb

15 lines
346 B
Ruby
Raw Permalink Normal View History

2023-10-20 01:37:34 +02:00
# frozen_string_literal: true
2021-12-22 19:21:09 +01:00
class CreateMuteRules < ActiveRecord::Migration[5.2]
def change
create_table :mute_rules do |t|
t.references :user, foreign_key: true
t.string :muted_phrase
t.timestamps
end
2022-01-02 15:30:04 +01:00
change_column(:mute_rules, :id, :bigint, default: -> { "gen_timestamp_id('mute_rules'::text)" })
2021-12-22 19:21:09 +01:00
end
end