discourse/db/migrate/20201210151635_create_do_not_disturb_timings.rb
2020-12-18 09:03:51 -06:00

15 lines
488 B
Ruby

# frozen_string_literal: true
class CreateDoNotDisturbTimings < ActiveRecord::Migration[6.0]
def change
create_table :do_not_disturb_timings do |t|
t.integer :user_id, null: false
t.datetime :starts_at, null: false
t.datetime :ends_at, null: false
end
add_index :do_not_disturb_timings, [:user_id], unique: false
add_index :do_not_disturb_timings, [:starts_at], unique: false
add_index :do_not_disturb_timings, [:ends_at], unique: false
end
end