1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-16 07:24:40 +02:00

feat: initial kysely migration file (#17678)

This commit is contained in:
Jason Rasmussen
2025-04-17 17:38:47 -04:00
committed by GitHub
parent e275f2d8b3
commit 6474a78b8b
13 changed files with 499 additions and 139 deletions

View File

@ -0,0 +1,47 @@
import { Column, DatabaseSchema, Index, Table } from 'src/sql-tools';
@Table()
@Index({ expression: '"id" IS NOT NULL' })
export class Table1 {
@Column({ nullable: true })
column1!: string;
}
export const description = 'should create an index based off of an expression';
export const schema: DatabaseSchema = {
name: 'postgres',
schemaName: 'public',
functions: [],
enums: [],
extensions: [],
parameters: [],
tables: [
{
name: 'table1',
columns: [
{
name: 'column1',
tableName: 'table1',
type: 'character varying',
nullable: true,
isArray: false,
primary: false,
synchronize: true,
},
],
indexes: [
{
name: 'IDX_376788d186160c4faa5aaaef63',
tableName: 'table1',
unique: false,
expression: '"id" IS NOT NULL',
synchronize: true,
},
],
triggers: [],
constraints: [],
synchronize: true,
},
],
warnings: [],
};