about summary refs log tree commit diff
path: root/db/migrate/20191218153258_create_announcements.rb
blob: 58e143c920d7d5df1bcdaa7f19ec0fe648b78ebc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class CreateAnnouncements < ActiveRecord::Migration[5.2]
  def change
    create_table :announcements do |t|
      t.text :text, null: false, default: ''

      t.boolean :published, null: false, default: false
      t.boolean :all_day, null: false, default: false

      t.datetime :scheduled_at
      t.datetime :starts_at
      t.datetime :ends_at

      t.timestamps
    end
  end
end