Class: ThesisCreatePage

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/thesis/install/templates/migrations/thesis_create_page.rb

Class Method Summary collapse

Class Method Details

.downObject



18
19
20
# File 'lib/generators/thesis/install/templates/migrations/thesis_create_page.rb', line 18

def self.down
  drop_table :pages
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/thesis/install/templates/migrations/thesis_create_page.rb', line 2

def self.up
  # Please note: if you change this (in the thesis gem) please
  # update the /spec/spec_helper.rb to match.
  
  create_table :pages do |t|
    t.integer :parent_id
    t.string  :name
    t.string  :slug
    t.string  :title
    t.string  :description
    t.integer :sort_order, default: 0, null: false
    t.string  :template, default: "default", null: false
    t.timestamps
  end
end