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
Has anyone else had a need to for a verification step. An assurance that the migration has completed successfully. e.g.
Lhm.change_table :my_table do |table|
table.ddl "ALTER TABLE `#{table.name}` DEFAULT CHARACTER SET utf8mb4, DEFAULT COLLATE utf8mb4_unicode_ci"
verification do |table|
result = table.query "SELECT count(*) FROM {#table.name) as new_table JOIN #{table.name} as old_table USING (id) WHERE new_table.name != old_table.name"
result.first[0] == 0
end
end
The verification block would be executed after the Chunker and before the Switcher. If it evaluated to false the change would be rolled back.
Does anyone else have a need for this and what strategies do you currently use? Does a feature like this fit into this gem?
The text was updated successfully, but these errors were encountered:
no, but the metadata lock should prevent any rows from being inserted/changed ( within the kown potential problems the replace/triggers have) I don't think is needed cc @sroysen
Has anyone else had a need to for a verification step. An assurance that the migration has completed successfully. e.g.
The verification block would be executed after the Chunker and before the Switcher. If it evaluated to false the change would be rolled back.
Does anyone else have a need for this and what strategies do you currently use? Does a feature like this fit into this gem?
The text was updated successfully, but these errors were encountered: