Sha256: 06d3b195546dbeff1be6118fd38ad59aa637885390af77911f248010d0dde120

Contents?: true

Size: 606 Bytes

Versions: 8

Compression:

Stored size: 606 Bytes

Contents

class CreateBlogPosts < ActiveRecord::Migration[5.0]
  def change
    create_table :blog_posts do |t|
      
      t.string :title, null: false, limit: 256
      t.string :slug, null: true, limit: 64
      t.string :author, null: true, limit: 256
      t.string :meta_description, null: true, limit: 512

      t.text   :description
      
      t.datetime :posted_at, null: true
      
      t.boolean :featured, default: false
      t.string :status, null: false, :default=>"unpublished", limit: 16

      t.text :tags

      t.timestamps null: false
    end
    add_index :blog_posts, :status
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dhatu-0.1.25 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.24 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.23 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.22 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.21 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.20 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.19 db/migrate/20171012103806_create_blog_posts.rb
dhatu-0.1.18 db/migrate/20171012103806_create_blog_posts.rb