Skip to content

Commit

Permalink
Merge pull request #88 from serlo/fix-dbdump-drop-databse
Browse files Browse the repository at this point in the history
fix(dbdump): really drop database first, important when renaming tables
  • Loading branch information
hugotiburtino authored Jun 23, 2024
2 parents e93b160 + e458c5a commit 31dc575
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion envs/production/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module "gcloud_postgres" {

module "athene2-dbdump" {
source = "../../modules/dbdump"
image = "eu.gcr.io/serlo-shared/athene2-dbdump-cronjob:3.4.1"
image = "eu.gcr.io/serlo-shared/athene2-dbdump-cronjob:3.4.2"
namespace = kubernetes_namespace.api_namespace.metadata.0.name
node_pool = module.cluster.node_pools.non-preemptible
schedule = "0 0 * * *"
Expand Down
2 changes: 1 addition & 1 deletion images/dbdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_image=serlo/$(image_name)
# change version if you want to push a new image
major_version=3
minor_version=4
patch_version=1
patch_version=2
version=$(major_version).$(minor_version).$(patch_version)

include ../docker.mk
Expand Down
2 changes: 1 addition & 1 deletion images/dbdump/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -e
log_info "dump serlo.org database - start"
log_info "dump legacy serlo database schema"

mysqldump $mysql_connect --no-data --lock-tables=false --add-drop-database serlo >mysql.sql
mysqldump $mysql_connect --no-data --lock-tables=false --add-drop-database --databases serlo >mysql.sql

mysqldump $mysql_connect --no-create-info --lock-tables=false --add-locks --ignore-table=serlo.user serlo >>mysql.sql

Expand Down

0 comments on commit 31dc575

Please sign in to comment.