| 12345678910111213141516171819 |
- # encoding:utf-8
- class CreateArticleCats < ActiveRecord::Migration
- def self.up
- create_table :article_cats do |t|
- t.column :name, :string, :null => false, :limit => 100
- t.column :position, :integer
- t.column :ancestry, :string, :limit => 100
- t.column :state, :boolean, :default => false
- end
- add_index :article_cats, :position
- add_index :article_cats, :ancestry
- add_index :article_cats, :name
- end
- def self.down
- drop_table :article_cats
- end
- end
|