Module: MigrationDefs
- Defined in:
- lib/migration_defs.rb
Defined Under Namespace
Classes: AbstractMigrationClass, AddColumnFunc, AddIndexFunc, AddTimestampsFunc, ChangeColumnDefaultFunc, ChangeColumnFunc, Column, ColumnOption, CreateTableFunc, CreateTableOption, DropTableFunc, FuncFactory, IndexOption, MigrationClass, MigrationMethod, RemoveColumnFunc, RemoveIndexFunc, RemoveIndexOption, RemoveTimestampsFunc, RenameColumnFunc, RenameIndexFunc, RenameTableFunc
Constant Summary collapse
- MethodName =
['change', 'up', 'down']
- FuncName =
{ 'create_table' => 'テーブルの作成', 'rename_table' => 'テーブル名を変更', 'drop_table' => 'テーブルの削除', #'change_table' => 'テーブル定義を変更',#not support 'add_column' => 'カラムの追加', 'rename_column' => 'カラム名の変更', 'change_column' => 'カラムの変更', 'remove_column' => 'カラムの削除', #'remove_columns' => '複数のカラムを削除',#not support 'change_column_default' => 'カラムの初期値を設定', 'add_index' => 'インデックスの追加', 'rename_index' => 'インデックスの変更', 'remove_index' => 'インデックスの削除', #'timestamps' => 'created_atとupdated_atを生成',#@create_table 'add_timestamps' => 'created_atとupdated_atを追加', 'remove_timestamps' => 'created_atとupdated_atの削除', }
- ColumnType =
{ 'string' => '文字列', 'text' => '長い文字列', 'integer' => '整数', 'float' => '浮動小数', 'decimal' => '精度の高い小数', 'datetime' => '日時', 'timestamp' => 'より細かい日時', 'time' => '時間', 'date' => '日付', 'binary' => 'バイナリデータ', 'boolean' => 'Boolean型', 'timestamps' => 'レコードの作成・更新日時', 'attachment' => 'attachment', 'belongs_to' => 'belongs_to', }