Sha256: faf6b3ad676d29717806a72313459ae0c2b988fd2925d030ba46a3c6e1f1c242

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

class CreatePrices < ActiveRecord::Migration[5.1]
  def change
    create_table :prices do |t|
      t.string :title, :null => false, limit: 128
      t.string :sub_title
      t.text :price
      t.references :category, index: true
      t.string :status, :null => false, :default=>"unpublished", :limit=>16
      t.boolean :featured, default: false
      t.integer :priority, default: 1, null: false

      t.timestamps null: false
    end

    add_index :prices, :status
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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