next;
}
-##CHECK ((isolation_level IS NULL) OR (lower(isolation_level) = ANY (ARRAY['serializable', 'repeatable read']))) vs CHECK (isolation_level IS NULL OR (LOWER(isolation_level) IN ('serializable', 'repeatable read')))
-
## Clean up the constraint to make it match what comes back from the database:
$cdef =~ s/;$//;
$cdef =~ s/','/', '/g;
- $cdef =~ s{\\\\}{\\}g;
if ($cdef =~ s/([^)]) (OR|AND) (\w)/$1) $2 ($3/g) {
$cdef =~ s/CHECK (.+)/CHECK ($1)/;
}
my $condef = constraint_definition($cname);
+ $condef =~ s{\\}{\\\\}g;
if ($condef ne $cdef) {
upgrade_and_log("ALTER TABLE $tcname DROP CONSTRAINT $cname");
upgrade_and_log("ALTER TABLE $tcname ADD CONSTRAINT $cname $cdef");