Let me preface by saying that while I have worked with a ton of other database technologies this is the first time I have ever used Supabase.
I looked through and the @supabase/supabase-js package in the repo does not provide any way to create a table. It seems the only way to do this is via the UI or to use a manual Postgres connection which is what I'm trying here. I used the provided type for DiscordUser and guessed at the types.
Please provide any feedback big or small. I hastily threw this together so I'm not particularly attached to any of it. If we come up with a good plan, I can go through and carry through with the other tables and add potentially add some seed data.
Also noticed that the createdAt field doesn't get set when I create my profile with /updateProfile but that's a problem for another day. 🙃
Let me preface by saying that while I have worked with a ton of other database technologies this is the first time I have ever used Supabase.
I looked through and the
@supabase/supabase-js
package in the repo does not provide any way to create a table. It seems the only way to do this is via the UI or to use a manual Postgres connection which is what I'm trying here. I used the provided type forDiscordUser
and guessed at the types.Please provide any feedback big or small. I hastily threw this together so I'm not particularly attached to any of it. If we come up with a good plan, I can go through and carry through with the other tables and add potentially add some seed data.
Also noticed that the
createdAt
field doesn't get set when I create my profile with/updateProfile
but that's a problem for another day. 🙃