Fix migration of database schema to preserve data (#75)

This commit is contained in:
Arjan H
2023-06-29 20:28:27 +02:00
parent 8aef5dd949
commit cfb9476d40

View File

@@ -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/