Closed imor closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dbdev | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 3, 2024 0:02am |
Because old dbdev CLI versions are not aware of default_version, the default_version_struct and default_version columns in app.packages are nullable for backward compatibility with those older CLI versions.
The current user base is like 5 people and we're pre-1.0. I think it's worth taking a breaking change thats solvable with a CLI upgrade to avoid having to make the field nullable at this point. wdyt?
default_version
is important to be set so making it non-nullable definitely reduces chances of bugs with the added benefit of making the code in this PR a lot simpler. So let me make this change.
What kind of change does this PR introduce?
feature
What is the current behavior?
default_version
key in the control file is not sent to the backend when a user runsdbdev publish
. This results in TLE's default version being the first installed version which is usually the oldest version.What is the new behavior?
The
default_version
is now tracked in theapp.packages
table in thedefault_version_struct
anddefault_version
columns. Thedbdev
CLI also sends thedefault_version
from the control file to the backend when runningdbdev publish
command. The CLI also checks that thedefault_version
in the control file is one of the valid versions of the package. The in-db client has been updated to fetch thedefault_version
from thepublic.packages
view and call thepgtle.set_default_version
function.Because old dbdev CLI versions are not aware of
default_version
, thedefault_version_struct
anddefault_version
columns inapp.packages
are nullable for backward compatibility with those older CLI versions.Additional context
Fixes #147