Sha256: f12e153e22f5a0e5bbaf098dfa898e5d8e9295684f1983daf8093f8db57d6a38

Contents?: true

Size: 1.07 KB

Versions: 44

Compression:

Stored size: 1.07 KB

Contents

class CreateEffectivePages < ActiveRecord::Migration
  def self.up
    create_table :pages do |t|
      t.string :title
      t.string :meta_description

      t.boolean :draft, :default => false

      t.string :layout, :default => 'application'
      t.string :template

      t.string :slug
      t.integer :roles_mask, :default => 0

      t.datetime :updated_at
      t.datetime :created_at
    end
    add_index :pages, :slug, :unique => true

    create_table :menus do |t|
      t.string      :title
      t.timestamps
    end

    create_table :menu_items do |t|
      t.integer       :menu_id

      t.integer       :menuable_id
      t.string        :menuable_type

      t.string        :title
      t.string        :url
      t.string        :classes
      t.string        :special
      t.boolean       :new_window, :default => false
      t.integer       :roles_mask, :default => nil

      t.integer       :lft
      t.integer       :rgt
    end
    add_index :menu_items, :lft

  end

  def self.down
    drop_table :pages
    drop_table :menus
    drop_table :menu_items
  end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
effective_pages-1.0.11 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.10 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.9 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.8 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.7 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.6 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.5 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.4 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.3 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.2 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.1 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.0 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.9 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.8 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.7 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.6 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.5 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.4 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.3 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-0.9.2 spec/dummy/db/migrate/01_create_effective_pages.rb