20181229102323_create_navigate_icon_configs.rb 855 B

1234567891011121314151617181920212223242526
  1. class CreateNavigateIconConfigs < ActiveRecord::Migration
  2. def change
  3. create_table :navigate_icon_configs do |t|
  4. #名称
  5. t.string :name, :default => '', :null => false, :limit => 10
  6. #排序
  7. t.integer :sort, :default => 1, :null => false
  8. #链接
  9. t.column :url, :string, :limit => 4096, :default => '',:null => false
  10. #链接类型-> 内部链接:0,外部链接:1
  11. t.column :url_type,:tinyint, :default => 0
  12. #图标图片
  13. t.string :cover
  14. #商品类别顺序[0-类别数量]
  15. t.integer :product_cat_index, :null => false, :default => 0
  16. #是否启用
  17. t.column :state, :boolean, :default => true, :null => false
  18. #备注
  19. t.column :remark, :string, :limit => 225, :default => ''
  20. end
  21. end
  22. def down
  23. drop_table :navigate_icon_configs
  24. end
  25. end