We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebbf4b6 commit f6a8d7aCopy full SHA for f6a8d7a
server/migrations/20241223103044_visits_user_id.js
@@ -20,8 +20,11 @@ async function up(knex) {
20
});
21
22
const [{ count }] = await knex("visits").count("* as count");
23
-
24
- if (count < 1_000_000) {
+
+ const count_number = parseInt(count);
25
+ if (Number.isNaN(count_number) || count_number === 0) return;
26
27
+ if (count_number < 1_000_000) {
28
const last_visit = await knex("visits").orderBy("id", "desc").first();
29
30
const size = 100_000;
0 commit comments