refactor: sql-tools (#19717)

This commit is contained in:
Jason Rasmussen 2025-07-03 10:59:17 -04:00 committed by GitHub
parent 484529e61e
commit 6044663e26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
160 changed files with 1120 additions and 1186 deletions

View file

@ -1,11 +1,4 @@
import {
Column,
DatabaseConstraintType,
DatabaseSchema,
ForeignKeyConstraint,
PrimaryColumn,
Table,
} from 'src/sql-tools';
import { Column, ConstraintType, DatabaseSchema, ForeignKeyConstraint, PrimaryColumn, Table } from 'src/sql-tools';
@Table()
export class Table1 {
@ -22,7 +15,7 @@ export class Table2 {
export const description = 'should warn against missing column in foreign key constraint';
export const schema: DatabaseSchema = {
name: 'postgres',
databaseName: 'postgres',
schemaName: 'public',
functions: [],
enums: [],
@ -46,7 +39,7 @@ export const schema: DatabaseSchema = {
triggers: [],
constraints: [
{
type: DatabaseConstraintType.PRIMARY_KEY,
type: ConstraintType.PRIMARY_KEY,
name: 'PK_b249cc64cf63b8a22557cdc8537',
tableName: 'table1',
columnNames: ['id'],