Class: CreateEcmCmsCoreFolders

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/ecm/cms_core/migrations/templates/create_ecm_cms_core_folders.rb

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
# File 'lib/generators/ecm/cms_core/migrations/templates/create_ecm_cms_core_folders.rb', line 17

def self.down
  drop_table :ecm_cms_core_folders
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/ecm/cms_core/migrations/templates/create_ecm_cms_core_folders.rb', line 2

def self.up
  create_table :ecm_cms_core_folders do |t|
    t.references :parent
    t.string :basename
    t.string :pathname
    t.integer :lft
    t.integer :rgt
    t.integer :depth
    t.integer :children_count, :default => 0
    t.integer :templates_count, :default => 0

    t.timestamps
  end
end