Update database schema to allow daily command last used

This commit is contained in:
Ethan Lane 2024-05-17 18:43:50 +01:00
parent 5a8ec932b4
commit 8821578ff6
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE `user`
ADD LastUsedDaily datetime null;

View file

@ -13,6 +13,9 @@ export default class User extends AppBaseEntity {
@Column()
Currency: number;
@Column()
LastUsedDaily?: Date;
public UpdateCurrency(currency: number) {
this.Currency = currency;
}

View file

@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import MigrationHelper from "../../../../helpers/MigrationHelper";
export class Daily1715967355818 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
MigrationHelper.Up("1715967355818-daily", "0.6", [
"01-table/User",
], queryRunner);
}
public async down(): Promise<void> {
}
}