dbmate
dbmate copied to clipboard
schema dump includes `AUTO INCREMENT`
Hi,
When I dbmate migrate
the schema dump includes the current AUTO INCREMENT
of each table, which is bad since if I want to import the schema as is (without going through all the migrations) to a server or another computer it will start the row count from where my local table ends.
Thanks
Which database is this on? I haven't noticed this behavior on postgres, so I'm wondering if it's mysql specific.
I do work with mysql currently, thanks.
Are you able to manually produce a mysqldump (using their cli tool) without the auto increment value set?
It seems like a known issue, but it can be resolved with the --skip-auto-increment
flag
source: https://stackoverflow.com/questions/15656463/mysqldump-export-structure-only-without-autoincrement
I will try to solve this in my fork. I will make a PR asap.
@paulovitorbal where is your PR?
It seems the mentioned --skip-auto-increment
doesn't actually exist for mysqldump
unless you have "GUI Tools". So, I took a stab at a PR for this. Interested in any feedback.