-
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.
- Loading branch information
1 parent
4a10de7
commit 61050ac
Showing
39 changed files
with
346 additions
and
613 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
apps/server/src/migrations/mikro-orm/Migration20240627134214.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,38 @@ | ||
import { Migration } from '@mikro-orm/migrations-mongodb'; | ||
|
||
export class Migration20240627134214 extends Migration { | ||
async up(): Promise<void> { | ||
await this.driver.aggregate('school-external-tools', [ | ||
{ $set: { isDeactivated: { $ifNull: ['$status.isDeactivated', false] } } }, | ||
{ $unset: 'status' }, | ||
{ $out: 'school-external-tools' }, | ||
]); | ||
|
||
console.info(`'status.isDeactivated' has moved to 'isDeactivated' for all school-external-tools`); | ||
} | ||
|
||
async down(): Promise<void> { | ||
await this.driver.nativeUpdate( | ||
'school-external-tools', | ||
{ isDeactivated: true }, | ||
{ | ||
$set: { | ||
status: { | ||
isOutdatedOnScopeSchool: false, | ||
isDeactivated: true, | ||
}, | ||
}, | ||
} | ||
); | ||
|
||
await this.driver.nativeUpdate( | ||
'school-external-tools', | ||
{}, | ||
{ | ||
$unset: { isDeactivated: '' }, | ||
} | ||
); | ||
|
||
console.info(`All school-external-tools were reverted to using 'status'`); | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
apps/server/src/modules/tool/school-external-tool/domain/index.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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './school-external-tool.do'; | ||
export * from './school-external-tool.ref'; | ||
export * from './school-external-tool-metadata'; | ||
export { SchoolExternalToolConfigurationStatus } from './school-external-tool-configuration-status'; |
4 changes: 2 additions & 2 deletions
4
...ool-external-tool-configuration-status.ts → ...ool-external-tool-configuration-status.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export class SchoolExternalToolConfigurationStatus { | ||
isOutdatedOnScopeSchool: boolean; | ||
|
||
isDeactivated: boolean; | ||
isGloballyDeactivated: boolean; | ||
|
||
constructor(props: SchoolExternalToolConfigurationStatus) { | ||
this.isOutdatedOnScopeSchool = props.isOutdatedOnScopeSchool; | ||
this.isDeactivated = props.isDeactivated; | ||
this.isGloballyDeactivated = props.isGloballyDeactivated; | ||
} | ||
} |
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.