availability serf reference;

fix copying last month;
This commit is contained in:
Dobromir Popov
2024-03-28 22:55:35 +02:00
parent a6b7c62768
commit a26dd954c0
11 changed files with 163 additions and 90 deletions

View File

@ -4,12 +4,18 @@
- You are about to drop the column `isTentative` on the `Assignment` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE `Assignment`
ADD COLUMN `isBySystem` BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE `Assignment`
ADD COLUMN `isBySystem` BOOLEAN NOT NULL DEFAULT FALSE;
-- Depending on your DBMS, you might need to execute one statement at a time.
-- Especially, the UPDATE statement should be run separately.
UPDATE `Assignment` SET `isBySystem` = isTentative;
ALTER TABLE `Assignment` DROP COLUMN `isTentative`,
-- Drop the isTentative column
ALTER TABLE `Assignment` DROP COLUMN `isTentative`;
-- AlterTable
ALTER TABLE `Report` ADD COLUMN `type` ENUM('ServiceReport', 'Experience', 'Feedback_Problem', 'Feedback_Suggestion', 'Feedback') NOT NULL DEFAULT 'ServiceReport';
ALTER TABLE `Report`
ADD COLUMN `type` ENUM('ServiceReport', 'Experience', 'Feedback_Problem', 'Feedback_Suggestion', 'Feedback') NOT NULL DEFAULT 'ServiceReport';

View File

@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE `availability` ADD COLUMN `parentAvailabilityId` INTEGER NULL;
-- AddForeignKey
ALTER TABLE `Availability` ADD CONSTRAINT `Availability_parentAvailabilityId_fkey` FOREIGN KEY (`parentAvailabilityId`) REFERENCES `Availability`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;