Create daily command #224
3 changed files with 20 additions and 0 deletions
2
database/0.6/1715967355818-daily/Up/01-table/User.sql
Normal file
2
database/0.6/1715967355818-daily/Up/01-table/User.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE `user`
|
||||
ADD LastUsedDaily datetime null;
|
|
@ -13,6 +13,9 @@ export default class User extends AppBaseEntity {
|
|||
@Column()
|
||||
Currency: number;
|
||||
|
||||
@Column()
|
||||
LastUsedDaily?: Date;
|
||||
|
||||
public UpdateCurrency(currency: number) {
|
||||
this.Currency = currency;
|
||||
}
|
||||
|
|
15
src/database/migrations/app/0.6/1715967355818-daily.ts
Normal file
15
src/database/migrations/app/0.6/1715967355818-daily.ts
Normal 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> {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue