Files
ppanel-web/migrations/postgres/02005_device_online_record.sql
T
Ember Moth d2253bb8fa fix bugs
2026-07-05 22:22:13 +08:00

17 lines
628 B
SQL

CREATE TABLE IF NOT EXISTS "user_device_online_record"
(
"id" BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
"user_id" BIGINT NOT NULL,
"identifier" VARCHAR(255) NOT NULL,
"online_time" TIMESTAMP,
"offline_time" TIMESTAMP,
"online_seconds" BIGINT,
"duration_days" BIGINT,
"created_at" TIMESTAMP
);
ALTER TABLE "user_subscribe" ADD COLUMN IF NOT EXISTS "finished_at" TIMESTAMP NULL;
ALTER TABLE "application_config" ADD COLUMN IF NOT EXISTS "invitation_link" TEXT NULL DEFAULT NULL;
ALTER TABLE "application_config" ADD COLUMN IF NOT EXISTS "kr_website_id" VARCHAR(255) NULL DEFAULT NULL;