task/3382: Harmonisera tabellnamn #6
@ -8,7 +8,7 @@ import jakarta.persistence.*;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "notification_delivery_configuration",
|
@Table(name = "notification_delivery_configuration",
|
||||||
uniqueConstraints = {
|
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 {
|
public class DeliveryConfiguration extends Configuration {
|
||||||
|
|
||||||
|
@ -586,6 +586,17 @@ alter table `reviewer_target`
|
|||||||
on delete cascade
|
on delete cascade
|
||||||
on update cascade;
|
on update cascade;
|
||||||
|
|
||||||
|
-- table: notification_delivery_configuration
|
||||||
|
|
||||||
NIQUE KEY `UK_ReviewerTarget_ReviewerId_Year` (`reviewer_id`,`year`),
|
alter table `notification_delivery_configuration` drop foreign key `FK7B2EE5BF895349BF`;
|
||||||
CONSTRAINT `FK_ReviewerTarget_ReviewerId` FOREIGN KEY (`reviewer_id`) REFERENCES `user` (`id`)
|
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