I have created a new flyway migration file and executed flywayMigrate:
ALTER TABLE xxx_user
ADD creation_date TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE xxx_user
ADD deleted BOOLEAN;
ALTER TABLE xxx_user
ADD last_changed TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE xxx_user
ALTER COLUMN deleted SET NOT NULL;
The migration failed with the message: ERROR: column “deleted” of relation “xxx_user” contains null values
I tried to fix the problem by adjusting the alter table command:
ALTER TABLE xxx_user
ADD deleted BOOLEAN NOT NULL DEFAULT FALSE;
However, I cannot carry out this migration. FlywayMigrate gives the same error, which is supposed to be in an empty line. The status of the migration is pending and flywayRepair does not do anything, as there is no failed migration.
How can I solve this problem? Is there a way to delete or change pending migrations?