A website template with lots of features, built with ruby on rails.

20140916213814_create_blog_posts.rb 314B

123456789101112131415
  1. class CreateBlogPosts < ActiveRecord::Migration
  2. def change
  3. create_table :blog_posts do |t|
  4. t.string :title
  5. t.string :slug
  6. t.text :content
  7. t.boolean :published
  8. t.references :author, index: true
  9. t.timestamps
  10. end
  11. add_index :blog_posts, :slug, unique: true
  12. end
  13. end