Resourcemanagement/db/knex_migrations
vickytechkey ec8ab87996
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 44s
fix(aws): alter aws_account.user_id to varchar(255) for better-auth compatibility
2026-10-23 21:09:52 +05:30
..
2023-08-16-0000-create-uptime.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-08-18-0301-heartbeat.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-09-29-0000-heartbeat-retires.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-10-08-0000-mqtt-query.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-10-11-1915-push-token-to-32.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-10-16-0000-create-remote-browsers.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-12-20-0000-alter-status-page.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-12-21-0000-stat-ping-min-max.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2023-12-22-0000-hourly-uptime.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-01-22-0000-stats-extras.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-04-26-0000-snmp-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-08-24-000-add-cache-bust.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-08-24-0000-conditions.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-10-31-0000-fix-snmp-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-10-1315-rabbitmq-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2024-11-27-1927-fix-info-json-data-type.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-01-01-0000-add-smtp.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-02-15-2312-add-wstest.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-02-17-2142-generalize-analytics.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-03-04-0000-ping-advanced-options.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-03-25-0127-fix-5721.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-05-09-0000-add-custom-url.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-06-03-0000-add-ip-family.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-06-11-0000-add-manual-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-06-13-0000-maintenance-add-last-start.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-06-15-0001-manual-monitor-fix.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-06-24-0000-add-audience-to-oauth.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-07-17-0000-mqtt-websocket-path.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-09-02-0000-add-domain-expiry.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-14-0000-add-ip-family-fix.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-15-0000-stat-table-fix.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-15-0001-add-monitor-response-config.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-15-0002-add-response-to-heartbeat.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-24-0000-show-only-last-heartbeat.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-10-29-0000-better-auth.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-12-09-0000-add-system-service-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-12-17-0000-add-globalping-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-12-22-0121-optimize-important-indexes.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-12-29-0000-remove-line-notify.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2025-12-31-2143-add-snmp-v3-username.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-02-0551-dns-last-result-to-text.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-02-0713-gamedig-v4-to-v5.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-05-0000-add-rss-title.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-05-0000-add-tls-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-06-0000-fix-domain-expiry-column-type.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-10-0000-convert-float-precision.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-15-0000-add-json-query-retry-only-status-code.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-01-16-0000-add-screenshot-delay.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-02-07-0000-disable-domain-expiry-unsupported-tlds.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-03-27-0000-add-ntp-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-05-20-0000-add-bearer-token.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-05-25-0000-add-gamedig-token.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-05-26-0000-better-auth-username.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-05-26-0010-better-auth-admin.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-05-28-0010-better-auth-foreign-key.js fix(migration): support PostgreSQL safe drop constraint in foreign key migration 2026-10-19 19:45:10 +05:30
2026-06-08-0000-better-auth-2fa.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-06-19-1411-add-rybbit-analytics-type.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-06-19-1412-analytics-type-to-string.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-06-29-0000-better-auth-api-key.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-07-22-0000-fix-stat-daily-overflow.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-08-07-0000-add-sftp-monitor.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-08-18-0000-sqlite-only-drop-analytics-type-check.js feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30
2026-10-23-0000-add-aws-account.js fix(aws): alter aws_account.user_id to varchar(255) for better-auth compatibility 2026-10-23 21:09:52 +05:30
2026-10-23-0001-alter-aws-account-user-id.js fix(aws): alter aws_account.user_id to varchar(255) for better-auth compatibility 2026-10-23 21:09:52 +05:30
README.md feat: initialize project structure with core components, notifications, and database migrations 2026-10-19 19:13:34 +05:30

Info

https://knexjs.org/guide/migrations.html#knexfile-in-other-languages

Basic rules

  • All tables must have a primary key named id
  • Filename format: YYYY-MM-DD-HHMM-patch-name.js
  • Avoid native SQL syntax, use knex methods, because Uptime Kuma supports SQLite and MariaDB.

Template

exports.up = function (knex) {};

exports.down = function (knex) {};

// exports.config = { transaction: false };

Example

Filename: 2023-06-30-1348-create-user-and-product.js

exports.up = function (knex) {
  return knex.schema
    .createTable("user", function (table) {
      table.increments("id");
      table.string("first_name", 255).notNullable();
      table.string("last_name", 255).notNullable();
    })
    .createTable("product", function (table) {
      table.increments("id");
      table.decimal("price").notNullable();
      table.string("name", 1000).notNullable();
    })
    .then(() => {
      knex("products").insert([
        { price: 10, name: "Apple" },
        { price: 20, name: "Orange" },
      ]);
    });
};

exports.down = function (knex) {
  return knex.schema.dropTable("product").dropTable("user");
};

https://knexjs.org/guide/migrations.html#transactions-in-migrations