Subject: | enum failure in sqlt-diff |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.418 (Entity 5.418) |
Content-Type: | text/plain; charset="utf8" |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
X-RT-Original-Encoding: | utf-8 |
Content-Length: | 802 |
[Not sure if this is MySQL specific, or if it's a general bug.]
Create a before and after SQL schema file as follows and run sqlt-diff
on them. The enum values are lost and replaced with what appears to be
their maximum length. I confirmed this bug in 0.08 and 0.08001.
---- before.sql ----
create table foo (
id int
);
---- after.sql ----
create table foo (
id int,
some_boolean enum('false','true')
);
Actual results:
% sqlt-diff before.sql=MySQL after.sql=MySQL
-- Convert schema 'before.sql' to 'after.sql':
ALTER TABLE foo ADD some_boolean enum(5);
Expected results:
% sqlt-diff before.sql=MySQL after.sql=MySQL
-- Convert schema 'before.sql' to 'after.sql':
ALTER TABLE foo ADD some_boolean enum('false', 'true');