You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: During a migration, sometimes I need to to more than just modify the database schema. For example, I might want to migrate data from an old column to a new column, before deleting the old column.
classTestMigration < ActiveRecord::Migrationdefself.upadd_column:phones,:number,:stringexecute("update phones set number = concat(area_code, prefix, suffix)")remove_column:phones,:area_coderemove_column:phones,:prefixremove_column:phones,:suffixendend
Can I do something like this with mini_record ??
The text was updated successfully, but these errors were encountered:
Sure! Open your console, in padrino padrino console in rails should be some like rails console, the simply require that file ie: require 'db/migrations/test_migration.rb'.
MiniRecord looks fantastic - thanks!!!
Question: During a migration, sometimes I need to to more than just modify the database schema. For example, I might want to migrate data from an old column to a new column, before deleting the old column.
Can I do something like this with mini_record ??
The text was updated successfully, but these errors were encountered: