chore(server): typeorm definitions fix part 3 (#1796)

* chore(server): tidy up exif typeorm entity definition

* chore(server): tidy up shared link typeorm entity definition

* chore(server): tidy up smart info typeorm entity definition

* chore(server): tidy up tag typeorm entity definition

* ci: add job that checks typeorm migrations are correct and up-to-date
This commit is contained in:
Zack Pollard 2023-02-20 01:50:27 +00:00 committed by GitHub
parent 5d3e8f17d1
commit d1ea6a897e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 140 additions and 101 deletions

View file

@ -1,4 +1,13 @@
import { Column, Entity, Index, ManyToMany, ManyToOne, PrimaryGeneratedColumn, Unique } from 'typeorm';
import {
Column,
CreateDateColumn,
Entity,
Index,
ManyToMany,
ManyToOne,
PrimaryGeneratedColumn,
Unique,
} from 'typeorm';
import { AlbumEntity } from './album.entity';
import { AssetEntity } from './asset.entity';
import { UserEntity } from './user.entity';
@ -25,7 +34,7 @@ export class SharedLinkEntity {
@Column()
type!: SharedLinkType;
@Column({ type: 'timestamptz' })
@CreateDateColumn({ type: 'timestamptz' })
createdAt!: string;
@Column({ type: 'timestamptz', nullable: true })
@ -56,5 +65,3 @@ export enum SharedLinkType {
*/
INDIVIDUAL = 'INDIVIDUAL',
}
// npm run typeorm -- migration:generate ./libs/infra/src/db/AddMorePermissionToSharedLink -d ./libs/infra/src/db/config/database.config.ts