Sha256: 81f81e94d798b41b66869efdc0be42b261b0df24c4a79abc5ec8ccc6c3490d33
Contents?: true
Size: 848 Bytes
Versions: 18
Compression:
Stored size: 848 Bytes
Contents
class SunriseCreateStructures < ActiveRecord::Migration def self.up create_table :structures do |t| t.string :title, :null => false t.string :slug, :null => false, :limit => 25 t.integer :kind, :limit => 1, :default => 0 t.integer :position, :limit => 2, :default => 0 t.boolean :is_visible, :default => true t.string :redirect_url t.integer "parent_id" t.integer "lft", :default => 0 t.integer "rgt", :default => 0 t.integer "depth", :default => 0 t.timestamps end add_index :structures, [:kind, :slug], :uniq => true add_index :structures, :parent_id add_index :structures, [:lft, :rgt] end def self.down drop_table :structures end end
Version data entries
18 entries across 13 versions & 4 rubygems