1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-04 05:50:38 +02:00
Files
immich/server/test/sql-tools/column-create-date.stub.ts

40 lines
832 B
TypeScript
Raw Normal View History

import { CreateDateColumn, DatabaseSchema, Table } from 'src/sql-tools';
@Table()
export class Table1 {
@CreateDateColumn()
createdAt!: string;
}
export const description = 'should register a table with an created at date column';
export const schema: DatabaseSchema = {
name: 'postgres',
schemaName: 'public',
functions: [],
enums: [],
extensions: [],
parameters: [],
tables: [
{
name: 'table1',
columns: [
{
name: 'createdAt',
tableName: 'table1',
type: 'timestamp with time zone',
default: 'now()',
nullable: false,
isArray: false,
primary: false,
synchronize: true,
},
],
indexes: [],
triggers: [],
constraints: [],
synchronize: true,
},
],
warnings: [],
};