UNPKG

@athenox/talos

Version:

Talos: a backend you describe instead of write. Declare a schema, write the rules in plain language, map URLs to sentences; a small built-in model turns them into query plans.

16 lines (15 loc) • 739 B
import type { Store } from './runtime.ts'; /** * The database brought up to a Drizzle schema, additively: a missing table is * created, a missing column added — nothing is ever dropped, renamed or * retyped (that is a migration to write by hand, with its data in mind). * What an app's migration folder did for fresh installs and new columns. * * await syncSchema(store, schema) // at startup * * Returns what it did, so a deploy log says it. */ export declare function syncSchema(store: Store, schema: Record<string, unknown>, o?: { /** rows that must exist, inserted only when absent (by their unique key): plugin defaults, a first admin */ seed?: Record<string, Record<string, unknown>[]>; }): Promise<string[]>;