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.3.2 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.3.1 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.3.0 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.2.0 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.9 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.8 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.7 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.6 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.5 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.4 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.3 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.2 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.1 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.1.0 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.17 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.16 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.15 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.14 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.13 spec/dummy/db/migrate/01_create_effective_pages.rb
effective_pages-1.0.12 spec/dummy/db/migrate/01_create_effective_pages.rb