Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Postgres bpchar Default Value Throwing Error

$
0
0
I have generated a migration from a postgres source but when I try to import that xml migration into a new database I have errors with bpchar columns:

[ERROR] Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "N"
[ERROR] Position: 163 [Failed SQL: CREATE TABLE my_table (id BIGSERIAL NOT NULL, group_id BIGINT NOT NULL, award_id BIGINT NOT NULL, archived BPCHAR(1) DEFAULT ''N'::bpchar' NOT NULL, time_created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL, time_modified TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL)]

Here is what the xml looks like:
<column defaultValue="'N'::bpchar" name="archived" type="BPCHAR(1)">

The defaultValue is being quoted when it imports (it is adding single quotes around it). Is there any way to ask liquibase to NOT add quotes around the default value?

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>