Sha256: 0e3679f90091611ef17568a9575014fe7e24c0749aade7f33cdcae5aa919320f

Contents?: true

Size: 714 Bytes

Versions: 5

Compression:

Stored size: 714 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.string :short_description, null: true, limit: 512
      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

5 entries across 5 versions & 1 rubygems

Version Path
dhatu-0.3.0.pre.materialize db/migrate/20171014125055_create_services.rb
dhatu-0.2.3 db/migrate/20171014125055_create_services.rb
dhatu-0.2.2 db/migrate/20171014125055_create_services.rb
dhatu-0.2.1 db/migrate/20171014125055_create_services.rb
dhatu-0.2.0 db/migrate/20171014125055_create_services.rb