Skip to content

add STRICT table mode support for SQLite#5389

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

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

Conversation

@elithrar
Copy link
Contributor

@elithrar elithrar commented Feb 18, 2026

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
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