Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Remove all but the initial go-cve-dictionary related alembic migrations #54

Open
evonide opened this issue Nov 2, 2020 · 0 comments
Open
Labels
enhancement New feature or request low_priority

Comments

@evonide
Copy link
Contributor

evonide commented Nov 2, 2020

The go-cve-dictionary third-party dependency maintains its own tables. If there is an update it will automatically migrate/update the table structure.

Currently, Vulncode-DB explicitly ensures over alembic migrations that the data models are in sync. However, this breaks if go-cve-dictionary is run before Vulncode-DB was upgraded to the newest version as some columns or database modifications might have already happened through go-cve-dictionary.

  1. Change all initial alembic migrations in migrations/versions/82f8f48c6ee6_initial_layout.py to be create if not exist.
  2. Remove all alembic upgrade instructions related to go-cve-dictionary from all migrations after that.

This way it is expected that go-cve-dictionary will be run at least once if there have been any updates.

  • How can automatically detect and enforce this to avoid unexpected breakages?
@evonide evonide added enhancement New feature or request low_priority labels Nov 2, 2020
@evonide evonide added this to the Yellow Neptunium milestone Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request low_priority
Projects
None yet
Development

No branches or pull requests

1 participant