Sha256: 377424182f8908d7cd460150d02bd65a2ae85f2d7da29a70d37c2ad14394d938

Contents?: true

Size: 568 Bytes

Versions: 8

Compression:

Stored size: 568 Bytes

Contents

class CreateEvents < ActiveRecord::Migration[5.0]
  def change
    create_table :events do |t|
      
      t.string :title, :null => false, :limit=>256
      t.string :venue, :null => false, :limit=>256

      t.text   :description
      
      t.date     :date, :null => true
      t.datetime :starts_at, :null => true
      t.datetime :ends_at, :null => true
      
      t.boolean :featured, default: false
      t.string :status, :null => false, :default=>"unpublished", :limit=>16

      t.timestamps null: false
    end
    add_index :events, :status
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dhatu-0.1.25 db/migrate/20160803045832_create_events.rb
dhatu-0.1.24 db/migrate/20160803045832_create_events.rb
dhatu-0.1.23 db/migrate/20160803045832_create_events.rb
dhatu-0.1.22 db/migrate/20160803045832_create_events.rb
dhatu-0.1.21 db/migrate/20160803045832_create_events.rb
dhatu-0.1.20 db/migrate/20160803045832_create_events.rb
dhatu-0.1.19 db/migrate/20160803045832_create_events.rb
dhatu-0.1.18 db/migrate/20160803045832_create_events.rb