Skip to content

Commit 8fd4470

Browse files
authored
Properties underscores in name can now be indexed
See: loopbackio#462
1 parent f97d755 commit 8fd4470

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
@@ -866,7 +866,7 @@ function mixinMigration(PostgreSQL) {
866866
}) || [];
867867
const sql = [];
868868
const ai = {};
869-
const propNameRegEx = new RegExp('^' + self.table(model) + '_([^_]+)_idx');
869+
const propNameRegEx = new RegExp('^' + self.table(model) + '_(.*)(?:_idx)$');
870870

871871
if (actualIndexes) {
872872
actualIndexes.forEach(function(i) {

0 commit comments

Comments
 (0)