Sha256: f16455fca6e16cd3ae5c01397303b4446ee1e48da92ef1e32702b08677ccacf5

Contents?: true

Size: 339 Bytes

Versions: 5

Compression:

Stored size: 339 Bytes

Contents

class CreateNews < ActiveRecord::Migration
  def change
    create_table :news do |t|
      t.datetime :published_on
      t.references :user
      t.string :photo
      t.string :slug
      t.string :title
      t.text :content

      t.timestamps
    end

    add_index :news, :user_id
    add_index :news, :slug, unique: true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
beerify-0.2.0 db/migrate/20130903130542_create_news.rb
beerify-0.1.3 db/migrate/20130903130542_create_news.rb
beerify-0.1.2 db/migrate/20130903130542_create_news.rb
beerify-0.1.1 db/migrate/20130903130542_create_news.rb
beerify-0.1.0 db/migrate/20130903130542_create_news.rb