-
Notifications
You must be signed in to change notification settings - Fork 245
Rfc/dump #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rfc/dump #3
Conversation
We would like to create a basic CLI for Supabase. At this stage we can assume that the user won't need to create orgs/projects from the CLI, but they will need to: - develop locally - push database migrations to their Postgres database
alter table "public"."users" add column | ||
"data" | ||
jsonb -- type | ||
default -- default | ||
; | ||
comment on column "public"."users"."data" is | ||
""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trickiest part of making the models "clean" seems to be figuring out how to group the comments with the column.
This looks clean:
create table users (
id uuid primary_key,
first_name text,
last_name text
)
but then the comments have to sit below the actual table:
create table users (
id uuid primary_key,
first_name text,
last_name text
)
comment on column "public"."users"."firstname" is "Some comment";
comment on column "public"."users"."lastname" is "Some comment";
As a result it may be better to create all the columns in separate alter
statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with the ALTER COLUMNs is that they're too verbose. I think that our structure should make the point that "SQL is code". Verbosity won't aid in that goal, and instead it discourages looking into the generated SQL.
So the comments at the bottom look better to me.
Closing this as we're transitioning to the Go CLI. |
What kind of change does this PR introduce?
Mocks up a dump concept