class CreateCustomize < ActiveRecord::Migration def self.change create_table :customize_characters do |t| t.string :key t.string :type t.text :value t.string :related_type t.integer :related_id end add_index :customize_characters, [:related_type, :related_id] create_table :customize_inherit_nodes do |t| t.integer :node_id t.string :node_type t.integer :left t.integer :right t.integer :parent_id end add_index :customize_inherit_nodes, [:node_type, :node_id] add_index :customize_inherit_nodes, :parent_id end end