Sha256: 0c6fa3cc2b833af18e356791dbf2a9d2db2f73066b922b446f9454979c00b268
Contents?: true
Size: 879 Bytes
Versions: 8
Compression:
Stored size: 879 Bytes
Contents
Description: Stubs out a new database migration. Pass the migration name, either CamelCased or under_scored, as an argument. A migration class is generated in db/migrate prefixed by the latest migration number. You can name your migration in either of these formats to generate add/remove column lines: AddColumnToTable or RemoveColumnFromTable Example: `./script/generate migration AddSslFlag` With 4 existing migrations, this creates the AddSslFlag migration in db/migrate/005_add_ssl_flag.rb `./script/generate migration AddSslFlagToAccount` This will create the AddSslFlagToAccount in db/migrate/005_add_ssl_flag_to_account.rb with this in the Up migration: add_column :accounts, :ssl_flag, :type, :null => :no?, :default => :maybe? And this in the Down migration: remove_column :accounts, :ssl_flag
Version data entries
8 entries across 8 versions & 1 rubygems