Hello all 👋 I've been playing with the headless...
# help
j
Hello all 👋 I've been playing with the headlessCMS Directus. I have it installed locally and it uses sqlite3 for it's DB. I need help converting the DB to postgresql 🥳 I learned how to dump
data.db
from my local instance into
data.sql
. I wish to import that file into Supabase but not sure how to?! 😖 I ran
Copy code
> sqlite3 data.db
SQLite version 3.38.2 2022-03-26 13:51:10
Enter ".help" for usage hints.
sqlite> .output data.sql
sqlite> .dump
sqlite> .exit
then
Copy code
> sqlite3 data.db`
sqlite> .output data_structure.sql
sqlite> .schema
sqlite> .quit
I now have
data.sql
with all data and
data_structure.sql
😉 Just don't know where to go from there. Been Googling for a while and most solutions seem to point to Rails and Gems 😕
n
Hello @jjaimealeman! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
s
the schema generation will be handled by directus once you connect the supabase postgress instance in production. for local development sqllite should work just fine
n
jjaimealeman (2022-04-04)
s
You can use the command line to do this, take a look at this page https://supabase.com/docs/guides/database#migrating-between-projects, look at point 5 and follow that. Do note that not all SQL databases are compatible, SQLite could be using types not compatible with Postgres.