Sha256: 738a1525b1f00b1d27ab64dd38ad5b7a40b38757ddfbe026e984f99db55245f2
Contents?: true
Size: 466 Bytes
Versions: 5
Compression:
Stored size: 466 Bytes
Contents
class CreateBlogitPosts < ActiveRecord::Migration def change create_table :blogit_posts do |t| t.with_options(null: false) do |r| r.string :title r.text :body r.string :state, default: Blogit::configuration.hidden_states.first.to_s r.integer :comments_count, default: 0 end t.references :blogger, polymorphic: true t.timestamps end add_index :blogit_posts, [:blogger_type, :blogger_id] end end
Version data entries
5 entries across 5 versions & 1 rubygems