immich/server/test/sql-tools/column-default-null.stub.ts
2025-03-28 10:40:09 -04:00

33 lines
706 B
TypeScript

import { Column, DatabaseSchema, Table } from 'src/sql-tools';
@Table()
export class Table1 {
@Column({ type: 'character varying', default: null })
column1!: string;
}
export const description = 'should register a nullable column from a default of null';
export const schema: DatabaseSchema = {
name: 'public',
tables: [
{
name: 'table1',
columns: [
{
name: 'column1',
tableName: 'table1',
type: 'character varying',
nullable: true,
isArray: false,
primary: false,
synchronize: true,
},
],
indexes: [],
constraints: [],
synchronize: true,
},
],
warnings: [],
};