不要怂,就是干,撸起袖子干!

Commit 89d13015 by ShaunParsons Committed by Felix Becker

fix(datatypes): add length to Postgres character type

1 parent 83351e6e
......@@ -101,7 +101,7 @@ const QueryGenerator = {
}
return 'SELECT pk.constraint_type as "Constraint", c.column_name as "Field", ' +
'c.column_default as "Default", c.is_nullable as "Null", ' +
'CASE WHEN c.udt_name = \'hstore\' THEN c.udt_name ELSE c.data_type END as "Type", ' +
'(CASE WHEN c.udt_name = \'hstore\' THEN c.udt_name ELSE c.data_type END) || (CASE WHEN c.character_maximum_length IS NOT NULL THEN \'(\' || c.character_maximum_length || \')\' ELSE \'\' END) as "Type", ' +
'(SELECT array_agg(e.enumlabel) ' +
'FROM pg_catalog.pg_type t JOIN pg_catalog.pg_enum e ON t.oid=e.enumtypid ' +
'WHERE t.typname=c.udt_name) AS "special" ' +
......
......@@ -174,7 +174,7 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
let assertVal = 'VARCHAR(255)';
switch (dialect) {
case 'postgres':
assertVal = 'CHARACTER VARYING';
assertVal = 'CHARACTER VARYING(255)';
break;
case 'mssql':
assertVal = 'NVARCHAR';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!