Why we shouldn't drop the SQL database tables anymore #1934
csirmazbendeguz
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The database consists of the following tables:
annotations- OCIdomains- OCIlocators- OCImigrations- defined in the source codemodules- OCIname_verifications- OCIpublications- created bydirctl routing publishrecord_usage_metricsrecords- OCIscan_reports- OCIsignature_verifications- OCIskills- OCIsyncs- created bydirctl syncMost tables come from the OCI. For example,
recordshas the same records as the OCI registry.syncsandpublicationsare operations created bydirctlmigrationsare defined in the source coderecord_usage_metricsis automatically created / updated on each pull, lookup, or periodically by the reconcilerPreviously, we used to drop the database tables when changing the database schema. This was okay, since most tables were coming from the OCI registry. Yes, we lost previous
syncsandpublicationsoperations, but that was acceptable to make migrations easierv1.6.1 comes with the
record_usage_metricstable which makes dropping & rebuilding the database tables a much less acceptable solution to migrations. These metrics are tracked in the database only, so resetting the database would mean losing these metricsNB: it doesn't make sense to move these metrics into the OCI registry:
Because of this, I believe we can't drop the database anymore. If we make a change to the database schema, we should use the existing migration system to handle the changes
All reactions