task/3382: Harmonisera tabellnamn #6
@ -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 {
|
||||
|
||||
|
@ -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;
|
Loading…
x
Reference in New Issue
Block a user