Project

General

Profile

« Previous | Next » 

Revision 1231

PostgreSQL-MySQL.csv: Fixed bug in removal of casts of default values, which treated NOT NULL as part of the datatype

View differences:

schemas/vegbien.my.sql
107 107
    plantobservation_id int(11),
108 108
    stratum_id int(11),
109 109
    coverindex_id int(11),
110
    occurrencestatus_dwc text DEFAULT 'present',
110
    occurrencestatus_dwc text DEFAULT 'present' NOT NULL,
111 111
    method_id int(11),
112 112
    linecover double precision,
113 113
    verbatimcollectorname text,
......
1515 1515
    plantconcept_id int(11) NOT NULL,
1516 1516
    party_id int(11),
1517 1517
    plantparent_id int(11),
1518
    plantconceptstatus text DEFAULT 'undetermined',
1518
    plantconceptstatus text DEFAULT 'undetermined' NOT NULL,
1519 1519
    reference_id int(11),
1520 1520
    plantpartycomments text,
1521 1521
    plantparentname text,
......
1859 1859
CREATE TABLE soilobs (
1860 1860
    soilobs_id int(11) NOT NULL,
1861 1861
    locationevent_id int(11) NOT NULL,
1862
    horizon text NOT NULL,
1862
    horizon text DEFAULT 'unknown' NOT NULL,
1863 1863
    description text,
1864 1864
    depthtop double precision,
1865 1865
    depthbottom double precision,
......
2391 2391
    userdefinedname text NOT NULL,
2392 2392
    userdefinedmetadata text,
2393 2393
    userdefinedcategory text,
2394
    userdefinedtype text DEFAULT 'text',
2394
    userdefinedtype text DEFAULT 'text' NOT NULL,
2395 2395
    tablename text NOT NULL,
2396 2396
    accessioncode text
2397 2397
);
lib/PostgreSQL-MySQL.csv
14 14
,,"syntax changes"
15 15
"^--(?=\S)","\g<0> ",
16 16
"""([^""]*?)""","`\1`",
17
"(?<=DEFAULT )(\d+|'[^']*')::\w+(?: \w+)*","\1",
17
"(?<=DEFAULT )(\d+|'[^']*')::\w+(?: [a-z]+)*","\1",
18 18
"(\d+|'[^']*')::(\w+(?: \w+)*)","CAST(\1 AS \2)",
19 19
,,"datatypes"
20 20
"\bserial( NOT NULL\b)?","int(11)\1 AUTO_INCREMENT",

Also available in: Unified diff