mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
feat: add foreign key indexes (#17672)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { onMissingTable, resolveTable } from 'src/sql-tools/from-code/processors/table.processor';
|
||||
import { Processor } from 'src/sql-tools/from-code/processors/type';
|
||||
import { asCheckConstraintName } from 'src/sql-tools/helpers';
|
||||
import { asKey } from 'src/sql-tools/helpers';
|
||||
import { DatabaseConstraintType } from 'src/sql-tools/types';
|
||||
|
||||
export const processCheckConstraints: Processor = (builder, items) => {
|
||||
@@ -24,3 +24,5 @@ export const processCheckConstraints: Processor = (builder, items) => {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const asCheckConstraintName = (table: string, expression: string) => asKey('CHK_', table, [expression]);
|
||||
|
||||
Reference in New Issue
Block a user