Fix command for sync stage enum (#6291)

We were missing the default value for syncStage, while it is expected
since indicated in the metadata
This commit is contained in:
Marie 2024-07-16 16:50:39 +02:00 committed by GitHub
parent 8eb021531d
commit 9711a430de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,6 +113,10 @@ export class UpdateMessageChannelSyncStageEnumCommand extends CommandRunner {
`ALTER TABLE "${dataSourceMetadata.schema}"."messageChannel" ALTER COLUMN "syncStage" TYPE "${dataSourceMetadata.schema}"."messageChannel_syncStage_enum" USING "syncStage"::text::"${dataSourceMetadata.schema}"."messageChannel_syncStage_enum"`,
);
await queryRunner.query(
`ALTER TABLE "${dataSourceMetadata.schema}"."messageChannel" ALTER COLUMN "syncStage" SET DEFAULT 'FULL_MESSAGE_LIST_FETCH_PENDING'`,
);
await queryRunner.query(
`DROP TYPE "${dataSourceMetadata.schema}"."messageChannel_syncStage_enum_old"`,
);