Skip to content

[db migrator] Introduce the DB migration infrastructure#519

Merged
yxieca merged 2 commits intosonic-net:masterfrom
yxieca:migrator
Apr 30, 2019
Merged

[db migrator] Introduce the DB migration infrastructure#519
yxieca merged 2 commits intosonic-net:masterfrom
yxieca:migrator

Conversation

@yxieca
Copy link
Copy Markdown
Contributor

@yxieca yxieca commented Apr 20, 2019

- What I did

  • Add infrastructure to migrate DB contents from a lower version schema
    to a higher version schema, eventually reach latest version.
  • if config load_minigraph is executed, the db schema version is always
    the latest.

- How to verify it
Some manual tests.

- Add infrastructure to migrate DB contents from a lower version schema
  to a higher version schema, eventually reach latest version.
- if config load_minigraph is executed, the db schema version is always
  the latest.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Copy link
Copy Markdown
Contributor

@wendani wendani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on pfc wd table migration

@yxieca
Copy link
Copy Markdown
Contributor Author

yxieca commented Apr 20, 2019

config reload should also call db_migrator.py -o migtate

@sonic-net sonic-net deleted a comment from prsunny Apr 22, 2019
@sonic-net sonic-net deleted a comment from lguohan Apr 29, 2019
@sonic-net sonic-net deleted a comment from lguohan Apr 29, 2019
@yxieca
Copy link
Copy Markdown
Contributor Author

yxieca commented Apr 29, 2019

Tested this change (uncommented the pfcwd upgrade), warm reboot from an image before to after worked.

@yxieca yxieca merged commit b531934 into sonic-net:master Apr 30, 2019
@yxieca yxieca deleted the migrator branch April 30, 2019 02:29
yxieca added a commit that referenced this pull request Apr 30, 2019
* [db migrator] Introduce the DB migration infrastructure

- Add infrastructure to migrate DB contents from a lower version schema
  to a higher version schema, eventually reach latest version.
- if config load_minigraph is executed, the db schema version is always
  the latest.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [db migrator] address issues found in test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants