Sha256: a28d41fc307605ff1024c46b898481bdd99284d72b68e93a9bdbdcc3a7d71d3c

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

class CreateGalleries < ActiveRecord::Migration
  def self.up
    create_table :galleries do |t|
      t.string :name
      t.text :description
      t.boolean :status
      t.date :created_at
      t.date :updated_at

      t.timestamps
    end

    add_index :galleries, :name, :unique => true
    add_index :galleries, :status
  end

  def self.down
    drop_table :galleries
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pictrails-0.5.0 db/migrate/001_create_galleries.rb