-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* implement functionality to create separate list board * added property 'layout' for existing boards * adapt column board structure to list board * added feature flag for list board
- Loading branch information
Showing
31 changed files
with
289 additions
and
125 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
apps/server/src/migrations/mikro-orm/Migration20240415124640.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Migration } from '@mikro-orm/migrations-mongodb'; | ||
import { BoardLayout } from '@shared/domain/domainobject'; | ||
import { BoardNodeType } from '@shared/domain/entity'; | ||
|
||
export class Migration20240415124640 extends Migration { | ||
async up(): Promise<void> { | ||
const columBoardResponse = await this.driver.nativeUpdate<{ type: BoardNodeType; layout: BoardLayout }>( | ||
'boardnodes', | ||
{ $and: [{ type: 'column-board' }, { layout: { $exists: false } }] }, | ||
{ layout: BoardLayout.COLUMNS } | ||
); | ||
console.info(`Updated ${columBoardResponse.affectedRows} records in boardnodes`); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/require-await | ||
async down(): Promise<void> { | ||
console.error(`boardnodes cannot be rolled-back. It must be restored from backup!`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.