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
I've reached a unique case of trying to remove all artifacts of an initial migration. In the migrate down I attempt to remove pgmigrations table, which understandably causes an issue, since afterwards the node-pg-migrate tries to delete the migration record from the table that no longer exists.
The question is if node-pg-migrate provides callbacks that I've yet to discover in the docs. My case of this cleanup is unique and unlikely to happen often, but I envision wanting to build notifiers (reports or emails) after failures/commits. If my database is 3 migrations behind, it'd be nice to wait for all three migrations to finish to consolidate into one report.
> npx node-pg-migrate "down""-s""some-schema"> Migrating files:
> - 1645591900441_my-first-migration
### MIGRATION 1645591900441_my-first-migration (DOWN) ###
DROP TABLE "posts";
DROP TABLE "users";
DROP TABLE IF EXISTS "pgmigrations";
DELETE FROM "some-schema"."pgmigrations" WHERE name='1645591900441_my-first-migration';
Error executing:
DELETE FROM "some-schema"."pgmigrations" WHERE name='1645591900441_my-first-migration';
^^^^
relation "some-schema.pgmigrations" does not exist
The text was updated successfully, but these errors were encountered:
I've reached a unique case of trying to remove all artifacts of an initial migration. In the
migrate down
I attempt to removepgmigrations
table, which understandably causes an issue, since afterwards thenode-pg-migrate
tries to delete the migration record from the table that no longer exists.The question is if
node-pg-migrate
provides callbacks that I've yet to discover in the docs. My case of this cleanup is unique and unlikely to happen often, but I envision wanting to build notifiers (reports or emails) after failures/commits. If my database is 3 migrations behind, it'd be nice to wait for all three migrations to finish to consolidate into one report.1645591900441_my-first-migration.js
command line
The text was updated successfully, but these errors were encountered: