mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +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
|
|
@ -1,39 +0,0 @@
|
|||
import { Column, DatabaseSchema, Table } from 'src/sql-tools';
|
||||
|
||||
enum Test {
|
||||
Foo = 'foo',
|
||||
Bar = 'bar',
|
||||
}
|
||||
|
||||
@Table()
|
||||
export class Table1 {
|
||||
@Column({ enum: Test })
|
||||
column1!: string;
|
||||
}
|
||||
|
||||
export const description = 'should use a default enum naming convention';
|
||||
export const schema: DatabaseSchema = {
|
||||
name: 'public',
|
||||
tables: [
|
||||
{
|
||||
name: 'table1',
|
||||
columns: [
|
||||
{
|
||||
name: 'column1',
|
||||
tableName: 'table1',
|
||||
type: 'enum',
|
||||
enumName: 'table1_column1_enum',
|
||||
enumValues: ['foo', 'bar'],
|
||||
nullable: false,
|
||||
isArray: false,
|
||||
primary: false,
|
||||
synchronize: true,
|
||||
},
|
||||
],
|
||||
indexes: [],
|
||||
constraints: [],
|
||||
synchronize: true,
|
||||
},
|
||||
],
|
||||
warnings: [],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue