I am trying postgres with supabase. I ported most of my data from a sqlite. There querries with depth > 0 worked but with the supabase setup I am getting only ids in the references. Is that a know issue with supabase or generally expected with postgres databases?
Any hints on what I might do wrong because it works fine with sqlite.
#Supabase query with depth > 0 only populates references with ids
8 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
are you sure the rows related to the ids exist?
Good idea, but yes they do exist.
One thing that might be an issue is that the migration says that the id should be serial but it is int8 on supabase. The image id is integer in the migration and also int8. Are serials just special int8 or depending just on what serial is used?
serials are special, yes
your best bet is to let payload's code create the tables for you in supabase, then work out a way to migrate your data from sqlite to postgres
sounds good. currently I am trying to migrate with pgloader but it's at least not working out of the box. How would you approach that?
I managed to port all the data :D
Filename: sqlite-to-supabase.load
LOAD DATABASE
FROM sqlite:///absolute-path-to-db.db
INTO postgresql://postgres-data-from-supabase-or-your-other-host:6543/postgres
WITH data only, truncate;
Command: pgloader sqlite-to-supabase.load
I started the webserver and went on a page, so the db tables are created on the database.
Then I ran the script from above.
It inserted all the rows and auto converted even values like bool that are 0 or 1 in sqlite to FALSE and TRUE.
Once you figure out the steps it is pretty easy :)