Skip to content

add STRICT table mode support for SQLite#5389

Open
elithrar wants to merge 2 commits into
drizzle-team:mainfrom
elithrar:feat/sqlite-strict-mode
Open

add STRICT table mode support for SQLite#5389
elithrar wants to merge 2 commits into
drizzle-team:mainfrom
elithrar:feat/sqlite-strict-mode

Conversation

@elithrar

@elithrar elithrar commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Adds .strict() method to sqliteTable() for creating SQLite STRICT tables.

const users = sqliteTable('users', {
  id: int('id').primaryKey(),
  name: text('name'),
}).strict();

Generates: CREATE TABLE users (...) STRICT;

Changes

  • .strict() chained method on sqliteTable (like enableRLS() pattern)
  • isStrict in schema serialization and DDL generation
  • introspection support for existing STRICT tables
  • runtime warnings for invalid STRICT column types (valid: INT, INTEGER, REAL, TEXT, BLOB, ANY)

Docs: drizzle-team/drizzle-orm-docs#653

@elithrar elithrar changed the title feat(sqlite): add STRICT table mode support add STRICT table mode support Feb 18, 2026
@elithrar elithrar changed the title add STRICT table mode support add STRICT table mode support for SQLite Feb 18, 2026
@elithrar elithrar marked this pull request as draft February 18, 2026 17:24
- add .strict() chained method to sqliteTable (like enableRLS pattern)
- add isStrict to schema serialization and DDL generation
- add introspection support to detect STRICT tables from existing databases
- add runtime warnings for invalid column types in STRICT tables
- valid STRICT types: INT, INTEGER, REAL, TEXT, BLOB, ANY
@elithrar elithrar force-pushed the feat/sqlite-strict-mode branch from 7618c1e to 0ae9784 Compare February 18, 2026 17:51
@agustif

agustif commented Jun 17, 2026

Copy link
Copy Markdown

I opened #5907 as the implementation for the current beta branch architecture. It follows the same feature direction, but carries STRICT metadata through the beta DDL model, snapshot v8 upgrade path, strict enable/disable rebuilds, introspection/pull code generation, mixed-version defaults, and unsupported-type validation. Linking the PRs here so maintainers can choose whether #5907 supersedes this older-main implementation or whether any API details should be reconciled.

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.

2 participants