blob: d8bc89103c5433a8c0384d7ca2f638ccb0969fe8 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 | class CreateCalendars < ActiveRecord::Migration
  def change
    create_table :calendars do |t|
      t.string :name
      t.string :short_name
      t.daterange :date_ranges, array: true
      t.date :dates, array: true
      t.boolean :shared
      t.belongs_to :organisation, index: true
      t.timestamps
    end
    add_index :calendars, :short_name, unique: true
  end
end
 |