drizzle-zero-sqlite
v0.12.11
Published
Generate Zero schemas from Drizzle SQLite schemas
Readme
drizzle-zero-sqlite
Generate a Zero schema from a Drizzle SQLite schema while keeping Drizzle as the single schema source.
import { drizzleZeroConfig } from 'drizzle-zero-sqlite'
export const zeroSchema = drizzleZeroConfig(
{ ...schema, relations },
{
tables: {
user: true,
message: true,
},
}
)drizzleZeroConfig() returns a real Zero schema created with
@rocicorp/zero. Pass it anywhere Zero expects your schema.
The translator accepts Drizzle sqliteTable definitions and beta
defineRelations exports, including through(...) relations. It rejects
PostgreSQL tables so a project cannot silently generate the wrong dialect.
