diff --git a/core/src/main/java/se/su/dsv/scipro/activityplan/Activity.java b/core/src/main/java/se/su/dsv/scipro/activityplan/Activity.java index 0b7e049f1f..28e834f5ef 100755 --- a/core/src/main/java/se/su/dsv/scipro/activityplan/Activity.java +++ b/core/src/main/java/se/su/dsv/scipro/activityplan/Activity.java @@ -72,7 +72,7 @@ public class Activity extends LazyDeletableDomainObject { private Checklist checklist; @OneToOne(optional = true, cascade = CascadeType.ALL) - @JoinColumn(name = "file_reference_id", referencedColumnName = "id") + @JoinColumn(name = "upload_file_reference_id", referencedColumnName = "id") private FileReference fileUpload; //</editor-fold> diff --git a/core/src/main/resources/db/migration/V390__harmonize_table_attribute_name.sql b/core/src/main/resources/db/migration/V390__harmonize_table_attribute_name.sql index 813dfeeb53..ff485fe3b9 100644 --- a/core/src/main/resources/db/migration/V390__harmonize_table_attribute_name.sql +++ b/core/src/main/resources/db/migration/V390__harmonize_table_attribute_name.sql @@ -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` 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); create index idx_activity_deleted on activity(deleted); @@ -1852,8 +1852,8 @@ alter table `activity` on delete cascade on update cascade ; alter table `activity` - add constraint `fk_activity_file_reference_id` - foreign key (file_reference_id) references file_reference (id) + add constraint `fk_activity_upload_file_reference_id` + foreign key (upload_file_reference_id) references file_reference (id) on delete cascade on update cascade ; -- table: ActivityPlan