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
Currently the schema use CREATE TABLE to create the table. This will throw an error in case the table already exists. Using CREATE TABLE IF NOT EXISTS instead would give better results.
However there probably should be a way to verify whether the table matches the specified schema as well to avoid version skew. Basic checks such as whether the table columns match could be a good start.
The text was updated successfully, but these errors were encountered:
The Schema() call isn't really intended for database migration purposes. We've considered building in migration support directly into dbx but haven't settled on a set of features we'd like to support. In the meantime, using dbx alongside something like github.com/go-migrate/go-migrate works pretty good. It does require manual construction of the up/down statements, however.
Currently the schema use
CREATE TABLE
to create the table. This will throw an error in case the table already exists. UsingCREATE TABLE IF NOT EXISTS
instead would give better results.However there probably should be a way to verify whether the table matches the specified schema as well to avoid version skew. Basic checks such as whether the table columns match could be a good start.
The text was updated successfully, but these errors were encountered: