diff --git a/USAGE.md b/USAGE.md index 3ba004c..1e0b25c 100644 --- a/USAGE.md +++ b/USAGE.md @@ -13,7 +13,6 @@ go build ### alter - Type: String -- Default value: `engine=innodb` - Examples: `add column foo int`, `add index foo (bar)` The alter table command to perform. The default value is a _null alter table_, which can be useful for testing. @@ -136,7 +135,6 @@ When set to `TRUE`, if Spirit encounters a checkpoint belonging to a previous mi ### table - Type: String -- Default value: `stock` The table that the schema change will be performed on. diff --git a/pkg/migration/migration.go b/pkg/migration/migration.go index f9eaf1d..6f1d64e 100644 --- a/pkg/migration/migration.go +++ b/pkg/migration/migration.go @@ -23,8 +23,8 @@ type Migration struct { Username string `name:"username" help:"User" optional:"" default:"msandbox"` Password string `name:"password" help:"Password" optional:"" default:"msandbox"` Database string `name:"database" help:"Database" optional:"" default:"test"` - Table string `name:"table" help:"Table" optional:"" default:"stock"` - Alter string `name:"alter" help:"The alter statement to run on the table" optional:"" default:"engine=innodb"` + Table string `name:"table" help:"Table" optional:""` + Alter string `name:"alter" help:"The alter statement to run on the table" optional:""` Threads int `name:"threads" help:"Number of concurrent threads for copy and checksum tasks" optional:"" default:"4"` TargetChunkTime time.Duration `name:"target-chunk-time" help:"The target copy time for each chunk" optional:"" default:"500ms"` ForceInplace bool `name:"force-inplace" help:"Force attempt to use inplace (only safe without replicas or with Aurora Global)" optional:"" default:"false"` diff --git a/scripts/build_and_run.sh b/scripts/build_and_run.sh deleted file mode 100755 index 3b81fe0..0000000 --- a/scripts/build_and_run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -go build ./cmd/spirit -~/sandboxes/msb_8_0_28/use test -e "DROP TABLE IF EXISTS t1; CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY auto_increment, b INT NOT NULL, c INT NOT NULL)" -./spirit --host "127.0.0.1:8028" --database=test --table=t1 \ No newline at end of file diff --git a/scripts/buildandrun.sh b/scripts/buildandrun.sh index bb5a301..f12124b 100755 --- a/scripts/buildandrun.sh +++ b/scripts/buildandrun.sh @@ -3,7 +3,7 @@ set -e go build ./cmd/spirit -params=(--host="$HOST" --username="$USERNAME" --password="$PASSWORD" --database="$DATABASE" --table="$TABLE") +params=(--host="$HOST" --username="$USERNAME" --password="$PASSWORD" --database="$DATABASE" --table="$TABLE" --alter="engine=innodb") if [ -n "$REPLICA_DSN" ]; then params+=(--replica-dsn="$REPLICA_DSN")