mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat(api): update existing artists in MusicLibrary
This commit is contained in:
parent
a0c28e2324
commit
a0ffe108e1
11 changed files with 176 additions and 1 deletions
18
src/database/migrations/06-AddUpdatedAtColumns.ts
Normal file
18
src/database/migrations/06-AddUpdatedAtColumns.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
||||
|
||||
export class AddUpdatedAtColumnes0000000000006 implements MigrationInterface {
|
||||
async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.addColumn(
|
||||
"artist",
|
||||
new TableColumn({
|
||||
name: "updatedAt",
|
||||
type: "timestamp",
|
||||
default: "NOW()",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.dropColumn("artist", "updatedAt");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue