Closed JuozasVainauskas closed 2 months ago
I think this sounds reasonable, will try to get to it tonight. Why bigint(20) ?
I think this sounds reasonable, will try to get to it tonight. Why bigint(20) ?
20 is a default display width (it has nothing to do with storage). It is equal to the number of characters in the largest negative BIGINT (-9223372036854775808). Official documentation: https://dev.mysql.com/doc/refman/8.4/en/numeric-type-attributes.html. I like to define it for a better readability of mysql table schemas.
Explanation: https://stackoverflow.com/questions/22014869/mysql-difference-between-bigint-and-bigint20
Hi, thank You for merging the PR. When are You planning to release this? @mfridman
Can do a release within the next few days.
Cut a release this morning
Cut a release this morning
Thank You very much!
We are using
goose
to run migrations on Vitess with MySQL setup. Unfortunately, Vitess does not supportSERIAL
keyword. Right now our work-around is to creategoose_db_version
table manually without usingSERIAL
keyword. We can solve this problem by NOT usingSERIAL
keyword and explicitly define the type of the column.This change is backwards-compatible
As stated in the MySQL documentation:
After table is created with
SERIAL
keyword, it automatically resolves tobigint(20) unsigned NOT NULL AUTO_INCREMENT
: