You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section should specify that migrations are run automatically when gotrue is called and do not need to be run with gotrue migrate at the start.
Additional context
I am just getting into go, and I am reading over the source of gotrue to get a feel for the language. All statements in this issue may be totally false, because I could be totally misunderstanding the code I am reading. If this is the case, please show some patience in the replies.
Thanks for the comprehensive description on the issue. The documentation does seem to be a little dated -- migrations are applied on startup and we now have a docker workflow for development. PRs are welcome!
With regards to the comment about the migrate command -- I think the main command does not run when the user chooses to run the sub command (e.g. only commands associated with ./gotrue migrate will be called and not both the main command( ./gotrue) and ./gotrue migrate
Improve documentation
Link
https://github.com/supabase/gotrue/blob/c9f1ed5731b102a40bae113e972c0e7674a9195b/README.md?plain=1#L136
Describe the problem
I believe that migrations are run automatically whenever gotrue is started. I am basing this believe on the fact that the root command calls migrate before calling any other command. See here:
https://github.com/supabase/gotrue/blob/c9f1ed5731b102a40bae113e972c0e7674a9195b/cmd/root_cmd.go#L15
Describe the improvement
This section should specify that migrations are run automatically when
gotrue
is called and do not need to be run withgotrue migrate
at the start.Additional context
I am just getting into go, and I am reading over the source of
gotrue
to get a feel for the language. All statements in this issue may be totally false, because I could be totally misunderstanding the code I am reading. If this is the case, please show some patience in the replies.Final Note
It might also be helpful to add a branch so that migrations are not run twice when
gotrue migrate
is called. Because currently, whengotrue migrate
is called, migrations are run once here: https://github.com/supabase/gotrue/blob/c9f1ed5731b102a40bae113e972c0e7674a9195b/cmd/root_cmd.go#L15and then run again here https://github.com/supabase/gotrue/blob/c9f1ed5731b102a40bae113e972c0e7674a9195b/cmd/migrate_cmd.go#L19
But I don't think that this double-run isn't really doing any harm so no need to special-case it if y'all think it's fine.
The text was updated successfully, but these errors were encountered: