Skip to content

Commit

Permalink
New type details
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-mabry committed Sep 10, 2024
1 parent 38da644 commit 580d212
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/models/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ export type Table = {
schema?: string
columns: TableColumn[]
indexes: TableIndex[]
constraints: Constraint[]
}

export type ConstraintColumn = {
columnName: string
constraintName: string
constraintSchema: string
tableName: string
tableSchema: string
}

export type Constraint = {
name: string
schema: string
tableName: string
type: string
columns: ConstraintColumn[]
}

export type TableColumn = {
Expand All @@ -22,7 +39,7 @@ export type TableColumn = {
default: any
primary: boolean
unique: boolean

// expression: string
references: TableReference[]
}
Expand Down Expand Up @@ -52,4 +69,4 @@ export type TableIndex = {
name: string
type: TableIndexType
columns: string[]
}
}

0 comments on commit 580d212

Please sign in to comment.