class <%= migration_class_name %> < ActiveRecord::Migration def change create_table :<%= lang_table_name %> do |t| t.string :code, null: false, limit: 5 t.boolean :east, null: false, default: false t.integer :position , default: 1 , null: false t.boolean :enable, null: false, default: true t.timestamps end add_index :<%= lang_table_name %>, [:code], unique: true create_table :<%= lang_text_table_name %> do |t| t.integer :parent_id, null: false t.integer :lang_id, null: false t.string :label t.timestamps end add_index :<%= lang_text_table_name %>, [:parent_id,:lang_id], unique: true end end