Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

update postgres / mysql migrations

Francis Caocb79d806e892
diff --git a/db/mysql/migrations/01_init/migration.sql b/db/mysql/migrations/01_init/migration.sql
index 58b7e6983..aea2574f5 100644
--- a/db/mysql/migrations/01_init/migration.sql
+++ b/db/mysql/migrations/01_init/migration.sql
@@ -41,7 +41,7 @@ CREATE TABLE `website` (
`name` VARCHAR(100) NOT NULL,
`domain` VARCHAR(500) NULL,
`share_id` VARCHAR(50) NULL,
- `rev_id` INTEGER UNSIGNED NOT NULL DEFAULT 0,
+ `reset_at` TIMESTAMP(0) NULL,
`user_id` VARCHAR(36) NULL,
`created_at` TIMESTAMP(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
`updated_at` TIMESTAMP(0) NULL,
@@ -138,6 +138,3 @@ CREATE TABLE `team_website` (
INDEX `team_website_website_id_idx`(`website_id`),
PRIMARY KEY (`team_website_id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
--- AddSystemUser
-INSERT INTO "user" (user_id, username, role, password) VALUES ('41e2b680-648e-4b09-bcd7-3e2b10c06264' , 'admin', 'admin', '$2b$10$BUli0c.muyCW1ErNJc3jL.vFRFtFJWrT8/GcR4A.sUdCznaXiqFXa');
\ No newline at end of file
diff --git a/db/postgresql/migrations/10_add_reset_at/migration.sql b/db/postgresql/migrations/10_add_reset_at/migration.sql
new file mode 100644
index 000000000..ba185e1bf
--- /dev/null
+++ b/db/postgresql/migrations/10_add_reset_at/migration.sql
@@ -0,0 +1,9 @@
+/*
+ Warnings:
+
+ - You are about to drop the column `rev_id` on the `website` table. All the data in the column will be lost.
+
+*/
+-- AlterTable
+ALTER TABLE "website" DROP COLUMN "rev_id",
+ADD COLUMN "reset_at" TIMESTAMPTZ(6);