Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get a dump of insert statements of your existing database: docker exec -i sunwave-mysql sh -c "mysqldump -u root -p'Welcome1' --skip-extended-insert sunwave3" > sunwave3-insert-statements.sql This example is for aws docker image. The key to use ”--skip-extended-insert”

  2. Pull out the table you need to update: cat sunwave3-insert-statements.sql | grep sw_timeline_task > insert_sw_timeline_task.sql

  3. Modify the sql file by copy the existing insert statement and modifying to suit your needs.

  4. Run locally: docker exec -i sunwave-mysql sh -c "exec mysql --force -uroot -pWelcome1 sunwave3" < insert_sw_timeline_task.sql The --force ignores any duplication errors while telling which statements are duplicates.

  5. Remove duplicates.

  6. Update https://github.com/sunwavehealth/devops/blob/develop/database/docker/3_wack-o-mole4_data.sql file with your new statements.

  7. Reinstall the docker image see https://sunwavehealth.atlassian.net/wiki/spaces/~63696606d60bd2b365f87223/pages/61865999/wack-o-mole+database+usage#Update-to-newest-version%3A

  8. Rerun your integration test.

...