Skip to content

Commit b20700f

Browse files
committed
chore: fix invalid query and rename script
1 parent 399dc34 commit b20700f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/unested_strategy.ts renamed to scripts/unest_strategy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import db from '../src/helpers/mysql';
33

44
const STRATEGY_NAME = 'multichain';
55

6-
// Usage: yarn ts-node scripts/refresh_spaces_counters.ts
6+
// Usage: yarn ts-node scripts/unest_strategy.ts
77
async function main() {
88
const spaces = await db.queryAsync(
99
`SELECT settings->'$.strategies[*].name', id, settings
1010
FROM spaces
11-
WHERE JSON_CONTAINS(settings->'$.strategies[*].name', '[?]')
11+
WHERE JSON_CONTAINS(settings->'$.strategies[*].name', ?)
1212
`,
13-
[STRATEGY_NAME]
13+
JSON.stringify([STRATEGY_NAME])
1414
);
1515

1616
console.log('Retrieved spaces count:', spaces.length);

0 commit comments

Comments
 (0)