0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-13 22:11:20 -05:00

refactor: use FieldsConfig for Table generic

This commit is contained in:
bholmesdev 2024-02-15 12:51:07 -05:00
parent 49f8fab4bf
commit 1a1589d9ce

View file

@ -1,6 +1,6 @@
import type { ColumnDataType, ColumnBaseConfig, SQLChunk } from 'drizzle-orm';
import type { ColumnDataType, ColumnBaseConfig } from 'drizzle-orm';
import type { SQLiteColumn, SQLiteTableWithColumns } from 'drizzle-orm/sqlite-core';
import type { DBField } from '../core/types.js';
import type { DBField, FieldsConfig } from '../core/types.js';
type GeneratedConfig<T extends ColumnDataType = ColumnDataType> = Pick<
ColumnBaseConfig<T, string>,
@ -76,7 +76,7 @@ export type Column<T extends DBField['type'], S extends GeneratedConfig> = T ext
export type Table<
TTableName extends string,
TFields extends Record<string, Pick<DBField, 'type' | 'schema'>>,
TFields extends FieldsConfig,
> = SQLiteTableWithColumns<{
name: TTableName;
schema: undefined;