Files
appointment-booking-software/tenant-migrations/0011_kind_starbolt.sql
T
e9bd83bcd2 148 provide apis for cancelling appointments staff and client wise (#164)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* Mail templates appointment cancellation

* Appointment cancellation notification texts

* Delete appointment by staff

* Deletion endpoint for staff

* My Appointments endpoint for clients

* Delete appointment by client

* Copilot review fixes

* Fixes after notification changes and updates.

* Fixed limiting errors

* Fix

* Refix fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:28:35 +01:00

9 lines
1.0 KiB
SQL

ALTER TABLE "client_tunnel_staff_key_share" DROP CONSTRAINT "client_tun_staff_keyShare_tId_client_app_tId_fk";
--> statement-breakpoint
ALTER TABLE "notification" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "notification" ALTER COLUMN "type" SET DEFAULT 'APPOINTMENT_CONFIRMED'::text;--> statement-breakpoint
DROP TYPE "public"."notification_type";--> statement-breakpoint
CREATE TYPE "public"."notification_type" AS ENUM('APPOINTMENT_CONFIRMED', 'APPOINTMENT_CANCELLED');--> statement-breakpoint
ALTER TABLE "notification" ALTER COLUMN "type" SET DEFAULT 'APPOINTMENT_CONFIRMED'::"public"."notification_type";--> statement-breakpoint
ALTER TABLE "notification" ALTER COLUMN "type" SET DATA TYPE "public"."notification_type" USING "type"::"public"."notification_type";--> statement-breakpoint
ALTER TABLE "client_tunnel_staff_key_share" ADD CONSTRAINT "tunnel_staff_key_share_tid_appointment_tid_fk" FOREIGN KEY ("tunnel_id") REFERENCES "public"."client_appointment_tunnel"("id") ON DELETE no action ON UPDATE no action;