16 lines
492 B
Ruby
16 lines
492 B
Ruby
class CreateBlogs < ActiveRecord::Migration
|
|
def change
|
|
create_table :blogs do |t|
|
|
t.string "name", :default => "", :null => false
|
|
t.text "description"
|
|
t.integer "position", :default => 1
|
|
t.integer "article_count", :default => 0, :null => false
|
|
t.integer "comments_count", :default => 0, :null => false
|
|
t.integer "last_comments_id"
|
|
t.integer "parent_id"
|
|
t.integer "author_id"
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|