Skip to content

Commit 7725b53

Browse files
author
Agnes Lin
committed
fix
1 parent 916c7b2 commit 7725b53

File tree

1 file changed

+4
-63
lines changed

1 file changed

+4
-63
lines changed

test/postgresql.autoupdate.test.js

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -360,66 +360,7 @@ describe('autoupdate', function() {
360360
});
361361
});
362362

363-
describe.only('foreign key constraint', function() {
364-
// before(function(done) {
365-
// const properties = {
366-
// 'id': {
367-
// 'type': 'String',
368-
// 'length': 20,
369-
// //'id': 1,
370-
// },
371-
// 'name': {
372-
// 'type': 'String',
373-
// 'required': false,
374-
// 'length': 40,
375-
// },
376-
// };
377-
// const Product = ds.define('Product', properties, {
378-
// 'idInjection': false,
379-
// 'postgresql': {
380-
// 'schema': 'myapp_test',
381-
// 'table': 'product_test',
382-
// }});
383-
// const C2 = ds.define('Customer2', properties, {
384-
// 'idInjection': false,
385-
// 'postgresql': {
386-
// 'schema': 'myapp_test',
387-
// 'table': 'customer_test2',
388-
// }});
389-
// const C3 = ds.define('Customer3', properties, {
390-
// 'idInjection': false,
391-
// 'postgresql': {
392-
// 'schema': 'myapp_test',
393-
// 'table': 'customer_test2',
394-
// }});
395-
// const props = {
396-
// 'id': {
397-
// 'type': 'String',
398-
// 'length': 20,
399-
// //'id': 1,
400-
// },
401-
// 'customerId': {
402-
// 'type': 'String',
403-
// 'required': false,
404-
// 'length': 40,
405-
// },
406-
// };
407-
// const Order = ds.define('order_test', properties, {
408-
// 'idInjection': false,
409-
// 'postgresql': {
410-
// 'schema': 'myapp_test',
411-
// 'table': 'order_test',
412-
// },
413-
// 'foreignKeys': {
414-
// 'fk_ordertest_customerId': {
415-
// 'name': 'fk_ordertest_customerId',
416-
// 'entity': 'CustomerTest2',
417-
// 'entityKey': 'id',
418-
// 'foreignKey': 'customerId',
419-
// },
420-
// }});
421-
// ds.automigrate(['Product', 'Customer2', 'Customer3', 'order_test'], done);
422-
// });
363+
describe('foreign key constraint', function() {
423364
it('should create, update, and delete foreign keys', function(done) {
424365
const product_schema = {
425366
'name': 'Product',
@@ -699,9 +640,9 @@ describe('autoupdate', function() {
699640
// assert.equal(foreignKeysMulti[1].pkTableName, 'customer_test3');
700641
// assert.equal(foreignKeysMulti[1].fkColumnName, 'customerId');
701642
// assert.equal(foreignKeysMulti[1].fkName, 'fk_ordertest_customerId');
702-
assert.equal(foreignKeys[0].pkTableName, 'product_test');
703-
assert.equal(foreignKeys[0].fkColumnName, 'productId');
704-
assert.equal(foreignKeys[0].fkName, 'fk_ordertest_productId');
643+
assert.equal(foreignKeys[0].pkTableName, 'product_test');
644+
assert.equal(foreignKeys[0].fkColumnName, 'productId');
645+
assert.equal(foreignKeys[0].fkName, 'fk_ordertest_productId');
705646
//}
706647

707648
// remove fk

0 commit comments

Comments
 (0)