mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-29 00:01:00 +00:00
fix(analytics): fixed issues with db init and refactor of code and names
This commit is contained in:
+1
-4
@@ -202,10 +202,7 @@ async function createTables() {
|
||||
table.text("footer_text");
|
||||
table.text("custom_css");
|
||||
table.boolean("show_powered_by").notNullable().defaultTo(true);
|
||||
table.string("analytics_id");
|
||||
table.string("analytics_domain_url");
|
||||
table.enu("analytics_type", [ "google", "umami", "plausible" ]).defaultTo(null);
|
||||
|
||||
table.string("google_analytics_tag_id");
|
||||
});
|
||||
|
||||
// maintenance_status_page
|
||||
|
||||
@@ -3,7 +3,7 @@ exports.up = function (knex) {
|
||||
return knex.schema
|
||||
.alterTable("status_page", function (table) {
|
||||
table.renameColumn("google_analytics_tag_id", "analytics_id");
|
||||
table.string("analytics_domain_url");
|
||||
table.string("analytics_script_url");
|
||||
table.enu("analytics_type", [ "google", "umami", "plausible", "matomo" ]).defaultTo(null);
|
||||
|
||||
}).then(() => {
|
||||
@@ -17,7 +17,7 @@ exports.up = function (knex) {
|
||||
exports.down = function (knex) {
|
||||
return knex.schema.alterTable("status_page", function (table) {
|
||||
table.renameColumn("analytics_id", "google_analytics_tag_id");
|
||||
table.dropColumn("analytics_domain_url");
|
||||
table.dropColumn("analytics_script_url");
|
||||
table.dropColumn("analytics_type");
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user