my-kaiqiuwang/prisma/migrations/20260324081804_add_notification_token_table/migration.sql
kyuuseiryuu 2774037012 feat(app): add push notification support and event management logic
- Introduce PermissionControlPanel in UserCenter for managing notification permissions.
- Update Service Worker (sw.ts) to handle background push notifications via Firebase Cloud Messaging.
- Implement EventSubscribeService logic to fetch active events, filter expired ones, and clean up subscriptions.
- Refactor KaiqiuService and parsing utilities to include eventId in event details.
- Remove deprecated ScheduleService and inline sendNotification logic.
- Update utility functions to support new types and notification checks.
- Add VAPI public key configuration and update Firebase exports.
2026-03-24 17:21:50 +09:00

18 lines
538 B
SQL

-- DropIndex
DROP INDEX `UserLocation_coords_idx` ON `UserLocation`;
-- AlterTable
ALTER TABLE `UserLocation` ADD COLUMN `avatar` TEXT NULL,
ADD COLUMN `kaiqiu_uid` VARCHAR(191) NULL;
-- CreateTable
CREATE TABLE `NotificationToken` (
`logto_uid` VARCHAR(191) NOT NULL,
`token` VARCHAR(191) NOT NULL,
UNIQUE INDEX `NotificationToken_logto_uid_token_key`(`logto_uid`, `token`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateIndex
CREATE INDEX `UserLocation_coords_idx` ON `UserLocation`(`coords`);