Open jasongitmail opened 11 months ago
Further, with this setup I've found that running "migration:generate": "drizzle-kit generate:sqlite",
will not look for schema at the path specified in drizzle.config.ts
(i.e. at ./drizzle/schema.ts
in my case) and consequently will generate a migration to create ALL new tables as if they don't exist yet.
But I can resolve this by moving my schema.ts
into the migrations
dir, or switching back to the directory structure (below) to get fully expected behavior:
// drizzle.config.ts
...
out: './drizzle',
schema: './drizzle/schema.ts',
...
Though it'd be nice to have all the migration files hidden away inside a migrations
dir.
What version of
drizzle-orm
are you using?0.28.6
What version of
drizzle-kit
are you using?0.19.13
Describe the Bug
drizzle.config.ts
:npm run migration:introspect
, which uses"migration:introspect": "drizzle-kit introspect:sqlite",
.Behavior
schema.ts
to be created at./drizzle/schema.ts
and to overwrite any existing file there../drizzle/migrations/schema.ts
within the migrations dir.Expected behavior
No response
Environment & setup
No response