From cfb9476d40d0e653805bfcf06346d0551996df8b Mon Sep 17 00:00:00 2001 From: Arjan H Date: Thu, 29 Jun 2023 20:28:27 +0200 Subject: [PATCH] Fix migration of database schema to preserve data (#75) --- restore | 1 + 1 file changed, 1 insertion(+) diff --git a/restore b/restore index 853bdf8..89a41cf 100755 --- a/restore +++ b/restore @@ -15,6 +15,7 @@ tar xzf $FILE 2>&1 cd /opt/boulder [ -f $TMPDIR/boulder_sa_integration.sql ] || (echo "MySQL backup file not found"; exit 1) +sed -i -e "s/\(INSERT INTO \`gorp_migrations\`.*\)/-- \1/" $TMPDIR/boulder_sa_integration.sql docker-compose exec -T bmysql mysql boulder_sa_integration <$TMPDIR/boulder_sa_integration.sql mv -f $TMPDIR/*key* $TMPDIR/*cert.pem $TMPDIR/*.csr /etc/nginx/ssl/