From 8fd4470af536e48e105f105014916681910ea613 Mon Sep 17 00:00:00 2001 From: ewrayjohnson Date: Wed, 7 Oct 2020 08:00:40 -0400 Subject: [PATCH] Properties underscores in name can now be indexed See: https://github.com/strongloop/loopback-connector-postgresql/issues/462 --- lib/migration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/migration.js b/lib/migration.js index 172045dd..e53454ad 100644 --- a/lib/migration.js +++ b/lib/migration.js @@ -866,7 +866,7 @@ function mixinMigration(PostgreSQL) { }) || []; const sql = []; const ai = {}; - const propNameRegEx = new RegExp('^' + self.table(model) + '_([^_]+)_idx'); + const propNameRegEx = new RegExp('^' + self.table(model) + '_(.*)(?:_idx)$'); if (actualIndexes) { actualIndexes.forEach(function(i) {