mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
initialized postgres support
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { AlterTableColumnAlteringBuilder, CompiledQuery, TableMetadata } from "kysely";
|
||||
import type { IndexMetadata } from "../connection/Connection";
|
||||
import type { IndexMetadata, SchemaResponse } from "../connection/Connection";
|
||||
import type { Entity, EntityManager } from "../entities";
|
||||
import { PrimaryField, type SchemaResponse } from "../fields";
|
||||
import { PrimaryField } from "../fields";
|
||||
|
||||
type IntrospectedTable = TableMetadata & {
|
||||
indices: IndexMetadata[];
|
||||
@@ -239,10 +239,9 @@ export class SchemaManager {
|
||||
|
||||
for (const column of columns) {
|
||||
const field = this.em.entity(table).getField(column)!;
|
||||
const fieldSchema = field.schema(this.em);
|
||||
if (Array.isArray(fieldSchema) && fieldSchema.length === 3) {
|
||||
schemas.push(fieldSchema);
|
||||
//throw new Error(`Field "${field.name}" on entity "${table}" has no schema`);
|
||||
const fieldSchema = field.schema();
|
||||
if (fieldSchema) {
|
||||
schemas.push(this.em.connection.getFieldSchema(fieldSchema));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user