Sha256: 4850bc156b46d1aa362bb77f5be47c32a43284bc9a1e8533405189ebfd0d10fb

Contents?: true

Size: 250 Bytes

Versions: 17

Compression:

Stored size: 250 Bytes

Contents

class CreatePosts < ActiveRecord::Migration
  def change
    create_table :posts do |t|
      t.string :title
      t.text :body
      t.boolean :published
      t.references :user

      t.timestamps
    end
    add_index :posts, :user_id
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
magic_grid-0.12.6 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.5 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.4 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.3 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.2 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.1 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.12.0 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.11.1 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.11.0 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.10.4 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.10.3 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.10.2 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.10.1 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.10.0 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.9.3.1 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.9.3 test/dummy/db/migrate/20111025195229_create_posts.rb
magic_grid-0.9.2 test/dummy/db/migrate/20111025195229_create_posts.rb