chore!: remove deviceId and deviceAssetId (#27818)

chore: remove deviceId and deviceAssetId
This commit is contained in:
Daniel Dietzler
2026-04-15 21:00:33 +02:00
committed by GitHub
parent d410131312
commit 8ee5d3039a
55 changed files with 31 additions and 1102 deletions
@@ -0,0 +1,11 @@
import { Kysely, sql } from 'kysely';
export async function up(db: Kysely<any>): Promise<void> {
await sql`ALTER TABLE "asset" DROP COLUMN "deviceAssetId";`.execute(db);
await sql`ALTER TABLE "asset" DROP COLUMN "deviceId";`.execute(db);
}
export async function down(db: Kysely<any>): Promise<void> {
await sql`ALTER TABLE "asset" ADD "deviceAssetId" character varying NOT NULL;`.execute(db);
await sql`ALTER TABLE "asset" ADD "deviceId" character varying NOT NULL;`.execute(db);
}
-6
View File
@@ -65,15 +65,9 @@ export class AssetTable {
@PrimaryGeneratedColumn()
id!: Generated<string>;
@Column()
deviceAssetId!: string;
@ForeignKeyColumn(() => UserTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE', nullable: false })
ownerId!: string;
@Column()
deviceId!: string;
@Column()
type!: AssetType;