When you create a new table via the UI what is cal...
# help
b
When you create a new table via the UI what is called in SQL? Just CREATE TABLE or also other statements like for example GRANT... ?
n
Hello @Barschreck! 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.
b
My goal is to build a .sql file for an initial setup of my tables to have the possibility to rebuild my table structure for a testing environment or on a new supabase instance
g
If you create a table in the sql editor or the UI the structure is the same. The grants are being set on the table from the schema by default. You might have to be careful though which user runs the sql to generate the table. The postgres user from the database connection is slightly different than the super user in the UI and SQL window.
n
Barschreck (2022-03-19)
b
What are the differences between them? I was trying a vscode extrension for postgres to execute my files where I put in the credentials for the postgres user.
Is it possible to run the commands as super user when I actually use the database connection with the postgres user?
g
For creating tables should be fine (Prisma uses the postgres connection and creates tables). But there have been cases that come up, mainly with postgres not having ownership of existing tables. https://github.com/supabase/supabase/discussions/4825
b
Thank you 🙂
n
Thread was archived by @Barschreck. Anyone can send a message to unarchive it.