mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
40 lines
806 B
TypeScript
40 lines
806 B
TypeScript
import { Column, DatabaseSchema, Table } from 'src/sql-tools';
|
|
|
|
@Table()
|
|
export class Table1 {
|
|
@Column({ length: 2 })
|
|
column1!: string;
|
|
}
|
|
|
|
export const description = 'should use create a string column with a fixed length';
|
|
export const schema: DatabaseSchema = {
|
|
name: 'postgres',
|
|
schemaName: 'public',
|
|
functions: [],
|
|
enums: [],
|
|
extensions: [],
|
|
parameters: [],
|
|
tables: [
|
|
{
|
|
name: 'table1',
|
|
columns: [
|
|
{
|
|
name: 'column1',
|
|
tableName: 'table1',
|
|
type: 'character varying',
|
|
length: 2,
|
|
nullable: false,
|
|
isArray: false,
|
|
primary: false,
|
|
synchronize: true,
|
|
},
|
|
],
|
|
indexes: [],
|
|
triggers: [],
|
|
constraints: [],
|
|
synchronize: true,
|
|
},
|
|
],
|
|
warnings: [],
|
|
};
|