midday-ai / midday

Run your business smarter ๐Ÿช„
https://midday.ai
GNU Affero General Public License v3.0
2.6k stars 244 forks source link

Supabase SQL schema #85

Closed WeiY closed 2 days ago

WeiY commented 2 months ago

When I tried to self host the midday dashboard, there is an error with getUser (cannot find the relationship between user id and team id). Maybe because I donโ€™t create any table in Supabase. Right now I only found the generated typescript types and there is no SQL schema. Is there anyway to create tables in Supabase? Thanks!

pontusab commented 2 months ago

Yes, we are using supabase replicas and there is currently an issue generating the SQL schema, we will add it asap once fixed!

WeiY commented 2 months ago

Thanks very much for reply! And if you have a simple document about how to setup the Supabase (like replicas) for dashboard running on self-host, that will be perfect.

atresnjo commented 1 month ago

I've thought about creating it with the use of ChatGPT (convert TS types to CREATE statements), got close but cannot figure out the views because I have no idea where decrypted_name is taken from, guess I'll just wait a bit ๐Ÿ‘

atresnjo commented 1 month ago

I got a lot working, can't seem to figure out the transaction view :D

image

image

got plaid and most of the stuff connected too, i guess my views are a bit wrong ๐Ÿ˜†

pontusab commented 1 month ago

Hey, im in contact with supabase regarding generate the schema when you have 1. replicas 2. encryption on row level (that you notice here) because we use Vault to store keys and those are unique to every project (ofc)

I'll let you know when we have a plan here!

azlekov commented 1 month ago

Can someone put some notes or steps for self-hosting this? I want to play around with it.

Many thanks!

cathalm1 commented 1 month ago

@pontusab any updates on when the sql schema will be released?

pontusab commented 2 days ago

We now have the schema in the repo ๐Ÿ‘ https://github.com/midday-ai/midday/tree/main/packages/supabase/migrations

Documentation will be ready after our ProductHunt release in 2 weeks!