Sha256: 3d372518be68c9d27eecfa3fc12c2bb5303e9500cb1954f7e70525b2f7c72724

Contents?: true

Size: 701 Bytes

Versions: 17

Compression:

Stored size: 701 Bytes

Contents

class CreateBlog < ActiveRecord::Migration[5.2]

  LIMIT = 16777215

  def change
    create_table :comfy_blog_posts do |t|
      t.integer   :site_id,       null: false
      t.string    :title,         null: false
      t.string    :slug,          null: false
      t.integer   :layout_id
      t.text      :content_cache, limit: LIMIT
      t.integer   :year,          null: false, limit: 4
      t.integer   :month,         null: false, limit: 2
      t.boolean   :is_published,  null: false, default: true
      t.datetime  :published_at,  null: false
      t.timestamps

      t.index [:site_id, :is_published]
      t.index [:year, :month, :slug]
      t.index [:created_at]
    end

  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
PixelForce_FyBlog-0.0.2 db/migrate/01_create_blog.rb
PixelForce_FyBlog-0.0.1 db/migrate/01_create_blog.rb
PixelForce_ComfyBlog-0.0.1 db/migrate/01_create_blog.rb
EtsComfyBlog-0.0.4 db/migrate/01_create_blog.rb
EtsComfyBlog-0.0.3 db/migrate/01_create_blog.rb
EtsComfyBlog-0.0.2 db/migrate/01_create_blog.rb
EtsComfyBlog-0.0.1 db/migrate/01_create_blog.rb
ets_comfy_blog-0.0.1 db/migrate/01_create_blog.rb
kcy_comfy_blog-2.0.7 db/migrate/01_create_blog.rb
comfy_blog-2.0.7 db/migrate/01_create_blog.rb
comfy_blog-2.0.6 db/migrate/01_create_blog.rb
comfy_blog-2.0.5 db/migrate/01_create_blog.rb
comfy_blog-2.0.4 db/migrate/01_create_blog.rb
comfy_blog-2.0.3 db/migrate/01_create_blog.rb
comfy_blog-2.0.2 db/migrate/01_create_blog.rb
comfy_blog-2.0.1 db/migrate/01_create_blog.rb
comfy_blog-2.0.0 db/migrate/01_create_blog.rb