multiSchema: migrate reset
with sqlserver does not delete second schema
#17051
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: multiSchema
multiple schemas
topic: previewFeatures
Issue touches on an preview feature flag
topic: prisma migrate reset
CLI: prisma migrate reset
topic: sql server
Microsoft SQL Server
Milestone
Bug description
When using
multSchema
withsqlserver
, runningmigrate reset
produces the errorDatabase error: There is already an object named 'schemaName' in the database.
How to reproduce
npx prisma migrate reset
Expected behavior
The 2nd schema along with its tables should be deleted.
More notes
I created one migration that creates the schema along with a table.
I tried it without the table and the same error occurs.
The first schema I'm using is
dbo
.Here's what the migration, with just the schema creation, looks like...
I tried wrapping the -- CreateSchema in an if statement. When I do that it doesn't error on the schema but it does on the table. The same type of error...
Database error: There is already an object named 'tableName' in the database.
It appears that the reset is not deleting the 2nd schema's objects.
This issue seems to be similar but it's closed as completed, #16561. Maybe it's only supposed to work for postgres.
Environment & setup
18.8.0
Prisma Version
The text was updated successfully, but these errors were encountered: