Sha256: 993557591ee54f5c2c5feac87fe430b787f185c7d9e011f6f937ba7a45d5a75a

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 Bytes

Contents

class CreateOffers < ActiveRecord::Migration[5.0]
  def change
    create_table :offers do |t|
      
      t.string :title, :null => false, :limit=>256
      t.string :offer_text, :null => false, :limit=>64

      t.text   :description
      
      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 :offers, :status
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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