mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: extension, triggers, functions, comments, parameters management in sql-tools (#17269)
feat: sql-tools extension, triggers, functions, comments, parameters
This commit is contained in:
parent
51c2c60231
commit
e7a5b96ed0
170 changed files with 5205 additions and 2295 deletions
38
server/test/sql-tools/column-delete-date.stub.ts
Normal file
38
server/test/sql-tools/column-delete-date.stub.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { DatabaseSchema, DeleteDateColumn, Table } from 'src/sql-tools';
|
||||
|
||||
@Table()
|
||||
export class Table1 {
|
||||
@DeleteDateColumn()
|
||||
deletedAt!: string;
|
||||
}
|
||||
|
||||
export const description = 'should register a table with a deleted at date column';
|
||||
export const schema: DatabaseSchema = {
|
||||
name: 'postgres',
|
||||
schemaName: 'public',
|
||||
functions: [],
|
||||
enums: [],
|
||||
extensions: [],
|
||||
parameters: [],
|
||||
tables: [
|
||||
{
|
||||
name: 'table1',
|
||||
columns: [
|
||||
{
|
||||
name: 'deletedAt',
|
||||
tableName: 'table1',
|
||||
type: 'timestamp with time zone',
|
||||
nullable: true,
|
||||
isArray: false,
|
||||
primary: false,
|
||||
synchronize: true,
|
||||
},
|
||||
],
|
||||
indexes: [],
|
||||
triggers: [],
|
||||
constraints: [],
|
||||
synchronize: true,
|
||||
},
|
||||
],
|
||||
warnings: [],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue