Sha256: 7def52b62dc141e9043f6a15c7508620659650670a4737cbcbfda45ce55ea5da

Contents?: true

Size: 606 Bytes

Versions: 5

Compression:

Stored size: 606 Bytes

Contents

class CreateBlogPosts < ActiveRecord::Migration
  def change
    create_table :blog_posts do |t|
      t.string :title, :null => false
      t.string :url_title, :null => false
      t.string :author, :null => false
      t.datetime :posted_at
      t.text :content, :null => false
      t.string :tweet, :null => false, :length => 140
      t.datetime :tweeted_at
      t.boolean :locked, :null => false, :default => false
      t.timestamps
    end

    add_index :blog_posts, :title, :unique => true
    add_index :blog_posts, :url_title, :unique => true
    add_index :blog_posts, :posted_at
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cartoonist-blog-0.0.8 db/migrate/20120308064117_create_blog_posts.rb
cartoonist-blog-0.0.7 db/migrate/20120308064117_create_blog_posts.rb
cartoonist-blog-0.0.6 db/migrate/20120308064117_create_blog_posts.rb
cartoonist-blog-0.0.5 db/migrate/20120308064117_create_blog_posts.rb
cartoonist-blog-0.0.4 db/migrate/20120308064117_create_blog_posts.rb