mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 23:35:50 +00:00
Merge pull request #2767 from gradido/2766-bug-migration-of-communities-with-errors
fix(database): change downwards migration to delete entries with last_announced_at IS NULL
This commit is contained in:
commit
c3e170d870
@ -23,6 +23,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
// write downgrade logic as parameter of queryFn
|
||||
await queryFn('DELETE FROM `communities` WHERE `last_announced_at` IS NULL;')
|
||||
await queryFn(
|
||||
'ALTER TABLE `communities` MODIFY COLUMN `last_announced_at` datetime(3) NOT NULL AFTER `end_point`;',
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user