2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/generators/merrycms/templates/create_pages_and_categories_migration.rb', line 2
def self.up
create_table :pages do |t|
t.string :title
t.text :content
t.text :content_html
t.string :link
t.string :state
t.datetime :published_at
t.datetime :archived_at
t.integer :category_id
t.timestamps
end
create_table :categories do |t|
t.string :name
t.integer :parent_id
t.integer :lft
t.integer :rgt
t.integer :depth
t.integer :position
t.string :link
t.timestamps
end
end
|