task/3382: Harmonisera tabellnamn #6
@ -72,7 +72,7 @@ public class Activity extends LazyDeletableDomainObject {
|
|||||||
private Checklist checklist;
|
private Checklist checklist;
|
||||||
|
|
||||||
@OneToOne(optional = true, cascade = CascadeType.ALL)
|
@OneToOne(optional = true, cascade = CascadeType.ALL)
|
||||||
@JoinColumn(name = "file_reference_id", referencedColumnName = "id")
|
@JoinColumn(name = "upload_file_reference_id", referencedColumnName = "id")
|
||||||
tozh4728 marked this conversation as resolved
Outdated
|
|||||||
private FileReference fileUpload;
|
private FileReference fileUpload;
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
|
@ -1841,7 +1841,7 @@ alter table `activity` change `action` `action` varchar(64) not null default 'no
|
|||||||
alter table `activity` change `editable` `editable` bit(1) not null default b'1' after `action`;
|
alter table `activity` change `editable` `editable` bit(1) not null default b'1' after `action`;
|
||||||
|
|
||||||
alter table `activity` rename column `activityTemplate_id` to `activity_plan_id`;
|
alter table `activity` rename column `activityTemplate_id` to `activity_plan_id`;
|
||||||
alter table `activity` rename column `file_upload_reference_id` to `file_reference_id`;
|
alter table `activity` rename column `file_upload_reference_id` to `upload_file_reference_id`;
|
||||||
|
|
||||||
alter table `activity` add constraint uk_activity_checklist_id unique (checklist_id);
|
alter table `activity` add constraint uk_activity_checklist_id unique (checklist_id);
|
||||||
create index idx_activity_deleted on activity(deleted);
|
create index idx_activity_deleted on activity(deleted);
|
||||||
@ -1852,8 +1852,8 @@ alter table `activity`
|
|||||||
on delete cascade on update cascade ;
|
on delete cascade on update cascade ;
|
||||||
|
|
||||||
alter table `activity`
|
alter table `activity`
|
||||||
add constraint `fk_activity_file_reference_id`
|
add constraint `fk_activity_upload_file_reference_id`
|
||||||
foreign key (file_reference_id) references file_reference (id)
|
foreign key (upload_file_reference_id) references file_reference (id)
|
||||||
on delete cascade on update cascade ;
|
on delete cascade on update cascade ;
|
||||||
|
|
||||||
-- table: ActivityPlan
|
-- table: ActivityPlan
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
This feels like a downgrade in terms of documentation from the column name.
file_upload_reference_id
tells you that it is an uploaded file to the activity whilefile_reference_id
conveys no such information.It's renamed to 'upload_file_reference_id', following the same scheme _user_id. "file_reference" is the table name.