module PGTrunk::Migrator
@private This module extends the ActiveRecord::Migrator to clean the gem-specific registry ‘pg_trunk`:
-
set version to rows added by the current migration
-
delete rows that refer to objects deleted by the migration
We need this because some objects (like check constraints, indexes etc.) can be dropped along with the table they refer to. This depencency is implicit-ish. That’s why we have to check the presence of all objects in ‘pg_trunk` after every single migration.
Public Instance Methods
record_version_state_after_migrating(*)
click to toggle source
Calls superclass method
# File lib/pg_trunk/core/railtie/migrator.rb, line 17 def record_version_state_after_migrating(*) super PGTrunk::Registry.finalize end