[GH-ISSUE #66] alter statement due to quotet default numbers #45

Open
opened 2026-02-25 21:33:07 +03:00 by kerem · 0 comments
Owner

Originally created by @glanzel on GitHub (Dec 4, 2017).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/66

Thanks for your good work.
Everything works fine for me.

I only want to notice that different sql databases version (an even different versions of maria db)
sometimes write the default value with quotes and sometimes not which leads to an alter statement even if everything is equal.

this happens if you compare a mariadb 10.1 and a mariadb 10.2 server for example.

you can reproduce this when you type
SHOW CREATE TABLE test;
when 'test' is created like this for example:

CREATE TABLE `test` (
  `tinyint` tinyint(1) NOT NULL DEFAULT 0,
  `int` int(11) NOT NULL DEFAULT 0
); 

greeting grischan

Originally created by @glanzel on GitHub (Dec 4, 2017). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/66 Thanks for your good work. Everything works fine for me. I only want to notice that different sql databases version (an even different versions of maria db) sometimes write the default value with quotes and sometimes not which leads to an alter statement even if everything is equal. this happens if you compare a mariadb 10.1 and a mariadb 10.2 server for example. you can reproduce this when you type `SHOW CREATE TABLE `test`;` when 'test' is created like this for example: ``` CREATE TABLE `test` ( `tinyint` tinyint(1) NOT NULL DEFAULT 0, `int` int(11) NOT NULL DEFAULT 0 ); ``` greeting grischan
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#45
No description provided.