Skip to content

Commit 8f20959

Browse files
author
germanamz
committed
JSONB support
Nested properties queries in JSONB columns type
1 parent 3295dc2 commit 8f20959

File tree

6 files changed

+367
-43
lines changed

6 files changed

+367
-43
lines changed

lib/migration.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,20 +541,27 @@ function mixinMigration(PostgreSQL) {
541541

542542
switch (prop.type.name) {
543543
default:
544-
case 'String':
545544
case 'JSON':
546-
return 'TEXT';
545+
case 'Object':
546+
return 'JSONB';
547+
547548
case 'Text':
549+
case 'String':
548550
return 'TEXT';
551+
549552
case 'Number':
550553
return 'INTEGER';
554+
551555
case 'Date':
552556
return 'TIMESTAMP WITH TIME ZONE';
557+
553558
case 'Timestamp':
554559
return 'TIMESTAMP WITH TIME ZONE';
560+
555561
case 'GeoPoint':
556562
case 'Point':
557563
return 'POINT';
564+
558565
case 'Boolean':
559566
return 'BOOLEAN'; // PostgreSQL doesn't have built-in boolean
560567
}

0 commit comments

Comments
 (0)