feat: add foreign key indexes (#17672)

This commit is contained in:
Jason Rasmussen
2025-04-17 14:41:06 -04:00
committed by GitHub
parent 81ed54aa61
commit e275f2d8b3
49 changed files with 382 additions and 285 deletions

View File

@@ -1,5 +1,5 @@
import { Processor } from 'src/sql-tools/from-code/processors/type';
import { asPrimaryKeyConstraintName } from 'src/sql-tools/helpers';
import { asKey } from 'src/sql-tools/helpers';
import { DatabaseConstraintType } from 'src/sql-tools/types';
export const processPrimaryKeyConstraints: Processor = (builder) => {
@@ -22,3 +22,5 @@ export const processPrimaryKeyConstraints: Processor = (builder) => {
}
}
};
const asPrimaryKeyConstraintName = (table: string, columns: string[]) => asKey('PK_', table, columns);