task/3382: Harmonisera tabellnamn #6

Merged
ansv7779 merged 104 commits from task/3382 into develop 2024-11-12 13:33:44 +01:00
2 changed files with 14 additions and 3 deletions
Showing only changes of commit 0f28cb10bc - Show all commits

View File

@ -8,7 +8,7 @@ import jakarta.persistence.*;
@Entity
@Table(name = "notification_delivery_configuration",
uniqueConstraints = {
@UniqueConstraint(name = "one_setting_per_user", columnNames = {"type", "event", "method", "user_id"})
@UniqueConstraint(name = "uk_one_setting_per_user", columnNames = {"type", "event", "method", "user_id"})
})
public class DeliveryConfiguration extends Configuration {

View File

@ -586,6 +586,17 @@ alter table `reviewer_target`
on delete cascade
on update cascade;
-- table: notification_delivery_configuration
NIQUE KEY `UK_ReviewerTarget_ReviewerId_Year` (`reviewer_id`,`year`),
CONSTRAINT `FK_ReviewerTarget_ReviewerId` FOREIGN KEY (`reviewer_id`) REFERENCES `user` (`id`)
alter table `notification_delivery_configuration` drop foreign key `FK7B2EE5BF895349BF`;
alter table `notification_delivery_configuration` drop key `FK7B2EE5BF895349BF`;
alter table `notification_delivery_configuration` drop key `one_setting_per_user`;
alter table `notification_delivery_configuration` add constraint uk_one_setting_per_user unique(type, event, method, user_id);
alter table `notification_delivery_configuration`
add constraint fk_notification_delivery_configuration_user_id
foreign key (user_id)
references user(id)
on delete cascade
on update cascade;