P
Prismaโ€ข5mo ago
Bartholomeas

Migrate sqlite to postgres

Hello! Currently i have SQLite database with Prisma. I need to transfer it (with entire data) to Postgres, it is easily possible? Didnt found any article or smth ๐Ÿ˜ฆ
2 Replies
Nurul
Nurulโ€ข5mo ago
Hey ๐Ÿ‘‹ You should be able to migrate from sqlite to postgres. I would recommend that you have two datasources, one sqlite and one postgresql: https://github.com/prisma/prisma/issues/2443#issuecomment-630679118 You can make a copy your existing schema file and change the provider value in datasource block of your schema.prisma from "sqlite" to "postgresql". And check if you get any errors in this new schema.prisma file. If you are using any field types specific to sqlite then you may need to migrate it to a compatible postgresql type. Once your schema is sorted out and the tables are created in your postgres table, you can start transferring data.
GitHub
Multiple Connections / Databases / Datasources ยท Issue #2443 ยท pris...
Problem An application may need to access different connections/databases. One use case could be having the exact same set of tables into different databases (multi-tenant approach). Another use ca...
Bartholomeas
BartholomeasOPโ€ข5mo ago
Thanks! Ill check that tomorrow ๐Ÿ˜„ Im not as advanced in handling databases, but maybe it will not be that hard
Want results from more Discord servers?
Add your server