add Messages table and availability dateOfEntry

This commit is contained in:
Dobromir Popov
2024-03-05 15:26:41 +02:00
parent a9d7df7262
commit e22d121f0f
5 changed files with 24 additions and 4 deletions

View File

@ -0,0 +1,18 @@
-- AlterTable
ALTER TABLE `Availability` ADD COLUMN `dateOfEntry` DATETIME(3) NULL;
-- CreateTable
CREATE TABLE `Message` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`publisherId` VARCHAR(191) NOT NULL,
`date` DATETIME(3) NOT NULL,
`content` VARCHAR(191) NOT NULL,
`isRead` BOOLEAN NOT NULL DEFAULT false,
`isPublic` BOOLEAN NOT NULL DEFAULT false,
`type` ENUM('Email', 'SMS', 'Push', 'InApp') NOT NULL DEFAULT 'Email',
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- AddForeignKey
ALTER TABLE `Message` ADD CONSTRAINT `Message_publisherId_fkey` FOREIGN KEY (`publisherId`) REFERENCES `Publisher`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -133,7 +133,7 @@ model Availability {
repeatWeekly Boolean? // New field to indicate weekly repetition // until now dayofweek was used for repetition when dayOfMonth is null
repeatFrequency Int? // New field to indicate repetition frequency
endDate DateTime? // New field for the end date of repetition
//dateOfEntry DateTime? //NEW v1.0.1 trade storage for intuintivity
dateOfEntry DateTime? //NEW v1.0.1 trade storage for intuintivity
}
model CartEvent {