class CreateNavigateIconConfigs < ActiveRecord::Migration
  def change
    create_table :navigate_icon_configs do |t|
      #名称
      t.string  :name,  :default => '', :null => false, :limit => 10
      #排序
      t.integer :sort, :default => 1, :null => false
      #链接
      t.column :url, :string, :limit => 4096, :default => '',:null => false
      #链接类型->   内部链接：0，外部链接：1 
      t.column :url_type,:tinyint, :default => 0
      #图标图片
      t.string :cover
      #商品类别顺序[0-类别数量]
      t.integer :product_cat_index, :null => false, :default => 0
      #是否启用
      t.column :state, :boolean, :default => true,  :null => false
      #备注
      t.column :remark, :string, :limit => 225, :default => ''
    end
  end
  def down
    drop_table :navigate_icon_configs
  end
end
