-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from TaloDev/develop
Release 0.48.0
- Loading branch information
Showing
16 changed files
with
203 additions
and
17 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
18 changes: 18 additions & 0 deletions
18
src/migrations/20241101233908AddPlayerPropCreatedAtColumn.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,18 @@ | ||
import { Migration } from '@mikro-orm/migrations' | ||
|
||
export class AddPlayerPropCreatedAtColumn extends Migration { | ||
|
||
override async up(): Promise<void> { | ||
this.addSql('alter table `player_prop` add `created_at` datetime not null default CURRENT_TIMESTAMP;') | ||
this.addSql('update `player_prop` set `created_at` = (select `updated_at` from `player` where `player`.`id` = `player_prop`.`player_id`);') | ||
|
||
this.addSql('alter table `apikey` modify `scopes` text not null;') | ||
} | ||
|
||
override async down(): Promise<void> { | ||
this.addSql('alter table `player_prop` drop column `created_at`;') | ||
|
||
this.addSql('alter table `apikey` modify `scopes` text not null;') | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/migrations/20241102004938AddPlayerAliasLastSeenAtColumn.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,14 @@ | ||
import { Migration } from '@mikro-orm/migrations' | ||
|
||
export class AddPlayerAliasLastSeenAtColumn extends Migration { | ||
|
||
override async up(): Promise<void> { | ||
this.addSql('alter table `player_alias` add `last_seen_at` datetime not null default CURRENT_TIMESTAMP;') | ||
this.addSql('update `player_alias` set `last_seen_at` = `updated_at`;') | ||
} | ||
|
||
override async down(): Promise<void> { | ||
this.addSql('alter table `player_alias` drop column `last_seen_at`;') | ||
} | ||
|
||
} |
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
Oops, something went wrong.