Open svetlyak40wt opened 3 years ago
Here is the minimal example to reproduce this issue:
CL-USER> (length (mito.migration.sql-parse::parse-statements " CREATE TABLE test_dist (id INTEGER, quicklisp_version TEXT NOT NULL DEFAULT ''); CREATE TABLE any_other_table_o_more (id INTEGER); INSERT INTO test_dist (id, quicklisp_version) VALUES (0, 'some version'); ")) 1
Expected value is 3.
However, when I replace '' default value with NULL, everything works!
''
NULL
CL-USER> (length (mito.migration.sql-parse::parse-statements " CREATE TABLE test_dist (id INTEGER, quicklisp_version TEXT NOT NULL DEFAULT NULL); CREATE TABLE any_other_table_o_more (id INTEGER); INSERT INTO test_dist (id, quicklisp_version) VALUES (0, 'some version'); ")) 3
Also works with nonempty default string:
(length (mito.migration.sql-parse::parse-statements " CREATE TABLE test_dist (id INTEGER, quicklisp_version TEXT NOT NULL DEFAULT 'blah'); CREATE TABLE any_other_table_o_more (id INTEGER); INSERT INTO test_dist (id, quicklisp_version) VALUES (0, 'some version'); ")) 3
Tested on the latest Mito from the repository. Commit c51e6476ee518ceb554516a010406a20b658b908.
Here is the minimal example to reproduce this issue:
Expected value is 3.
However, when I replace
''
default value withNULL
, everything works!Also works with nonempty default string:
Tested on the latest Mito from the repository. Commit c51e6476ee518ceb554516a010406a20b658b908.