task/3382: Harmonisera tabellnamn #6
@ -23,6 +23,7 @@ public class Idea extends DomainObject {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
|
@JoinColumn(name = "project_type_id")
|
||||||
private ProjectType projectType;
|
private ProjectType projectType;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
|
@ -910,6 +910,15 @@ alter table `milestone_activity_template_project_type`
|
|||||||
foreign key (milestone_activity_template_id) references milestone_activity_template(id)
|
foreign key (milestone_activity_template_id) references milestone_activity_template(id)
|
||||||
on delete cascade on update cascade;
|
on delete cascade on update cascade;
|
||||||
|
|
||||||
|
-- table: idea, we only remove foreign key from idea to ProjectType and rename the column projectType_id here.
|
||||||
|
-- This table has many related tables and will be fixed later.
|
||||||
|
|
||||||
|
alter table `idea` drop foreign key `FK_idea_projectType`;
|
||||||
|
alter table `idea` drop key `FK_idea_projectType`;
|
||||||
|
|
||||||
|
alter table `idea` rename column `projectType_id` to `project_type_id`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Activate following later
|
/* Activate following later
|
||||||
|
|
||||||
@ -919,6 +928,12 @@ alter table `milestone_activity_template_project_type`
|
|||||||
|
|
||||||
-- Add back all foreign key references to project_typ
|
-- Add back all foreign key references to project_typ
|
||||||
|
|
||||||
|
-- add foreign key reference from idea to project_type
|
||||||
|
alter table `idea`
|
||||||
|
add constraint fk_idea_project_type_id
|
||||||
|
foreign key (project_type_id) references project_type(id)
|
||||||
|
on delete cascade on update cascade;
|
||||||
|
|
||||||
-- add foreign key reference from milestone_activity_template_project_type to project_type
|
-- add foreign key reference from milestone_activity_template_project_type to project_type
|
||||||
alter table `milestone_activity_template_project_type`
|
alter table `milestone_activity_template_project_type`
|
||||||
add constraint fk_ma_tpt_project_type_id
|
add constraint fk_ma_tpt_project_type_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user