Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/cli/src/actions/pull/provider/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ export const sqlite: IntrospectionProvider = {

// List user tables and views from sqlite_schema (the master catalog).
// sqlite_schema contains one row per table, view, index, and trigger.
// We filter to only tables/views and exclude internal sqlite_* objects.
// We filter to only tables/views and exclude internal sqlite_* objects
// and the Prisma migration tracking table.
// The 'sql' column contains the original CREATE TABLE/VIEW statement.
const tablesRaw = all<{ name: string; type: 'table' | 'view'; definition: string | null }>(
"SELECT name, type, sql AS definition FROM sqlite_schema WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%' ORDER BY name",
"SELECT name, type, sql AS definition FROM sqlite_schema WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%' AND name <> '_prisma_migrations' ORDER BY name",
);

// Detect AUTOINCREMENT by parsing the CREATE TABLE statement
Expand Down
Loading