Closed
Description
Describe the Bug
I get an error when I try to run a migration with multiple statements wrapped in a BEGIN/COMMIT
Steps to Reproduce
Steps to reproduce the behavior:
- My migrations look like '...'
BEGIN;
ALTER TABLE sharedcampaigns CHANGE COLUMN `uuid` `id` CHAR(36);
ALTER TABLE sharedresearch CHANGE COLUMN `uuid` `id` CHAR(36);
COMMIT;
- I ran migrate with the following options '....'
parseTime=true
- See error
panic: migration failed in line 0: BEGIN;
ALTER TABLE sharedcampaigns CHANGE COLUMN `uuid` `id` CHAR(36);
ALTER TABLE sharedresearch CHANGE COLUMN `uuid` `id` CHAR(36);
COMMIT;
(details: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ALTER TABLE sharedcampaigns CHANGE COLUMN `uuid` `id` CHAR(36);
ALTER TABLE shar' at line 2)
goroutine 1 [running]:
main.doe(...)
/home/franklin/go/src/github.com/Billups/snapshot-rewrite/cmd/migrate/migrate.go:26
main.main()
/home/franklin/go/src/github.com/Billups/snapshot-rewrite/cmd/migrate/migrate.go:69 +0x4a1
Expected Behavior
The migrations should run fine.
Migrate Version
93d53a5
Loaded Source Drivers
file
Loaded Database Drivers
mysql
Go Version
go version go1.11 linux/amd64
Metadata
Metadata
Assignees
Labels
No labels