@@ -477,6 +477,9 @@ describe('autoupdate', function() {
477
477
'customerId' : {
478
478
'type' : 'String' ,
479
479
'length' : 20 ,
480
+ 'postgresql' : {
481
+ 'columnName' : 'customerId' ,
482
+ } ,
480
483
} ,
481
484
'description' : {
482
485
'type' : 'String' ,
@@ -512,6 +515,9 @@ describe('autoupdate', function() {
512
515
'customerId' : {
513
516
'type' : 'String' ,
514
517
'length' : 20 ,
518
+ 'postgresql' : {
519
+ 'columnName' : 'customerId' ,
520
+ } ,
515
521
} ,
516
522
'description' : {
517
523
'type' : 'String' ,
@@ -521,6 +527,9 @@ describe('autoupdate', function() {
521
527
'productId' : {
522
528
'type' : 'String' ,
523
529
'length' : 20 ,
530
+ 'postgresql' : {
531
+ 'columnName' : 'productId' ,
532
+ } ,
524
533
} ,
525
534
} ,
526
535
} ;
@@ -557,6 +566,9 @@ describe('autoupdate', function() {
557
566
'customerId' : {
558
567
'type' : 'String' ,
559
568
'length' : 20 ,
569
+ 'postgresql' : {
570
+ 'columnName' : 'customerId' ,
571
+ } ,
560
572
} ,
561
573
'description' : {
562
574
'type' : 'String' ,
@@ -566,6 +578,9 @@ describe('autoupdate', function() {
566
578
'productId' : {
567
579
'type' : 'String' ,
568
580
'length' : 20 ,
581
+ 'postgresql' : {
582
+ 'columnName' : 'productId' ,
583
+ } ,
569
584
} ,
570
585
} ,
571
586
} ;
@@ -588,10 +603,16 @@ describe('autoupdate', function() {
588
603
'customerId' : {
589
604
'type' : 'String' ,
590
605
'length' : 20 ,
606
+ 'postgresql' : {
607
+ 'columnName' : 'customerId' ,
608
+ } ,
591
609
} ,
592
610
'productId' : {
593
611
'type' : 'String' ,
594
612
'length' : 20 ,
613
+ 'postgresql' : {
614
+ 'columnName' : 'productId' ,
615
+ } ,
595
616
} ,
596
617
'description' : {
597
618
'type' : 'String' ,
@@ -626,8 +647,7 @@ describe('autoupdate', function() {
626
647
assert . equal ( foreignKeys . length , 1 ) ;
627
648
assert . equal ( foreignKeys [ 0 ] . pkColumnName , 'id' ) ;
628
649
assert . equal ( foreignKeys [ 0 ] . pkTableName , 'customer_test3' ) ;
629
- // note: column names are converted to lowercase by postgres
630
- assert . equal ( foreignKeys [ 0 ] . fkColumnName , 'customerid' ) ;
650
+ assert . equal ( foreignKeys [ 0 ] . fkColumnName , 'customerId' ) ;
631
651
assert . equal ( foreignKeys [ 0 ] . fkName , 'fk_ordertest_customerId' ) ;
632
652
633
653
// update and add another fk
@@ -646,8 +666,7 @@ describe('autoupdate', function() {
646
666
assert . equal ( foreignKeysUpdated . length , 1 ) ;
647
667
assert . equal ( foreignKeysUpdated [ 0 ] . pkColumnName , 'id' ) ;
648
668
assert . equal ( foreignKeysUpdated [ 0 ] . pkTableName , 'customer_test2' ) ;
649
- // note: column names are converted to lowercase by postgres
650
- assert . equal ( foreignKeysUpdated [ 0 ] . fkColumnName , 'customerid' ) ;
669
+ assert . equal ( foreignKeysUpdated [ 0 ] . fkColumnName , 'customerId' ) ;
651
670
assert . equal ( foreignKeysUpdated [ 0 ] . fkName , 'fk_ordertest_customerId' ) ;
652
671
653
672
// create multiple fks on object
0 commit comments