Skip to content

feat(sqlite): add native STRICT table support#5907

Draft
agustif wants to merge 1 commit into
drizzle-team:betafrom
agustif:feat/sqlite-strict-effect-v4
Draft

feat(sqlite): add native STRICT table support#5907
agustif wants to merge 1 commit into
drizzle-team:betafrom
agustif:feat/sqlite-strict-effect-v4

Conversation

@agustif

@agustif agustif commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Adds first-class SQLite STRICT table support to the current beta architecture.

const users = sqliteTable.strict("users", {
  id: integer().primaryKey(),
  name: text({ length: 128 }),
})

Drizzle Kit emits STRICT, preserves the metadata through snapshots, diffs, introspection, pull code generation, and recreate-table migrations, and rejects unsupported SQLite storage classes before SQL generation.

Compatibility

  • Bumps SQLite snapshots from v7 to v8.
  • drizzle-kit up upgrades v5/v6/v7 histories and defaults existing tables to isStrict: false.
  • Missing strict metadata from mixed ORM versions is treated as non-strict.
  • Strict mode changes in either direction use the existing recreate-table path.
  • Built-in text(N) metadata is emitted as SQLite TEXT in strict tables so the generated SQL uses an allowed strict storage class; Effect Schema still derives the declared text limit.

Validation

  • 223 focused Drizzle Kit SQLite tests passed across tables, v6/v7 snapshots, constraints, columns, generated columns, views, checks, commutativity, and generation flow.
  • Strict introspection and pull code generation test passed.
  • 3 SQLite Effect Schema/runtime metadata tests passed.
  • drizzle-orm type tests passed.
  • Pre-commit formatting and lint checks passed.

Existing work

This is the beta-branch implementation of the same feature area as #5389 and the earlier #202 request. #5389 targets the older main Kit architecture; this PR carries the feature through the current beta DDL/snapshot pipeline, including v8 upgrades, strict toggles, pull generation, and invalid-type validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant