When I'm creating migrations for my model(_schema.prisma)_ :
datasource db {
provider = "sqlite"
url = "file:dev.db"
enabled = true
}
model User {
id Int @id
createdAt DateTime @default(now())
email String @unique
name String?
role Role @default(USER)
posts Post[]
profile Profile?
}
I get this sql as the migration script
CREATE TABLE "lift"."User" (
"createdAt" DATE NOT NULL DEFAULT '1970-01-01 00:00:00' ,
"email" TEXT NOT NULL DEFAULT '' ,
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT ,
"name" TEXT ,
"role" TEXT NOT NULL DEFAULT 'USER'
);
Here, _lift_ schema is created in my database which is unexpected. Is there a way to avoid this, or configure it?
Ok, I managed to reproduce this:
prisma/schema.prisma inside with content:model User {
id Int @id
createdAt DateTime @default(now())
email String @unique
name String?
}
```
prisma migrate upREADME.md in the migration folder that was createdIf you run prisma migrate up with the generated mirgation, it just creates the User table as it should - so I think this is a display problem in the README.md.
Does this match your observations @insanebaba?
Or did something actually break for you in other ways besides the displayed SQL queries?
Yes, That's right. Thank you
Thanks @insanebaba, this is actually a real bug in our code that should be fixed then.
I am not sure that this is a thing that we should fix as this only affects the README. This occurs only on SQLite because the driver requires you to attach files you want to use like this: ATTACH [/path/to/file] AS [schema]. In our case we hardcode the schema name to be always lift. It is a completely transient thing that is only used internally. It would require really awkward hacks to work around this.
internal note: Dropping for this sprint. Bring it up in a later sprint.
"quaint" prefix is used in the latest version instead of "lift" but yeah this still exists:

Version: @prisma/cli : 2.0.0-alpha.1244
Most helpful comment
I am not sure that this is a thing that we should fix as this only affects the
README. This occurs only on SQLite because the driver requires you to attach files you want to use like this:ATTACH [/path/to/file] AS [schema]. In our case we hardcode the schema name to be alwayslift. It is a completely transient thing that is only used internally. It would require really awkward hacks to work around this.