Sha256: ba845b0aa15a7bb51cb4288cb0a94144a373ad532c483ec806659621bd0cd02f

Contents?: true

Size: 753 Bytes

Versions: 7

Compression:

Stored size: 753 Bytes

Contents

# This migration comes from notee (originally 20160605141437)
class CreateNoteePosts < ActiveRecord::Migration
  def change
    create_table :notee_posts do |t|

      # notee's base

      t.string  :title, default: "no title"
      t.text    :content
      t.string  :slug, default: "#{Time.now.strftime("%Y-%H-%M-%S")}"
      t.integer :status, default: 0
      t.integer :category_id, default: 0
      t.integer :thumbnail_id, default: 0
      t.datetime :published_at, default: Time.now

      # seo
      t.string  :seo_keyword, default: ""
      t.string  :seo_description, default: ""


      # if you have user_id
      # t.integer :user_id

      t.timestamps null: false

    end

    add_index :notee_posts, :slug, :unique => true
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
notee-0.3.1 db/migrate/20160605141437_create_notee_posts.rb
notee-0.3.0 db/migrate/20160605141437_create_notee_posts.rb
notee-0.2.9 db/migrate/20160605141437_create_notee_posts.rb
notee-0.2.8 db/migrate/20160605141437_create_notee_posts.rb
notee-0.2.7 db/migrate/20160605141437_create_notee_posts.rb
notee-0.2.6 db/migrate/20160605141437_create_notee_posts.rb
notee-0.2.5 db/migrate/20160605141437_create_notee_posts.rb