update postgres / mysql migrations

This commit is contained in:
Francis Cao 2023-03-27 11:36:21 -07:00
parent 14e4a090bb
commit cb79d806e8
2 changed files with 10 additions and 4 deletions

View File

@ -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');

View File

@ -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);