Migrate: Can not create SQLite database when using protocol `sqlite://`

Created on 2 Jul 2020  路  3Comments  路  Source: prisma/migrate

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlite"
  url      = "sqlite://dev.db"
}

model User {
  id    String  @default(cuid()) @id
  email String  @unique
  name  String?
}

leads to endless spinner on prisma migrate save --experimental.

With url = "file:./dev.db" it creates the file, but does not finish the process and you have to use Ctrl+C (but that is tracked in another issue).

(Windows)

bu1-repro-available kinbug

Most helpful comment

What was actually https://github.com/prisma/migrate/issues/342 @jsplate - which should be fixed in the @dev version now and will be inlcuded in the next release on latest as well.

All 3 comments

I had the same problem on Windows. Slight difference: Even Ctrl+C did not stop the command from running. The db file was created, but no migrations. On Ubuntu 20-04 it runs fine.

What was actually https://github.com/prisma/migrate/issues/342 @jsplate - which should be fixed in the @dev version now and will be inlcuded in the next release on latest as well.

So sqlite:// is actually expected to fail as it's not supported, changing it to file: should work.

Was this page helpful?
0 / 5 - 0 ratings