feat: rename schema (#19891)

This commit is contained in:
Jason Rasmussen
2025-07-14 10:13:06 -04:00
committed by GitHub
parent 33c29e4305
commit c699df002a
103 changed files with 4378 additions and 3224 deletions
+3 -10
View File
@@ -9,11 +9,9 @@ import {
PrimaryGeneratedColumn,
Table,
Timestamp,
Unique,
} from 'src/sql-tools';
@Table('shared_links')
@Unique({ name: 'UQ_sharedlink_key', columns: ['key'] })
@Table('shared_link')
export class SharedLinkTable {
@PrimaryGeneratedColumn()
id!: Generated<string>;
@@ -24,7 +22,7 @@ export class SharedLinkTable {
@ForeignKeyColumn(() => UserTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
userId!: string;
@Column({ type: 'bytea', indexName: 'IDX_sharedlink_key' })
@Column({ type: 'bytea', index: true, unique: true })
key!: Buffer; // use to access the individual asset
@Column()
@@ -39,12 +37,7 @@ export class SharedLinkTable {
@Column({ type: 'boolean', default: false })
allowUpload!: boolean;
@ForeignKeyColumn(() => AlbumTable, {
nullable: true,
onDelete: 'CASCADE',
onUpdate: 'CASCADE',
indexName: 'IDX_sharedlink_albumId',
})
@ForeignKeyColumn(() => AlbumTable, { nullable: true, onDelete: 'CASCADE', onUpdate: 'CASCADE' })
albumId!: string | null;
@Column({ type: 'boolean', default: true })