rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.16k stars 269 forks source link

sql-migrate up returns: Migration failed: Error 1146: Table 'go_test.user' doesn't exist handling 20210114023524-create_user_table.sql #220

Closed 1200mhz closed 2 years ago

1200mhz commented 2 years ago

I have a migration in the path: migrations/mysql/20210114023525-create_user_table.sql

-- +migrate Up
CREATE TABLE IF NOT EXISTS User1
(
    id         INT AUTO_INCREMENT     NOT NULL,
...

dbconfig.yml:

development:
  dialect: mysql
  datasource: gotest:gotest@tcp(db:3306)/go_test?parseTime=true
  table: migrations
  dir: migrations/mysql

The library sees it, but writes "doesn't exist handling" Whats it meens??

rubenv commented 2 years ago

Error 1146 is a MySQL error, and it's an error in your migration. Doesn't correspond with your migration either, so unless you post the full one there's nothing we can diagnose here.

Either way, this is not a sql-migrate bug.