Sha256: 823bab4a30c902923817c9eeb37cc6ad2832dd39577e7eba0e481ad3e94e26c5

Contents?: true

Size: 649 Bytes

Versions: 8

Compression:

Stored size: 649 Bytes

Contents

class CreateServices < ActiveRecord::Migration[5.1]
  def change
    create_table :services do |t|
      t.string :name, :null => false, limit: 128
      t.string :one_liner
      t.string :permalink, :null => false, limit: 128
      t.text   :description

      t.text :price
      t.text :duration
      
      t.references :category
      
      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 :services, :permalink, :unique => true
    add_index :services, :status
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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