Skip to content

Commit 337eebe

Browse files
committed
Properties underscores in name can now be indexed
See: loopbackio#462
1 parent 04edca5 commit 337eebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/migration.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ function mixinMigration(PostgreSQL) {
930930
}) || [];
931931
const sql = [];
932932
const ai = {};
933-
const propNameRegEx = new RegExp('^' + self.table(model) + '_([^_]+)_idx');
933+
const propNameRegEx = new RegExp('^' + self.table(model) + '_(.*)(?:_idx)$');
934934

935935
if (actualIndexes) {
936936
actualIndexes.forEach(function(i) {

0 commit comments

Comments
 (0)