diff --git a/.gitea/workflows/deploy-branch.yaml b/.gitea/workflows/deploy-branch.yaml new file mode 100644 index 0000000000..f3f9411993 --- /dev/null +++ b/.gitea/workflows/deploy-branch.yaml @@ -0,0 +1,27 @@ +name: Deploy to branch.dsv.su.se +on: + - pull_request +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - id: deploy + uses: https://gitea.dsv.su.se/ansv7779/action-branch-deploy@v1 + with: + gitea-token: ${{ secrets.GITEA_TOKEN }} + ssh-key: ${{ secrets.BRANCH_DEPLOY_KEY }} + compose-file: compose-branch-deploy.yaml + - name: Post URL to deployment as comment + uses: actions/github-script@v7 + if: github.event.action == 'opened' + env: + BRANCH_URL: ${{ steps.deploy.outputs.url }} + with: + script: | + const url = process.env.BRANCH_URL; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `Deployed to ${url}` + }) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..ced2b34fd9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM debian:bookworm AS build + +RUN apt-get update && apt-get install -y openjdk-17-jdk-headless + +WORKDIR /app + +COPY pom.xml . +COPY .mvn/ .mvn/ +COPY mvnw . +COPY api/pom.xml api/pom.xml +COPY core/pom.xml core/pom.xml +COPY view/pom.xml view/pom.xml +COPY war/pom.xml war/pom.xml +COPY daisy-integration/pom.xml daisy-integration/pom.xml + +# Download dependencies in a separate layer to allow caching for future builds +RUN ./mvnw dependency:go-offline --batch-mode --define includeScope=compile --activate-profiles docker-dependencies + +COPY api/src/ api/src/ +COPY core/src/ core/src/ +COPY view/src/ view/src/ +COPY war/src/ war/src/ +COPY daisy-integration/src/ daisy-integration/src/ + +RUN ./mvnw package --offline --define skipTests --activate-profiles branch,DEV + +FROM tomcat:10 AS run + +COPY --from=build /app/war/target/*.war /usr/local/tomcat/webapps/ROOT.war + +EXPOSE 8080 diff --git a/README.md b/README.md index 749d07cb72..50ed89f290 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +## Working with the web GUI (Wicket) +The web GUI is protected by OAuth 2 log in. Run the Docker Compose containers with +`docker compose up` to start the authorization server to be able to log in. + ## Working with the API The API is protected by OAuth 2 acting as a [resource server](https://www.oauth.com/oauth2-servers/the-resource-server/) verifying tokens using [token introspection](https://datatracker.ietf.org/doc/html/rfc7662). diff --git a/compose-branch-deploy.yaml b/compose-branch-deploy.yaml new file mode 100644 index 0000000000..90f436252c --- /dev/null +++ b/compose-branch-deploy.yaml @@ -0,0 +1,71 @@ +services: + scipro: + build: + context: . + dockerfile: Dockerfile + depends_on: + db: + condition: service_healthy + oauth2: + condition: service_started + environment: + - JDBC_DATABASE_URL=jdbc:mariadb://db:3306/scipro + - JDBC_DATABASE_USERNAME=scipro + - JDBC_DATABASE_PASSWORD=scipro + - OAUTH2_AUTHORIZATION_URI=https://oauth2-${VHOST}/authorize + - OAUTH2_TOKEN_URI=https://oauth2-${VHOST}/exchange + - OAUTH2_USER_INFO_URI=https://oauth2-${VHOST}/verify + - OAUTH2_CLIENT_ID=scipro_client + - OAUTH2_CLIENT_SECRET=scipro_secret + - OAUTH2_RESOURCE_SERVER_ID=scipro_api_client + - OAUTH2_RESOURCE_SERVER_SECRET=scipro_api_secret + - OAUTH2_RESOURCE_SERVER_INTROSPECTION_URI=https://oauth2-${VHOST}/introspect + networks: + - traefik + - internal + labels: + - "traefik.enable=true" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${VHOST}`)" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt" + + db: + image: mariadb:10.11 + restart: always + networks: + - internal + environment: + MARIADB_ROOT_PASSWORD: root + MARIADB_DATABASE: scipro + MARIADB_USER: scipro + MARIADB_PASSWORD: scipro + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect"] + start_period: 10s + interval: 10s + timeout: 5s + retries: 6 + + oauth2: + build: + context: https://github.com/dsv-su/toker.git + dockerfile: embedded.Dockerfile + restart: always + environment: + - CLIENT_ID=scipro_client + - CLIENT_SECRET=scipro_secret + - CLIENT_REDIRECT_URI=https://${VHOST}/login/oauth2/code/scipro + - RESOURCE_SERVER_ID=scipro_api_client + - RESOURCE_SERVER_SECRET=scipro_api_secret + networks: + - traefik + labels: + - "traefik.enable=true" + - "traefik.http.routers.oauth2-${COMPOSE_PROJECT_NAME}.rule=Host(`oauth2-${VHOST}`)" + - "traefik.http.routers.oauth2-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt" + +networks: + traefik: + name: traefik + external: true + internal: + name: ${COMPOSE_PROJECT_NAME}_internal diff --git a/core/src/main/java/se/su/dsv/scipro/DataInitializer.java b/core/src/main/java/se/su/dsv/scipro/DataInitializer.java index 762ea0c32a..5e38d4f9bc 100644 --- a/core/src/main/java/se/su/dsv/scipro/DataInitializer.java +++ b/core/src/main/java/se/su/dsv/scipro/DataInitializer.java @@ -234,14 +234,8 @@ public class DataInitializer implements Lifecycle { } private void createGradingCriterionTemplateIfNotDone() { - save(getBachelorTemplate()); - save(getBachelorTemplate()); save(getBachelorTemplate()); save(getMasterTemplate()); - save(getMasterTemplate()); - save(getMasterTemplate()); - save(getMagisterTemplate()); - save(getMagisterTemplate()); save(getMagisterTemplate()); } diff --git a/core/src/main/java/se/su/dsv/scipro/system/AuthenticationContext.java b/core/src/main/java/se/su/dsv/scipro/system/AuthenticationContext.java new file mode 100644 index 0000000000..9f46604358 --- /dev/null +++ b/core/src/main/java/se/su/dsv/scipro/system/AuthenticationContext.java @@ -0,0 +1,15 @@ +package se.su.dsv.scipro.system; + +/** + * Information about the current authentication context. + *

+ * The difference between this and {@link CurrentUser} is that a user can be + * authenticated without being a user in the system. This can happen when a + * user logs in for the first time via SSO. The {@link #set(User)} method can + * be used if the user can be imported based on the {@link #getPrincipalName()}. + */ +public interface AuthenticationContext extends CurrentUser { + void set(User user); + + String getPrincipalName(); +} diff --git a/core/src/main/resources/db/migration/V100__description_to_checklists.sql b/core/src/main/resources/db/migration/V100__description_to_checklists.sql deleted file mode 100644 index b25e4c1920..0000000000 --- a/core/src/main/resources/db/migration/V100__description_to_checklists.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `checklist` ADD COLUMN `description` LONGTEXT DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V101__made_type_not_null_in_file_description_until_migration_is_done.sql b/core/src/main/resources/db/migration/V101__made_type_not_null_in_file_description_until_migration_is_done.sql deleted file mode 100644 index fb52e7a069..0000000000 --- a/core/src/main/resources/db/migration/V101__made_type_not_null_in_file_description_until_migration_is_done.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` MODIFY COLUMN `type` VARCHAR(255); diff --git a/core/src/main/resources/db/migration/V102__added_final_seminar_created_event.sql b/core/src/main/resources/db/migration/V102__added_final_seminar_created_event.sql deleted file mode 100644 index 47f4642656..0000000000 --- a/core/src/main/resources/db/migration/V102__added_final_seminar_created_event.sql +++ /dev/null @@ -1 +0,0 @@ -insert into Event values ('FinalSeminarCreated','Final seminar created'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V103__file_description_clean_up.sql b/core/src/main/resources/db/migration/V103__file_description_clean_up.sql deleted file mode 100644 index eb83719fc7..0000000000 --- a/core/src/main/resources/db/migration/V103__file_description_clean_up.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `file_description` ADD CONSTRAINT `file_description_user` FOREIGN KEY (`userId`) REFERENCES `user` (`id`); -ALTER TABLE `file_description` DROP COLUMN `data`; diff --git a/core/src/main/resources/db/migration/V104__removed_target_last_modified_from_file_description.sql b/core/src/main/resources/db/migration/V104__removed_target_last_modified_from_file_description.sql deleted file mode 100644 index 09a07ba0e2..0000000000 --- a/core/src/main/resources/db/migration/V104__removed_target_last_modified_from_file_description.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` DROP COLUMN `targetLastModified`; diff --git a/core/src/main/resources/db/migration/V105__remove_supervisor_checklists.sql b/core/src/main/resources/db/migration/V105__remove_supervisor_checklists.sql deleted file mode 100644 index 7023c24d27..0000000000 --- a/core/src/main/resources/db/migration/V105__remove_supervisor_checklists.sql +++ /dev/null @@ -1,39 +0,0 @@ -create temporary table `remove_checklists` (id bigint); -insert into remove_checklists - select checklist_id from checklist_checklist_category - where categories_id = (select id from checklist_category where categoryName = 'Supervisor') - and checklist_id not in (select checklist_id from checklist_checklist_category - where categories_id not in (select id from checklist_category where categoryName = 'Supervisor')); - -create temporary table `remove_answers` (id bigint); -insert into remove_answers select answers_id from checklist_question_checklist_answer where checklist_question_id in -(select questions_id from checklist_checklist_question where checklist_id in (select id from remove_checklists)); - - -delete from checklist_question_checklist_answer where checklist_question_id in -(select questions_id from checklist_checklist_question where checklist_id in -(select id from remove_checklists)); - -delete from checklist_answer where id in -(select id from remove_answers); - -create temporary table `remove_questions` (id bigint); -insert into remove_questions select questions_id from checklist_checklist_question where checklist_id in - (select id from remove_checklists); - -delete from checklist_checklist_question where checklist_id in (select id from remove_checklists); - -delete from checklist_question where id in (select id from remove_questions); - -delete from checklist_checklist_category where checklist_id in (select id from remove_checklists); - -delete from Checklist_userLastOpenDate where CheckList_id in (select id from remove_checklists); - -delete from project_checklist where checkLists_id in (select id from remove_checklists); - -UPDATE project_schedule_event -SET checkList_id = NULL -WHERE checkList_id in (select id from remove_checklists); - -delete from checklist where id in (select id from remove_checklists); - diff --git a/core/src/main/resources/db/migration/V106__remove_supervisor_checklist_templates.sql b/core/src/main/resources/db/migration/V106__remove_supervisor_checklist_templates.sql deleted file mode 100644 index 5ec37ded5e..0000000000 --- a/core/src/main/resources/db/migration/V106__remove_supervisor_checklist_templates.sql +++ /dev/null @@ -1,19 +0,0 @@ -create temporary table `remove_checklist_templates` (id bigint); -insert into remove_checklist_templates - select checklist_template_id from checklist_template_checklist_category - where categories_id = (select id from checklist_category where categoryName = 'Supervisor') - and checklist_template_id not in (select checklist_id from checklist_checklist_category - where categories_id not in (select id from checklist_category where categoryName = 'Supervisor')); - -delete from ChecklistTemplate_questions where CheckListTemplate_id in (select id from remove_checklist_templates); - -delete from checklist_template_checklist_category where checklist_template_id in (select id from remove_checklist_templates); - -update peer_request set checkListTemplate_id = NULL where checkListTemplate_id in (select id from remove_checklist_templates); - -update project_event_template set checkListTemplate_id = NULL where checkListTemplate_id in (select id from remove_checklist_templates); - -delete from checklist_template_ProjectType where checklist_template_id in (select id from remove_checklist_templates); -delete from checklist_template where id in (select id from remove_checklist_templates); - -delete from checklist_category where categoryName = 'Supervisor'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V107__deletable_project_files.sql b/core/src/main/resources/db/migration/V107__deletable_project_files.sql deleted file mode 100644 index da48b11655..0000000000 --- a/core/src/main/resources/db/migration/V107__deletable_project_files.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` ADD COLUMN `deletable` BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V108__adding_phd_stuff.sql b/core/src/main/resources/db/migration/V108__adding_phd_stuff.sql deleted file mode 100644 index 2a291a688f..0000000000 --- a/core/src/main/resources/db/migration/V108__adding_phd_stuff.sql +++ /dev/null @@ -1,43 +0,0 @@ -CREATE TABLE IF NOT EXISTS `AnnualReview` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `year` int(4) NOT NULL, - `annualReview_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_1lixh18i7nf77ewo7kbcpp0s2` (`annualReview_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - -ALTER TABLE `AnnualReview` - ADD CONSTRAINT `FK_1lixh18i7nf77ewo7kbcpp0s2` FOREIGN KEY (`annualReview_id`) REFERENCES `file_description` (`id`); - -CREATE TABLE IF NOT EXISTS `PhD` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `basicContract_id` bigint(20) DEFAULT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_ulti91hg79n6uve40ypk4ep8` (`project_id`), - KEY `FK_gjws84yb3jwcjtsl566p7elwt` (`basicContract_id`), - KEY `FK_ulti91hg79n6uve40ypk4ep8` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - -ALTER TABLE `PhD` - ADD CONSTRAINT `FK_ulti91hg79n6uve40ypk4ep8` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_gjws84yb3jwcjtsl566p7elwt` FOREIGN KEY (`basicContract_id`) REFERENCES `file_description` (`id`); - -CREATE TABLE IF NOT EXISTS `PhD_AnnualReview` ( - `PhD_id` bigint(20) NOT NULL, - `annualReviews_id` bigint(20) NOT NULL, - PRIMARY KEY (`PhD_id`,`annualReviews_id`), - UNIQUE KEY `UK_s7qfudoo5kkayljbmyyssfywi` (`annualReviews_id`), - KEY `FK_s7qfudoo5kkayljbmyyssfywi` (`annualReviews_id`), - KEY `FK_8gpidcs94cr95v2mgk5be6x8b` (`PhD_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - -ALTER TABLE `PhD_AnnualReview` - ADD CONSTRAINT `FK_8gpidcs94cr95v2mgk5be6x8b` FOREIGN KEY (`PhD_id`) REFERENCES `PhD` (`id`), - ADD CONSTRAINT `FK_s7qfudoo5kkayljbmyyssfywi` FOREIGN KEY (`annualReviews_id`) REFERENCES `AnnualReview` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V109__phd_tables_utf8.sql b/core/src/main/resources/db/migration/V109__phd_tables_utf8.sql deleted file mode 100644 index 34376c2f0c..0000000000 --- a/core/src/main/resources/db/migration/V109__phd_tables_utf8.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `AnnualReview` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `PhD` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `PhD_AnnualReview` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `ApplicationPeriodProjectType` CONVERT TO CHARACTER SET utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V10__grading_report_for_bachelor.sql b/core/src/main/resources/db/migration/V10__grading_report_for_bachelor.sql deleted file mode 100644 index 5c10bcc1d3..0000000000 --- a/core/src/main/resources/db/migration/V10__grading_report_for_bachelor.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `grading_report_template` MODIFY COLUMN `description` VARCHAR(2000); -ALTER TABLE `grading_question` MODIFY COLUMN `description` VARCHAR(2000); -ALTER TABLE `grading_answer` ADD COLUMN `feedback` VARCHAR(2000); diff --git a/core/src/main/resources/db/migration/V110__copy_daisy_start_date_to_date_created_and_drop_it.sql b/core/src/main/resources/db/migration/V110__copy_daisy_start_date_to_date_created_and_drop_it.sql deleted file mode 100644 index dae3f4ff9e..0000000000 --- a/core/src/main/resources/db/migration/V110__copy_daisy_start_date_to_date_created_and_drop_it.sql +++ /dev/null @@ -1,2 +0,0 @@ -update project set dateCreated = daisyStartDate where dateCreated is null; -alter table project drop column daisyStartDate; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V111__cascade_in_database_to_handle_hibernate_misses.sql b/core/src/main/resources/db/migration/V111__cascade_in_database_to_handle_hibernate_misses.sql deleted file mode 100644 index ffa9549ad4..0000000000 --- a/core/src/main/resources/db/migration/V111__cascade_in_database_to_handle_hibernate_misses.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `NotificationData` DROP FOREIGN KEY `FK2DCAC3554D07E0A9`; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK2DCAC3554D07E0A9` FOREIGN KEY (`seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE; diff --git a/core/src/main/resources/db/migration/V112__project_type_modules.sql b/core/src/main/resources/db/migration/V112__project_type_modules.sql deleted file mode 100644 index 4a701f7e3b..0000000000 --- a/core/src/main/resources/db/migration/V112__project_type_modules.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `project_type_modules` ( - `ProjectType_id` bigint(20) NOT NULL, - `modules` varchar(255) DEFAULT NULL, - KEY `FK_4attsf1e22qpveesgl6o9b7lg` (`ProjectType_id`), - CONSTRAINT `FK_4attsf1e22qpveesgl6o9b7lg` FOREIGN KEY (`ProjectType_id`) REFERENCES `ProjectType` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V113__renamed_phd_to_study_plan.sql b/core/src/main/resources/db/migration/V113__renamed_phd_to_study_plan.sql deleted file mode 100644 index c8909a8cc9..0000000000 --- a/core/src/main/resources/db/migration/V113__renamed_phd_to_study_plan.sql +++ /dev/null @@ -1,5 +0,0 @@ -RENAME TABLE `PhD` TO `StudyPlan`; -ALTER TABLE `AnnualReview` ADD COLUMN `studyPlan_id` BIGINT(20); -ALTER TABLE `AnnualReview` ADD CONSTRAINT `FK_annual_review_study_plan` FOREIGN KEY (`studyPlan_id`) REFERENCES `StudyPlan` (`id`); -UPDATE `AnnualReview` SET `studyPlan_id` = (SELECT `PhD_id` FROM `PhD_AnnualReview` WHERE `annualReviews_id` = `AnnualReview`.`id`); -DROP TABLE `PhD_AnnualReview`; diff --git a/core/src/main/resources/db/migration/V114__drop_project_type_from_project_partner.sql b/core/src/main/resources/db/migration/V114__drop_project_type_from_project_partner.sql deleted file mode 100644 index ef14b085b6..0000000000 --- a/core/src/main/resources/db/migration/V114__drop_project_type_from_project_partner.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `projectPartner` DROP FOREIGN KEY `FK_projectPartner_projectType`; -ALTER TABLE `projectPartner` DROP KEY `FK_projectPartner_projectType`; -ALTER TABLE `projectPartner` DROP `projectType_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V115_10__change_final_seminar_active_participation_to_user.sql b/core/src/main/resources/db/migration/V115_10__change_final_seminar_active_participation_to_user.sql deleted file mode 100644 index 48b784ead9..0000000000 --- a/core/src/main/resources/db/migration/V115_10__change_final_seminar_active_participation_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `final_seminar_active_participation` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `final_seminar_active_participation` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `role`.`id` = `student_id`); -ALTER TABLE `final_seminar_active_participation` ADD CONSTRAINT `final_seminar_active_participation_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `final_seminar_active_participation` DROP FOREIGN KEY `FK_active_participation_student_id`; -ALTER TABLE `final_seminar_active_participation` DROP COLUMN `student_id`; diff --git a/core/src/main/resources/db/migration/V115_11__change_milestone_to_user.sql b/core/src/main/resources/db/migration/V115_11__change_milestone_to_user.sql deleted file mode 100644 index d1a4154e91..0000000000 --- a/core/src/main/resources/db/migration/V115_11__change_milestone_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `milestone` ADD COLUMN `user_id` BIGINT(20) DEFAULT NULL; -UPDATE `milestone` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `id` = `student_id` AND `student_id` IS NOT NULL); -ALTER TABLE `milestone` ADD CONSTRAINT `milestone_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `milestone` DROP FOREIGN KEY `FKC08419709BD14DD5`; -ALTER TABLE `milestone` DROP COLUMN `student_id`; diff --git a/core/src/main/resources/db/migration/V115_12__change_head_supervisor_to_user.sql b/core/src/main/resources/db/migration/V115_12__change_head_supervisor_to_user.sql deleted file mode 100644 index 67cfd2a810..0000000000 --- a/core/src/main/resources/db/migration/V115_12__change_head_supervisor_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `project` ADD COLUMN `supervisor_id` BIGINT(20) DEFAULT NULL; -UPDATE `project` SET `supervisor_id` = (SELECT `user_id` FROM `role` WHERE `id` = `headSupervisor_id`); -ALTER TABLE `project` ADD CONSTRAINT `project_supervisor_id` FOREIGN KEY (`supervisor_id`) REFERENCES `user` (`id`); -ALTER TABLE `project` DROP FOREIGN KEY `FK_6k74jgcmji5vo3lheg4npoaql`; -ALTER TABLE `project` DROP COLUMN `headSupervisor_id`; diff --git a/core/src/main/resources/db/migration/V115_13__change_project_follower_to_user.sql b/core/src/main/resources/db/migration/V115_13__change_project_follower_to_user.sql deleted file mode 100644 index f438ac83e1..0000000000 --- a/core/src/main/resources/db/migration/V115_13__change_project_follower_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `project_follower` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `project_follower` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `id` = `follower_id`); -ALTER TABLE `project_follower` ADD CONSTRAINT `project_follower_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `project_follower` DROP FOREIGN KEY `FK_h49g8tc2d8q69y3i66nj404h7`; -ALTER TABLE `project_follower` DROP COLUMN `follower_id`; diff --git a/core/src/main/resources/db/migration/V115_14__changed_peer_review_to_user.sql b/core/src/main/resources/db/migration/V115_14__changed_peer_review_to_user.sql deleted file mode 100644 index bb23d592aa..0000000000 --- a/core/src/main/resources/db/migration/V115_14__changed_peer_review_to_user.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `peer_review` DROP FOREIGN KEY `FK_9xy59w1sbydtuplendcthlhu5`; -ALTER TABLE `peer_review` CHANGE COLUMN `reviewer_id` `foo` BIGINT(20) NOT NULL; -ALTER TABLE `peer_review` ADD COLUMN `reviewer_id` BIGINT(20) NOT NULL; -UPDATE `peer_review` SET `reviewer_id` = (SELECT `user_id` FROM `role` WHERE `id` = `foo`); -ALTER TABLE `peer_review` ADD CONSTRAINT `peer_review_reviewer_id` FOREIGN KEY (`reviewer_id`) REFERENCES `user` (`id`); -ALTER TABLE `peer_review` DROP COLUMN `foo`; diff --git a/core/src/main/resources/db/migration/V115_15__changed_peer_request_to_user.sql b/core/src/main/resources/db/migration/V115_15__changed_peer_request_to_user.sql deleted file mode 100644 index 5d2cb7a374..0000000000 --- a/core/src/main/resources/db/migration/V115_15__changed_peer_request_to_user.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `peer_request` DROP FOREIGN KEY `FK_ihqq9n3eb7ycvd5ggjxx5wn38`; -ALTER TABLE `peer_request` CHANGE COLUMN `requester_id` `foo` BIGINT(20) NOT NULL; -ALTER TABLE `peer_request` ADD COLUMN `requester_id` BIGINT(20) NOT NULL; -UPDATE `peer_request` SET `requester_id` = (SELECT `user_id` FROM `role` WHERE `id` = `foo`); -ALTER TABLE `peer_request` ADD CONSTRAINT `peer_request_reviewer_id` FOREIGN KEY (`requester_id`) REFERENCES `user` (`id`); -ALTER TABLE `peer_request` DROP COLUMN `foo`; diff --git a/core/src/main/resources/db/migration/V115_16__changed_application_period_exemption_to_user.sql b/core/src/main/resources/db/migration/V115_16__changed_application_period_exemption_to_user.sql deleted file mode 100644 index 1f1d931a68..0000000000 --- a/core/src/main/resources/db/migration/V115_16__changed_application_period_exemption_to_user.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `applicationperiodexemption` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `applicationperiodexemption` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `id` = `studentId`); -ALTER TABLE `applicationperiodexemption` ADD CONSTRAINT `applicationperiodexemption_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `applicationperiodexemption` DROP FOREIGN KEY `FKCB7E71913353DC5C`; -ALTER TABLE `applicationperiodexemption` DROP PRIMARY KEY; -ALTER TABLE `applicationperiodexemption` ADD PRIMARY KEY (`user_id`, `applicationPeriodId`); -ALTER TABLE `applicationperiodexemption` DROP COLUMN `studentId`; diff --git a/core/src/main/resources/db/migration/V115_17__changed_idea_participation_to_user.sql b/core/src/main/resources/db/migration/V115_17__changed_idea_participation_to_user.sql deleted file mode 100644 index ed01f46de5..0000000000 --- a/core/src/main/resources/db/migration/V115_17__changed_idea_participation_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `idea_student` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `idea_student` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `id` = `role_id`); -ALTER TABLE `idea_student` ADD CONSTRAINT `idea_student_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `idea_student` DROP FOREIGN KEY `FK9458BA932B6C61BA`; -ALTER TABLE `idea_student` DROP COLUMN `role_id`; diff --git a/core/src/main/resources/db/migration/V115_18__changed_match_to_user.sql b/core/src/main/resources/db/migration/V115_18__changed_match_to_user.sql deleted file mode 100644 index 8f047ef903..0000000000 --- a/core/src/main/resources/db/migration/V115_18__changed_match_to_user.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `idea_match` DROP FOREIGN KEY `FK87EA481DBCA56165`; -ALTER TABLE `idea_match` CHANGE COLUMN `supervisor_id` `foo` BIGINT(20) DEFAULT NULL; -ALTER TABLE `idea_match` ADD COLUMN `supervisor_id` BIGINT(20) DEFAULT NULL; -UPDATE `idea_match` SET `supervisor_id` = (SELECT `user_id` FROM `role` WHERE `id` = `foo`); -ALTER TABLE `idea_match` ADD CONSTRAINT `idea_match_supervisor_id` FOREIGN KEY (`supervisor_id`) REFERENCES `user` (`id`); -ALTER TABLE `idea_match` DROP COLUMN `foo`; diff --git a/core/src/main/resources/db/migration/V115_19__changed_target_to_user.sql b/core/src/main/resources/db/migration/V115_19__changed_target_to_user.sql deleted file mode 100644 index 5d219ad325..0000000000 --- a/core/src/main/resources/db/migration/V115_19__changed_target_to_user.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `target` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `target` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `id` = `employeeId`); -ALTER TABLE `target` ADD CONSTRAINT `target_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `target` DROP FOREIGN KEY `FKCB7E71913353DC5Cb`; -ALTER TABLE `target` DROP PRIMARY KEY; -ALTER TABLE `target` ADD PRIMARY KEY (`user_id`, `applicationPeriodId`, `projectTypeId`); -ALTER TABLE `target` DROP COLUMN `employeeId`; diff --git a/core/src/main/resources/db/migration/V115_1__migrate_student_data_to_user.sql b/core/src/main/resources/db/migration/V115_1__migrate_student_data_to_user.sql deleted file mode 100644 index 642a63ef27..0000000000 --- a/core/src/main/resources/db/migration/V115_1__migrate_student_data_to_user.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `user_program` ( - `user_id` BIGINT(20) NOT NULL, - `program_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`user_id`, `program_id`), - CONSTRAINT `user_program_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - CONSTRAINT `user_program_program_id` FOREIGN KEY (`program_id`) REFERENCES `Program` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `user_program` (`user_id`, `program_id`) - SELECT `user`.`id`, `role_Program`.`programs_id` - FROM `role_Program` - INNER JOIN `role` ON `role`.`id` = `role_Program`.`role_id` - INNER JOIN `user` ON `user`.`id` = `role`.`user_id`; diff --git a/core/src/main/resources/db/migration/V115_20__changed_final_seminar_examiner_to_user.sql b/core/src/main/resources/db/migration/V115_20__changed_final_seminar_examiner_to_user.sql deleted file mode 100644 index 1f7effbe84..0000000000 --- a/core/src/main/resources/db/migration/V115_20__changed_final_seminar_examiner_to_user.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `final_seminar` DROP FOREIGN KEY `FK49900D2873048D7F`; -ALTER TABLE `final_seminar` CHANGE COLUMN `examiner_id` `foo` BIGINT(20) DEFAULT NULL; -ALTER TABLE `final_seminar` ADD COLUMN `examiner_id` BIGINT(20) DEFAULT NULL; -UPDATE `final_seminar` SET `examiner_id` = (SELECT `user_id` FROM `role` WHERE `id` = `foo`); -ALTER TABLE `final_seminar` ADD CONSTRAINT `final_seminar_examiner_id` FOREIGN KEY (`examiner_id`) REFERENCES `user` (`id`); -ALTER TABLE `final_seminar` DROP COLUMN `foo`; diff --git a/core/src/main/resources/db/migration/V115_21__clean_up.sql b/core/src/main/resources/db/migration/V115_21__clean_up.sql deleted file mode 100644 index afa17fb907..0000000000 --- a/core/src/main/resources/db/migration/V115_21__clean_up.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE `role_Program`; -DROP TABLE `Employee_Language`; -DROP TABLE `employee_researcharea`; -DROP TABLE `SupervisorNotificationSettings`; -DROP TABLE `project_student`; -DROP TABLE `role`; diff --git a/core/src/main/resources/db/migration/V115_2__migrate_language_to_user.sql b/core/src/main/resources/db/migration/V115_2__migrate_language_to_user.sql deleted file mode 100644 index 90d585273b..0000000000 --- a/core/src/main/resources/db/migration/V115_2__migrate_language_to_user.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `user_language` ( - `user_id` BIGINT(20) NOT NULL, - `language_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`user_id`, `language_id`), - CONSTRAINT `user_language_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - CONSTRAINT `user_language_language_id` FOREIGN KEY (`language_id`) REFERENCES `Language` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `user_language` (`user_id`, `language_id`) - SELECT `user`.`id`, `Employee_Language`.`languages_id` - FROM `Employee_Language` - INNER JOIN `role` ON `role`.`id` = `Employee_Language`.`role_id` - INNER JOIN `user` ON `user`.`id` = `role`.`user_id`; diff --git a/core/src/main/resources/db/migration/V115_3__migrate_research_area_to_user.sql b/core/src/main/resources/db/migration/V115_3__migrate_research_area_to_user.sql deleted file mode 100644 index b5f96ef176..0000000000 --- a/core/src/main/resources/db/migration/V115_3__migrate_research_area_to_user.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `user_research_area` ( - `user_id` BIGINT(20) NOT NULL, - `research_area_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`user_id`, `research_area_id`), - CONSTRAINT `user_research_area_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - CONSTRAINT `user_research_area_research_area_id` FOREIGN KEY (`research_area_id`) REFERENCES `researcharea` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `user_research_area` (`user_id`, `research_area_id`) - SELECT `user`.`id`, `employee_researcharea`.`researchAreas_id` - FROM `employee_researcharea` - INNER JOIN `role` ON `role`.`id` = `employee_researcharea`.`role_id` - INNER JOIN `user` ON `user`.`id` = `role`.`user_id`; diff --git a/core/src/main/resources/db/migration/V115_4__migrate_unit_to_user.sql b/core/src/main/resources/db/migration/V115_4__migrate_unit_to_user.sql deleted file mode 100644 index 83309ff66e..0000000000 --- a/core/src/main/resources/db/migration/V115_4__migrate_unit_to_user.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `user` ADD COLUMN `unit_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `user` ADD CONSTRAINT `user_unit_id` FOREIGN KEY (`unit_id`) REFERENCES `unit` (`id`); -UPDATE `user` SET `unit_id` = (SELECT `unit_id` FROM `role` WHERE `user_id` = `user`.`id` AND `unit_id` IS NOT NULL); diff --git a/core/src/main/resources/db/migration/V115_5__migrated_roles_to_new_table.sql b/core/src/main/resources/db/migration/V115_5__migrated_roles_to_new_table.sql deleted file mode 100644 index b472570384..0000000000 --- a/core/src/main/resources/db/migration/V115_5__migrated_roles_to_new_table.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE `user_role` ( - `user_id` BIGINT(20) NOT NULL, - `role` VARCHAR(255) NOT NULL, - PRIMARY KEY (`user_id`, `role`), - CONSTRAINT `user_role_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `user_role` (`user_id`, `role`) - SELECT `user_id`, UPPER(`rolename`) - FROM `role`; - diff --git a/core/src/main/resources/db/migration/V115_6__made_project_authors_be_user_not_student.sql b/core/src/main/resources/db/migration/V115_6__made_project_authors_be_user_not_student.sql deleted file mode 100644 index 280fece2da..0000000000 --- a/core/src/main/resources/db/migration/V115_6__made_project_authors_be_user_not_student.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE `project_user` ( - `user_id` BIGINT(20) NOT NULL, - `project_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`user_id`, `project_id`), - CONSTRAINT `project_user_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - CONSTRAINT `project_user_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `project_user` (`user_id`, `project_id`) - SELECT `role`.`user_id`, `project_student`.`project_id` - FROM `project_student` - INNER JOIN `role` ON `role`.`id` = `project_student`.`projectParticipants_id`; diff --git a/core/src/main/resources/db/migration/V115_7__change_grading_report_to_user.sql b/core/src/main/resources/db/migration/V115_7__change_grading_report_to_user.sql deleted file mode 100644 index e6c8026092..0000000000 --- a/core/src/main/resources/db/migration/V115_7__change_grading_report_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `SupervisorGradingReport` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `SupervisorGradingReport` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `role`.`id` = `student_id`); -ALTER TABLE `SupervisorGradingReport` ADD CONSTRAINT `supervisor_grading_report_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `SupervisorGradingReport` DROP FOREIGN KEY `FK_2vi1wacprhrqlc8agx08btx34`; -ALTER TABLE `SupervisorGradingReport` DROP COLUMN `student_id`; diff --git a/core/src/main/resources/db/migration/V115_8__change_final_seminar_respondent_to_user.sql b/core/src/main/resources/db/migration/V115_8__change_final_seminar_respondent_to_user.sql deleted file mode 100644 index 6990b0fb6a..0000000000 --- a/core/src/main/resources/db/migration/V115_8__change_final_seminar_respondent_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `final_seminar_respondent` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `final_seminar_respondent` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `role`.`id` = `student_id`); -ALTER TABLE `final_seminar_respondent` ADD CONSTRAINT `final_seminar_respondent_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `final_seminar_respondent` DROP FOREIGN KEY `FK_student_respondent_id`; -ALTER TABLE `final_seminar_respondent` DROP COLUMN `student_id`; diff --git a/core/src/main/resources/db/migration/V115_9__change_final_seminar_opposition_to_user.sql b/core/src/main/resources/db/migration/V115_9__change_final_seminar_opposition_to_user.sql deleted file mode 100644 index fc0287b7b6..0000000000 --- a/core/src/main/resources/db/migration/V115_9__change_final_seminar_opposition_to_user.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `final_seminar_opposition` ADD COLUMN `user_id` BIGINT(20) NOT NULL; -UPDATE `final_seminar_opposition` SET `user_id` = (SELECT `user_id` FROM `role` WHERE `role`.`id` = `student_id`); -ALTER TABLE `final_seminar_opposition` ADD CONSTRAINT `final_seminar_opposition_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); -ALTER TABLE `final_seminar_opposition` DROP FOREIGN KEY `FK_opposition_student_id`; -ALTER TABLE `final_seminar_opposition` DROP COLUMN `student_id`; diff --git a/core/src/main/resources/db/migration/V116__removing_unused_attributes.sql b/core/src/main/resources/db/migration/V116__removing_unused_attributes.sql deleted file mode 100644 index af5d16ec57..0000000000 --- a/core/src/main/resources/db/migration/V116__removing_unused_attributes.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `schedule_template` DROP FOREIGN KEY `FK_schedule_template_projectType`; -ALTER TABLE `schedule_template` DROP COLUMN `projectType_id`; - -ALTER TABLE `project_event_template` DROP FOREIGN KEY `FK_p8buy8evr4g6u8nkbml0mdf1v`; -ALTER TABLE `project_event_template` DROP COLUMN `templateCreator_id`; -ALTER TABLE `project_event_template` DROP COLUMN `estimatedTimeConsumption`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V117__removing_unused_attributes.sql b/core/src/main/resources/db/migration/V117__removing_unused_attributes.sql deleted file mode 100644 index 15496fd341..0000000000 --- a/core/src/main/resources/db/migration/V117__removing_unused_attributes.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `checklist_template` - DROP `numberOfQuestions`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V118__add_credits_to_grading_report_template.sql b/core/src/main/resources/db/migration/V118__add_credits_to_grading_report_template.sql deleted file mode 100644 index e41ef4f283..0000000000 --- a/core/src/main/resources/db/migration/V118__add_credits_to_grading_report_template.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report_template` ADD COLUMN `credits` INT(11); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V119__removing_unnecessary_attribute.sql b/core/src/main/resources/db/migration/V119__removing_unnecessary_attribute.sql deleted file mode 100644 index 80a51c99de..0000000000 --- a/core/src/main/resources/db/migration/V119__removing_unnecessary_attribute.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `project_schedule_event` DROP FOREIGN KEY `creator_id_index`; -ALTER TABLE `project_schedule_event` DROP KEY `creator_id_index`; -ALTER TABLE `project_schedule_event` DROP `creator_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V11__rename_grading_question_criterion.sql b/core/src/main/resources/db/migration/V11__rename_grading_question_criterion.sql deleted file mode 100644 index e9a338a1e3..0000000000 --- a/core/src/main/resources/db/migration/V11__rename_grading_question_criterion.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE `grading_question` TO `grading_criterion`; diff --git a/core/src/main/resources/db/migration/V120__adding_reviewer_and_cosupervisor_set_to_project.sql b/core/src/main/resources/db/migration/V120__adding_reviewer_and_cosupervisor_set_to_project.sql deleted file mode 100644 index 7745a7f766..0000000000 --- a/core/src/main/resources/db/migration/V120__adding_reviewer_and_cosupervisor_set_to_project.sql +++ /dev/null @@ -1,37 +0,0 @@ -CREATE TABLE IF NOT EXISTS `project_reviewer` ( - `project_id` bigint(20) NOT NULL, - `user_id` bigint(20) NOT NULL, - PRIMARY KEY (`project_id`,`user_id`), - KEY `FK_g7yryw3e0dtmuuvgw5qjhphjm` (`user_id`), - KEY `FK_6aik0jd18kv3383fbt09xd0pi` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `project_reviewer` - ADD CONSTRAINT `FK_6aik0jd18kv3383fbt09xd0pi` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_g7yryw3e0dtmuuvgw5qjhphjm` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - -INSERT INTO `project_reviewer` (`user_id`, `project_id`) ( - SELECT `user_id` , `project_id` - FROM `project_follower` - WHERE `projectRole` = 'REVIEWER' -); - -CREATE TABLE IF NOT EXISTS `project_cosupervisor` ( - `user_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`user_id`,`project_id`), - KEY `FK_18x2poxkt8s2bw9kpr7vbmd5j` (`user_id`), - KEY `FK_fj57t069dymdrnnhdxcnfvvnn` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `project_cosupervisor` - ADD CONSTRAINT `FK_fj57t069dymdrnnhdxcnfvvnn` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_18x2poxkt8s2bw9kpr7vbmd5j` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - -INSERT INTO `project_cosupervisor` (`user_id`, `project_id`) ( - SELECT DISTINCT `user_id` , `project_id` - FROM `project_follower` - WHERE `projectRole` = 'CO_SUPERVISOR' -); - -DROP TABLE `project_follower`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V121__language_to_enums.sql b/core/src/main/resources/db/migration/V121__language_to_enums.sql deleted file mode 100644 index 281323f8da..0000000000 --- a/core/src/main/resources/db/migration/V121__language_to_enums.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `user_languages` ( - `user_id` bigint(20) NOT NULL, - `languages` varchar(255) DEFAULT NULL, - KEY `user_languages_user_id` (`user_id`), - CONSTRAINT `user_languages_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -INSERT INTO `user_languages` (`user_id`, `languages`) SELECT `user_id`, UPPER(`Language`.`name`) - FROM `user_language` INNER JOIN `Language` ON `Language`.`id` = `user_language`.`language_id`; - -DROP TABLE `user_language`; - -ALTER TABLE `idea` DROP FOREIGN KEY `FK6E0518973BE9881F`; -ALTER TABLE `idea` ADD COLUMN `language` VARCHAR(255) DEFAULT NULL; -UPDATE `idea` SET `language` = (SELECT UPPER(`name`) FROM `Language` where `id` = language_id); -ALTER TABLE `idea` DROP COLUMN `language_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V122__renamed_free_text_answer_to_motivation.sql b/core/src/main/resources/db/migration/V122__renamed_free_text_answer_to_motivation.sql deleted file mode 100644 index fcb9d46c2d..0000000000 --- a/core/src/main/resources/db/migration/V122__renamed_free_text_answer_to_motivation.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `answer` CHANGE COLUMN `freeTextAnswer` `motivation` LONGTEXT; diff --git a/core/src/main/resources/db/migration/V123__bye_peer_ratings.sql b/core/src/main/resources/db/migration/V123__bye_peer_ratings.sql deleted file mode 100644 index f06d5a8f10..0000000000 --- a/core/src/main/resources/db/migration/V123__bye_peer_ratings.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE review_rating; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V124__remove_peer_rating_setting.sql b/core/src/main/resources/db/migration/V124__remove_peer_rating_setting.sql deleted file mode 100644 index fdae0d8a39..0000000000 --- a/core/src/main/resources/db/migration/V124__remove_peer_rating_setting.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` DROP COLUMN `peerRatingsEnabled`; diff --git a/core/src/main/resources/db/migration/V125__remove_peer_priority.sql b/core/src/main/resources/db/migration/V125__remove_peer_priority.sql deleted file mode 100644 index 006c0ecd0b..0000000000 --- a/core/src/main/resources/db/migration/V125__remove_peer_priority.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project_type_settings` DROP COLUMN `numDaysBeforePeerRequestPriority`; diff --git a/core/src/main/resources/db/migration/V126__removed_thesis_file_from_file_description.sql b/core/src/main/resources/db/migration/V126__removed_thesis_file_from_file_description.sql deleted file mode 100644 index f79eea6fea..0000000000 --- a/core/src/main/resources/db/migration/V126__removed_thesis_file_from_file_description.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` DROP COLUMN `isThesisFile`; diff --git a/core/src/main/resources/db/migration/V127__add_source_to_file_description.sql b/core/src/main/resources/db/migration/V127__add_source_to_file_description.sql deleted file mode 100644 index 0f74631468..0000000000 --- a/core/src/main/resources/db/migration/V127__add_source_to_file_description.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` ADD COLUMN `fileSource` VARCHAR(255); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V128__feedback_to_longtext.sql b/core/src/main/resources/db/migration/V128__feedback_to_longtext.sql deleted file mode 100644 index 2a41f25f6b..0000000000 --- a/core/src/main/resources/db/migration/V128__feedback_to_longtext.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `criterion` MODIFY COLUMN `feedback` LONGTEXT DEFAULT NULL; -ALTER TABLE `GradingCriterion` MODIFY COLUMN `feedback` LONGTEXT DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V129__renaming.sql b/core/src/main/resources/db/migration/V129__renaming.sql deleted file mode 100644 index 1754105192..0000000000 --- a/core/src/main/resources/db/migration/V129__renaming.sql +++ /dev/null @@ -1,27 +0,0 @@ -RENAME TABLE `schedule_template` TO `ActivityPlanTemplate`; -RENAME TABLE `project_event_template` TO `ActivityTemplate`; - -ALTER TABLE `ActivityTemplate` DROP FOREIGN KEY `FK_ca5bhq3i6p2g292fo5l4fqtf`; -ALTER TABLE `ActivityTemplate` DROP KEY `FKD4434665C5FC509F`; -ALTER TABLE `ActivityTemplate` CHANGE `scheduleTemplate_id` `activityPlanTemplate_id` bigint(20) DEFAULT NULL; -ALTER TABLE `ActivityTemplate` ADD KEY `FKD4434665C5FC509F` (`activityPlanTemplate_id`); -ALTER TABLE `ActivityTemplate` ADD CONSTRAINT `FK_ca5bhq3i6p2g292fo5l4fqtf` FOREIGN KEY (`activityPlanTemplate_id`) REFERENCES `ActivityPlanTemplate` (`id`); - -ALTER TABLE `ApplicationPeriodProjectType` DROP FOREIGN KEY `FK_3ku67jvegs1xxh8ykk023i7sb`; -ALTER TABLE `ApplicationPeriodProjectType` DROP KEY `FK_3ku67jvegs1xxh8ykk023i7sb`; -ALTER TABLE `ApplicationPeriodProjectType` CHANGE `scheduleTemplate_id` `activityPlanTemplate_id` bigint(20) DEFAULT NULL; -ALTER TABLE `ApplicationPeriodProjectType` ADD KEY `FK_3ku67jvegs1xxh8ykk023i7sb` (`activityPlanTemplate_id`); -ALTER TABLE `ApplicationPeriodProjectType` ADD CONSTRAINT `FK_3ku67jvegs1xxh8ykk023i7sb` FOREIGN KEY (`activityPlanTemplate_id`) REFERENCES `ActivityPlanTemplate` (`id`); - -ALTER TABLE `ActivityPlanTemplate` CHANGE `templateDescription` `description` longtext; -ALTER TABLE `ActivityPlanTemplate` CHANGE `templateName` `title` varchar(255) NOT NULL; - -RENAME TABLE `project_schedule` TO `ActivityPlan`; -RENAME TABLE `project_schedule_event` TO `Activity`; - -ALTER TABLE `Activity` DROP FOREIGN KEY `projectSchedule_id_index`; -ALTER TABLE `Activity` DROP KEY `projectSchedule_id_index`; -ALTER TABLE `Activity` CHANGE `projectSchedule_id` `activityTemplate_id` bigint(20) NOT NULL; -ALTER TABLE `Activity` ADD KEY `activityTemplate_id_index` (`activityTemplate_id`); -ALTER TABLE `Activity` ADD CONSTRAINT `activityTemplate_id_index` FOREIGN KEY (`activityTemplate_id`) REFERENCES `ActivityPlan` (`id`); -ALTER TABLE `Activity` CHANGE `name` `title` varchar(500) NOT NULL; diff --git a/core/src/main/resources/db/migration/V12__finished_boolean.sql b/core/src/main/resources/db/migration/V12__finished_boolean.sql deleted file mode 100644 index 8f351980a5..0000000000 --- a/core/src/main/resources/db/migration/V12__finished_boolean.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report` ADD COLUMN `finished` BOOLEAN DEFAULT FALSE NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V130__checklist_notification_urls.sql b/core/src/main/resources/db/migration/V130__checklist_notification_urls.sql deleted file mode 100644 index 0737bd9eb5..0000000000 --- a/core/src/main/resources/db/migration/V130__checklist_notification_urls.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, '&checklist=', '&clid=') -WHERE absoluteURL LIKE '%&checklist=%'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V131__forum_notification_urls.sql b/core/src/main/resources/db/migration/V131__forum_notification_urls.sql deleted file mode 100644 index abd1cd2524..0000000000 --- a/core/src/main/resources/db/migration/V131__forum_notification_urls.sql +++ /dev/null @@ -1,7 +0,0 @@ -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, '&tid=', '&ftid=') -WHERE absoluteURL LIKE '%&tid=%'; - -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, '&postID=', '&fpid=') -WHERE absoluteURL LIKE '%&postID=%'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V132__file_attachment_to_reports.sql b/core/src/main/resources/db/migration/V132__file_attachment_to_reports.sql deleted file mode 100644 index ff89b6d46e..0000000000 --- a/core/src/main/resources/db/migration/V132__file_attachment_to_reports.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `opposition_report` ADD `attachment_id` bigint(20) DEFAULT NULL; -ALTER TABLE `opposition_report` ADD CONSTRAINT `opposition_report_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `file_description` (`id`); - -ALTER TABLE `preliminary_grading_report` ADD `attachment_id` bigint(20) DEFAULT NULL; -ALTER TABLE `preliminary_grading_report` ADD CONSTRAINT `preliminary_grading_report_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `file_description` (`id`); diff --git a/core/src/main/resources/db/migration/V133__research_plan.sql b/core/src/main/resources/db/migration/V133__research_plan.sql deleted file mode 100644 index a821fb50b9..0000000000 --- a/core/src/main/resources/db/migration/V133__research_plan.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `research_plan` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `project_id` bigint(20) NOT NULL, - `file_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `research_plan_project` (`project_id`), - KEY `research_plan_file` (`file_id`), - CONSTRAINT `research_plan_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - CONSTRAINT `research_plan_file` FOREIGN KEY (`file_id`) REFERENCES `file_description` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V134__externallink.sql b/core/src/main/resources/db/migration/V134__externallink.sql deleted file mode 100644 index 3ff3da318d..0000000000 --- a/core/src/main/resources/db/migration/V134__externallink.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE IF NOT EXISTS `externallink` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `url` varchar(255) NOT NULL, - `project_id` bigint(20) NOT NULL, - `user_id` bigint(20) NOT NULL, - `description` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_PROJECT` (`project_id`), - KEY `FK_USER` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - -ALTER TABLE `externallink` - ADD CONSTRAINT `FK_USER` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_PROJECT` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - -INSERT INTO `externallink` (`dateCreated`, `lastModified`, `version`, `url`, `project_id`, `user_id`) -SELECT `thesislink`.`dateCreated`, `thesislink`.`lastModified`, `thesislink`.`version`, `thesislink`.`URL`, `thesislink`.`project_id`, `project`.`supervisor_id` -FROM `thesislink`, `project` -WHERE `thesislink`.`project_id` = `project`.`id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V135__removed_old_thesis_link.sql b/core/src/main/resources/db/migration/V135__removed_old_thesis_link.sql deleted file mode 100644 index 327718acd0..0000000000 --- a/core/src/main/resources/db/migration/V135__removed_old_thesis_link.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `thesislink`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V136__removed_unused_general_system_settings.sql b/core/src/main/resources/db/migration/V136__removed_unused_general_system_settings.sql deleted file mode 100644 index bc2bbab37a..0000000000 --- a/core/src/main/resources/db/migration/V136__removed_unused_general_system_settings.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `general_system_settings` DROP COLUMN `bachelorCountDate`; -ALTER TABLE `general_system_settings` DROP COLUMN `masterCountDate`; diff --git a/core/src/main/resources/db/migration/V137__show_single_sign_on_settings.sql b/core/src/main/resources/db/migration/V137__show_single_sign_on_settings.sql deleted file mode 100644 index 5a402116ed..0000000000 --- a/core/src/main/resources/db/migration/V137__show_single_sign_on_settings.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD COLUMN `showSingleSignOn` BOOLEAN DEFAULT TRUE NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V138__increasing_length_of_thesis_summary.sql b/core/src/main/resources/db/migration/V138__increasing_length_of_thesis_summary.sql deleted file mode 100644 index 528ee87428..0000000000 --- a/core/src/main/resources/db/migration/V138__increasing_length_of_thesis_summary.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `opposition_report` CHANGE `thesisSummary` `thesisSummary` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V139__department_service.sql b/core/src/main/resources/db/migration/V139__department_service.sql deleted file mode 100644 index 8cb479f805..0000000000 --- a/core/src/main/resources/db/migration/V139__department_service.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE `department_service` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` int(11) NOT NULL, - `user_id` bigint(20) NOT NULL, - `dateStarted` DATETIME NOT NULL, - `dateEnded` DATETIME NOT NULL, - `hours` INT NOT NULL, - `description` LONGTEXT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `department_service_user` (`user_id`), - CONSTRAINT `department_service_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V13__remove_useless_columns.sql b/core/src/main/resources/db/migration/V13__remove_useless_columns.sql deleted file mode 100644 index 4def8d40aa..0000000000 --- a/core/src/main/resources/db/migration/V13__remove_useless_columns.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `user_settings` - DROP `apiKey`, - DROP `available`, - DROP `iPhoneId`, - DROP `statusMessage`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V140__transaction.sql b/core/src/main/resources/db/migration/V140__transaction.sql deleted file mode 100644 index 9207b17514..0000000000 --- a/core/src/main/resources/db/migration/V140__transaction.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE IF NOT EXISTS `transaction` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `project_id` bigint(20) NOT NULL, - `user_id` bigint(20) NOT NULL, - `amount` int(11) NOT NULL, - `comment` longtext, - PRIMARY KEY (`id`), - KEY `FK_transaction_project` (`project_id`), - KEY `FK_transaction_user` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - -ALTER TABLE `transaction` - ADD CONSTRAINT `FK_transaction_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_transaction_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V141__roughdraft.sql b/core/src/main/resources/db/migration/V141__roughdraft.sql deleted file mode 100644 index affeffd3e3..0000000000 --- a/core/src/main/resources/db/migration/V141__roughdraft.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `project` ADD `draft_id` bigint(20) DEFAULT NULL; -ALTER TABLE `project` ADD KEY `FK_draft` (`draft_id`); -ALTER TABLE `project` ADD CONSTRAINT `FK_draft` FOREIGN KEY (`draft_id`) REFERENCES `file_description` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V142__final_seminar_approval.sql b/core/src/main/resources/db/migration/V142__final_seminar_approval.sql deleted file mode 100644 index efb46fb17b..0000000000 --- a/core/src/main/resources/db/migration/V142__final_seminar_approval.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE `Decision` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `reason` varchar(255) DEFAULT NULL, - `status` varchar(255) DEFAULT NULL, - `attachment_id` bigint(20) DEFAULT NULL, - `thesis_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_d3pbhn9dtb5oqmjhpgk5cs4t1` (`attachment_id`), - KEY `FK_s9cnrqblgomd6mhoaet3lgg1b` (`thesis_id`), - CONSTRAINT `FK_s9cnrqblgomd6mhoaet3lgg1b` FOREIGN KEY (`thesis_id`) REFERENCES `file_description` (`id`), - CONSTRAINT `FK_d3pbhn9dtb5oqmjhpgk5cs4t1` FOREIGN KEY (`attachment_id`) REFERENCES `file_description` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `FinalSeminarApproval` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_9lr1dn8boyfc5a0477ld4q8rw` (`project_id`), - CONSTRAINT `FK_9lr1dn8boyfc5a0477ld4q8rw` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `FinalSeminarApproval_Decision` ( - `FinalSeminarApproval_id` bigint(20) NOT NULL, - `decisions_id` bigint(20) NOT NULL, - `decisions_ORDER` int(11) NOT NULL, - PRIMARY KEY (`FinalSeminarApproval_id`,`decisions_ORDER`), - UNIQUE KEY `UK_r1ba76xigvossvqj1vrkxy2cc` (`decisions_id`), - KEY `FK_r1ba76xigvossvqj1vrkxy2cc` (`decisions_id`), - KEY `FK_7g4wtjpvw81tv6hna7vwvu05f` (`FinalSeminarApproval_id`), - CONSTRAINT `FK_7g4wtjpvw81tv6hna7vwvu05f` FOREIGN KEY (`FinalSeminarApproval_id`) REFERENCES `FinalSeminarApproval` (`id`), - CONSTRAINT `FK_r1ba76xigvossvqj1vrkxy2cc` FOREIGN KEY (`decisions_id`) REFERENCES `Decision` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V143__thread_refactoring.sql b/core/src/main/resources/db/migration/V143__thread_refactoring.sql deleted file mode 100644 index bf7f1f2df2..0000000000 --- a/core/src/main/resources/db/migration/V143__thread_refactoring.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE `thread` ( - `id` BIGINT(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `project` bigint(20) NOT NULL, - `subject` varchar(1000) NOT NULL, - KEY `thread_project` (`project`) -) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; - -ALTER TABLE `thread` ADD CONSTRAINT `thread_project` FOREIGN KEY (`project`) REFERENCES `project` (`id`); - -CREATE TABLE `reviewer_thread` ( - `id` BIGINT(20) NOT NULL PRIMARY KEY AUTO_INCREMENT -) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; - -ALTER TABLE `reviewer_thread` ADD CONSTRAINT `reviewer_thread_thread` FOREIGN KEY (`id`) REFERENCES `thread` (`id`); - -INSERT INTO `thread` SELECT `id`, `dateCreated`, `lastModified`, `version`, `deleted`, `project`, `subject` FROM `forum_threads`; - -ALTER TABLE `forum_threads` ADD CONSTRAINT `forum_threads_thread` FOREIGN KEY (`id`) REFERENCES `thread` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V144__drop_thread_columns.sql b/core/src/main/resources/db/migration/V144__drop_thread_columns.sql deleted file mode 100644 index 41b32f9a4c..0000000000 --- a/core/src/main/resources/db/migration/V144__drop_thread_columns.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `forum_threads` DROP COLUMN `dateCreated`; -ALTER TABLE `forum_threads` DROP COLUMN `lastModified`; -ALTER TABLE `forum_threads` DROP COLUMN `version`; -ALTER TABLE `forum_threads` DROP COLUMN `deleted`; - -ALTER TABLE `forum_threads` DROP FOREIGN KEY `FKAF97368B247CE02D`; - -ALTER TABLE `forum_threads` DROP COLUMN `project`; -ALTER TABLE `forum_threads` DROP COLUMN `subject`; diff --git a/core/src/main/resources/db/migration/V145__changed_reference_in_forum_posts.sql b/core/src/main/resources/db/migration/V145__changed_reference_in_forum_posts.sql deleted file mode 100644 index 61be7cc27c..0000000000 --- a/core/src/main/resources/db/migration/V145__changed_reference_in_forum_posts.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `forum_posts` DROP FOREIGN KEY `FKEDDC4F355E9380A1`; -ALTER TABLE `forum_posts` ADD CONSTRAINT `forum_posts_thread` FOREIGN KEY (`thread`) REFERENCES `thread` (`id`); diff --git a/core/src/main/resources/db/migration/V146__rough_draft_approval.sql b/core/src/main/resources/db/migration/V146__rough_draft_approval.sql deleted file mode 100644 index 8841aa84b5..0000000000 --- a/core/src/main/resources/db/migration/V146__rough_draft_approval.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE `RoughDraftApproval` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `rough_draft_approval_project` (`project_id`), - CONSTRAINT `rough_draft_approval_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `RoughDraftApproval_Decision` ( - `RoughDraftApproval_id` bigint(20) NOT NULL, - `decisions_id` bigint(20) NOT NULL, - `decisions_ORDER` int(11) NOT NULL, - PRIMARY KEY (`RoughDraftApproval_id`,`decisions_ORDER`), - UNIQUE KEY `rough_draft_approval_uk` (`decisions_id`), - KEY `rough_draft_approval_decision_decisions` (`decisions_id`), - KEY `rough_draft_approval_decision_rough_draft` (`RoughDraftApproval_id`), - CONSTRAINT `rough_draft_approval_decision_rough_draft` FOREIGN KEY (`RoughDraftApproval_id`) REFERENCES `RoughDraftApproval` (`id`), - CONSTRAINT `rough_draft_approval_decision_decisions` FOREIGN KEY (`decisions_id`) REFERENCES `Decision` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V147__approval_refactoring.sql b/core/src/main/resources/db/migration/V147__approval_refactoring.sql deleted file mode 100644 index 969c10a696..0000000000 --- a/core/src/main/resources/db/migration/V147__approval_refactoring.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE `RoughDraftApproval_Decision`; -DROP TABLE `RoughDraftApproval`; - -RENAME TABLE `FinalSeminarApproval` TO `ReviewerApproval`; -RENAME TABLE `FinalSeminarApproval_Decision` TO `ReviewerApproval_Decision`; - -ALTER TABLE `ReviewerApproval_Decision` DROP FOREIGN KEY `FK_7g4wtjpvw81tv6hna7vwvu05f`; -ALTER TABLE `ReviewerApproval_Decision` CHANGE COLUMN `FinalSeminarApproval_id` `ReviewerApproval_id` bigint(20) not null; -ALTER TABLE `ReviewerApproval_Decision` ADD CONSTRAINT `FK_7g4wtjpvw81tv6hna7vwvu05f` FOREIGN KEY (`ReviewerApproval_id`) REFERENCES `ReviewerApproval` (`id`); - -ALTER TABLE `ReviewerApproval` ADD COLUMN `type` varchar(64) not null; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V148__removed_year_from_annual_review.sql b/core/src/main/resources/db/migration/V148__removed_year_from_annual_review.sql deleted file mode 100644 index 0ad793f104..0000000000 --- a/core/src/main/resources/db/migration/V148__removed_year_from_annual_review.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `AnnualReview` DROP COLUMN `year`; diff --git a/core/src/main/resources/db/migration/V149__remove_draft_from_project.sql b/core/src/main/resources/db/migration/V149__remove_draft_from_project.sql deleted file mode 100644 index aa3edc69e7..0000000000 --- a/core/src/main/resources/db/migration/V149__remove_draft_from_project.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `project` DROP FOREIGN KEY `FK_draft`; -ALTER TABLE `project` DROP COLUMN `draft_id`; diff --git a/core/src/main/resources/db/migration/V14__final_thesis_date_approved.sql b/core/src/main/resources/db/migration/V14__final_thesis_date_approved.sql deleted file mode 100644 index 3db85ee215..0000000000 --- a/core/src/main/resources/db/migration/V14__final_thesis_date_approved.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `FinalThesis` ADD COLUMN `dateApproved` DATE; diff --git a/core/src/main/resources/db/migration/V150__added_events_when_reviewer_steps_are_approved.sql b/core/src/main/resources/db/migration/V150__added_events_when_reviewer_steps_are_approved.sql deleted file mode 100644 index af1aa27460..0000000000 --- a/core/src/main/resources/db/migration/V150__added_events_when_reviewer_steps_are_approved.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `Event` - (`name`, `description`) -VALUES - ('Step.FINAL_SEMINAR_APPROVAL', 'The thesis is approved for final seminar by the reviewer'), - ('Step.ROUGH_DRAFT_APPROVAL', 'Rough draft is approved by the reviewer'); diff --git a/core/src/main/resources/db/migration/V151__added_external_resources.sql b/core/src/main/resources/db/migration/V151__added_external_resources.sql deleted file mode 100644 index 1185ff3870..0000000000 --- a/core/src/main/resources/db/migration/V151__added_external_resources.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `ExternalResource` ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, - `url` VARCHAR(255) NOT NULL, - `label` VARCHAR(255) NOT NULL, - `relevantFor_id` BIGINT(20) NOT NULL, - CONSTRAINT `ExternalResource_ProjectType_relevantFor` FOREIGN KEY (`relevantFor_id`) REFERENCES `ProjectType` (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V152__extended_event_column_to_accomodate_long_enums.sql b/core/src/main/resources/db/migration/V152__extended_event_column_to_accomodate_long_enums.sql deleted file mode 100644 index dc7fe6f201..0000000000 --- a/core/src/main/resources/db/migration/V152__extended_event_column_to_accomodate_long_enums.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `notification_delivery_configuration` MODIFY COLUMN `event` VARCHAR(255) NOT NULL; diff --git a/core/src/main/resources/db/migration/V153__removed_separate_realm_column_from_username.sql b/core/src/main/resources/db/migration/V153__removed_separate_realm_column_from_username.sql deleted file mode 100644 index 8e68c12a86..0000000000 --- a/core/src/main/resources/db/migration/V153__removed_separate_realm_column_from_username.sql +++ /dev/null @@ -1,11 +0,0 @@ --- Clean up -ALTER TABLE `username` DROP KEY `username`; -ALTER TABLE `username` DROP KEY `UK_s525no5d53h1qncd9n3vp3nfw`; -ALTER TABLE `username` DROP KEY `FKF02988D6895349BF`; - --- What the script should be doing --- We skip usernames that already have a @ in them since they are most likely correct already -UPDATE `username` SET `username` = LOWER(CONCAT(`username`, '@', `realm`)) WHERE `username` NOT LIKE '%@%'; -ALTER TABLE `username` DROP COLUMN `realm`; - -ALTER TABLE `username` ADD UNIQUE KEY `username_must_be_unique` (`username`); diff --git a/core/src/main/resources/db/migration/V154__added_evaluation_url.sql b/core/src/main/resources/db/migration/V154__added_evaluation_url.sql deleted file mode 100644 index c0a513d947..0000000000 --- a/core/src/main/resources/db/migration/V154__added_evaluation_url.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `FinalSeminarSettings` ADD COLUMN `evaluationURL` LONGTEXT DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V156__adding_footer_link.sql b/core/src/main/resources/db/migration/V156__adding_footer_link.sql deleted file mode 100644 index 4d91c927ba..0000000000 --- a/core/src/main/resources/db/migration/V156__adding_footer_link.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE IF NOT EXISTS `footer_link` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `footerColumn` varchar(10) NOT NULL, - `title` varchar(255) NOT NULL, - `URL` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V157__made_reason_in_decision_longtext.sql b/core/src/main/resources/db/migration/V157__made_reason_in_decision_longtext.sql deleted file mode 100644 index b924bf58d3..0000000000 --- a/core/src/main/resources/db/migration/V157__made_reason_in_decision_longtext.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `Decision` MODIFY COLUMN `reason` LONGTEXT DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V158__creating_reviewer_deadline_settings.sql b/core/src/main/resources/db/migration/V158__creating_reviewer_deadline_settings.sql deleted file mode 100644 index 0993d77a3b..0000000000 --- a/core/src/main/resources/db/migration/V158__creating_reviewer_deadline_settings.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE IF NOT EXISTS `reviewer_deadline_settings` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `roughDraftApproval` int(11) NOT NULL, - `finalSeminarApproval` int(11) NOT NULL, - `finalGrading` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V159__modifying_approvals.sql b/core/src/main/resources/db/migration/V159__modifying_approvals.sql deleted file mode 100644 index de86c176b5..0000000000 --- a/core/src/main/resources/db/migration/V159__modifying_approvals.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `ReviewerApproval` ADD ( -`dateCreated` datetime NOT NULL, -`lastModified` datetime NOT NULL, -`version` int(11) NOT NULL -); - -UPDATE `ReviewerApproval` SET `dateCreated` = NOW(); -UPDATE `ReviewerApproval` SET `lastModified` = NOW(); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V15__final_thesis_date_rejected.sql b/core/src/main/resources/db/migration/V15__final_thesis_date_rejected.sql deleted file mode 100644 index 0ea6f50779..0000000000 --- a/core/src/main/resources/db/migration/V15__final_thesis_date_rejected.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `FinalThesis` ADD COLUMN `dateRejected` DATE; diff --git a/core/src/main/resources/db/migration/V160__adding_footer_address.sql b/core/src/main/resources/db/migration/V160__adding_footer_address.sql deleted file mode 100644 index 0bce9b89ff..0000000000 --- a/core/src/main/resources/db/migration/V160__adding_footer_address.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE IF NOT EXISTS `footer_address` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `title` varchar(255) NOT NULL, - `address` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V161__added_requested_and_decision_date_to_decision.sql b/core/src/main/resources/db/migration/V161__added_requested_and_decision_date_to_decision.sql deleted file mode 100644 index c68b8a982f..0000000000 --- a/core/src/main/resources/db/migration/V161__added_requested_and_decision_date_to_decision.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `Decision` ADD COLUMN `requested` DATETIME NOT NULL; -ALTER TABLE `Decision` ADD COLUMN `decisionDate` DATETIME DEFAULT NULL; - -UPDATE `Decision` SET `requested` = (SELECT `dateCreated` FROM `file_description` WHERE `id` = `thesis_id`); -UPDATE `Decision` SET `decisionDate` = `requested` WHERE `status` != 'UNDECIDED'; diff --git a/core/src/main/resources/db/migration/V162__change_employee_to_supervisor.sql b/core/src/main/resources/db/migration/V162__change_employee_to_supervisor.sql deleted file mode 100644 index b37dc273dc..0000000000 --- a/core/src/main/resources/db/migration/V162__change_employee_to_supervisor.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `user_role` SET `role` = 'SUPERVISOR' WHERE `role` like 'EMPLOYEE'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V163__change_student_to_author.sql b/core/src/main/resources/db/migration/V163__change_student_to_author.sql deleted file mode 100644 index 5b0fa4598f..0000000000 --- a/core/src/main/resources/db/migration/V163__change_student_to_author.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `user_role` SET `role` = 'AUTHOR' WHERE `role` like 'STUDENT'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V164__added_opposition_priority_days.sql b/core/src/main/resources/db/migration/V164__added_opposition_priority_days.sql deleted file mode 100644 index c29644631b..0000000000 --- a/core/src/main/resources/db/migration/V164__added_opposition_priority_days.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `FinalSeminarSettings` ADD COLUMN `oppositionPriorityDays` INT NOT NULL; diff --git a/core/src/main/resources/db/migration/V165_1__migrated_language_enums_to_database.sql b/core/src/main/resources/db/migration/V165_1__migrated_language_enums_to_database.sql deleted file mode 100644 index bcda6b3c67..0000000000 --- a/core/src/main/resources/db/migration/V165_1__migrated_language_enums_to_database.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `Language` (`dateCreated`, `lastModified`, `version`, `name`) - SELECT NOW(), NOW(), 0, 'Swedish' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `Language` WHERE `name` = 'Swedish'); -INSERT INTO `Language` (`dateCreated`, `lastModified`, `version`, `name`) - SELECT NOW(), NOW(), 0, 'English' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `Language` WHERE `name` = 'English'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V165_2__migrated_final_seminar_language.sql b/core/src/main/resources/db/migration/V165_2__migrated_final_seminar_language.sql deleted file mode 100644 index 0913cf5a9f..0000000000 --- a/core/src/main/resources/db/migration/V165_2__migrated_final_seminar_language.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `final_seminar` ADD COLUMN `reportLanguage_id` BIGINT(20) NOT NULL; -UPDATE `final_seminar` SET `reportLanguage_id` = (SELECT `id` FROM `Language` WHERE UPPER(`name`) = UPPER(`final_seminar`.`reportLanguage`)); -ALTER TABLE `final_seminar` ADD CONSTRAINT `FK_final_seminar_report_language` FOREIGN KEY (`reportLanguage_id`) REFERENCES `Language` (`id`); -ALTER TABLE `final_seminar` DROP COLUMN `reportLanguage`; - -ALTER TABLE `final_seminar` ADD COLUMN `presentationLanguage_id` BIGINT(20) NOT NULL; -UPDATE `final_seminar` SET `presentationLanguage_id` = (SELECT `id` FROM `Language` WHERE UPPER(`name`) = UPPER(`final_seminar`.`presentationLanguage`)); -ALTER TABLE `final_seminar` ADD CONSTRAINT `FK_final_seminar_presentation_language` FOREIGN KEY (`presentationLanguage_id`) REFERENCES `Language` (`id`); -ALTER TABLE `final_seminar` DROP COLUMN `presentationLanguage`; diff --git a/core/src/main/resources/db/migration/V165_3__migrated_idea_to_language_entity.sql b/core/src/main/resources/db/migration/V165_3__migrated_idea_to_language_entity.sql deleted file mode 100644 index 0734c9b41e..0000000000 --- a/core/src/main/resources/db/migration/V165_3__migrated_idea_to_language_entity.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `idea` ADD COLUMN `language_id` BIGINT(20) DEFAULT NULL; -UPDATE `idea` SET `language_id` = (SELECT `id` FROM `Language` WHERE UPPER(`name`) = UPPER(`idea`.`language`)); -ALTER TABLE `idea` ADD CONSTRAINT `FK_idea_language` FOREIGN KEY (`language_id`) REFERENCES `Language` (`id`); -ALTER TABLE `idea` DROP COLUMN `language`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V165_4__migrated_user_to_language_entity.sql b/core/src/main/resources/db/migration/V165_4__migrated_user_to_language_entity.sql deleted file mode 100644 index fd65158f56..0000000000 --- a/core/src/main/resources/db/migration/V165_4__migrated_user_to_language_entity.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `user_languages` ADD COLUMN `language_id` BIGINT(20) NOT NULL; -UPDATE `user_languages` SET `language_id` = (SELECT `id` FROM `Language` WHERE UPPER(`name`) = UPPER(`user_languages`.`languages`)); -ALTER TABLE `user_languages` ADD CONSTRAINT `FK_user_languages_language` FOREIGN KEY (`language_id`) REFERENCES `Language` (`id`); -ALTER TABLE `user_languages` DROP COLUMN `languages`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V166__create_group.sql b/core/src/main/resources/db/migration/V166__create_group.sql deleted file mode 100644 index 0f98f4a5e9..0000000000 --- a/core/src/main/resources/db/migration/V166__create_group.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE IF NOT EXISTS `group` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `title` varchar(250) NOT NULL, - `description` LONGTEXT, - `user_id` bigint(20) NOT NULL, - `active` bit(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - -CREATE TABLE IF NOT EXISTS `group_project` ( - `group_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`group_id`, `project_id`), - KEY `FK_group_id` (`group_id`), - KEY `FK_project_id` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V167__group_fixes.sql b/core/src/main/resources/db/migration/V167__group_fixes.sql deleted file mode 100644 index 7b95dfa936..0000000000 --- a/core/src/main/resources/db/migration/V167__group_fixes.sql +++ /dev/null @@ -1,28 +0,0 @@ -DROP TABLE `group`, `group_project`; - -CREATE TABLE IF NOT EXISTS `project_group` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `title` varchar(255) NOT NULL, - `description` LONGTEXT, - `user_id` bigint(20) NOT NULL, - `active` bit(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - -ALTER TABLE `project_group` ADD CONSTRAINT `FK_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - -CREATE TABLE IF NOT EXISTS `project_group_project` ( - `project_group_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`project_group_id`, `project_id`), - KEY `FK_project_group_id` (`project_group_id`), - KEY `FK_project_id` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `project_group_project` - ADD CONSTRAINT `FK_project_group_id` FOREIGN KEY (`project_group_id`) REFERENCES `project_group` (`id`), - ADD CONSTRAINT `FK_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V168__removing_remote_export_setting.sql b/core/src/main/resources/db/migration/V168__removing_remote_export_setting.sql deleted file mode 100644 index 232ca26480..0000000000 --- a/core/src/main/resources/db/migration/V168__removing_remote_export_setting.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` DROP `remoteExport` ; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V169__group_forum_entities.sql b/core/src/main/resources/db/migration/V169__group_forum_entities.sql deleted file mode 100644 index 88de0bd518..0000000000 --- a/core/src/main/resources/db/migration/V169__group_forum_entities.sql +++ /dev/null @@ -1,52 +0,0 @@ -CREATE TABLE IF NOT EXISTS `group_thread` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `subject` varchar(255) NOT NULL, - `user` bigint(20) NOT NULL, - `project_group` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY (`deleted`), - KEY (`user`), - KEY (`project_group`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - -ALTER TABLE `group_thread` -ADD CONSTRAINT FOREIGN KEY (`user`) REFERENCES `user` (`id`), -ADD CONSTRAINT FOREIGN KEY (`project_group`) REFERENCES `project_group` (`id`); - -CREATE TABLE IF NOT EXISTS `group_post` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `content` LONGTEXT NOT NULL, - `user` bigint(20) NOT NULL, - `group_thread` bigint(20) NOT NULL, - `attachment` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY (`deleted`), - KEY (`user`), - KEY (`group_thread`), - KEY (`attachment`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - -ALTER TABLE `group_post` -ADD CONSTRAINT FOREIGN KEY (`user`) REFERENCES `user` (`id`), -ADD CONSTRAINT FOREIGN KEY (`group_thread`) REFERENCES `group_thread` (`id`), -ADD CONSTRAINT FOREIGN KEY (`attachment`) REFERENCES `file_description` (`id`); - -CREATE TABLE IF NOT EXISTS `group_thread_group_post` ( - `group_thread` bigint(20) NOT NULL, - `group_post` bigint(20) NOT NULL, - PRIMARY KEY (`group_thread`, `group_post`), - KEY (`group_thread`), - KEY (`group_post`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `group_thread_group_post` -ADD CONSTRAINT FOREIGN KEY (`group_thread`) REFERENCES `group_thread` (`id`), -ADD CONSTRAINT FOREIGN KEY (`group_post`) REFERENCES `group_post` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V16__grading_report_export.sql b/core/src/main/resources/db/migration/V16__grading_report_export.sql deleted file mode 100644 index 3ba9c8c398..0000000000 --- a/core/src/main/resources/db/migration/V16__grading_report_export.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE `daisy_grading_report_export` ( - gradingReport_id BIGINT(20) NOT NULL, - PRIMARY KEY (`gradingReport_id`), - CONSTRAINT `grading_report_export_grading_report` FOREIGN KEY (`gradingReport_id`) REFERENCES `grading_report` (`id`) -) ENGINE =InnoDB DEFAULT CHARSET =latin1; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V170__system_modules.sql b/core/src/main/resources/db/migration/V170__system_modules.sql deleted file mode 100644 index c76ea22c86..0000000000 --- a/core/src/main/resources/db/migration/V170__system_modules.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE IF NOT EXISTS `general_system_settings_system_modules` ( - `GeneralSystemSettings_id` bigint(20) NOT NULL, - `systemModules` varchar(255) NOT NULL, - KEY (`GeneralSystemSettings_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `general_system_settings_system_modules` -ADD CONSTRAINT FOREIGN KEY (`GeneralSystemSettings_id`) REFERENCES `general_system_settings` (`id`), -ADD PRIMARY KEY (`GeneralSystemSettings_id`, `systemModules`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V171__renaming_modules.sql b/core/src/main/resources/db/migration/V171__renaming_modules.sql deleted file mode 100644 index a320f48353..0000000000 --- a/core/src/main/resources/db/migration/V171__renaming_modules.sql +++ /dev/null @@ -1,4 +0,0 @@ -RENAME TABLE `project_type_modules` TO `project_type_project_modules`; -ALTER TABLE `project_type_project_modules` -CHANGE `modules` `projectModules` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, -ADD PRIMARY KEY (`ProjectType_id`, `projectModules`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V172__refactor_forum_entities.sql b/core/src/main/resources/db/migration/V172__refactor_forum_entities.sql deleted file mode 100644 index 7e046b5112..0000000000 --- a/core/src/main/resources/db/migration/V172__refactor_forum_entities.sql +++ /dev/null @@ -1,75 +0,0 @@ -# trailing s in table name annoying, removing -RENAME TABLE `forum_threads` TO `forum_thread`; -RENAME TABLE `forum_posts` TO `forum_post`; -RENAME TABLE `forum_posts_read` TO `forum_post_read`; - -# this is redundant, we can get it from the first posts user -ALTER TABLE `forum_thread` DROP FOREIGN KEY `FKAF97368B924F477B`; -# ALTER TABLE `forum_thread` DROP KEY `FKEDDC4F35924F477B`; this doesn't appear to exist -ALTER TABLE `forum_thread` DROP `user`; - -# create new middle table for threads connected to projects -CREATE TABLE IF NOT EXISTS `project_thread` ( -`id` bigint(20) NOT NULL AUTO_INCREMENT, -`project` bigint(20) NOT NULL, -PRIMARY KEY (`id`), -KEY (`project`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `project_thread` -ADD CONSTRAINT FOREIGN KEY (`project`) REFERENCES `project` (`id`), -ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `thread` (`id`); - -INSERT INTO `project_thread`(`id`, `project`) - SELECT `id`, `project` FROM `thread`; - -# remove connection to project from thread -ALTER TABLE `thread` DROP FOREIGN KEY `thread_project`; -ALTER TABLE `thread` DROP KEY `thread_project`; -ALTER TABLE `thread` DROP `project`; - -# point id to project_thread id instead of thread id -ALTER TABLE `forum_thread` DROP FOREIGN KEY `forum_threads_thread`; -ALTER TABLE `forum_thread` ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `project_thread` (`id`); - -# point id to project_thread id instead of thread id -ALTER TABLE `reviewer_thread` DROP FOREIGN KEY `reviewer_thread_thread`; -ALTER TABLE `reviewer_thread` ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `project_thread` (`id`); - -# drop old separate group tables -ALTER TABLE `group_thread` -DROP FOREIGN KEY `group_thread_ibfk_1`, -DROP FOREIGN KEY `group_thread_ibfk_2`, -DROP KEY `user`, -DROP KEY `project_group`; - -ALTER TABLE `group_post` -DROP FOREIGN KEY `group_post_ibfk_1`, -DROP FOREIGN KEY `group_post_ibfk_2`, -DROP FOREIGN KEY `group_post_ibfk_3`, -DROP KEY `deleted`, -DROP KEY `user`, -DROP KEY `group_thread`, -DROP KEY `attachment`; - -ALTER TABLE `group_thread_group_post` -DROP FOREIGN KEY `group_thread_group_post_ibfk_1`, -DROP FOREIGN KEY `group_thread_group_post_ibfk_2`, -DROP KEY `group_thread`, -DROP KEY `group_post`; - -DROP TABLE `group_thread_group_post`; -DROP TABLE `group_post`; -DROP TABLE `group_thread`; - -# create new group thread table -CREATE TABLE IF NOT EXISTS `project_group_thread` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `project_group` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY (`project_group`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `project_group_thread` -ADD CONSTRAINT FOREIGN KEY (`project_group`) REFERENCES `project_group` (`id`), -ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `thread` (`id`); diff --git a/core/src/main/resources/db/migration/V173__urls_and_notifications.sql b/core/src/main/resources/db/migration/V173__urls_and_notifications.sql deleted file mode 100644 index 29d0e60490..0000000000 --- a/core/src/main/resources/db/migration/V173__urls_and_notifications.sql +++ /dev/null @@ -1,11 +0,0 @@ -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, 'wicket/bookmarkable/se.su.dsv.scipro.supervisor.pages.SupervisorInteractWithReviewerPage', 'supervisor/interactwithreviewer') -WHERE absoluteURL LIKE '%wicket/bookmarkable/se.su.dsv.scipro.supervisor.pages.SupervisorInteractWithReviewerPage%'; - -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, 'wicket/bookmarkable/se.su.dsv.scipro.reviewer.ReviewerInteractionPage', 'supervisor/interactwithsupervisor') -WHERE absoluteURL LIKE '%wicket/bookmarkable/se.su.dsv.scipro.reviewer.ReviewerInteractionPage%'; - -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, 'wicket/bookmarkable/se.su.dsv.scipro.seminar.pages.ProjectFinalSeminarDetailsPage', 'project/finalseminardetails') -WHERE absoluteURL LIKE '%wicket/bookmarkable/se.su.dsv.scipro.seminar.pages.ProjectFinalSeminarDetailsPage%'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V174__thread_urls_and_notifications.sql b/core/src/main/resources/db/migration/V174__thread_urls_and_notifications.sql deleted file mode 100644 index e2ee6e82f0..0000000000 --- a/core/src/main/resources/db/migration/V174__thread_urls_and_notifications.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE Notification -SET absoluteURL = REPLACE(absoluteURL, 'ftid=', 'tid=') -WHERE absoluteURL LIKE '%ftid=%'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V175__group_id.sql b/core/src/main/resources/db/migration/V175__group_id.sql deleted file mode 100644 index da608bf474..0000000000 --- a/core/src/main/resources/db/migration/V175__group_id.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `NotificationData` ADD `group_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `NotificationData` ADD CONSTRAINT `notificationdata_group_id` FOREIGN KEY (`group_id`) REFERENCES `project_group` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V176__turnitinsettings_changes.sql b/core/src/main/resources/db/migration/V176__turnitinsettings_changes.sql deleted file mode 100644 index 8a2e665b26..0000000000 --- a/core/src/main/resources/db/migration/V176__turnitinsettings_changes.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `TurnitinSettings` -ADD `enabled` tinyint(1) NOT NULL, -ADD `integrationId` int(11) NOT NULL, -ADD `integrationURL` varchar(255) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V177__hash.sql b/core/src/main/resources/db/migration/V177__hash.sql deleted file mode 100644 index 834b2b58d1..0000000000 --- a/core/src/main/resources/db/migration/V177__hash.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE IF NOT EXISTS `hash` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `user` bigint(20) NOT NULL, - `hash` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY (`user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - -ALTER TABLE `hash` -ADD CONSTRAINT FOREIGN KEY (`user`) REFERENCES `user` (`id`); - -ALTER TABLE `NotificationData` ADD `user_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `NotificationData` ADD CONSTRAINT `notificationdata_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V178__forum_mail_settings.sql b/core/src/main/resources/db/migration/V178__forum_mail_settings.sql deleted file mode 100644 index a3728f34a6..0000000000 --- a/core/src/main/resources/db/migration/V178__forum_mail_settings.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE `forum_mail_settings` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `incomingMailAddress` varchar(255) DEFAULT NULL, - `incomingMailPort` int(4) DEFAULT NULL, - `replyAddress` varchar(255) DEFAULT NULL, - `password` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V179__added_message-ID_to_mail_event.sql b/core/src/main/resources/db/migration/V179__added_message-ID_to_mail_event.sql deleted file mode 100644 index fb862c5639..0000000000 --- a/core/src/main/resources/db/migration/V179__added_message-ID_to_mail_event.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `mail_event` ADD COLUMN `messageID` VARCHAR(255) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V17__removed_user_settings.sql b/core/src/main/resources/db/migration/V17__removed_user_settings.sql deleted file mode 100644 index 2b101e11a6..0000000000 --- a/core/src/main/resources/db/migration/V17__removed_user_settings.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `user_settings`; diff --git a/core/src/main/resources/db/migration/V180__added_forum_mail.sql b/core/src/main/resources/db/migration/V180__added_forum_mail.sql deleted file mode 100644 index 42c7dc796f..0000000000 --- a/core/src/main/resources/db/migration/V180__added_forum_mail.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE `forum_mail` ( - `id` BIGINT(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` INT(11) NOT NULL, - `mailEvent_id` BIGINT(20) NOT NULL, - `user_id` BIGINT(20) NOT NULL, - `thread_id` BIGINT(20) NOT NULL, - CONSTRAINT `FK_forum_mail_mail_event` FOREIGN KEY (`mailEvent_id`) REFERENCES `mail_event` (`id`), - CONSTRAINT `FK_forum_mail_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - CONSTRAINT `FK_forum_mail_thread` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V181__added_file_to_mail.sql b/core/src/main/resources/db/migration/V181__added_file_to_mail.sql deleted file mode 100644 index 9593269e95..0000000000 --- a/core/src/main/resources/db/migration/V181__added_file_to_mail.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `mail_event` ADD `attachment_id` bigint(20) DEFAULT NULL; -ALTER TABLE `mail_event` ADD KEY (`attachment_id`); -ALTER TABLE `mail_event` ADD CONSTRAINT FOREIGN KEY (`attachment_id`) REFERENCES `file_description` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V182__idea_have_many_languages.sql b/core/src/main/resources/db/migration/V182__idea_have_many_languages.sql deleted file mode 100644 index aef7929285..0000000000 --- a/core/src/main/resources/db/migration/V182__idea_have_many_languages.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE `idea_language` ( - `idea_id` BIGINT(20) NOT NULL, - `language_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`idea_id`, language_id), - CONSTRAINT `FK_idea_language_idea` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`), - CONSTRAINT `FK_idea_language_language` FOREIGN KEY (`language_id`) REFERENCES `Language` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - -INSERT INTO `idea_language` (`idea_id`, `language_id`) SELECT `id`, `language_id` FROM `idea` WHERE `language_id` IS NOT NULL; - -ALTER TABLE `idea` DROP FOREIGN KEY `FK_idea_language`; -ALTER TABLE `idea` DROP COLUMN `language_id`; diff --git a/core/src/main/resources/db/migration/V183__added_gravatar.sql b/core/src/main/resources/db/migration/V183__added_gravatar.sql deleted file mode 100644 index 5a4624289b..0000000000 --- a/core/src/main/resources/db/migration/V183__added_gravatar.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `showGravatar` BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V184__adding_editable_to_activity.sql b/core/src/main/resources/db/migration/V184__adding_editable_to_activity.sql deleted file mode 100644 index d64319640e..0000000000 --- a/core/src/main/resources/db/migration/V184__adding_editable_to_activity.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `Activity` ADD `editable` bit(1) NOT NULL DEFAULT 1; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V185__made_firstname_lastname_email_required.sql b/core/src/main/resources/db/migration/V185__made_firstname_lastname_email_required.sql deleted file mode 100644 index f5eb189370..0000000000 --- a/core/src/main/resources/db/migration/V185__made_firstname_lastname_email_required.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `user` MODIFY COLUMN `firstName` VARCHAR(255) NOT NULL; -ALTER TABLE `user` MODIFY COLUMN `lastName` VARCHAR(255) NOT NULL; -ALTER TABLE `user` MODIFY COLUMN `emailAddress` VARCHAR(255) NOT NULL; diff --git a/core/src/main/resources/db/migration/V186__rename_forum_mail_settings.sql b/core/src/main/resources/db/migration/V186__rename_forum_mail_settings.sql deleted file mode 100644 index 63c64e5073..0000000000 --- a/core/src/main/resources/db/migration/V186__rename_forum_mail_settings.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `forum_mail_settings` CHANGE COLUMN `incomingMailAddress` `host` VARCHAR(255) DEFAULT NULL; -ALTER TABLE `forum_mail_settings` CHANGE COLUMN `incomingMailPort` `port` INT(5) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V187__added_separate_account_to_forum_mail_settings.sql b/core/src/main/resources/db/migration/V187__added_separate_account_to_forum_mail_settings.sql deleted file mode 100644 index 041b8562fe..0000000000 --- a/core/src/main/resources/db/migration/V187__added_separate_account_to_forum_mail_settings.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `forum_mail_settings` ADD COLUMN `account` VARCHAR(255) DEFAULT NULL; -UPDATE `forum_mail_settings` SET `account` = `replyAddress`; diff --git a/core/src/main/resources/db/migration/V188__adding_notes.sql b/core/src/main/resources/db/migration/V188__adding_notes.sql deleted file mode 100644 index 258c8f3741..0000000000 --- a/core/src/main/resources/db/migration/V188__adding_notes.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE IF NOT EXISTS `note` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `user_id` bigint(20) NOT NULL, - `content` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT = 1; - -ALTER TABLE `note` ADD CONSTRAINT FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V189__plugins.sql b/core/src/main/resources/db/migration/V189__plugins.sql deleted file mode 100644 index 74eb031fd3..0000000000 --- a/core/src/main/resources/db/migration/V189__plugins.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE `plugin_settings` ( - `pluginName` VARCHAR(255) NOT NULL, - `enabled` BOOLEAN NOT NULL DEFAULT FALSE, - PRIMARY KEY (`pluginName`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V18__convert_entire_database_to_utf8.sql b/core/src/main/resources/db/migration/V18__convert_entire_database_to_utf8.sql deleted file mode 100644 index afcf929a2f..0000000000 --- a/core/src/main/resources/db/migration/V18__convert_entire_database_to_utf8.sql +++ /dev/null @@ -1,93 +0,0 @@ -ALTER TABLE `ApplicationPeriod` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `ApplicationPeriod_project_class` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `CheckListTemplate_questions` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `CheckList_userLastOpenDate` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Employee_Language` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `FinalSeminarSettings` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `FinalSeminarSettings_punishMails` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `FinalThesis` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Keyword` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Keyword_researcharea` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Language` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `MailEvent_nonUserRecipients` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `NonWorkDayPeriod` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Notification` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `NotificationData` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Password` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `Program` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `SupervisorNotificationSettings` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `TurnitinSettings` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `TurnitinSettings_expirationMails` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `answer` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `applicationperiodexemption` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_answer` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_category` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_checklist_category` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_checklist_question` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_question` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_question_checklist_answer` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_template` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `checklist_template_checklist_category` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `comment` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `comment_thread` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `daisy_grading_report_export` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `employee_researcharea` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `file_description` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `final_seminar` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `final_seminar_active_participation` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `final_seminar_opposition` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `final_seminar_thesis_review` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `forum_posts` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `forum_posts_read` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `forum_threads` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `general_system_settings` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `general_system_settings_alarm_recipients` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `general_system_settings_supervisor_change_recipients` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `grading_answer` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `grading_criterion` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `grading_report` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `grading_report_template` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `hibernate_sequences` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea_Keyword` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea_export` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea_first_meeting` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea_match` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `idea_student` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `mail_event` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `mail_event_recipients` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `mail_event_reply_to` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `milestone` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `milestone_activity` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `milestone_activity_project_class` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `milestone_phase` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `notification_delivery_configuration` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `notification_event_configuration` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `notification_receiver_configuration` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `peer_request` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `peer_review` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `projectPartner` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_checklist` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_class` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_class_settings` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_event_template` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_follower` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_schedule` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_schedule_event` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `project_student` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `question` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `researcharea` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `review_rating` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `role` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `role_Program` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `schedule_template` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `settings_date` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `target` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `turnitincheck` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `unit` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `user` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `user_profile` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `username` CONVERT TO CHARACTER SET utf8; -ALTER TABLE `worker_data` CONVERT TO CHARACTER SET utf8; diff --git a/core/src/main/resources/db/migration/V190__activity_forum.sql b/core/src/main/resources/db/migration/V190__activity_forum.sql deleted file mode 100644 index 66769e5c98..0000000000 --- a/core/src/main/resources/db/migration/V190__activity_forum.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `activity_thread` ( - `thread_id` BIGINT(20) NOT NULL, - `activity_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`thread_id`, `activity_id`), - CONSTRAINT `FK_activity_thread_thread` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `FK_activity_thread_activity` FOREIGN KEY (`activity_id`) REFERENCES `Activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V191__add_match_responsible_mail.sql b/core/src/main/resources/db/migration/V191__add_match_responsible_mail.sql deleted file mode 100644 index 0ba3619de1..0000000000 --- a/core/src/main/resources/db/migration/V191__add_match_responsible_mail.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD `matchResponsibleMail` varchar(255) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V192__add_forum_post_id_to_notification_data.sql b/core/src/main/resources/db/migration/V192__add_forum_post_id_to_notification_data.sql deleted file mode 100644 index ba3bf76d95..0000000000 --- a/core/src/main/resources/db/migration/V192__add_forum_post_id_to_notification_data.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `NotificationData` ADD `forumPost_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `NotificationData` ADD CONSTRAINT `notificationdata_forum_post_id` FOREIGN KEY (`forumPost_id`) REFERENCES `forum_post` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V193__update_old_notification_data.sql b/core/src/main/resources/db/migration/V193__update_old_notification_data.sql deleted file mode 100644 index 1e2e3b65ff..0000000000 --- a/core/src/main/resources/db/migration/V193__update_old_notification_data.sql +++ /dev/null @@ -1,2 +0,0 @@ -update NotificationData set type='FORUM', DTYPE='ProjectForumEvent' -where (event='NEW_FORUM_POST' or event='NEW_REVIEWER_INTERACTION' or event='NEW_FORUM_POST_COMMENT') and type='PROJECT'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V194__added_creation_reason_to_final_seminar.sql b/core/src/main/resources/db/migration/V194__added_creation_reason_to_final_seminar.sql deleted file mode 100644 index e4d6f7f60a..0000000000 --- a/core/src/main/resources/db/migration/V194__added_creation_reason_to_final_seminar.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `final_seminar` ADD COLUMN `creationReason` TINYTEXT DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V195__remove_communication_from_title_in_reviewer_thread.sql b/core/src/main/resources/db/migration/V195__remove_communication_from_title_in_reviewer_thread.sql deleted file mode 100644 index a4a7342176..0000000000 --- a/core/src/main/resources/db/migration/V195__remove_communication_from_title_in_reviewer_thread.sql +++ /dev/null @@ -1 +0,0 @@ -update thread set subject='' where subject='Communication'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V196__remove_unused_grading_report_exporter.sql b/core/src/main/resources/db/migration/V196__remove_unused_grading_report_exporter.sql deleted file mode 100644 index d91fef1acd..0000000000 --- a/core/src/main/resources/db/migration/V196__remove_unused_grading_report_exporter.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `daisy_grading_report_export`; diff --git a/core/src/main/resources/db/migration/V197__made_supervisor_not_null_in_project.sql b/core/src/main/resources/db/migration/V197__made_supervisor_not_null_in_project.sql deleted file mode 100644 index 73f93fd4f4..0000000000 --- a/core/src/main/resources/db/migration/V197__made_supervisor_not_null_in_project.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project` MODIFY COLUMN `supervisor_id` BIGINT(20) NOT NULL; diff --git a/core/src/main/resources/db/migration/V198__naming_conventions.sql b/core/src/main/resources/db/migration/V198__naming_conventions.sql deleted file mode 100644 index fca3854e8c..0000000000 --- a/core/src/main/resources/db/migration/V198__naming_conventions.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `footer_link` CHANGE `URL` `url` VARCHAR( 255 ); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V199__added_state_to_grading_report.sql b/core/src/main/resources/db/migration/V199__added_state_to_grading_report.sql deleted file mode 100644 index 8df618a29d..0000000000 --- a/core/src/main/resources/db/migration/V199__added_state_to_grading_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `GradingReport` ADD COLUMN `state` VARCHAR(16) NOT NULL DEFAULT 'INITIAL'; -UPDATE `GradingReport` SET `state` = 'FINALIZED' WHERE `id` IN (SELECT `id` FROM `report` WHERE `submitted` IS TRUE); diff --git a/core/src/main/resources/db/migration/V19__remove_suggested_match_status.sql b/core/src/main/resources/db/migration/V19__remove_suggested_match_status.sql deleted file mode 100644 index 7c443ccd74..0000000000 --- a/core/src/main/resources/db/migration/V19__remove_suggested_match_status.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `idea_match` SET `status` = "UNMATCHED" WHERE `status` = "SUGGESTED"; diff --git a/core/src/main/resources/db/migration/V1__Initial_Setup.sql b/core/src/main/resources/db/migration/V1__Initial_Setup.sql deleted file mode 100644 index 07f0622ba4..0000000000 --- a/core/src/main/resources/db/migration/V1__Initial_Setup.sql +++ /dev/null @@ -1,2207 +0,0 @@ --- --- Database: `scipro` --- - --- -------------------------------------------------------- - --- --- Table structure for table `answer` --- - -CREATE TABLE IF NOT EXISTS `answer` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `freeTextAnswer` longtext, - `peerReview_id` bigint(20) NOT NULL, - `question_id` bigint(20) NOT NULL, - `answer` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FKABCA3FBE2C41A959` (`peerReview_id`), - KEY `FKABCA3FBE4236D179` (`question_id`), - KEY `FK_64r70sbiishrkuj1vn87vo53k` (`peerReview_id`), - KEY `FK_eix9du6u2r4wxwu415wq8yb99` (`question_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6950 ; - --- -------------------------------------------------------- - --- --- Table structure for table `ApplicationPeriod` --- - -CREATE TABLE IF NOT EXISTS `ApplicationPeriod` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `endDate` datetime NOT NULL, - `name` varchar(255) NOT NULL, - `startDate` datetime NOT NULL, - `courseStartDate` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ; - --- -------------------------------------------------------- - --- --- Table structure for table `applicationperiodexemption` --- - -CREATE TABLE IF NOT EXISTS `applicationperiodexemption` ( - `applicationPeriodId` bigint(20) NOT NULL, - `studentId` bigint(20) NOT NULL, - `until` datetime NOT NULL, - `comment` varchar(255) DEFAULT NULL, - `grantedOn` datetime NOT NULL, - `grantedBy_id` bigint(20) NOT NULL, - PRIMARY KEY (`applicationPeriodId`,`studentId`), - KEY `FK34182FD8790761A4` (`applicationPeriodId`), - KEY `FKCB7E71913353DC5C` (`studentId`), - KEY `FK34182FD8DEC4D3D8` (`grantedBy_id`), - KEY `FK_4p3he5fymtmdgbkl3xwrodq36` (`grantedBy_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `ApplicationPeriod_project_class` --- - -CREATE TABLE IF NOT EXISTS `ApplicationPeriod_project_class` ( - `ApplicationPeriod_id` bigint(20) NOT NULL, - `projectClass_id` bigint(20) NOT NULL, - PRIMARY KEY (`ApplicationPeriod_id`,`projectClass_id`), - KEY `FK97FDEC24BEC322C1` (`ApplicationPeriod_id`), - KEY `FK97FDEC24B2B6081F` (`projectClass_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist` --- - -CREATE TABLE IF NOT EXISTS `checklist` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `name` varchar(255) NOT NULL, - `project_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK17CCD1A6C1813915` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5076 ; - --- -------------------------------------------------------- - --- --- Table structure for table `CheckListTemplate_questions` --- - -CREATE TABLE IF NOT EXISTS `CheckListTemplate_questions` ( - `CheckListTemplate_id` bigint(20) NOT NULL, - `questions` longtext, - KEY `FK872F7C0E869F0235` (`CheckListTemplate_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_answer` --- - -CREATE TABLE IF NOT EXISTS `checklist_answer` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `answer` varchar(255) NOT NULL, - `comment` longtext, - `user_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK49936477895349BF` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5352 ; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_category` --- - -CREATE TABLE IF NOT EXISTS `checklist_category` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `categoryName` varchar(255) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `categoryName` (`categoryName`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_checklist_category` --- - -CREATE TABLE IF NOT EXISTS `checklist_checklist_category` ( - `checklist_id` bigint(20) NOT NULL, - `categories_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - KEY `FK54F86EB08725F1D` (`categories_id`), - KEY `FK54F86EB01F327355` (`checklist_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_checklist_question` --- - -CREATE TABLE IF NOT EXISTS `checklist_checklist_question` ( - `checklist_id` bigint(20) NOT NULL, - `questions_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`checklist_id`,`questions_id`), - UNIQUE KEY `questions_id` (`questions_id`), - UNIQUE KEY `UK_o5ndj9lydqv17attv7uf8wlr` (`questions_id`), - KEY `FKC77ED98C64F9D54` (`questions_id`), - KEY `FKC77ED981F327355` (`checklist_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_question` --- - -CREATE TABLE IF NOT EXISTS `checklist_question` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `question` longtext NOT NULL, - `questionNumber` int(11) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=50911 ; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_question_checklist_answer` --- - -CREATE TABLE IF NOT EXISTS `checklist_question_checklist_answer` ( - `checklist_question_id` bigint(20) NOT NULL, - `answers_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - UNIQUE KEY `answers_id` (`answers_id`), - UNIQUE KEY `UK_47is0po5b69467hxbgr4a2gph` (`answers_id`), - KEY `FK86395A574BFBD702` (`checklist_question_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_template` --- - -CREATE TABLE IF NOT EXISTS `checklist_template` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `name` varchar(255) NOT NULL, - `creator_id` bigint(20) NOT NULL, - `numberOfQuestions` int(11) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `templateNumber` int(11) NOT NULL DEFAULT '999', - PRIMARY KEY (`id`), - KEY `FK14DA6F3E44F4DBE` (`creator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=50 ; - --- -------------------------------------------------------- - --- --- Table structure for table `checklist_template_checklist_category` --- - -CREATE TABLE IF NOT EXISTS `checklist_template_checklist_category` ( - `checklist_template_id` bigint(20) NOT NULL, - `categories_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - KEY `FK4E82F44372B51E82` (`checklist_template_id`), - KEY `FK4E82F4438725F1D` (`categories_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `CheckList_userLastOpenDate` --- - -CREATE TABLE IF NOT EXISTS `CheckList_userLastOpenDate` ( - `CheckList_id` bigint(20) NOT NULL, - `userLastOpenDate` datetime DEFAULT NULL, - `userLastOpenDate_KEY` bigint(20) NOT NULL, - PRIMARY KEY (`CheckList_id`,`userLastOpenDate_KEY`), - KEY `FKF7E07AB26D025A9` (`userLastOpenDate_KEY`), - KEY `FKF7E07AB21F327355` (`CheckList_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `comment` --- - -CREATE TABLE IF NOT EXISTS `comment` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `comment` longtext, - `commentThread_id` bigint(20) NOT NULL, - `creator_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK38A5EE5F45F802F5` (`commentThread_id`), - KEY `FK38A5EE5FE44F4DBE` (`creator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3538960 ; - --- -------------------------------------------------------- - --- --- Table structure for table `comment_thread` --- - -CREATE TABLE IF NOT EXISTS `comment_thread` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `commentableId` bigint(20) NOT NULL, - `commentableKey` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `commentableKey` (`commentableKey`,`commentableId`), - UNIQUE KEY `UK_s0ve8ppa3snl8i1wocqwiuwn2` (`commentableKey`,`commentableId`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2104 ; - --- -------------------------------------------------------- - --- --- Table structure for table `Employee_Language` --- - -CREATE TABLE IF NOT EXISTS `Employee_Language` ( - `role_id` bigint(20) NOT NULL, - `languages_id` bigint(20) NOT NULL, - PRIMARY KEY (`role_id`,`languages_id`), - KEY `FK603173EA55E687C` (`languages_id`), - KEY `FK603173EA7B617197` (`role_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `employee_researcharea` --- - -CREATE TABLE IF NOT EXISTS `employee_researcharea` ( - `role_id` bigint(20) NOT NULL, - `researchAreas_id` bigint(20) NOT NULL, - PRIMARY KEY (`role_id`,`researchAreas_id`), - KEY `employee_researcharea_key` (`role_id`), - KEY `employee_researcharea_key2` (`researchAreas_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `file_description` --- - -CREATE TABLE IF NOT EXISTS `file_description` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `identifier` varchar(255) DEFAULT NULL, - `mimeType` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `path` varchar(255) DEFAULT NULL, - `size` bigint(20) DEFAULT NULL, - `targetLastModified` datetime DEFAULT NULL, - `userId` bigint(20) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `isThesisFile` bit(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `file_description_path_index` (`path`), - KEY `file_description_identifier_index` (`identifier`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3007 ; - --- -------------------------------------------------------- - --- --- Table structure for table `FinalSeminarSettings` --- - -CREATE TABLE IF NOT EXISTS `FinalSeminarSettings` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `daysAheadThesisCommentToRemind` int(11) NOT NULL, - `daysAheadToCreate` int(11) NOT NULL, - `daysAheadToRegisterOpposition` int(11) NOT NULL, - `daysAheadToRegisterParticipation` int(11) NOT NULL, - `daysAheadToUploadThesis` int(11) NOT NULL, - `daysAheadToUploadThesisReview` int(11) NOT NULL, - `examinerThesisReviewsMandatory` tinyint(1) NOT NULL, - `reviewerThesisReviewsMandatory` tinyint(1) NOT NULL, - `supervisorThesisReviewsMandatory` tinyint(1) NOT NULL, - `thesisMustBePDF` tinyint(1) NOT NULL, - `thesisReviewsEnabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `FinalSeminarSettings_punishMails` --- - -CREATE TABLE IF NOT EXISTS `FinalSeminarSettings_punishMails` ( - `FinalSeminarSettings_id` bigint(20) NOT NULL, - `punishMails` varchar(255) DEFAULT NULL, - KEY `FK373B1D06BB47DEDF` (`FinalSeminarSettings_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `final_seminar` --- - -CREATE TABLE IF NOT EXISTS `final_seminar` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `documentUploadDate` datetime DEFAULT NULL, - `endDate` datetime DEFAULT NULL, - `room` varchar(255) NOT NULL, - `startDate` datetime NOT NULL, - `document_id` bigint(20) DEFAULT NULL, - `documentUploader_id` bigint(20) DEFAULT NULL, - `project_id` bigint(20) NOT NULL, - `presentationLanguage` varchar(255) NOT NULL, - `reportLanguage` varchar(255) NOT NULL, - `checkedForPlagirism` bit(1) DEFAULT NULL, - `turnitinId` varchar(255) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `maxOpponents` int(11) NOT NULL, - `maxParticipants` int(11) NOT NULL, - `examiner_id` bigint(20) DEFAULT NULL, - `deleted` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_rv1p7wl0dnj25saiarmk55yvr` (`project_id`), - KEY `FK49900D2844AF969A` (`document_id`), - KEY `FK49900D284C97041` (`documentUploader_id`), - KEY `FK49900D28C1813915` (`project_id`), - KEY `FK49900D2873048D7F` (`examiner_id`), - KEY `deleted_index` (`deleted`), - KEY `FK_41udcn88r6uugt3ptbelflph6` (`document_id`), - KEY `FK_rv1p7wl0dnj25saiarmk55yvr` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1215 ; - --- -------------------------------------------------------- - --- --- Table structure for table `final_seminar_active_participation` --- - -CREATE TABLE IF NOT EXISTS `final_seminar_active_participation` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `preDeleted` bit(1) NOT NULL, - `finalSeminar_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - `user_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK35AB727FF583C69F` (`finalSeminar_id`), - KEY `FK35AB727FC1813915` (`project_id`), - KEY `FK35AB727F895349BF` (`user_id`), - KEY `FK_mk920fce29yhjgv33wr69fe8a` (`finalSeminar_id`), - KEY `FK_3si3rx7tv6ke9oeiq0hts3lm0` (`project_id`), - KEY `FK_hf9puequi3ygf518hi6b1js2m` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3597 ; - --- -------------------------------------------------------- - --- --- Table structure for table `final_seminar_opposition` --- - -CREATE TABLE IF NOT EXISTS `final_seminar_opposition` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `dateReported` datetime DEFAULT NULL, - `finalSeminar_id` bigint(20) NOT NULL, - `opponent_id` bigint(20) NOT NULL, - `opponentReport_id` bigint(20) DEFAULT NULL, - `project_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK8CD13581F583C69F` (`finalSeminar_id`), - KEY `FK8CD135812AFD4724` (`opponentReport_id`), - KEY `FK8CD13581C1813915` (`project_id`), - KEY `FK8CD135819EC40373` (`opponent_id`), - KEY `FK_62i59u7j6x5ma0iydx9no6m4i` (`finalSeminar_id`), - KEY `FK_esjegfl5vokjy9u63u1dh1muh` (`opponent_id`), - KEY `FK_7j5k6jia1rrgxkmish6153hfp` (`opponentReport_id`), - KEY `FK_hilhyo3tgq89pm27i4pxjaua` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1977 ; - --- -------------------------------------------------------- - --- --- Table structure for table `final_seminar_thesis_review` --- - -CREATE TABLE IF NOT EXISTS `final_seminar_thesis_review` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `finalSeminar_id` bigint(20) NOT NULL, - `thesisReview_id` bigint(20) DEFAULT NULL, - `uploader_id` bigint(20) NOT NULL, - `comment` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `thesisReview_id` (`thesisReview_id`), - KEY `FKE045D554F583C69F` (`finalSeminar_id`), - KEY `FKE045D5541AAF75F1` (`thesisReview_id`), - KEY `FKE045D554D1E6703C` (`uploader_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ; - --- -------------------------------------------------------- - --- --- Table structure for table `forum_posts` --- - -CREATE TABLE IF NOT EXISTS `forum_posts` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `content` longtext NOT NULL, - `user` bigint(20) NOT NULL, - `thread` bigint(20) NOT NULL, - `attachment_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKEDDC4F35924F477B` (`user`), - KEY `FKEDDC4F355E9380A1` (`thread`), - KEY `deleted_index` (`deleted`), - KEY `FKEDDC4F35CCABB192` (`attachment_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1851 ; - --- -------------------------------------------------------- - --- --- Table structure for table `forum_posts_read` --- - -CREATE TABLE IF NOT EXISTS `forum_posts_read` ( - `read` tinyint(1) NOT NULL, - `user` bigint(20) NOT NULL, - `post` bigint(20) NOT NULL, - PRIMARY KEY (`post`,`user`), - KEY `FK8A5DFC60924F477B` (`user`), - KEY `FK8A5DFC60DD74550D` (`post`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `forum_threads` --- - -CREATE TABLE IF NOT EXISTS `forum_threads` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `subject` varchar(255) NOT NULL, - `user` bigint(20) NOT NULL, - `project` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKAF97368B924F477B` (`user`), - KEY `FKAF97368B247CE02D` (`project`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1116 ; - --- -------------------------------------------------------- - --- --- Table structure for table `general_system_settings` --- - -CREATE TABLE IF NOT EXISTS `general_system_settings` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `peerDisplayNumberOfReviewsPerformed` bit(1) NOT NULL, - `peerRatingsEnabled` bit(1) NOT NULL, - `projectPartnerDaysToLive` int(11) NOT NULL, - `mailFromName` varchar(255) NOT NULL, - `mailNotifications` bit(1) NOT NULL, - `numberOfLatestReviewsDisplayed` int(11) NOT NULL, - `peerDisplayLatestReviews` bit(1) NOT NULL, - `publicReviewsActivated` bit(1) NOT NULL, - `smtpServer` varchar(255) NOT NULL, - `systemFromMail` varchar(255) NOT NULL, - `peerDownloadEnabled` bit(1) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `remoteExport` bit(1) NOT NULL, - `confirmationDays` int(11) NOT NULL, - `bachelorCountDate` datetime DEFAULT NULL, - `masterCountDate` datetime DEFAULT NULL, - `remindMessage` longtext, - `sciproURL` varchar(255) NOT NULL, - `matchPartnerConfirmation` bit(1) NOT NULL, - `daisyProfileLinkBaseURL` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `general_system_settings_alarm_recipients` --- - -CREATE TABLE IF NOT EXISTS `general_system_settings_alarm_recipients` ( - `GeneralSystemSettings_id` bigint(20) NOT NULL, - `mail` varchar(255) DEFAULT NULL, - KEY `FK3C9272B2AC37675` (`GeneralSystemSettings_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `general_system_settings_supervisor_change_recipients` --- - -CREATE TABLE IF NOT EXISTS `general_system_settings_supervisor_change_recipients` ( - `GeneralSystemSettings_id` bigint(20) NOT NULL, - `mail` varchar(255) DEFAULT NULL, - KEY `FK7DA712D52AC37675` (`GeneralSystemSettings_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `hibernate_sequences` --- - -CREATE TABLE IF NOT EXISTS `hibernate_sequences` ( - `sequence_name` varchar(255) DEFAULT NULL, - `sequence_next_hi_value` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `Keyword` --- - -CREATE TABLE IF NOT EXISTS `Keyword` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` bit(1) NOT NULL, - `keyword` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=411 ; - --- -------------------------------------------------------- - --- --- Table structure for table `Keyword_researcharea` --- - -CREATE TABLE IF NOT EXISTS `Keyword_researcharea` ( - `Keyword_id` bigint(20) NOT NULL, - `researchAreas_id` bigint(20) NOT NULL, - KEY `FKF8C66F5E98ED461` (`Keyword_id`), - KEY `FKF8C66F5E6F20ECBC` (`researchAreas_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `Language` --- - -CREATE TABLE IF NOT EXISTS `Language` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `name` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- -------------------------------------------------------- - --- --- Table structure for table `MailEvent_nonUserRecipients` --- - -CREATE TABLE IF NOT EXISTS `MailEvent_nonUserRecipients` ( - `MailEvent_id` bigint(20) NOT NULL, - `nonUserRecipients` varchar(255) DEFAULT NULL, - KEY `FKD7F8996D0814DF5` (`MailEvent_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `mail_event` --- - -CREATE TABLE IF NOT EXISTS `mail_event` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `fromEmail` varchar(255) DEFAULT NULL, - `fromName` varchar(255) DEFAULT NULL, - `messageBody` longtext NOT NULL, - `notificationEventType` varchar(255) DEFAULT NULL, - `subject` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14116 ; - --- -------------------------------------------------------- - --- --- Table structure for table `mail_event_recipients` --- - -CREATE TABLE IF NOT EXISTS `mail_event_recipients` ( - `recipients_id` bigint(20) NOT NULL, - `mail_event_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`recipients_id`,`mail_event_id`), - KEY `FK41091C7FE7F98C6` (`mail_event_id`), - KEY `FK41091C7B286D1B0` (`recipients_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `mail_event_reply_to` --- - -CREATE TABLE IF NOT EXISTS `mail_event_reply_to` ( - `replyTo_id` bigint(20) NOT NULL, - `mail_event_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`replyTo_id`), - KEY `FK51C5EF7DFE7F98C6` (`mail_event_id`), - KEY `FK51C5EF7D72821865` (`replyTo_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `milestone` --- - -CREATE TABLE IF NOT EXISTS `milestone` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `confirmed` tinyint(1) NOT NULL, - `activity_id` bigint(20) NOT NULL, - `project_id` bigint(20) DEFAULT NULL, - `student_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKC0841970667E5A5E` (`activity_id`), - KEY `FKC0841970C1813915` (`project_id`), - KEY `FKC08419709BD14DD5` (`student_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=61 ; - --- -------------------------------------------------------- - --- --- Table structure for table `milestone_activity` --- - -CREATE TABLE IF NOT EXISTS `milestone_activity` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `type` varchar(255) DEFAULT NULL, - `code` varchar(255) DEFAULT NULL, - `sortOrder` int(11) DEFAULT NULL, - `phase` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`), - KEY `deleted_index` (`deleted`), - KEY `FK42DAA8FE233E1A72` (`phase`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; - --- -------------------------------------------------------- - --- --- Table structure for table `milestone_activity_project_class` --- - -CREATE TABLE IF NOT EXISTS `milestone_activity_project_class` ( - `milestone_activity_id` bigint(20) NOT NULL, - `projectClasses_id` bigint(20) NOT NULL, - PRIMARY KEY (`milestone_activity_id`,`projectClasses_id`), - KEY `FKFB3FC75157F6B071` (`projectClasses_id`), - KEY `FKFB3FC75180E42A0F` (`milestone_activity_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `milestone_phase` --- - -CREATE TABLE IF NOT EXISTS `milestone_phase` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `sortOrder` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea` --- - -CREATE TABLE IF NOT EXISTS `newidea` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `description` longtext, - `externalSupervisorInfo` longtext, - `prerequisites` longtext, - `title` longtext NOT NULL, - `type` varchar(255) DEFAULT NULL, - `practicalHow` longtext, - `theoryHow` longtext, - `what` longtext, - `why` longtext, - `applicationPeriod_id` bigint(20) DEFAULT NULL, - `creator_id` bigint(20) NOT NULL, - `language_id` bigint(20) DEFAULT NULL, - `match_id` bigint(20) DEFAULT NULL, - `project_id` bigint(20) DEFAULT NULL, - `projectClass_id` bigint(20) NOT NULL, - `researchArea_id` bigint(20) DEFAULT NULL, - `suggestedReviewer_id` bigint(20) DEFAULT NULL, - `published` bit(1) NOT NULL DEFAULT b'1', - PRIMARY KEY (`id`), - KEY `FK6E051897C1813915` (`project_id`), - KEY `FK6E051897B9431B73` (`match_id`), - KEY `FK6E051897BEC322C1` (`applicationPeriod_id`), - KEY `FK6E051897E20156A5` (`suggestedReviewer_id`), - KEY `FK6E051897B2B6081F` (`projectClass_id`), - KEY `FK6E0518974E257FBF` (`researchArea_id`), - KEY `FK6E051897E44F4DBE` (`creator_id`), - KEY `FK6E0518973BE9881F` (`language_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=581 ; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea_export` --- - -CREATE TABLE IF NOT EXISTS `newidea_export` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `reason` varchar(255) DEFAULT NULL, - `result` varchar(255) DEFAULT NULL, - `idea_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK68FA705CFCDADF61` (`idea_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=56 ; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea_first_meeting` --- - -CREATE TABLE IF NOT EXISTS `newidea_first_meeting` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` longtext, - `firstMeetingDate` datetime NOT NULL, - `idea_id` bigint(20) NOT NULL, - `room` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `idea_id` (`idea_id`), - UNIQUE KEY `UK_k4m4tupnikallbq3cq3llvlmk` (`idea_id`), - KEY `FK9393AA04FCDADF61` (`idea_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=286 ; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea_Keyword` --- - -CREATE TABLE IF NOT EXISTS `newidea_Keyword` ( - `newidea_id` bigint(20) NOT NULL, - `keywords_id` bigint(20) NOT NULL, - PRIMARY KEY (`newidea_id`,`keywords_id`), - KEY `FK3707EE21BD1521C1` (`newidea_id`), - KEY `FK3707EE21AE316F00` (`keywords_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea_match` --- - -CREATE TABLE IF NOT EXISTS `newidea_match` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `status` varchar(255) DEFAULT NULL, - `changedBy_id` bigint(20) DEFAULT NULL, - `idea_id` bigint(20) NOT NULL, - `supervisor_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK87EA481DFCDADF61` (`idea_id`), - KEY `FK87EA481DBCA56165` (`supervisor_id`), - KEY `FK87EA481DA89FFB7F` (`changedBy_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=819 ; - --- -------------------------------------------------------- - --- --- Table structure for table `newidea_student` --- - -CREATE TABLE IF NOT EXISTS `newidea_student` ( - `confirmed` bit(1) DEFAULT NULL, - `dateCreated` datetime NOT NULL, - `role_id` bigint(20) NOT NULL DEFAULT '0', - `idea_id` bigint(20) NOT NULL DEFAULT '0', - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `program_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK9458BA93FCDADF61` (`idea_id`), - KEY `FK9458BA932B6C61BA` (`role_id`), - KEY `FK_c5py593l4g261jdkuvwdmcmgj` (`program_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=752 ; - --- -------------------------------------------------------- - --- --- Table structure for table `NonWorkDayPeriod` --- - -CREATE TABLE IF NOT EXISTS `NonWorkDayPeriod` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `comment` varchar(255) NOT NULL, - `endDate` datetime NOT NULL, - `startDate` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; - --- -------------------------------------------------------- - --- --- Table structure for table `Notification` --- - -CREATE TABLE IF NOT EXISTS `Notification` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `absoluteURL` varchar(255) NOT NULL, - `unread` bit(1) NOT NULL, - `notificationData_id` bigint(20) DEFAULT NULL, - `user_id` bigint(20) DEFAULT NULL, - `mailed` bit(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK2D45DD0B895349BF` (`user_id`), - KEY `FK2D45DD0B599425F6` (`notificationData_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14456 ; - --- -------------------------------------------------------- - --- --- Table structure for table `NotificationData` --- - -CREATE TABLE IF NOT EXISTS `NotificationData` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `DTYPE` varchar(31) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `type` varchar(255) DEFAULT NULL, - `event` varchar(255) DEFAULT NULL, - `project_id` bigint(20) DEFAULT NULL, - `seminar_id` bigint(20) DEFAULT NULL, - `idea_id` bigint(20) DEFAULT NULL, - `source` varchar(1000) DEFAULT NULL, - `review_id` bigint(20) DEFAULT NULL, - `request_id` bigint(20) DEFAULT NULL, - `causedBy_id` bigint(20) DEFAULT NULL, - `additionalSource` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK2DCAC3554D07E0A9` (`seminar_id`), - KEY `FK2DCAC355C1813915` (`project_id`), - KEY `FK2DCAC35542E9AC7B` (`review_id`), - KEY `FK2DCAC3558D40D1B9` (`request_id`), - KEY `FK2DCAC355B2E2AD78` (`causedBy_id`), - KEY `FK2DCAC355FCDADF61` (`idea_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5584 ; - --- -------------------------------------------------------- - --- --- Table structure for table `notification_delivery_configuration` --- - -CREATE TABLE IF NOT EXISTS `notification_delivery_configuration` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `enabled` tinyint(1) NOT NULL, - `event` varchar(32) NOT NULL, - `method` varchar(255) NOT NULL, - `type` varchar(255) NOT NULL, - `user_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `one_setting_per_user` (`type`,`event`,`method`,`user_id`), - KEY `FK7B2EE5BF895349BF` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=166 ; - --- -------------------------------------------------------- - --- --- Table structure for table `notification_event_configuration` --- - -CREATE TABLE IF NOT EXISTS `notification_event_configuration` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `event` varchar(255) NOT NULL, - `type` varchar(255) NOT NULL, - `description` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `type` (`type`,`event`), - UNIQUE KEY `one_description_per_event` (`type`,`event`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- -------------------------------------------------------- - --- --- Table structure for table `notification_receiver_configuration` --- - -CREATE TABLE IF NOT EXISTS `notification_receiver_configuration` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `type` varchar(255) NOT NULL, - `event` varchar(255) NOT NULL, - `member` varchar(255) NOT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `one_setting_per_role` (`type`,`event`,`member`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=194 ; - --- -------------------------------------------------------- - --- --- Table structure for table `Password` --- - -CREATE TABLE IF NOT EXISTS `Password` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` bit(1) NOT NULL, - `hash` tinyblob, - `salt` tinyblob, - `user_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - UNIQUE KEY `UK_43erxladp39q03wrco68hi9iq` (`user_id`), - KEY `FK4C641EBB895349BF` (`user_id`), - KEY `deleted_index` (`deleted`), - KEY `FK_43erxladp39q03wrco68hi9iq` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; - --- -------------------------------------------------------- - --- --- Table structure for table `peer_request` --- - -CREATE TABLE IF NOT EXISTS `peer_request` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `comment` longtext, - `status` varchar(255) NOT NULL, - `file_id` bigint(20) DEFAULT NULL, - `project_id` bigint(20) NOT NULL, - `requester_id` bigint(20) NOT NULL, - `checkListTemplate_id` bigint(20) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK514488B2F3860A99` (`file_id`), - KEY `FK514488B2C1813915` (`project_id`), - KEY `FK514488B2275CA4F4` (`requester_id`), - KEY `deleted_index` (`deleted`), - KEY `checkListTemplate_index` (`checkListTemplate_id`), - KEY `FK514488B2869F0235` (`checkListTemplate_id`), - KEY `FK_e2s20f9ga6lgxa0r2uldjt4q` (`file_id`), - KEY `FK_ppnisfed4ipbg17rts8vbuqt8` (`project_id`), - KEY `FK_ihqq9n3eb7ycvd5ggjxx5wn38` (`requester_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1145 ; - --- -------------------------------------------------------- - --- --- Table structure for table `peer_review` --- - -CREATE TABLE IF NOT EXISTS `peer_review` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `aborted` bit(1) NOT NULL, - `comment` longtext, - `submitted` bit(1) NOT NULL, - `file_id` bigint(20) DEFAULT NULL, - `peerRequest_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - `reviewer_id` bigint(20) NOT NULL, - `abortReason` longtext, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FKB00C90D5F3860A99` (`file_id`), - KEY `FKB00C90D5CEE8709B` (`peerRequest_id`), - KEY `FKB00C90D5C1813915` (`project_id`), - KEY `FKB00C90D52ABD35CB` (`reviewer_id`), - KEY `deleted_index` (`deleted`), - KEY `FK_6vrh7sr7twvhsjrrs8rhefxt3` (`file_id`), - KEY `FK_9ke7armwg3tfnghmschgo011f` (`peerRequest_id`), - KEY `FK_n5wj0qsev5cf8acm0xhfrqlpg` (`project_id`), - KEY `FK_9xy59w1sbydtuplendcthlhu5` (`reviewer_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1038 ; - --- -------------------------------------------------------- - --- --- Table structure for table `Program` --- - -CREATE TABLE IF NOT EXISTS `Program` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `externalId` bigint(20) DEFAULT NULL, - `name` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project` --- - -CREATE TABLE IF NOT EXISTS `project` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `identifier` bigint(20) DEFAULT NULL, - `projectStatus` varchar(255) DEFAULT NULL, - `stateOfMind` varchar(255) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `headSupervisor_id` bigint(20) DEFAULT NULL, - `projectClass_id` bigint(20) NOT NULL, - `daisyStartDate` datetime DEFAULT NULL, - `statusMessage` varchar(255) NOT NULL, - `stateOfMindDate` datetime DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `externalOrganization` varchar(255) DEFAULT NULL, - `fs_rule_exmpt` bit(1) NOT NULL DEFAULT b'0', - `stateOfMindReason` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `identifier` (`identifier`), - KEY `FKED904B19C6FA1F85` (`headSupervisor_id`), - KEY `FKED904B19B2B6081F` (`projectClass_id`), - KEY `FK_6k74jgcmji5vo3lheg4npoaql` (`headSupervisor_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3632 ; - --- -------------------------------------------------------- - --- --- Table structure for table `projectPartner` --- - -CREATE TABLE IF NOT EXISTS `projectPartner` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `infotext` longtext NOT NULL, - `user_id` bigint(20) NOT NULL, - `projectClass_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FK1882B6F895349BF` (`user_id`), - KEY `FK_2ar5my1wm4p3uevf1xrrv4cgd` (`projectClass_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=83 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_checklist` --- - -CREATE TABLE IF NOT EXISTS `project_checklist` ( - `project_id` bigint(20) NOT NULL, - `checkLists_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - UNIQUE KEY `checkLists_id` (`checkLists_id`), - UNIQUE KEY `UK_df8pnqoo65pt2wn0jaanpl4ej` (`checkLists_id`), - KEY `FK8351CC00C1813915` (`project_id`), - KEY `FK8351CC005785440E` (`checkLists_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `project_class` --- - -CREATE TABLE IF NOT EXISTS `project_class` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `code` varchar(255) NOT NULL, - `description` longtext, - `name` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_class_settings` --- - -CREATE TABLE IF NOT EXISTS `project_class_settings` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `numDaysBeforePeerRequestPriority` int(11) NOT NULL, - `numDaysBetweenPeerReviewsOnSameProject` int(11) NOT NULL, - `numDaysToSubmitPeerReview` int(11) NOT NULL, - `projectClass_id` bigint(20) NOT NULL, - `numDaysBeforePeerGetsCancelled` int(11) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `minAuthors` int(11) NOT NULL DEFAULT '1', - `maxAuthors` int(11) NOT NULL DEFAULT '2', - `maxFinalSeminarActiveParticipation` int(11) NOT NULL, - `maxOpponentsOnFinalSeminar` int(11) NOT NULL, - `minFinalSeminarActiveParticipation` int(11) NOT NULL, - `minOpponentsOnFinalSeminar` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `projectClass_id` (`projectClass_id`), - UNIQUE KEY `UK_oxqyb1t8jo7cq2fx8j9slvloa` (`projectClass_id`), - KEY `FK3918D8F0B2B6081F` (`projectClass_id`), - KEY `FK_oxqyb1t8jo7cq2fx8j9slvloa` (`projectClass_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_event_template` --- - -CREATE TABLE IF NOT EXISTS `project_event_template` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `description` longtext, - `estimatedTimeConsumption` bigint(20) NOT NULL, - `numberInOrder` int(11) NOT NULL, - `requireHandIn` bit(1) NOT NULL, - `title` varchar(255) NOT NULL, - `scheduleTemplate_id` bigint(20) DEFAULT NULL, - `templateCreator_id` bigint(20) DEFAULT NULL, - `daysOffset` int(11) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `checkListTemplate_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKD443466587849B8` (`templateCreator_id`), - KEY `FKD4434665C5FC509F` (`scheduleTemplate_id`), - KEY `checkListTemplate_index` (`checkListTemplate_id`), - KEY `FK_667ye6la0yb5obk64v21knimn` (`checkListTemplate_id`), - KEY `FK_ca5bhq3i6p2g292fo5l4fqtf` (`scheduleTemplate_id`), - KEY `FK_p8buy8evr4g6u8nkbml0mdf1v` (`templateCreator_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=543 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_follower` --- - -CREATE TABLE IF NOT EXISTS `project_follower` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `projectRole` varchar(255) DEFAULT NULL, - `follower_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FKCB227284AFEBDC67` (`follower_id`), - KEY `FKCB227284C1813915` (`project_id`), - KEY `deleted_index` (`deleted`), - KEY `FK_h49g8tc2d8q69y3i66nj404h7` (`follower_id`), - KEY `FK_k48hlfgvhd22aklm6j82g1xpr` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3734 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_schedule` --- - -CREATE TABLE IF NOT EXISTS `project_schedule` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `locked` bit(1) NOT NULL, - `project_id` bigint(20) NOT NULL, - `startDate` datetime DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `project_id` (`project_id`), - UNIQUE KEY `UK_86kwi5nttd0rkmu2nvxgdx984` (`project_id`), - KEY `FK8F8BE4FDC1813915` (`project_id`), - KEY `FK_86kwi5nttd0rkmu2nvxgdx984` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=394 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_schedule_event` --- - -CREATE TABLE IF NOT EXISTS `project_schedule_event` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `deleted` bit(1) NOT NULL, - `date` datetime NOT NULL, - `description` longtext NOT NULL, - `name` varchar(500) NOT NULL, - `uploadRequired` bit(1) NOT NULL, - `checkList_id` bigint(20) DEFAULT NULL, - `creator_id` bigint(20) NOT NULL, - `fileUpload_id` bigint(20) DEFAULT NULL, - `projectSchedule_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `projectSchedule_id_index` (`projectSchedule_id`), - KEY `checkList_id_index` (`checkList_id`), - KEY `creator_id_index` (`creator_id`), - KEY `fileUpload_id_index` (`fileUpload_id`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7649 ; - --- -------------------------------------------------------- - --- --- Table structure for table `project_student` --- - -CREATE TABLE IF NOT EXISTS `project_student` ( - `project_id` bigint(20) NOT NULL, - `projectParticipants_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`project_id`,`projectParticipants_id`), - KEY `FK1524B15F3CA217` (`projectParticipants_id`), - KEY `FK1524B15C1813915` (`project_id`), - KEY `FK_o3axkuf5be8j9tvi46b5uovdd` (`project_id`), - KEY `FK_4pw7xshosdbluw0g7t4n972ev` (`projectParticipants_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `question` --- - -CREATE TABLE IF NOT EXISTS `question` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `question` longtext NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6950 ; - --- -------------------------------------------------------- - --- --- Table structure for table `researcharea` --- - -CREATE TABLE IF NOT EXISTS `researcharea` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `identifier` bigint(20) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `deleted` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `identifier` (`identifier`), - KEY `deleted_index` (`deleted`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; - --- -------------------------------------------------------- - --- --- Table structure for table `review_rating` --- - -CREATE TABLE IF NOT EXISTS `review_rating` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `peerReview_id` bigint(20) NOT NULL, - `rating` double NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `peerReview_id` (`peerReview_id`), - UNIQUE KEY `UK_d8vjux42hpcawkf6k49des3my` (`peerReview_id`), - KEY `FK452A44642C41A959` (`peerReview_id`), - KEY `FK_d8vjux42hpcawkf6k49des3my` (`peerReview_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `role` --- - -CREATE TABLE IF NOT EXISTS `role` ( - `rolename` varchar(8) NOT NULL, - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `user_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `unit_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`,`rolename`), - UNIQUE KEY `role_is_unique` (`user_id`,`rolename`), - KEY `FK358076895349BF` (`user_id`), - KEY `deleted_index` (`deleted`), - KEY `FK_1vd9v6smpu103gmeu6fddfk2s` (`unit_id`), - KEY `FK_kyiccjhffirji07hqfrsgtoig` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=60599 ; - --- -------------------------------------------------------- - --- --- Table structure for table `role_Program` --- - -CREATE TABLE IF NOT EXISTS `role_Program` ( - `role_id` bigint(20) NOT NULL, - `programs_id` bigint(20) NOT NULL, - PRIMARY KEY (`role_id`,`programs_id`), - KEY `FK_i1i38rcos28p2hu4xgel3ftcw` (`programs_id`), - KEY `FK_90cvbm5wx89wvlqnkq3vusner` (`role_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `schedule_template` --- - -CREATE TABLE IF NOT EXISTS `schedule_template` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `isSysAdminTemplate` bit(1) NOT NULL, - `templateDescription` longtext, - `templateName` varchar(255) NOT NULL, - `creator_id` bigint(20) NOT NULL, - `projectClass_id` bigint(20) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `FKACCF6522B2B6081F` (`projectClass_id`), - KEY `FKACCF6522E44F4DBE` (`creator_id`), - KEY `FK_rgwf80yvcy2msbb6g80bae10p` (`creator_id`), - KEY `FK_s8jm2o7uguo5wcjd41bheteu6` (`projectClass_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=55 ; - --- -------------------------------------------------------- - --- --- Table structure for table `settings_date` --- - -CREATE TABLE IF NOT EXISTS `settings_date` ( - `style` varchar(255) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `format` varchar(255) NOT NULL, - PRIMARY KEY (`style`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `SupervisorNotificationSettings` --- - -CREATE TABLE IF NOT EXISTS `SupervisorNotificationSettings` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `mailNotifyConferenceComment` bit(1) NOT NULL, - `mailNotifyConferencePost` bit(1) NOT NULL, - `mailPeerReviewAborted` bit(1) NOT NULL, - `mailPeerReviewCompleted` bit(1) NOT NULL, - `employee_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK5863DDD65FCBC05F` (`employee_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=104 ; - --- -------------------------------------------------------- - --- --- Table structure for table `target` --- - -CREATE TABLE IF NOT EXISTS `target` ( - `applicationPeriodId` bigint(20) NOT NULL, - `employeeId` bigint(20) NOT NULL, - `projectClassId` bigint(20) NOT NULL, - `target` int(11) NOT NULL, - PRIMARY KEY (`applicationPeriodId`,`employeeId`,`projectClassId`), - KEY `FKCB7E71913353DC5C` (`employeeId`), - KEY `FKCB7E7191A520201E` (`projectClassId`), - KEY `FKCB7E7191790761A4` (`applicationPeriodId`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `turnitincheck` --- - -CREATE TABLE IF NOT EXISTS `turnitincheck` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `hash` longblob, - `fileDescription_id` bigint(20) DEFAULT NULL, - `turnItInId` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK32D6DF9B460E9895` (`fileDescription_id`), - KEY `FK_cqi2extqeqiycldjlfe7afx3j` (`fileDescription_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=226 ; - --- -------------------------------------------------------- - --- --- Table structure for table `TurnitinSettings` --- - -CREATE TABLE IF NOT EXISTS `TurnitinSettings` ( - `id` bigint(20) NOT NULL, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `accountNo` int(11) NOT NULL, - `assignmentName` varchar(255) NOT NULL, - `className` varchar(255) NOT NULL, - `classNo` int(11) NOT NULL, - `expirationContent` longtext, - `expirationDate` datetime DEFAULT NULL, - `firstName` varchar(255) NOT NULL, - `lastName` varchar(255) NOT NULL, - `password` varchar(255) NOT NULL, - `sharedKey` varchar(255) NOT NULL, - `username` varchar(255) NOT NULL, - `lastFailedDate` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `TurnitinSettings_expirationMails` --- - -CREATE TABLE IF NOT EXISTS `TurnitinSettings_expirationMails` ( - `TurnitinSettings_id` bigint(20) NOT NULL, - `expirationMails` varchar(255) DEFAULT NULL, - KEY `FKD2343EDE5AC3183F` (`TurnitinSettings_id`), - KEY `FK_lji32bekgobx76otvw7syu4hb` (`TurnitinSettings_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `unit` --- - -CREATE TABLE IF NOT EXISTS `unit` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `identifier` bigint(20) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `identifier` (`identifier`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2947 ; - --- -------------------------------------------------------- - --- --- Table structure for table `user` --- - -CREATE TABLE IF NOT EXISTS `user` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `deleted` bit(1) NOT NULL, - `emailAddress` varchar(255) DEFAULT NULL, - `firstName` varchar(255) DEFAULT NULL, - `identifier` bigint(20) DEFAULT NULL, - `lastName` varchar(255) DEFAULT NULL, - `version` int(4) NOT NULL DEFAULT '0', - `password_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `identifier` (`identifier`), - KEY `deleted_index` (`deleted`), - KEY `FK_hpmviec1b7vdg23xtxsalwxw8` (`password_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18235 ; - --- -------------------------------------------------------- - --- --- Table structure for table `username` --- - -CREATE TABLE IF NOT EXISTS `username` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `realm` varchar(255) NOT NULL, - `username` varchar(255) NOT NULL, - `user_id` bigint(20) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `username` (`username`,`realm`), - UNIQUE KEY `UK_s525no5d53h1qncd9n3vp3nfw` (`username`,`realm`), - KEY `FKF02988D6895349BF` (`user_id`), - KEY `FK_17moq4bksxe30ihucce3jovdc` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=45156 ; - --- -------------------------------------------------------- - --- --- Table structure for table `user_profile` --- - -CREATE TABLE IF NOT EXISTS `user_profile` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `otherInfo` varchar(255) DEFAULT NULL, - `phoneNumber` varchar(255) DEFAULT NULL, - `skypeId` varchar(255) DEFAULT NULL, - `user_id` bigint(20) NOT NULL, - `mailCompilation` tinyint(1) NOT NULL, - `threadedForum` tinyint(1) NOT NULL DEFAULT '1', - `sortLatestForumPost` tinyint(1) NOT NULL DEFAULT '1', - `expandProjectDetails` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - UNIQUE KEY `UK_ebc21hy5j7scdvcjt0jy6xxrv` (`user_id`), - KEY `FK487E2135895349BF` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=797 ; - --- -------------------------------------------------------- - --- --- Table structure for table `user_settings` --- - -CREATE TABLE IF NOT EXISTS `user_settings` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `activeProject_id` bigint(20) DEFAULT NULL, - `user_id` bigint(20) NOT NULL, - `apiKey` varchar(255) DEFAULT NULL, - `available` bit(1) NOT NULL, - `iPhoneId` varchar(255) DEFAULT NULL, - `statusMessage` longtext, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - UNIQUE KEY `UK_4bos7satl9xeqd18frfeqg6tt` (`user_id`), - KEY `FK588616176FFA289B` (`activeProject_id`), - KEY `FK58861617895349BF` (`user_id`), - KEY `FK_h9hl3b7rscn09u0k0ik18eprg` (`activeProject_id`), - KEY `FK_4bos7satl9xeqd18frfeqg6tt` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1765 ; - --- -------------------------------------------------------- - --- --- Table structure for table `worker_data` --- - -CREATE TABLE IF NOT EXISTS `worker_data` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `lastRun` datetime NOT NULL, - `lastSuccessfulRun` datetime DEFAULT '2011-11-28 01:00:00', - `name` varchar(255) NOT NULL, - `version` int(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; - --- --- Constraints for dumped tables --- - --- --- Constraints for table `answer` --- -ALTER TABLE `answer` - ADD CONSTRAINT `FK_eix9du6u2r4wxwu415wq8yb99` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`), - ADD CONSTRAINT `FK_64r70sbiishrkuj1vn87vo53k` FOREIGN KEY (`peerReview_id`) REFERENCES `peer_review` (`id`); - --- --- Constraints for table `applicationperiodexemption` --- -ALTER TABLE `applicationperiodexemption` - ADD CONSTRAINT `FK_4p3he5fymtmdgbkl3xwrodq36` FOREIGN KEY (`grantedBy_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK34182FD8790761A4` FOREIGN KEY (`applicationPeriodId`) REFERENCES `ApplicationPeriod` (`id`), - ADD CONSTRAINT `FKCB7E71913353DC5C` FOREIGN KEY (`studentId`) REFERENCES `role` (`id`); - --- --- Constraints for table `ApplicationPeriod_project_class` --- -ALTER TABLE `ApplicationPeriod_project_class` - ADD CONSTRAINT `FK97FDEC24B2B6081F` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`), - ADD CONSTRAINT `FK97FDEC24BEC322C1` FOREIGN KEY (`ApplicationPeriod_id`) REFERENCES `ApplicationPeriod` (`id`); - --- --- Constraints for table `checklist` --- -ALTER TABLE `checklist` - ADD CONSTRAINT `FK17CCD1A6C1813915` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `CheckListTemplate_questions` --- -ALTER TABLE `CheckListTemplate_questions` - ADD CONSTRAINT `FK872F7C0E869F0235` FOREIGN KEY (`CheckListTemplate_id`) REFERENCES `checklist_template` (`id`); - --- --- Constraints for table `checklist_answer` --- -ALTER TABLE `checklist_answer` - ADD CONSTRAINT `FK49936477895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `checklist_checklist_category` --- -ALTER TABLE `checklist_checklist_category` - ADD CONSTRAINT `FK54F86EB01F327355` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`), - ADD CONSTRAINT `FK54F86EB08725F1D` FOREIGN KEY (`categories_id`) REFERENCES `checklist_category` (`id`); - --- --- Constraints for table `checklist_checklist_question` --- -ALTER TABLE `checklist_checklist_question` - ADD CONSTRAINT `FKC77ED981F327355` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`), - ADD CONSTRAINT `FKC77ED98C64F9D54` FOREIGN KEY (`questions_id`) REFERENCES `checklist_question` (`id`); - --- --- Constraints for table `checklist_question_checklist_answer` --- -ALTER TABLE `checklist_question_checklist_answer` - ADD CONSTRAINT `FK86395A574BFBD702` FOREIGN KEY (`checklist_question_id`) REFERENCES `checklist_question` (`id`), - ADD CONSTRAINT `FK86395A5787D18D44` FOREIGN KEY (`answers_id`) REFERENCES `checklist_answer` (`id`); - --- --- Constraints for table `checklist_template` --- -ALTER TABLE `checklist_template` - ADD CONSTRAINT `FK14DA6F3E44F4DBE` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `checklist_template_checklist_category` --- -ALTER TABLE `checklist_template_checklist_category` - ADD CONSTRAINT `FK4E82F44372B51E82` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`), - ADD CONSTRAINT `FK4E82F4438725F1D` FOREIGN KEY (`categories_id`) REFERENCES `checklist_category` (`id`); - --- --- Constraints for table `CheckList_userLastOpenDate` --- -ALTER TABLE `CheckList_userLastOpenDate` - ADD CONSTRAINT `FKF7E07AB21F327355` FOREIGN KEY (`CheckList_id`) REFERENCES `checklist` (`id`), - ADD CONSTRAINT `FKF7E07AB26D025A9` FOREIGN KEY (`userLastOpenDate_KEY`) REFERENCES `user` (`id`); - --- --- Constraints for table `comment` --- -ALTER TABLE `comment` - ADD CONSTRAINT `FK38A5EE5F45F802F5` FOREIGN KEY (`commentThread_id`) REFERENCES `comment_thread` (`id`), - ADD CONSTRAINT `FK38A5EE5FE44F4DBE` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `Employee_Language` --- -ALTER TABLE `Employee_Language` - ADD CONSTRAINT `FK603173EA55E687C` FOREIGN KEY (`languages_id`) REFERENCES `Language` (`id`), - ADD CONSTRAINT `FK603173EA7B617197` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`); - --- --- Constraints for table `employee_researcharea` --- -ALTER TABLE `employee_researcharea` - ADD CONSTRAINT `employee_researcharea_key` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `employee_researcharea_key2` FOREIGN KEY (`researchAreas_id`) REFERENCES `researcharea` (`id`); - --- --- Constraints for table `FinalSeminarSettings_punishMails` --- -ALTER TABLE `FinalSeminarSettings_punishMails` - ADD CONSTRAINT `FK373B1D06BB47DEDF` FOREIGN KEY (`FinalSeminarSettings_id`) REFERENCES `FinalSeminarSettings` (`id`); - --- --- Constraints for table `final_seminar` --- -ALTER TABLE `final_seminar` - ADD CONSTRAINT `FK_rv1p7wl0dnj25saiarmk55yvr` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK49900D2873048D7F` FOREIGN KEY (`examiner_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK_41udcn88r6uugt3ptbelflph6` FOREIGN KEY (`document_id`) REFERENCES `file_description` (`id`); - --- --- Constraints for table `final_seminar_active_participation` --- -ALTER TABLE `final_seminar_active_participation` - ADD CONSTRAINT `FK_hf9puequi3ygf518hi6b1js2m` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_3si3rx7tv6ke9oeiq0hts3lm0` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_mk920fce29yhjgv33wr69fe8a` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`); - --- --- Constraints for table `final_seminar_opposition` --- -ALTER TABLE `final_seminar_opposition` - ADD CONSTRAINT `FK_hilhyo3tgq89pm27i4pxjaua` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_62i59u7j6x5ma0iydx9no6m4i` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`), - ADD CONSTRAINT `FK_7j5k6jia1rrgxkmish6153hfp` FOREIGN KEY (`opponentReport_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `FK_esjegfl5vokjy9u63u1dh1muh` FOREIGN KEY (`opponent_id`) REFERENCES `role` (`id`); - --- --- Constraints for table `final_seminar_thesis_review` --- -ALTER TABLE `final_seminar_thesis_review` - ADD CONSTRAINT `FKE045D5541AAF75F1` FOREIGN KEY (`thesisReview_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `FKE045D554D1E6703C` FOREIGN KEY (`uploader_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FKE045D554F583C69F` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`); - --- --- Constraints for table `forum_posts` --- -ALTER TABLE `forum_posts` - ADD CONSTRAINT `FKEDDC4F35CCABB192` FOREIGN KEY (`attachment_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `FKEDDC4F355E9380A1` FOREIGN KEY (`thread`) REFERENCES `forum_threads` (`id`), - ADD CONSTRAINT `FKEDDC4F35924F477B` FOREIGN KEY (`user`) REFERENCES `user` (`id`); - --- --- Constraints for table `forum_posts_read` --- -ALTER TABLE `forum_posts_read` - ADD CONSTRAINT `FK8A5DFC60924F477B` FOREIGN KEY (`user`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK8A5DFC60DD74550D` FOREIGN KEY (`post`) REFERENCES `forum_posts` (`id`); - --- --- Constraints for table `forum_threads` --- -ALTER TABLE `forum_threads` - ADD CONSTRAINT `FKAF97368B247CE02D` FOREIGN KEY (`project`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FKAF97368B924F477B` FOREIGN KEY (`user`) REFERENCES `user` (`id`); - --- --- Constraints for table `general_system_settings_alarm_recipients` --- -ALTER TABLE `general_system_settings_alarm_recipients` - ADD CONSTRAINT `FK3C9272B2AC37675` FOREIGN KEY (`GeneralSystemSettings_id`) REFERENCES `general_system_settings` (`id`); - --- --- Constraints for table `general_system_settings_supervisor_change_recipients` --- -ALTER TABLE `general_system_settings_supervisor_change_recipients` - ADD CONSTRAINT `FK7DA712D52AC37675` FOREIGN KEY (`GeneralSystemSettings_id`) REFERENCES `general_system_settings` (`id`); - --- --- Constraints for table `Keyword_researcharea` --- -ALTER TABLE `Keyword_researcharea` - ADD CONSTRAINT `FKF8C66F5E6F20ECBC` FOREIGN KEY (`researchAreas_id`) REFERENCES `researcharea` (`id`), - ADD CONSTRAINT `FKF8C66F5E98ED461` FOREIGN KEY (`Keyword_id`) REFERENCES `Keyword` (`id`); - --- --- Constraints for table `MailEvent_nonUserRecipients` --- -ALTER TABLE `MailEvent_nonUserRecipients` - ADD CONSTRAINT `FKD7F8996D0814DF5` FOREIGN KEY (`MailEvent_id`) REFERENCES `mail_event` (`id`); - --- --- Constraints for table `mail_event_recipients` --- -ALTER TABLE `mail_event_recipients` - ADD CONSTRAINT `FK41091C7B286D1B0` FOREIGN KEY (`recipients_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK41091C7FE7F98C6` FOREIGN KEY (`mail_event_id`) REFERENCES `mail_event` (`id`); - --- --- Constraints for table `mail_event_reply_to` --- -ALTER TABLE `mail_event_reply_to` - ADD CONSTRAINT `FK51C5EF7D72821865` FOREIGN KEY (`replyTo_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK51C5EF7DFE7F98C6` FOREIGN KEY (`mail_event_id`) REFERENCES `mail_event` (`id`); - --- --- Constraints for table `milestone` --- -ALTER TABLE `milestone` - ADD CONSTRAINT `FKC0841970667E5A5E` FOREIGN KEY (`activity_id`) REFERENCES `milestone_activity` (`id`), - ADD CONSTRAINT `FKC08419709BD14DD5` FOREIGN KEY (`student_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FKC0841970C1813915` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `milestone_activity` --- -ALTER TABLE `milestone_activity` - ADD CONSTRAINT `FK42DAA8FE233E1A72` FOREIGN KEY (`phase`) REFERENCES `milestone_phase` (`id`); - --- --- Constraints for table `milestone_activity_project_class` --- -ALTER TABLE `milestone_activity_project_class` - ADD CONSTRAINT `FKFB3FC75157F6B071` FOREIGN KEY (`projectClasses_id`) REFERENCES `project_class` (`id`), - ADD CONSTRAINT `FKFB3FC75180E42A0F` FOREIGN KEY (`milestone_activity_id`) REFERENCES `milestone_activity` (`id`); - --- --- Constraints for table `newidea` --- -ALTER TABLE `newidea` - ADD CONSTRAINT `FK6E0518973BE9881F` FOREIGN KEY (`language_id`) REFERENCES `Language` (`id`), - ADD CONSTRAINT `FK6E0518974E257FBF` FOREIGN KEY (`researchArea_id`) REFERENCES `researcharea` (`id`), - ADD CONSTRAINT `FK6E051897B2B6081F` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`), - ADD CONSTRAINT `FK6E051897B9431B73` FOREIGN KEY (`match_id`) REFERENCES `newidea_match` (`id`), - ADD CONSTRAINT `FK6E051897BEC322C1` FOREIGN KEY (`applicationPeriod_id`) REFERENCES `ApplicationPeriod` (`id`), - ADD CONSTRAINT `FK6E051897C1813915` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK6E051897E20156A5` FOREIGN KEY (`suggestedReviewer_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK6E051897E44F4DBE` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `newidea_export` --- -ALTER TABLE `newidea_export` - ADD CONSTRAINT `FK68FA705CFCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`); - --- --- Constraints for table `newidea_first_meeting` --- -ALTER TABLE `newidea_first_meeting` - ADD CONSTRAINT `FK9393AA04FCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`); - --- --- Constraints for table `newidea_Keyword` --- -ALTER TABLE `newidea_Keyword` - ADD CONSTRAINT `FK3707EE21AE316F00` FOREIGN KEY (`keywords_id`) REFERENCES `Keyword` (`id`), - ADD CONSTRAINT `FK3707EE21BD1521C1` FOREIGN KEY (`newidea_id`) REFERENCES `newidea` (`id`); - --- --- Constraints for table `newidea_match` --- -ALTER TABLE `newidea_match` - ADD CONSTRAINT `FK87EA481DA89FFB7F` FOREIGN KEY (`changedBy_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK87EA481DBCA56165` FOREIGN KEY (`supervisor_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK87EA481DFCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`); - --- --- Constraints for table `newidea_student` --- -ALTER TABLE `newidea_student` - ADD CONSTRAINT `FK9458BA932B6C61BA` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK9458BA93FCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`); - --- --- Constraints for table `Notification` --- -ALTER TABLE `Notification` - ADD CONSTRAINT `FK2D45DD0B599425F6` FOREIGN KEY (`notificationData_id`) REFERENCES `NotificationData` (`id`) ON DELETE CASCADE, - ADD CONSTRAINT `FK2D45DD0B895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `NotificationData` --- -ALTER TABLE `NotificationData` - ADD CONSTRAINT `FK2DCAC35542E9AC7B` FOREIGN KEY (`review_id`) REFERENCES `peer_review` (`id`), - ADD CONSTRAINT `FK2DCAC3554D07E0A9` FOREIGN KEY (`seminar_id`) REFERENCES `final_seminar` (`id`), - ADD CONSTRAINT `FK2DCAC3558D40D1B9` FOREIGN KEY (`request_id`) REFERENCES `peer_request` (`id`) ON DELETE SET NULL, - ADD CONSTRAINT `FK2DCAC355B2E2AD78` FOREIGN KEY (`causedBy_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK2DCAC355C1813915` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK2DCAC355FCDADF61` FOREIGN KEY (`idea_id`) REFERENCES `newidea` (`id`) ON DELETE CASCADE; - --- --- Constraints for table `notification_delivery_configuration` --- -ALTER TABLE `notification_delivery_configuration` - ADD CONSTRAINT `FK7B2EE5BF895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `Password` --- -ALTER TABLE `Password` - ADD CONSTRAINT `FK_43erxladp39q03wrco68hi9iq` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `peer_request` --- -ALTER TABLE `peer_request` - ADD CONSTRAINT `FK_ihqq9n3eb7ycvd5ggjxx5wn38` FOREIGN KEY (`requester_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK514488B2869F0235` FOREIGN KEY (`checkListTemplate_id`) REFERENCES `checklist_template` (`id`), - ADD CONSTRAINT `FK_e2s20f9ga6lgxa0r2uldjt4q` FOREIGN KEY (`file_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `FK_ppnisfed4ipbg17rts8vbuqt8` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `peer_review` --- -ALTER TABLE `peer_review` - ADD CONSTRAINT `FK_9xy59w1sbydtuplendcthlhu5` FOREIGN KEY (`reviewer_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK_6vrh7sr7twvhsjrrs8rhefxt3` FOREIGN KEY (`file_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `FK_9ke7armwg3tfnghmschgo011f` FOREIGN KEY (`peerRequest_id`) REFERENCES `peer_request` (`id`), - ADD CONSTRAINT `FK_n5wj0qsev5cf8acm0xhfrqlpg` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `project` --- -ALTER TABLE `project` - ADD CONSTRAINT `FK_6k74jgcmji5vo3lheg4npoaql` FOREIGN KEY (`headSupervisor_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FKED904B19B2B6081F` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`); - --- --- Constraints for table `projectPartner` --- -ALTER TABLE `projectPartner` - ADD CONSTRAINT `FK_2ar5my1wm4p3uevf1xrrv4cgd` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`), - ADD CONSTRAINT `FK1882B6F895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `project_checklist` --- -ALTER TABLE `project_checklist` - ADD CONSTRAINT `FK8351CC005785440E` FOREIGN KEY (`checkLists_id`) REFERENCES `checklist` (`id`), - ADD CONSTRAINT `FK8351CC00C1813915` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `project_class_settings` --- -ALTER TABLE `project_class_settings` - ADD CONSTRAINT `FK_oxqyb1t8jo7cq2fx8j9slvloa` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`); - --- --- Constraints for table `project_event_template` --- -ALTER TABLE `project_event_template` - ADD CONSTRAINT `FK_p8buy8evr4g6u8nkbml0mdf1v` FOREIGN KEY (`templateCreator_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_667ye6la0yb5obk64v21knimn` FOREIGN KEY (`checkListTemplate_id`) REFERENCES `checklist_template` (`id`), - ADD CONSTRAINT `FK_ca5bhq3i6p2g292fo5l4fqtf` FOREIGN KEY (`scheduleTemplate_id`) REFERENCES `schedule_template` (`id`); - --- --- Constraints for table `project_follower` --- -ALTER TABLE `project_follower` - ADD CONSTRAINT `FK_k48hlfgvhd22aklm6j82g1xpr` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - ADD CONSTRAINT `FK_h49g8tc2d8q69y3i66nj404h7` FOREIGN KEY (`follower_id`) REFERENCES `role` (`id`); - --- --- Constraints for table `project_schedule` --- -ALTER TABLE `project_schedule` - ADD CONSTRAINT `FK_86kwi5nttd0rkmu2nvxgdx984` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `project_schedule_event` --- -ALTER TABLE `project_schedule_event` - ADD CONSTRAINT `checkList_id_index` FOREIGN KEY (`checkList_id`) REFERENCES `checklist` (`id`), - ADD CONSTRAINT `creator_id_index` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `fileUpload_id_index` FOREIGN KEY (`fileUpload_id`) REFERENCES `file_description` (`id`), - ADD CONSTRAINT `projectSchedule_id_index` FOREIGN KEY (`projectSchedule_id`) REFERENCES `project_schedule` (`id`); - --- --- Constraints for table `project_student` --- -ALTER TABLE `project_student` - ADD CONSTRAINT `FK_4pw7xshosdbluw0g7t4n972ev` FOREIGN KEY (`projectParticipants_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK_o3axkuf5be8j9tvi46b5uovdd` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - --- --- Constraints for table `review_rating` --- -ALTER TABLE `review_rating` - ADD CONSTRAINT `FK_d8vjux42hpcawkf6k49des3my` FOREIGN KEY (`peerReview_id`) REFERENCES `peer_review` (`id`); - --- --- Constraints for table `role` --- -ALTER TABLE `role` - ADD CONSTRAINT `FK_kyiccjhffirji07hqfrsgtoig` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_1vd9v6smpu103gmeu6fddfk2s` FOREIGN KEY (`unit_id`) REFERENCES `unit` (`id`); - --- --- Constraints for table `role_Program` --- -ALTER TABLE `role_Program` - ADD CONSTRAINT `FK_90cvbm5wx89wvlqnkq3vusner` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FK_i1i38rcos28p2hu4xgel3ftcw` FOREIGN KEY (`programs_id`) REFERENCES `Program` (`id`); - --- --- Constraints for table `schedule_template` --- -ALTER TABLE `schedule_template` - ADD CONSTRAINT `FK_s8jm2o7uguo5wcjd41bheteu6` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`), - ADD CONSTRAINT `FK_rgwf80yvcy2msbb6g80bae10p` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `SupervisorNotificationSettings` --- -ALTER TABLE `SupervisorNotificationSettings` - ADD CONSTRAINT `FK5863DDD65FCBC05F` FOREIGN KEY (`employee_id`) REFERENCES `role` (`id`); - --- --- Constraints for table `target` --- -ALTER TABLE `target` - ADD CONSTRAINT `FKCB7E7191790761A4b` FOREIGN KEY (`applicationPeriodId`) REFERENCES `ApplicationPeriod` (`id`), - ADD CONSTRAINT `FKCB7E71913353DC5Cb` FOREIGN KEY (`employeeId`) REFERENCES `role` (`id`), - ADD CONSTRAINT `FKCB7E7191A520201Eb` FOREIGN KEY (`projectClassId`) REFERENCES `project_class` (`id`); - --- --- Constraints for table `turnitincheck` --- -ALTER TABLE `turnitincheck` - ADD CONSTRAINT `FK_cqi2extqeqiycldjlfe7afx3j` FOREIGN KEY (`fileDescription_id`) REFERENCES `file_description` (`id`); - --- --- Constraints for table `TurnitinSettings_expirationMails` --- -ALTER TABLE `TurnitinSettings_expirationMails` - ADD CONSTRAINT `FK_lji32bekgobx76otvw7syu4hb` FOREIGN KEY (`TurnitinSettings_id`) REFERENCES `TurnitinSettings` (`id`); - --- --- Constraints for table `user` --- -ALTER TABLE `user` - ADD CONSTRAINT `FK_hpmviec1b7vdg23xtxsalwxw8` FOREIGN KEY (`password_id`) REFERENCES `Password` (`id`); - --- --- Constraints for table `username` --- -ALTER TABLE `username` - ADD CONSTRAINT `FK_17moq4bksxe30ihucce3jovdc` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `user_profile` --- -ALTER TABLE `user_profile` - ADD CONSTRAINT `FK487E2135895349BF` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`); - --- --- Constraints for table `user_settings` --- -ALTER TABLE `user_settings` - ADD CONSTRAINT `FK_4bos7satl9xeqd18frfeqg6tt` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - ADD CONSTRAINT `FK_h9hl3b7rscn09u0k0ik18eprg` FOREIGN KEY (`activeProject_id`) REFERENCES `project` (`id`); diff --git a/core/src/main/resources/db/migration/V1__new_baseline_2024-04-11.sql b/core/src/main/resources/db/migration/V1__new_baseline_2024-04-11.sql new file mode 100644 index 0000000000..dd9f9a4762 --- /dev/null +++ b/core/src/main/resources/db/migration/V1__new_baseline_2024-04-11.sql @@ -0,0 +1,2898 @@ +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `activity` +-- + +DROP TABLE IF EXISTS `activity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `deleted` bit(1) NOT NULL, + `title` varchar(500) NOT NULL, + `date` datetime NOT NULL, + `description` longtext DEFAULT NULL, + `action` varchar(64) NOT NULL DEFAULT 'none', + `editable` bit(1) NOT NULL DEFAULT b'1', + `activity_plan_id` bigint(20) NOT NULL, + `checklist_id` bigint(20) DEFAULT NULL, + `upload_file_reference_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_activity_checklist_id` (`checklist_id`), + KEY `idx_activity_deleted` (`deleted`), + KEY `fk_activity_upload_file_reference_id` (`upload_file_reference_id`), + KEY `fk_activity_activity_plan_id` (`activity_plan_id`), + CONSTRAINT `fk_activity_activity_plan_id` FOREIGN KEY (`activity_plan_id`) REFERENCES `activity_plan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_activity_checklist_id` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_activity_upload_file_reference_id` FOREIGN KEY (`upload_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=7649 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `activity_final_seminar` +-- + +DROP TABLE IF EXISTS `activity_final_seminar`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity_final_seminar` ( + `final_seminar_id` bigint(20) NOT NULL, + `activity_id` bigint(20) NOT NULL, + PRIMARY KEY (`final_seminar_id`,`activity_id`), + KEY `fk_afs_activity_id` (`activity_id`), + CONSTRAINT `fk_afs_activity_id` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_afs_final_seminar_id` FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `activity_plan` +-- + +DROP TABLE IF EXISTS `activity_plan`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity_plan` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `start_date` datetime DEFAULT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_activity_plan_project_id` (`project_id`), + CONSTRAINT `fk_activity_plan_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=394 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `activity_plan_template` +-- + +DROP TABLE IF EXISTS `activity_plan_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity_plan_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `is_sys_admin_template` bit(1) NOT NULL, + `description` longtext DEFAULT NULL, + `title` varchar(255) NOT NULL, + `creator_user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `fk_activity_plan_template_creator_user_id` (`creator_user_id`), + CONSTRAINT `fk_activity_plan_template_creator_user_id` FOREIGN KEY (`creator_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `activity_template` +-- + +DROP TABLE IF EXISTS `activity_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `description` longtext DEFAULT NULL, + `number_in_order` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `activity_plan_template_id` bigint(20) DEFAULT NULL, + `days_offset` int(11) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `checklist_template_id` bigint(20) DEFAULT NULL, + `action` varchar(64) NOT NULL DEFAULT 'NONE', + PRIMARY KEY (`id`), + KEY `fk_activity_template_checklist_template_id` (`checklist_template_id`), + KEY `fk_activity_template_activity_plan_template_id` (`activity_plan_template_id`), + CONSTRAINT `fk_activity_template_activity_plan_template_id` FOREIGN KEY (`activity_plan_template_id`) REFERENCES `activity_plan_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_activity_template_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=543 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `activity_thread` +-- + +DROP TABLE IF EXISTS `activity_thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `activity_thread` ( + `activity_id` bigint(20) NOT NULL, + `project_thread_id` bigint(20) NOT NULL, + PRIMARY KEY (`activity_id`,`project_thread_id`), + KEY `fk_activity_thread_project_thread_id` (`project_thread_id`), + CONSTRAINT `fk_activity_thread_activity_id` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_activity_thread_project_thread_id` FOREIGN KEY (`project_thread_id`) REFERENCES `project_thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `answer` +-- + +DROP TABLE IF EXISTS `answer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `answer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `question` longtext NOT NULL, + `answer` varchar(255) NOT NULL, + `motivation` longtext DEFAULT NULL, + `peer_review_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_answer_peer_review_id` (`peer_review_id`), + CONSTRAINT `fk_answer_peer_review_id` FOREIGN KEY (`peer_review_id`) REFERENCES `peer_review` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=6950 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `application_period` +-- + +DROP TABLE IF EXISTS `application_period`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `application_period` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `end_date` date NOT NULL, + `name` varchar(255) NOT NULL, + `start_date` date NOT NULL, + `course_start_date` datetime NOT NULL, + `course_end_date` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `application_period_exemption` +-- + +DROP TABLE IF EXISTS `application_period_exemption`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `application_period_exemption` ( + `user_id` bigint(20) NOT NULL, + `application_period_id` bigint(20) NOT NULL, + `type` varchar(64) NOT NULL, + `granted_on` datetime NOT NULL, + `granted_by_id` bigint(20) NOT NULL, + `comment` mediumtext DEFAULT NULL, + `end_date` date DEFAULT NULL, + PRIMARY KEY (`application_period_id`,`user_id`,`type`), + KEY `fk_ape_user_id` (`user_id`), + KEY `fk_ape_granted_by_id` (`granted_by_id`), + CONSTRAINT `fk_ape_application_period_id` FOREIGN KEY (`application_period_id`) REFERENCES `application_period` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ape_granted_by_id` FOREIGN KEY (`granted_by_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ape_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `application_period_project_type` +-- + +DROP TABLE IF EXISTS `application_period_project_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `application_period_project_type` ( + `application_period_id` bigint(20) NOT NULL DEFAULT 0, + `project_type_id` bigint(20) NOT NULL DEFAULT 0, + `activity_plan_template_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`application_period_id`,`project_type_id`), + KEY `fk_ap_pt_activity_plan_template_id` (`activity_plan_template_id`), + KEY `fk_ap_pt_project_type_id` (`project_type_id`), + CONSTRAINT `fk_ap_pt_activity_plan_template_id` FOREIGN KEY (`activity_plan_template_id`) REFERENCES `activity_plan_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ap_pt_application_period_id` FOREIGN KEY (`application_period_id`) REFERENCES `application_period` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ap_pt_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist` +-- + +DROP TABLE IF EXISTS `checklist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `name` varchar(255) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `description` longtext DEFAULT NULL, + `project_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_checklist_project_id` (`project_id`), + CONSTRAINT `fk_checklist_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5076 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_answer` +-- + +DROP TABLE IF EXISTS `checklist_answer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_answer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `answer` varchar(255) NOT NULL, + `comment` longtext DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `fk_checklist_answer_user_id` (`user_id`), + CONSTRAINT `fk_checklist_answer_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5352 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_category` +-- + +DROP TABLE IF EXISTS `checklist_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_category` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `category_name` varchar(191) DEFAULT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_checklist_category_category_name` (`category_name`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_checklist_category` +-- + +DROP TABLE IF EXISTS `checklist_checklist_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_checklist_category` ( + `checklist_id` bigint(20) NOT NULL, + `checklist_category_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + KEY `fk_cca_checklist_id` (`checklist_id`), + KEY `fk_cca_checklist_category_id` (`checklist_category_id`), + CONSTRAINT `fk_cca_checklist_category_id` FOREIGN KEY (`checklist_category_id`) REFERENCES `checklist_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cca_checklist_id` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_checklist_question` +-- + +DROP TABLE IF EXISTS `checklist_checklist_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_checklist_question` ( + `checklist_id` bigint(20) NOT NULL, + `checklist_question_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`checklist_id`,`checklist_question_id`), + UNIQUE KEY `uk_ccq_checklist_question_id` (`checklist_question_id`), + CONSTRAINT `fk_ccq_checklist_id` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ccq_checklist_question_id` FOREIGN KEY (`checklist_question_id`) REFERENCES `checklist_question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_question` +-- + +DROP TABLE IF EXISTS `checklist_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_question` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `question` longtext NOT NULL, + `question_number` int(11) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=50911 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_question_checklist_answer` +-- + +DROP TABLE IF EXISTS `checklist_question_checklist_answer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_question_checklist_answer` ( + `checklist_question_id` bigint(20) NOT NULL, + `checklist_answer_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + UNIQUE KEY `uk_cq_ca_checklist_answer_id` (`checklist_answer_id`), + KEY `fk_cq_ca_checklist_question_id` (`checklist_question_id`), + CONSTRAINT `fk_cq_ca_checklist_answer_id` FOREIGN KEY (`checklist_answer_id`) REFERENCES `checklist_answer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cq_ca_checklist_question_id` FOREIGN KEY (`checklist_question_id`) REFERENCES `checklist_question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_template` +-- + +DROP TABLE IF EXISTS `checklist_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `name` varchar(255) NOT NULL, + `creator_user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `template_number` int(11) NOT NULL DEFAULT 999, + `description` longtext DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_checklist_template_creator_user_id` (`creator_user_id`), + CONSTRAINT `fk_checklist_template_creator_user_id` FOREIGN KEY (`creator_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_template_checklist_category` +-- + +DROP TABLE IF EXISTS `checklist_template_checklist_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_template_checklist_category` ( + `checklist_template_id` bigint(20) NOT NULL, + `checklist_category_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + KEY `fk_ct_cc_checklist_template_id` (`checklist_template_id`), + KEY `fk_ct_cc_checklist_category_id` (`checklist_category_id`), + CONSTRAINT `fk_ct_cc_checklist_category_id` FOREIGN KEY (`checklist_category_id`) REFERENCES `checklist_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ct_cc_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_template_project_type` +-- + +DROP TABLE IF EXISTS `checklist_template_project_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_template_project_type` ( + `checklist_template_id` bigint(20) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + PRIMARY KEY (`checklist_template_id`,`project_type_id`), + KEY `fk_ct_pt_project_type_id` (`project_type_id`), + CONSTRAINT `fk_ct_pt_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ct_pt_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_template_question` +-- + +DROP TABLE IF EXISTS `checklist_template_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_template_question` ( + `checklist_template_id` bigint(20) NOT NULL, + `question` longtext DEFAULT NULL, + KEY `fk_ctq_checklist_template_id` (`checklist_template_id`), + CONSTRAINT `fk_ctq_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `checklist_user_last_open_date` +-- + +DROP TABLE IF EXISTS `checklist_user_last_open_date`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checklist_user_last_open_date` ( + `checklist_id` bigint(20) NOT NULL, + `last_open_date` datetime DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`checklist_id`,`user_id`), + KEY `fk_cu_lod_user_id` (`user_id`), + CONSTRAINT `fk_cu_lod_checklist_id` FOREIGN KEY (`checklist_id`) REFERENCES `checklist` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_cu_lod_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `comment` +-- + +DROP TABLE IF EXISTS `comment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `comment` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `comment` longtext DEFAULT NULL, + `comment_thread_id` bigint(20) NOT NULL, + `creator_user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `fk_comment_creator_user_id` (`creator_user_id`), + KEY `fk_comment_comment_thread_id` (`comment_thread_id`), + CONSTRAINT `fk_comment_comment_thread_id` FOREIGN KEY (`comment_thread_id`) REFERENCES `comment_thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_comment_creator_user_id` FOREIGN KEY (`creator_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3538960 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `comment_thread` +-- + +DROP TABLE IF EXISTS `comment_thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `comment_thread` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `commentable_id` bigint(20) NOT NULL, + `commentable_key` varchar(191) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_comment_thread_id_key` (`commentable_id`,`commentable_key`) +) ENGINE=InnoDB AUTO_INCREMENT=2104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `criterion` +-- + +DROP TABLE IF EXISTS `criterion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `criterion` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title_sv` varchar(255) NOT NULL, + `title_en` varchar(255) NOT NULL DEFAULT '', + `description_sv` varchar(2000) DEFAULT NULL, + `description_en` varchar(2000) DEFAULT NULL, + `feedback` longtext DEFAULT NULL, + `sort_order` int(11) NOT NULL, + `report_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_criterion_report_id` (`report_id`), + CONSTRAINT `fk_criterion_report_id` FOREIGN KEY (`report_id`) REFERENCES `report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `decision` +-- + +DROP TABLE IF EXISTS `decision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `decision` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `status` varchar(255) DEFAULT NULL, + `reason` longtext DEFAULT NULL, + `comment` longtext DEFAULT NULL, + `requested_date` datetime NOT NULL, + `decision_date` datetime DEFAULT NULL, + `deadline` datetime DEFAULT NULL, + `assigned_reviewer_date` date DEFAULT NULL, + `assigned_reviewer_id` bigint(20) DEFAULT NULL, + `attachment_reference_id` bigint(20) DEFAULT NULL, + `reviewer_approval_id` bigint(20) NOT NULL, + `thesis_reference_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_decision_assigned_reviewer_id` (`assigned_reviewer_id`), + KEY `fk_decision_attachment_reference_id` (`attachment_reference_id`), + KEY `fk_decision_thesis_reference_id` (`thesis_reference_id`), + KEY `fk_decision_reviewer_approval_id` (`reviewer_approval_id`), + CONSTRAINT `fk_decision_assigned_reviewer_id` FOREIGN KEY (`assigned_reviewer_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_decision_attachment_reference_id` FOREIGN KEY (`attachment_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_decision_reviewer_approval_id` FOREIGN KEY (`reviewer_approval_id`) REFERENCES `reviewer_approval` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_decision_thesis_reference_id` FOREIGN KEY (`thesis_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `event` +-- + +DROP TABLE IF EXISTS `event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `name` varchar(191) NOT NULL, + `description` mediumtext DEFAULT NULL, + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `external_link` +-- + +DROP TABLE IF EXISTS `external_link`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_link` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `url` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_external_link_project_id` (`project_id`), + KEY `fk_external_link_user_id` (`user_id`), + CONSTRAINT `fk_external_link_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_external_link_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `external_resource` +-- + +DROP TABLE IF EXISTS `external_resource`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_resource` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `url` varchar(255) NOT NULL, + `label` varchar(255) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_external_resource_project_type_id` (`project_type_id`), + CONSTRAINT `fk_external_resource_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `file_description` +-- + +DROP TABLE IF EXISTS `file_description`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `file_description` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `name` varchar(255) DEFAULT NULL, + `mime_type` varchar(255) DEFAULT NULL, + `size` bigint(20) DEFAULT NULL, + `file_identifier` varchar(255) DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + `user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_file_description_user_id` (`user_id`), + CONSTRAINT `fk_file_description_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3007 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `file_reference` +-- + +DROP TABLE IF EXISTS `file_reference`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `file_reference` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `file_description_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_file_reference_file_description_id` (`file_description_id`), + CONSTRAINT `fk_file_reference_file_description_id` FOREIGN KEY (`file_description_id`) REFERENCES `file_description` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_seminar` +-- + +DROP TABLE IF EXISTS `final_seminar`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_seminar` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `deleted` tinyint(1) NOT NULL, + `start_date` datetime NOT NULL, + `room` varchar(255) NOT NULL, + `max_opponents` int(11) NOT NULL, + `max_participants` int(11) NOT NULL, + `presentation_lang` varchar(255) NOT NULL, + `document_upload_date` datetime DEFAULT NULL, + `extra_info` text DEFAULT NULL, + `creation_reason` mediumtext DEFAULT NULL, + `manual_participants` tinyint(1) NOT NULL DEFAULT 0, + `document_file_reference_id` bigint(20) DEFAULT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_final_seminar_project_id` (`project_id`), + KEY `idx_final_seminar_deleted` (`deleted`), + KEY `fk_final_seminar_document_file_reference_id` (`document_file_reference_id`), + CONSTRAINT `fk_final_seminar_document_file_reference_id` FOREIGN KEY (`document_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_final_seminar_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1215 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_seminar_active_participation` +-- + +DROP TABLE IF EXISTS `final_seminar_active_participation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_seminar_active_participation` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `grade` varchar(20) DEFAULT NULL, + `final_seminar_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_fsap_final_seminar_id` (`final_seminar_id`), + KEY `fk_fsap_user_id` (`user_id`), + KEY `fk_fsap_project_id` (`project_id`), + CONSTRAINT `fk_fsap_final_seminar_id` FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fsap_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fsap_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3597 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_seminar_opposition` +-- + +DROP TABLE IF EXISTS `final_seminar_opposition`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_seminar_opposition` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `grade` varchar(20) DEFAULT NULL, + `points` int(11) DEFAULT NULL, + `feedback` varchar(2000) DEFAULT NULL, + `final_seminar_id` bigint(20) NOT NULL, + `opponent_report_file_reference_id` bigint(20) DEFAULT NULL, + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_fso_final_seminar_id` (`final_seminar_id`), + KEY `fk_fso_opponent_report_file_reference_id` (`opponent_report_file_reference_id`), + KEY `fk_fso_project_id` (`project_id`), + KEY `fk_fso_user_id` (`user_id`), + CONSTRAINT `fk_fso_final_seminar_id` FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fso_opponent_report_file_reference_id` FOREIGN KEY (`opponent_report_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fso_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fso_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1977 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_seminar_respondent` +-- + +DROP TABLE IF EXISTS `final_seminar_respondent`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_seminar_respondent` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `grade` varchar(20) DEFAULT NULL, + `final_seminar_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_fsr_final_seminar_id` (`final_seminar_id`), + KEY `fk_fsr_user_id` (`user_id`), + CONSTRAINT `fk_fsr_final_seminar_id` FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_fsr_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_seminar_settings` +-- + +DROP TABLE IF EXISTS `final_seminar_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_seminar_settings` ( + `id` bigint(20) NOT NULL, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `days_ahead_to_create` int(11) NOT NULL, + `days_ahead_to_register_opposition` int(11) NOT NULL, + `days_ahead_to_register_participation` int(11) NOT NULL, + `days_ahead_to_upload_thesis` int(11) NOT NULL, + `thesis_must_be_pdf` tinyint(1) NOT NULL, + `evaluation_url` longtext DEFAULT NULL, + `opposition_priority_days` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `final_thesis` +-- + +DROP TABLE IF EXISTS `final_thesis`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `final_thesis` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title_sv` longtext DEFAULT NULL, + `title_en` longtext DEFAULT NULL, + `status` varchar(32) NOT NULL, + `date_approved` date DEFAULT NULL, + `date_rejected` date DEFAULT NULL, + `rejection_comment` text DEFAULT NULL, + `text_matching_analysis` text DEFAULT NULL, + `text_matching_document_reference_id` bigint(20) DEFAULT NULL, + `document_reference_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_final_thesis_text_matching_document_reference_id` (`text_matching_document_reference_id`), + KEY `fk_final_thesis_document_reference_id` (`document_reference_id`), + KEY `fk_final_thesis_project_id` (`project_id`), + CONSTRAINT `fk_final_thesis_document_reference_id` FOREIGN KEY (`document_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_final_thesis_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_final_thesis_text_matching_document_reference_id` FOREIGN KEY (`text_matching_document_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `footer_address` +-- + +DROP TABLE IF EXISTS `footer_address`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `footer_address` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `address` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `footer_link` +-- + +DROP TABLE IF EXISTS `footer_link`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `footer_link` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `footer_column` varchar(10) NOT NULL, + `title` varchar(255) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `order` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `forum_notification` +-- + +DROP TABLE IF EXISTS `forum_notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `forum_notification` ( + `forum_post_id` bigint(20) NOT NULL, + `notification_data_id` bigint(20) NOT NULL, + PRIMARY KEY (`forum_post_id`,`notification_data_id`), + KEY `fk_forum_notification_notification_data_id` (`notification_data_id`), + CONSTRAINT `fk_forum_notification_forum_post_id` FOREIGN KEY (`forum_post_id`) REFERENCES `forum_post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_forum_notification_notification_data_id` FOREIGN KEY (`notification_data_id`) REFERENCES `notification_data` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `forum_post` +-- + +DROP TABLE IF EXISTS `forum_post`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `forum_post` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `content` longtext NOT NULL, + `deleted` tinyint(1) NOT NULL, + `thread_id` bigint(20) NOT NULL, + `user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_forum_post_deleted` (`deleted`), + KEY `fk_forum_post_thread_id` (`thread_id`), + KEY `fk_forum_post_user_id` (`user_id`), + CONSTRAINT `fk_forum_post_thread_id` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_forum_post_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1851 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `forum_post_file_reference` +-- + +DROP TABLE IF EXISTS `forum_post_file_reference`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `forum_post_file_reference` ( + `forum_post_id` bigint(20) NOT NULL, + `file_reference_id` bigint(20) NOT NULL, + PRIMARY KEY (`forum_post_id`,`file_reference_id`), + KEY `fk_forum_post_file_reference_file_reference_id` (`file_reference_id`), + CONSTRAINT `fk_forum_post_file_reference_file_reference_id` FOREIGN KEY (`file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_forum_post_file_reference_forum_post_id` FOREIGN KEY (`forum_post_id`) REFERENCES `forum_post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `forum_post_read_state` +-- + +DROP TABLE IF EXISTS `forum_post_read_state`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `forum_post_read_state` ( + `forum_post_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `read` tinyint(1) NOT NULL, + PRIMARY KEY (`forum_post_id`,`user_id`), + KEY `fk_forum_post_read_state_user_id` (`user_id`), + CONSTRAINT `fk_forum_post_read_state_forum_post_id` FOREIGN KEY (`forum_post_id`) REFERENCES `forum_post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_forum_post_read_state_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `general_system_settings` +-- + +DROP TABLE IF EXISTS `general_system_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `general_system_settings` ( + `id` bigint(20) NOT NULL, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `project_partner_days_to_live` int(11) NOT NULL, + `mail_from_name` varchar(50) NOT NULL, + `mail_notifications` bit(1) NOT NULL, + `number_of_latest_reviews_displayed` int(11) NOT NULL, + `peer_display_latest_reviews` bit(1) NOT NULL, + `public_reviews_activated` bit(1) NOT NULL, + `smtp_server` varchar(50) NOT NULL, + `system_from_mail` varchar(50) NOT NULL, + `peer_download_enabled` bit(1) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `scipro_url` varchar(50) NOT NULL, + `daisy_profile_link_base_url` varchar(100) DEFAULT NULL, + `show_single_sign_on` tinyint(1) NOT NULL DEFAULT 1, + `match_responsible_mail` varchar(50) DEFAULT NULL, + `external_room_booking_url` varchar(100) DEFAULT NULL, + `reviewer_support_mail` varchar(50) DEFAULT NULL, + `thesis_support_mail` varchar(50) DEFAULT NULL, + `external_getting_started_with_idea_url` varchar(100) DEFAULT NULL, + `external_grading_url` varchar(100) DEFAULT NULL, + `final_survey_available` tinyint(1) NOT NULL DEFAULT 0, + `active_project_idea_support_mail` varchar(50) DEFAULT NULL, + `daisy_select_research_area_url` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `general_system_settings_alarm_recipient` +-- + +DROP TABLE IF EXISTS `general_system_settings_alarm_recipient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `general_system_settings_alarm_recipient` ( + `general_system_settings_id` bigint(20) NOT NULL, + `mail` varchar(255) NOT NULL, + PRIMARY KEY (`general_system_settings_id`,`mail`), + CONSTRAINT `fk_general_system_settings_alarm_recipient_id` FOREIGN KEY (`general_system_settings_id`) REFERENCES `general_system_settings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `general_system_settings_supervisor_change_recipient` +-- + +DROP TABLE IF EXISTS `general_system_settings_supervisor_change_recipient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `general_system_settings_supervisor_change_recipient` ( + `general_system_settings_id` bigint(20) NOT NULL, + `mail` varchar(255) NOT NULL, + PRIMARY KEY (`general_system_settings_id`,`mail`), + CONSTRAINT `fk_general_system_settings_supervisor_change_recipient_id` FOREIGN KEY (`general_system_settings_id`) REFERENCES `general_system_settings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `general_system_settings_system_module` +-- + +DROP TABLE IF EXISTS `general_system_settings_system_module`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `general_system_settings_system_module` ( + `general_system_settings_id` bigint(20) NOT NULL, + `system_module` varchar(191) NOT NULL, + PRIMARY KEY (`general_system_settings_id`,`system_module`), + CONSTRAINT `fk_general_system_settings_system_module_id` FOREIGN KEY (`general_system_settings_id`) REFERENCES `general_system_settings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grade` +-- + +DROP TABLE IF EXISTS `grade`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grade` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `value` varchar(255) NOT NULL, + `reported_when` date NOT NULL, + `project_id` bigint(20) NOT NULL, + `reported_by_user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_grade_project_id` (`project_id`), + KEY `fk_grade_reported_by_user_id` (`reported_by_user_id`), + CONSTRAINT `fk_grade_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_grade_reported_by_user_id` FOREIGN KEY (`reported_by_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_criterion` +-- + +DROP TABLE IF EXISTS `grading_criterion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_criterion` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title_sv` varchar(255) NOT NULL, + `title_en` varchar(255) NOT NULL DEFAULT '', + `type` varchar(64) NOT NULL, + `points_required_to_pass` int(11) NOT NULL, + `points` int(11) DEFAULT NULL, + `feedback` longtext DEFAULT NULL, + `sort_order` int(11) NOT NULL, + `fx` tinyint(1) NOT NULL DEFAULT 1, + `flag` varchar(64) DEFAULT NULL, + `grading_report_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_grading_criterion_grading_report_id` (`grading_report_id`), + CONSTRAINT `fk_grading_criterion_grading_report_id` FOREIGN KEY (`grading_report_id`) REFERENCES `grading_report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_criterion_point` +-- + +DROP TABLE IF EXISTS `grading_criterion_point`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_criterion_point` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `point` int(11) NOT NULL, + `description_sv` longtext DEFAULT NULL, + `description_en` longtext DEFAULT NULL, + `grading_criterion_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_gcp_grading_criterion_id` (`grading_criterion_id`), + CONSTRAINT `fk_gcp_grading_criterion_id` FOREIGN KEY (`grading_criterion_id`) REFERENCES `grading_criterion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_criterion_point_template` +-- + +DROP TABLE IF EXISTS `grading_criterion_point_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_criterion_point_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `grading_criterion_template_id` bigint(20) NOT NULL, + `point` int(11) NOT NULL, + `description_sv` varchar(600) DEFAULT NULL, + `description_en` varchar(600) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_gc_pt_grading_criterion_template_id` (`grading_criterion_template_id`), + CONSTRAINT `fk_gc_pt_grading_criterion_template_id` FOREIGN KEY (`grading_criterion_template_id`) REFERENCES `grading_criterion_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_criterion_template` +-- + +DROP TABLE IF EXISTS `grading_criterion_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_criterion_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title_sv` varchar(255) NOT NULL, + `title_en` varchar(255) NOT NULL DEFAULT '', + `grading_report_template_id` bigint(20) NOT NULL, + `sort_order` int(11) NOT NULL, + `points_required_to_pass` int(11) NOT NULL, + `type` varchar(64) NOT NULL, + `fx` tinyint(1) NOT NULL DEFAULT 1, + `flag` varchar(64) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_gct_grading_report_template_id` (`grading_report_template_id`), + CONSTRAINT `fk_gct_grading_report_template_id` FOREIGN KEY (`grading_report_template_id`) REFERENCES `grading_report_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_history_approval` +-- + +DROP TABLE IF EXISTS `grading_history_approval`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_history_approval` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `when` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_grading_history_approval_project_id` (`project_id`), + CONSTRAINT `fk_grading_history_approval_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_history_rejection` +-- + +DROP TABLE IF EXISTS `grading_history_rejection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_history_rejection` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `reason` text NOT NULL, + `when` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_grading_history_rejections_project_id` (`project_id`), + CONSTRAINT `fk_grading_history_rejections_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_history_submission` +-- + +DROP TABLE IF EXISTS `grading_history_submission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_history_submission` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `when` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `corrections` text DEFAULT NULL, + `author_user_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_grading_history_submission_project_id` (`project_id`), + KEY `fk_grading_history_submission_author_user_id` (`author_user_id`), + CONSTRAINT `fk_grading_history_submission_author_user_id` FOREIGN KEY (`author_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_grading_history_submission_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_report` +-- + +DROP TABLE IF EXISTS `grading_report`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_report` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project_id` bigint(20) NOT NULL, + `state` varchar(16) NOT NULL DEFAULT 'INITIAL', + `date_submitted_to_examiner` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_grading_report_project_id` (`project_id`), + CONSTRAINT `fk_grading_report_id` FOREIGN KEY (`id`) REFERENCES `report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_grading_report_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_report_template` +-- + +DROP TABLE IF EXISTS `grading_report_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_report_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `valid_from` date NOT NULL DEFAULT '2001-01-01', + `note` text DEFAULT NULL, + `failing_grade` varchar(32) DEFAULT NULL, + `project_type_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_grading_report_template_project_type_id_valid_from` (`project_type_id`,`valid_from`), + CONSTRAINT `fk_grading_report_template_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grading_report_template_grade_limit` +-- + +DROP TABLE IF EXISTS `grading_report_template_grade_limit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grading_report_template_grade_limit` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `grade` varchar(32) NOT NULL, + `lower_limit` int(11) NOT NULL, + `grading_report_template_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_grt_gl_grading_report_template_id_grade` (`grading_report_template_id`,`grade`), + CONSTRAINT `fk_grt_gl_grading_report_template_id` FOREIGN KEY (`grading_report_template_id`) REFERENCES `grading_report_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `hibernate_sequences` +-- + +DROP TABLE IF EXISTS `hibernate_sequences`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hibernate_sequences` ( + `sequence_name` varchar(255) DEFAULT NULL, + `sequence_next_hi_value` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea` +-- + +DROP TABLE IF EXISTS `idea`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `description` longtext DEFAULT NULL, + `prerequisites` longtext DEFAULT NULL, + `title` longtext NOT NULL, + `type` varchar(255) DEFAULT NULL, + `published` bit(1) NOT NULL DEFAULT b'1', + `cached_status` varchar(255) DEFAULT NULL, + `inactive` tinyint(1) NOT NULL DEFAULT 0, + `practical_how` longtext DEFAULT NULL, + `theory_how` longtext DEFAULT NULL, + `what` longtext DEFAULT NULL, + `why` longtext DEFAULT NULL, + `literature` longtext DEFAULT NULL, + `background` longtext DEFAULT NULL, + `problem` longtext DEFAULT NULL, + `method` longtext DEFAULT NULL, + `interests` longtext DEFAULT NULL, + `application_period_id` bigint(20) DEFAULT NULL, + `creator_user_id` bigint(20) NOT NULL, + `latest_match_id` bigint(20) DEFAULT NULL, + `project_id` bigint(20) DEFAULT NULL, + `project_type_id` bigint(20) NOT NULL, + `research_area_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_idea_project_id` (`project_id`), + KEY `fk_idea_application_period_id` (`application_period_id`), + KEY `fk_idea_project_type_id` (`project_type_id`), + KEY `fk_idea_research_area_id` (`research_area_id`), + KEY `fk_idea_creator_user_id` (`creator_user_id`), + KEY `fk_idea_latest_match_id` (`latest_match_id`), + CONSTRAINT `fk_idea_application_period_id` FOREIGN KEY (`application_period_id`) REFERENCES `application_period` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_creator_user_id` FOREIGN KEY (`creator_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_latest_match_id` FOREIGN KEY (`latest_match_id`) REFERENCES `idea_match` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_research_area_id` FOREIGN KEY (`research_area_id`) REFERENCES `research_area` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=581 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_export` +-- + +DROP TABLE IF EXISTS `idea_export`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_export` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `reason` varchar(255) DEFAULT NULL, + `result` varchar(255) DEFAULT NULL, + `idea_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_idea_export_idea_id` (`idea_id`), + CONSTRAINT `fk_idea_export_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_first_meeting` +-- + +DROP TABLE IF EXISTS `idea_first_meeting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_first_meeting` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` longtext DEFAULT NULL, + `first_meeting_date` datetime NOT NULL, + `room` longtext NOT NULL, + `idea_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_idea_first_meeting_idea_id` (`idea_id`), + CONSTRAINT `fk_idea_first_meeting_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=286 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_keyword` +-- + +DROP TABLE IF EXISTS `idea_keyword`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_keyword` ( + `idea_id` bigint(20) NOT NULL, + `keyword_id` bigint(20) NOT NULL, + PRIMARY KEY (`idea_id`,`keyword_id`), + KEY `fk_idea_keyword_keyword_id` (`keyword_id`), + CONSTRAINT `fk_idea_keyword_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_keyword_keyword_id` FOREIGN KEY (`keyword_id`) REFERENCES `keyword` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_language` +-- + +DROP TABLE IF EXISTS `idea_language`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_language` ( + `idea_id` bigint(20) NOT NULL, + `language` varchar(191) NOT NULL, + PRIMARY KEY (`idea_id`,`language`), + CONSTRAINT `fk_idea_language_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_match` +-- + +DROP TABLE IF EXISTS `idea_match`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_match` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `status` varchar(255) DEFAULT NULL, + `changed_by_user_id` bigint(20) DEFAULT NULL, + `idea_id` bigint(20) NOT NULL, + `supervisor_user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_idea_match_idea_id` (`idea_id`), + KEY `fk_idea_match_changed_by_user_id` (`changed_by_user_id`), + KEY `fk_idea_match_supervisor_user_id` (`supervisor_user_id`), + CONSTRAINT `fk_idea_match_changed_by_user_id` FOREIGN KEY (`changed_by_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_match_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_match_supervisor_user_id` FOREIGN KEY (`supervisor_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=819 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `idea_student` +-- + +DROP TABLE IF EXISTS `idea_student`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `idea_student` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `idea_id` bigint(20) NOT NULL DEFAULT 0, + `program_id` bigint(20) DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_idea_student_idea_id` (`idea_id`), + KEY `fk_idea_student_user_id` (`user_id`), + CONSTRAINT `fk_idea_student_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_idea_student_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=752 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `keyword` +-- + +DROP TABLE IF EXISTS `keyword`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `keyword` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `deleted` bit(1) NOT NULL, + `keyword` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_keyword_deleted` (`deleted`) +) ENGINE=InnoDB AUTO_INCREMENT=411 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `keyword_research_area` +-- + +DROP TABLE IF EXISTS `keyword_research_area`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `keyword_research_area` ( + `keyword_id` bigint(20) NOT NULL, + `research_area_id` bigint(20) NOT NULL, + KEY `fk_kra_keyword_id` (`keyword_id`), + KEY `fk_kra_research_area_id` (`research_area_id`), + CONSTRAINT `fk_kra_keyword_id` FOREIGN KEY (`keyword_id`) REFERENCES `keyword` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_kra_research_area_id` FOREIGN KEY (`research_area_id`) REFERENCES `research_area` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mail_event` +-- + +DROP TABLE IF EXISTS `mail_event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mail_event` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `subject` varchar(255) NOT NULL, + `from_name` varchar(255) DEFAULT NULL, + `from_email` varchar(255) DEFAULT NULL, + `message_body` longtext NOT NULL, + `sent` tinyint(1) NOT NULL DEFAULT 0, + `message_id` varchar(255) DEFAULT NULL, + `notification_event_type` varchar(255) DEFAULT NULL, + `attachment_file_reference_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_mail_event_attachment_file_reference_id` (`attachment_file_reference_id`), + CONSTRAINT `fk_mail_event_attachment_file_reference_id` FOREIGN KEY (`attachment_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=14116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mail_event_non_user_recipient` +-- + +DROP TABLE IF EXISTS `mail_event_non_user_recipient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mail_event_non_user_recipient` ( + `mail_event_id` bigint(20) NOT NULL, + `non_user_recipient` varchar(255) DEFAULT NULL, + KEY `fk_mail_event_non_user_recipient_mail_event_id` (`mail_event_id`), + CONSTRAINT `fk_mail_event_non_user_recipient_mail_event_id` FOREIGN KEY (`mail_event_id`) REFERENCES `mail_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mail_event_recipient` +-- + +DROP TABLE IF EXISTS `mail_event_recipient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mail_event_recipient` ( + `mail_event_id` bigint(20) NOT NULL, + `recipient_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`mail_event_id`,`recipient_id`), + KEY `fk_mail_event_recipient_recipient_id` (`recipient_id`), + CONSTRAINT `fk_mail_event_recipient_mail_event_id` FOREIGN KEY (`mail_event_id`) REFERENCES `mail_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_mail_event_recipient_recipient_id` FOREIGN KEY (`recipient_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `milestone` +-- + +DROP TABLE IF EXISTS `milestone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestone` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `confirmed` tinyint(1) NOT NULL, + `milestone_activity_template_id` bigint(20) NOT NULL, + `project_id` bigint(20) DEFAULT NULL, + `user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_milestone_milestone_activity_template_id` (`milestone_activity_template_id`), + KEY `fk_milestone_project_id` (`project_id`), + KEY `fk_milestone_user_id` (`user_id`), + CONSTRAINT `fk_milestone_milestone_activity_template_id` FOREIGN KEY (`milestone_activity_template_id`) REFERENCES `milestone_activity_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_milestone_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_milestone_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `milestone_activity_template` +-- + +DROP TABLE IF EXISTS `milestone_activity_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestone_activity_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `title` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + `code` varchar(191) DEFAULT NULL, + `sort_order` int(11) DEFAULT NULL, + `editable_by_students` bit(1) NOT NULL DEFAULT b'0', + `milestone_phase_template_id` bigint(20) NOT NULL, + `activated_by_event_name` varchar(191) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_milestone_activity_template_code` (`code`), + KEY `idx_milestone_activity_template_deleted` (`deleted`), + KEY `fk_mat_milestone_phase_template_id` (`milestone_phase_template_id`), + KEY `fk_mat_activated_by_event_name` (`activated_by_event_name`), + CONSTRAINT `fk_mat_activated_by_event_name` FOREIGN KEY (`activated_by_event_name`) REFERENCES `event` (`name`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_mat_milestone_phase_template_id` FOREIGN KEY (`milestone_phase_template_id`) REFERENCES `milestone_phase_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `milestone_activity_template_project_type` +-- + +DROP TABLE IF EXISTS `milestone_activity_template_project_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestone_activity_template_project_type` ( + `milestone_activity_template_id` bigint(20) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + PRIMARY KEY (`milestone_activity_template_id`,`project_type_id`), + KEY `fk_ma_tpt_project_type_id` (`project_type_id`), + CONSTRAINT `fk_ma_tpt_milestone_activity_template_id` FOREIGN KEY (`milestone_activity_template_id`) REFERENCES `milestone_activity_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ma_tpt_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `milestone_phase_template` +-- + +DROP TABLE IF EXISTS `milestone_phase_template`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestone_phase_template` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `title` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `sort_order` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_milestone_phase_template_deleted` (`deleted`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `national_subject_category` +-- + +DROP TABLE IF EXISTS `national_subject_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `national_subject_category` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_sv` varchar(255) NOT NULL, + `name_en` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL, + `preselected` tinyint(1) NOT NULL, + `external_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_national_subject_category_external_id` (`external_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `non_work_day_period` +-- + +DROP TABLE IF EXISTS `non_work_day_period`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `non_work_day_period` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `comment` varchar(255) NOT NULL, + `end_date` date NOT NULL, + `start_date` date NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `note` +-- + +DROP TABLE IF EXISTS `note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `note` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `user_id` bigint(20) NOT NULL, + `content` longtext DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_note_user_id` (`user_id`), + CONSTRAINT `fk_note_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notification` +-- + +DROP TABLE IF EXISTS `notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `mailed` bit(1) NOT NULL, + `unread` bit(1) NOT NULL, + `notification_data_id` bigint(20) DEFAULT NULL, + `user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_notification_user_id` (`user_id`), + KEY `fk_notification_notification_data_id` (`notification_data_id`), + CONSTRAINT `fk_notification_notification_data_id` FOREIGN KEY (`notification_data_id`) REFERENCES `notification_data` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=14456 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notification_data` +-- + +DROP TABLE IF EXISTS `notification_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification_data` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `event` varchar(255) DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + `source` longtext DEFAULT NULL, + `additional_source` longtext DEFAULT NULL, + `subclass` varchar(31) NOT NULL, + `final_seminar_id` bigint(20) DEFAULT NULL, + `idea_id` bigint(20) DEFAULT NULL, + `milestone_id` bigint(20) DEFAULT NULL, + `peer_request_id` bigint(20) DEFAULT NULL, + `peer_review_id` bigint(20) DEFAULT NULL, + `project_id` bigint(20) DEFAULT NULL, + `project_group_id` bigint(20) DEFAULT NULL, + `caused_by_user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_notification_data_final_seminar_id` (`final_seminar_id`), + KEY `fk_notification_data_idea_id` (`idea_id`), + KEY `fk_notification_data_milestone_id` (`milestone_id`), + KEY `fk_notification_data_peer_request_id` (`peer_request_id`), + KEY `fk_notification_data_peer_review_id` (`peer_review_id`), + KEY `fk_notification_data_project_id` (`project_id`), + KEY `fk_notification_data_project_group_id` (`project_group_id`), + KEY `fk_notification_data_caused_by_user_id` (`caused_by_user_id`), + CONSTRAINT `fk_notification_data_caused_by_user_id` FOREIGN KEY (`caused_by_user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_final_seminar_id` FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_milestone_id` FOREIGN KEY (`milestone_id`) REFERENCES `milestone` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_peer_request_id` FOREIGN KEY (`peer_request_id`) REFERENCES `peer_request` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_peer_review_id` FOREIGN KEY (`peer_review_id`) REFERENCES `peer_review` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_project_group_id` FOREIGN KEY (`project_group_id`) REFERENCES `project_group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_notification_data_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=5584 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notification_delivery_configuration` +-- + +DROP TABLE IF EXISTS `notification_delivery_configuration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification_delivery_configuration` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `event` varchar(191) NOT NULL, + `method` varchar(191) NOT NULL, + `type` varchar(191) NOT NULL, + `user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_one_setting_per_user` (`type`,`event`,`method`,`user_id`), + KEY `fk_notification_delivery_configuration_user_id` (`user_id`), + CONSTRAINT `fk_notification_delivery_configuration_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notification_receiver_configuration` +-- + +DROP TABLE IF EXISTS `notification_receiver_configuration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notification_receiver_configuration` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `type` varchar(191) NOT NULL, + `event` varchar(191) NOT NULL, + `member` varchar(191) NOT NULL, + `enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `one_setting_per_role` (`type`,`event`,`member`) +) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `opposition_report` +-- + +DROP TABLE IF EXISTS `opposition_report`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `opposition_report` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `thesis_summary` longtext DEFAULT NULL, + `attachment_file_reference_id` bigint(20) DEFAULT NULL, + `final_seminar_opposition_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_or_final_seminar_opposition_id` (`final_seminar_opposition_id`), + KEY `fk_or_attachment_file_reference_id` (`attachment_file_reference_id`), + CONSTRAINT `fk_or_attachment_file_reference_id` FOREIGN KEY (`attachment_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_or_final_seminar_opposition_id` FOREIGN KEY (`final_seminar_opposition_id`) REFERENCES `final_seminar_opposition` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_or_id` FOREIGN KEY (`id`) REFERENCES `report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `password` +-- + +DROP TABLE IF EXISTS `password`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `password` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `deleted` bit(1) NOT NULL, + `hash` tinyblob DEFAULT NULL, + `salt` tinyblob DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_password_user_id` (`user_id`), + KEY `idx_password_deleted` (`deleted`), + CONSTRAINT `fk_password_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `peer_request` +-- + +DROP TABLE IF EXISTS `peer_request`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `peer_request` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `comment` longtext DEFAULT NULL, + `status` varchar(255) NOT NULL, + `language` varchar(255) NOT NULL, + `checklist_template_id` bigint(20) DEFAULT NULL, + `file_reference_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + `requester_user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_peer_request_checklist_template_id` (`checklist_template_id`), + KEY `fk_peer_request_file_reference_id` (`file_reference_id`), + KEY `fk_peer_request_project_id` (`project_id`), + KEY `fk_peer_request_requester_user_id` (`requester_user_id`), + CONSTRAINT `fk_peer_request_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_peer_request_file_reference_id` FOREIGN KEY (`file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_peer_request_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_peer_request_requester_user_id` FOREIGN KEY (`requester_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1145 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `peer_review` +-- + +DROP TABLE IF EXISTS `peer_review`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `peer_review` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `comment` longtext DEFAULT NULL, + `status` varchar(255) NOT NULL, + `deadline` datetime NOT NULL, + `file_reference_id` bigint(20) DEFAULT NULL, + `peer_request_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + `reviewer_user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_peer_review_file_reference_id` (`file_reference_id`), + KEY `fk_peer_review_peer_request_id` (`peer_request_id`), + KEY `fk_peer_review_project_id` (`project_id`), + KEY `fk_peer_review_reviewer_user_id` (`reviewer_user_id`), + CONSTRAINT `fk_peer_review_file_reference_id` FOREIGN KEY (`file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_peer_review_peer_request_id` FOREIGN KEY (`peer_request_id`) REFERENCES `peer_request` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_peer_review_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_peer_review_reviewer_user_id` FOREIGN KEY (`reviewer_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1038 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `plagiarism_request` +-- + +DROP TABLE IF EXISTS `plagiarism_request`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plagiarism_request` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `document_file_reference_id` bigint(20) NOT NULL, + `receiver_user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_plagiarism_request_document_file_reference_id` (`document_file_reference_id`), + KEY `fk_plagiarism_request_receiver_user_id` (`receiver_user_id`), + CONSTRAINT `fk_plagiarism_request_document_file_reference_id` FOREIGN KEY (`document_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_plagiarism_request_receiver_user_id` FOREIGN KEY (`receiver_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `preliminary_match` +-- + +DROP TABLE IF EXISTS `preliminary_match`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `preliminary_match` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL DEFAULT 0, + `comment` mediumtext DEFAULT NULL, + `idea_id` bigint(20) NOT NULL, + `supervisor_user_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_preliminary_match_idea_id` (`idea_id`), + KEY `fk_preliminary_match_supervisor_user_id` (`supervisor_user_id`), + CONSTRAINT `fk_preliminary_match_idea_id` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_preliminary_match_supervisor_user_id` FOREIGN KEY (`supervisor_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `program` +-- + +DROP TABLE IF EXISTS `program`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `program` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `external_id` bigint(20) DEFAULT NULL, + `name_sv` varchar(255) NOT NULL, + `name_en` varchar(255) DEFAULT NULL, + `code` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project` +-- + +DROP TABLE IF EXISTS `project`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `title` longtext NOT NULL, + `credits` int(11) NOT NULL DEFAULT 0, + `language` varchar(255) DEFAULT NULL, + `start_date` date NOT NULL, + `expected_end_date` date DEFAULT NULL, + `external_organization` varchar(255) DEFAULT NULL, + `project_status` varchar(255) DEFAULT NULL, + `final_seminar_rule_exmpt` bit(1) NOT NULL DEFAULT b'0', + `state_of_mind` varchar(255) DEFAULT NULL, + `state_of_mind_reason` varchar(255) DEFAULT NULL, + `state_of_mind_date` datetime DEFAULT NULL, + `daisy_identifier` bigint(20) DEFAULT NULL, + `project_type_id` bigint(20) NOT NULL, + `research_area_id` bigint(20) DEFAULT NULL, + `supervisor_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_project_daisy_identifier` (`daisy_identifier`), + KEY `fk_project_project_type_id` (`project_type_id`), + KEY `fk_project_research_area_id` (`research_area_id`), + KEY `fk_project_supervisor_id` (`supervisor_id`), + CONSTRAINT `fk_project_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_research_area_id` FOREIGN KEY (`research_area_id`) REFERENCES `research_area` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_supervisor_id` FOREIGN KEY (`supervisor_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3632 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_cosupervisor` +-- + +DROP TABLE IF EXISTS `project_cosupervisor`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_cosupervisor` ( + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`user_id`,`project_id`), + KEY `fk_project_cosupervisor_project_id` (`project_id`), + CONSTRAINT `fk_project_cosupervisor_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_cosupervisor_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_file` +-- + +DROP TABLE IF EXISTS `project_file`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_file` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `file_source` varchar(255) NOT NULL, + `file_reference_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_project_file_file_reference_id` (`file_reference_id`), + KEY `fk_project_file_project_id` (`project_id`), + CONSTRAINT `fk_project_file_file_reference_id` FOREIGN KEY (`file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_file_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_first_meeting` +-- + +DROP TABLE IF EXISTS `project_first_meeting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_first_meeting` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `room` longtext NOT NULL, + `activity_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_project_first_meeting_activity_id` (`activity_id`), + CONSTRAINT `fk_project_first_meeting_activity_id` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_group` +-- + +DROP TABLE IF EXISTS `project_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_group` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `description` longtext DEFAULT NULL, + `active` bit(1) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_project_group_user_id` (`user_id`), + CONSTRAINT `fk_project_group_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_group_project` +-- + +DROP TABLE IF EXISTS `project_group_project`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_group_project` ( + `project_group_id` bigint(20) NOT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`project_group_id`,`project_id`), + KEY `fk_project_group_project_project_id` (`project_id`), + CONSTRAINT `fk_project_group_project_project_group_id` FOREIGN KEY (`project_group_id`) REFERENCES `project_group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_group_project_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_group_thread` +-- + +DROP TABLE IF EXISTS `project_group_thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_group_thread` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project_group_id` bigint(20) NOT NULL, + `thread_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_project_group_thread_project_group_id` (`project_group_id`), + KEY `fk_project_group_thread_thread_id` (`thread_id`), + CONSTRAINT `fk_project_group_thread_project_group_id` FOREIGN KEY (`project_group_id`) REFERENCES `project_group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_group_thread_thread_id` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_partner` +-- + +DROP TABLE IF EXISTS `project_partner`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_partner` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `info_text` longtext NOT NULL, + `user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `project_type_id` bigint(20) NOT NULL, + `application_period_id` bigint(20) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`), + KEY `fk_project_partner_user_id` (`user_id`), + KEY `fk_project_partner_application_period_id` (`application_period_id`), + KEY `fk_project_partner_project_type_id` (`project_type_id`), + CONSTRAINT `fk_project_partner_application_period_id` FOREIGN KEY (`application_period_id`) REFERENCES `application_period` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_partner_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_partner_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_reviewer` +-- + +DROP TABLE IF EXISTS `project_reviewer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_reviewer` ( + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`project_id`,`user_id`), + KEY `fk_project_reviewer_user_id` (`user_id`), + CONSTRAINT `fk_project_reviewer_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_reviewer_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_thread` +-- + +DROP TABLE IF EXISTS `project_thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_thread` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project_id` bigint(20) NOT NULL, + `thread_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_project_thread_project_id` (`project_id`), + KEY `fk_project_thread_thread_id` (`thread_id`), + CONSTRAINT `fk_project_thread_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_thread_thread_id` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_type` +-- + +DROP TABLE IF EXISTS `project_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_type` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `deleted` bit(1) NOT NULL, + `description` longtext DEFAULT NULL, + `name` varchar(255) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `degree_type` varchar(32) NOT NULL DEFAULT 'NONE', + `reviewed` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`), + KEY `deleted_index` (`deleted`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_type_project_module` +-- + +DROP TABLE IF EXISTS `project_type_project_module`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_type_project_module` ( + `project_type_id` bigint(20) NOT NULL, + `project_module` varchar(191) NOT NULL, + PRIMARY KEY (`project_type_id`,`project_module`), + CONSTRAINT `fk_project_type_project_module_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_type_settings` +-- + +DROP TABLE IF EXISTS `project_type_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_type_settings` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `num_days_between_peer_reviews_on_same_project` int(11) NOT NULL, + `num_days_to_submit_peer_review` int(11) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + `num_days_before_peer_gets_cancelled` int(11) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `min_authors` int(11) NOT NULL DEFAULT 1, + `max_authors` int(11) NOT NULL DEFAULT 2, + `max_final_seminar_active_participation` int(11) NOT NULL, + `max_opponents_on_final_seminar` int(11) NOT NULL, + `min_final_seminar_active_participation` int(11) NOT NULL, + `min_opponents_on_final_seminar` int(11) NOT NULL, + `min_oppositions_to_be_graded` int(11) NOT NULL DEFAULT 0, + `min_active_participations_to_be_graded` int(11) NOT NULL DEFAULT 0, + `review_process_information_url_for_supervisor` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_project_type_settings_project_type_id` (`project_type_id`), + CONSTRAINT `fk_project_type_settings_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_user` +-- + +DROP TABLE IF EXISTS `project_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_user` ( + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `reflection` text DEFAULT NULL, + `subscribed_to_final_seminar_notifications` tinyint(1) NOT NULL DEFAULT 0, + `reflection_status` varchar(32) NOT NULL DEFAULT 'NOT_SUBMITTED', + `reflection_comment_by_supervisor` text DEFAULT NULL, + PRIMARY KEY (`user_id`,`project_id`), + KEY `fk_project_user_project_id` (`project_id`), + CONSTRAINT `fk_project_user_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_user_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `project_user_note` +-- + +DROP TABLE IF EXISTS `project_user_note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_user_note` ( + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `note` text DEFAULT NULL, + PRIMARY KEY (`project_id`,`user_id`), + KEY `fk_project_user_note_user_id` (`user_id`), + CONSTRAINT `fk_project_user_note_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_project_user_note_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `publication_metadata` +-- + +DROP TABLE IF EXISTS `publication_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `publication_metadata` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `abstract_sv` text DEFAULT NULL, + `abstract_en` text DEFAULT NULL, + `keywords_sv` text DEFAULT NULL, + `keywords_en` text DEFAULT NULL, + `national_subject_category_id` bigint(20) DEFAULT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_publication_metadata_national_subject_category_id` (`national_subject_category_id`), + KEY `fk_publication_metadata_project_id` (`project_id`), + CONSTRAINT `fk_publication_metadata_national_subject_category_id` FOREIGN KEY (`national_subject_category_id`) REFERENCES `national_subject_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_publication_metadata_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `question` +-- + +DROP TABLE IF EXISTS `question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `question` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(255) NOT NULL, + `text` text NOT NULL, + `order` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `question_choices` +-- + +DROP TABLE IF EXISTS `question_choices`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `question_choices` ( + `question_id` bigint(20) NOT NULL, + `choices` text NOT NULL, + KEY `fk_question_choices_question_id` (`question_id`), + CONSTRAINT `fk_question_choices_question_id` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `report` +-- + +DROP TABLE IF EXISTS `report`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `report` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `submitted` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `research_area` +-- + +DROP TABLE IF EXISTS `research_area`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `research_area` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `identifier` bigint(20) DEFAULT NULL, + `title` varchar(255) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `deleted` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_research_area_identifier` (`identifier`), + KEY `idx_research_area_deleted` (`deleted`) +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reviewer_approval` +-- + +DROP TABLE IF EXISTS `reviewer_approval`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reviewer_approval` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `type` varchar(64) NOT NULL, + `project_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_reviewer_approval_project_id` (`project_id`), + CONSTRAINT `fk_reviewer_approval_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reviewer_deadline_settings` +-- + +DROP TABLE IF EXISTS `reviewer_deadline_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reviewer_deadline_settings` ( + `id` bigint(20) NOT NULL, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `rough_draft_approval` int(11) NOT NULL, + `final_seminar_approval` int(11) NOT NULL, + `final_grading` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reviewer_grading_report` +-- + +DROP TABLE IF EXISTS `reviewer_grading_report`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reviewer_grading_report` ( + `id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `fk_reviewer_grading_report_id` FOREIGN KEY (`id`) REFERENCES `grading_report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reviewer_target` +-- + +DROP TABLE IF EXISTS `reviewer_target`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reviewer_target` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `reviewer_user_id` bigint(20) NOT NULL, + `year` int(11) NOT NULL, + `spring` int(11) NOT NULL, + `autumn` int(11) NOT NULL, + `note` text DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_reviewer_target_reviewer_user_id_year` (`reviewer_user_id`,`year`), + CONSTRAINT `fk_reviewer_target_reviewer_user_id` FOREIGN KEY (`reviewer_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reviewer_thread` +-- + +DROP TABLE IF EXISTS `reviewer_thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reviewer_thread` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project_id` bigint(20) NOT NULL, + `thread_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_reviewer_thread_project_id` (`project_id`,`thread_id`), + KEY `fk_reviewer_thread_thread_id` (`thread_id`), + CONSTRAINT `fk_reviewer_thread_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_reviewer_thread_thread_id` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `schema_version` +-- + +DROP TABLE IF EXISTS `schema_version`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `schema_version` ( + `installed_rank` int(11) NOT NULL, + `version` varchar(50) DEFAULT NULL, + `description` varchar(200) NOT NULL, + `type` varchar(20) NOT NULL, + `script` varchar(1000) NOT NULL, + `checksum` int(11) DEFAULT NULL, + `installed_by` varchar(100) NOT NULL, + `installed_on` timestamp NOT NULL DEFAULT current_timestamp(), + `execution_time` int(11) NOT NULL, + `success` tinyint(1) NOT NULL, + PRIMARY KEY (`installed_rank`), + KEY `schema_version_s_idx` (`success`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `supervisor_grading_report` +-- + +DROP TABLE IF EXISTS `supervisor_grading_report`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supervisor_grading_report` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `rejection_comment` text DEFAULT NULL, + `rejection_comment_feedback` text DEFAULT NULL, + `motivation` text DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_sgr_user_id` (`user_id`), + CONSTRAINT `fk_sgr_id` FOREIGN KEY (`id`) REFERENCES `grading_report` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_sgr_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `survey` +-- + +DROP TABLE IF EXISTS `survey`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `survey` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `project_id` bigint(20) NOT NULL, + `user_id` bigint(20) NOT NULL, + `submitted` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `fk_survey_project_id` (`project_id`), + KEY `fk_survey_user_id` (`user_id`), + CONSTRAINT `fk_survey_project_id` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_survey_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `survey_answer` +-- + +DROP TABLE IF EXISTS `survey_answer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `survey_answer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `survey_id` bigint(20) NOT NULL, + `question_id` bigint(20) NOT NULL, + `answer` text DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_survey_answer_question_id` (`question_id`), + KEY `fk_survey_answer_survey_id` (`survey_id`), + CONSTRAINT `fk_survey_answer_question_id` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_survey_answer_survey_id` FOREIGN KEY (`survey_id`) REFERENCES `survey` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `survey_answer_multiple_answers` +-- + +DROP TABLE IF EXISTS `survey_answer_multiple_answers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `survey_answer_multiple_answers` ( + `survey_answer_id` bigint(20) NOT NULL, + `multiple_answers` text NOT NULL, + KEY `fk_sama_survey_answer_id` (`survey_answer_id`), + CONSTRAINT `fk_sama_survey_answer_id` FOREIGN KEY (`survey_answer_id`) REFERENCES `survey_answer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `target` +-- + +DROP TABLE IF EXISTS `target`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `target` ( + `application_period_id` bigint(20) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + `target` int(11) NOT NULL, + `user_id` bigint(20) NOT NULL, + PRIMARY KEY (`application_period_id`,`project_type_id`,`user_id`), + KEY `fk_target_user_id` (`user_id`), + KEY `fk_target_project_type_id` (`project_type_id`), + CONSTRAINT `fk_target_application_period_id` FOREIGN KEY (`application_period_id`) REFERENCES `application_period` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_target_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_target_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `thread` +-- + +DROP TABLE IF EXISTS `thread`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `thread` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `subject` varchar(1000) NOT NULL, + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `unit` +-- + +DROP TABLE IF EXISTS `unit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `unit` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `identifier` bigint(20) DEFAULT NULL, + `title` varchar(255) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + `match_responsible` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_unit_identifier` (`identifier`) +) ENGINE=InnoDB AUTO_INCREMENT=2947 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `urkund_settings` +-- + +DROP TABLE IF EXISTS `urkund_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `urkund_settings` ( + `id` int(11) NOT NULL, + `enabled` tinyint(1) NOT NULL DEFAULT 0, + `username` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `urkund_submission` +-- + +DROP TABLE IF EXISTS `urkund_submission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `urkund_submission` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(4) NOT NULL, + `submitted_date` datetime NOT NULL, + `state` varchar(32) NOT NULL, + `next_poll_date` datetime NOT NULL, + `polling_delay` varchar(16) NOT NULL, + `message` varchar(255) DEFAULT NULL, + `report_url` varchar(255) DEFAULT NULL, + `significance` float DEFAULT NULL, + `analysis_address` varchar(255) DEFAULT NULL, + `document_file_reference_id` bigint(20) NOT NULL, + `receiver_user_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `fk_urkund_submission_document_file_reference_id` (`document_file_reference_id`), + KEY `fk_urkund_submission_receiver_user_id` (`receiver_user_id`), + CONSTRAINT `fk_urkund_submission_document_file_reference_id` FOREIGN KEY (`document_file_reference_id`) REFERENCES `file_reference` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_urkund_submission_receiver_user_id` FOREIGN KEY (`receiver_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user` +-- + +DROP TABLE IF EXISTS `user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `deleted` bit(1) NOT NULL, + `email_address` varchar(255) NOT NULL, + `first_name` varchar(255) NOT NULL, + `identifier` bigint(20) DEFAULT NULL, + `last_name` varchar(255) NOT NULL, + `full_name` varchar(510) GENERATED ALWAYS AS (concat(`first_name`,' ',`last_name`)) VIRTUAL, + `version` int(4) NOT NULL DEFAULT 0, + `password_id` bigint(20) DEFAULT NULL, + `unit_id` bigint(20) DEFAULT NULL, + `deceased` tinyint(1) NOT NULL DEFAULT 0, + `degree_type` varchar(32) NOT NULL DEFAULT 'NONE', + `active_as_supervisor` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_user_identifier` (`identifier`), + KEY `idx_user_deleted` (`deleted`), + KEY `fk_user_unit_id` (`unit_id`), + KEY `fk_user_password_id` (`password_id`), + CONSTRAINT `fk_user_password_id` FOREIGN KEY (`password_id`) REFERENCES `password` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_user_unit_id` FOREIGN KEY (`unit_id`) REFERENCES `unit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=18235 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_language` +-- + +DROP TABLE IF EXISTS `user_language`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_language` ( + `user_id` bigint(20) NOT NULL, + `language` varchar(191) NOT NULL, + PRIMARY KEY (`user_id`,`language`), + CONSTRAINT `fk_user_language_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_profile` +-- + +DROP TABLE IF EXISTS `user_profile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_profile` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `version` int(11) NOT NULL, + `other_info` varchar(255) DEFAULT NULL, + `phone_number` varchar(255) DEFAULT NULL, + `skype_id` varchar(255) DEFAULT NULL, + `user_id` bigint(20) NOT NULL, + `mail_compilation` tinyint(1) NOT NULL, + `default_supervisor_filter` tinyint(1) NOT NULL DEFAULT 1, + `selected_role` varchar(255) DEFAULT NULL, + `supervisor_project_note_display` varchar(15) NOT NULL DEFAULT 'COMPACT', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_user_profile_user_id` (`user_id`), + CONSTRAINT `fk_user_profile_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=797 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_profile_default_project_status_filter` +-- + +DROP TABLE IF EXISTS `user_profile_default_project_status_filter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_profile_default_project_status_filter` ( + `user_profile_id` bigint(20) NOT NULL, + `default_project_status_filter` varchar(255) DEFAULT NULL, + KEY `fk_user_profile_default_project_status_filter_user_profile_id` (`user_profile_id`), + CONSTRAINT `fk_user_profile_default_project_status_filter_user_profile_id` FOREIGN KEY (`user_profile_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_profile_default_project_team_member_roles_filter` +-- + +DROP TABLE IF EXISTS `user_profile_default_project_team_member_roles_filter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_profile_default_project_team_member_roles_filter` ( + `user_profile_id` bigint(20) NOT NULL, + `default_project_team_member_roles_filter` varchar(255) DEFAULT NULL, + KEY `fk_up_dp_tm_roles_filter_user_profile_id` (`user_profile_id`), + CONSTRAINT `fk_up_dp_tm_roles_filter_user_profile_id` FOREIGN KEY (`user_profile_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_profile_project_type` +-- + +DROP TABLE IF EXISTS `user_profile_project_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_profile_project_type` ( + `user_profile_id` bigint(20) NOT NULL, + `project_type_id` bigint(20) NOT NULL, + KEY `fk_user_profile_project_type_user_profile_id` (`user_profile_id`), + KEY `fk_user_profile_project_type_project_type_id` (`project_type_id`), + CONSTRAINT `fk_user_profile_project_type_project_type_id` FOREIGN KEY (`project_type_id`) REFERENCES `project_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_user_profile_project_type_user_profile_id` FOREIGN KEY (`user_profile_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_program` +-- + +DROP TABLE IF EXISTS `user_program`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_program` ( + `user_id` bigint(20) NOT NULL, + `program_id` bigint(20) NOT NULL, + PRIMARY KEY (`user_id`,`program_id`), + KEY `fk_user_program_program_id` (`program_id`), + CONSTRAINT `fk_user_program_program_id` FOREIGN KEY (`program_id`) REFERENCES `program` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_user_program_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_research_area` +-- + +DROP TABLE IF EXISTS `user_research_area`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_research_area` ( + `user_id` bigint(20) NOT NULL, + `research_area_id` bigint(20) NOT NULL, + PRIMARY KEY (`user_id`,`research_area_id`), + KEY `fk_ura_research_area_id` (`research_area_id`), + CONSTRAINT `fk_ura_research_area_id` FOREIGN KEY (`research_area_id`) REFERENCES `research_area` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ura_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_role` +-- + +DROP TABLE IF EXISTS `user_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_role` ( + `user_id` bigint(20) NOT NULL, + `role` varchar(191) NOT NULL, + PRIMARY KEY (`user_id`,`role`), + CONSTRAINT `fk_user_role_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `username` +-- + +DROP TABLE IF EXISTS `username`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `username` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `username` varchar(191) NOT NULL, + `user_id` bigint(20) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_username` (`username`), + KEY `fk_username_user_id` (`user_id`), + CONSTRAINT `fk_username_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=45156 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `worker_data` +-- + +DROP TABLE IF EXISTS `worker_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `worker_data` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_created` datetime NOT NULL, + `last_modified` datetime NOT NULL, + `last_run` datetime NOT NULL, + `last_successful_run` datetime DEFAULT '2011-11-28 01:00:00', + `name` varchar(191) NOT NULL, + `version` int(4) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-11-21 22:51:39 diff --git a/core/src/main/resources/db/migration/V200__activity_final_seminar.sql b/core/src/main/resources/db/migration/V200__activity_final_seminar.sql deleted file mode 100644 index bc2c6518fa..0000000000 --- a/core/src/main/resources/db/migration/V200__activity_final_seminar.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE IF NOT EXISTS `activity_final_seminar` ( - `final_seminar_id` bigint(20) NOT NULL, - `activity_id` bigint(20) NOT NULL, - PRIMARY KEY (`final_seminar_id`,`activity_id`), - KEY (`activity_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `activity_final_seminar` -ADD CONSTRAINT FOREIGN KEY (`final_seminar_id`) REFERENCES `final_seminar` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, -ADD CONSTRAINT FOREIGN KEY (`activity_id`) REFERENCES `Activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/core/src/main/resources/db/migration/V201__application_period_exemption_comment.sql b/core/src/main/resources/db/migration/V201__application_period_exemption_comment.sql deleted file mode 100644 index e4168794e0..0000000000 --- a/core/src/main/resources/db/migration/V201__application_period_exemption_comment.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `applicationperiodexemption` MODIFY COLUMN `comment` TEXT DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V202__multiple_files_in_forum_posts.sql b/core/src/main/resources/db/migration/V202__multiple_files_in_forum_posts.sql deleted file mode 100644 index 78ad8ffbec..0000000000 --- a/core/src/main/resources/db/migration/V202__multiple_files_in_forum_posts.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE IF NOT EXISTS `forum_post_file_description` ( - `forum_post_id` bigint(20) NOT NULL, - `file_description_id` bigint(20) NOT NULL, - PRIMARY KEY (`forum_post_id`,`file_description_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `forum_post_file_description` -ADD CONSTRAINT FOREIGN KEY (`forum_post_id`) REFERENCES `forum_post` (`id`), -ADD CONSTRAINT FOREIGN KEY (`file_description_id`) REFERENCES `file_description` (`id`); - -INSERT INTO forum_post_file_description (forum_post_id, file_description_id) SELECT id, attachment_id FROM forum_post WHERE attachment_id IS NOT NULL; - -ALTER TABLE `forum_post` DROP FOREIGN KEY `FKEDDC4F35CCABB192`; -ALTER TABLE `forum_post` DROP `attachment_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V203__limit_to_one_preliminary_grading_report_per_author_and_final_seminar.sql b/core/src/main/resources/db/migration/V203__limit_to_one_preliminary_grading_report_per_author_and_final_seminar.sql deleted file mode 100644 index 0a9307ba78..0000000000 --- a/core/src/main/resources/db/migration/V203__limit_to_one_preliminary_grading_report_per_author_and_final_seminar.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `preliminary_grading_report` -ADD CONSTRAINT `UK_one_preliminary_grading_report_per_author_and_final_seminar` -UNIQUE (`author_id`, `finalSeminar_id`); diff --git a/core/src/main/resources/db/migration/V204__removed_unsubmitted_preliminary_grading_reports.sql b/core/src/main/resources/db/migration/V204__removed_unsubmitted_preliminary_grading_reports.sql deleted file mode 100644 index 45c320e8cb..0000000000 --- a/core/src/main/resources/db/migration/V204__removed_unsubmitted_preliminary_grading_reports.sql +++ /dev/null @@ -1,21 +0,0 @@ -# Preliminary grading reports for the supervisor can not be un-submitted in the new process -CREATE TEMPORARY TABLE `pgr_id` (id BIGINT(20)); - -INSERT INTO `pgr_id` - SELECT - `id` - FROM `preliminary_grading_report` - INNER JOIN `report` USING (`id`) - WHERE `submitted` IS FALSE AND `author_id` = (SELECT - `supervisor_id` - FROM `project` - WHERE `id` = (SELECT - `project_id` - FROM `final_seminar` - WHERE `id` = `finalSeminar_id`)); - -DELETE FROM `criterion` WHERE `report_id` IN (SELECT `id` FROM `pgr_id`); -DELETE FROM `preliminary_grading_report` WHERE `id` IN (SELECT `id` FROM `pgr_id`); -DELETE FROM `report` WHERE `id` IN (SELECT `id` FROM `pgr_id`); - -DROP TABLE `pgr_id`; diff --git a/core/src/main/resources/db/migration/V205__rwanda_grade.sql b/core/src/main/resources/db/migration/V205__rwanda_grade.sql deleted file mode 100644 index cbd7f43a2e..0000000000 --- a/core/src/main/resources/db/migration/V205__rwanda_grade.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project` ADD `rwandaGrade` varchar(255) DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V206__rwanda_grade_rename.sql b/core/src/main/resources/db/migration/V206__rwanda_grade_rename.sql deleted file mode 100644 index 227ca1de1c..0000000000 --- a/core/src/main/resources/db/migration/V206__rwanda_grade_rename.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `scipro`.`project_type_project_modules` SET `projectModules` = 'FINAL_GRADING' WHERE `project_type_project_modules`.`projectModules` = 'RWANDA_GRADING'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V207__longer_final_seminar_reason.sql b/core/src/main/resources/db/migration/V207__longer_final_seminar_reason.sql deleted file mode 100644 index 8ef2fe1e6e..0000000000 --- a/core/src/main/resources/db/migration/V207__longer_final_seminar_reason.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `final_seminar` CHANGE `creationReason` `creationReason` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V208__adding_enabled_setting_to_forum_mail_settings.sql b/core/src/main/resources/db/migration/V208__adding_enabled_setting_to_forum_mail_settings.sql deleted file mode 100644 index 3f3a850d59..0000000000 --- a/core/src/main/resources/db/migration/V208__adding_enabled_setting_to_forum_mail_settings.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `forum_mail_settings` ADD `enabled` tinyint(1) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V209__added_external_room_booking_url.sql b/core/src/main/resources/db/migration/V209__added_external_room_booking_url.sql deleted file mode 100644 index 4dc3438ae0..0000000000 --- a/core/src/main/resources/db/migration/V209__added_external_room_booking_url.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD COLUMN `externalRoomBookingURL` VARCHAR(255) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V20__remove_mail_event_reply_to.sql b/core/src/main/resources/db/migration/V20__remove_mail_event_reply_to.sql deleted file mode 100644 index 24aaeca3b1..0000000000 --- a/core/src/main/resources/db/migration/V20__remove_mail_event_reply_to.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `mail_event_reply_to`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V210__point_template.sql b/core/src/main/resources/db/migration/V210__point_template.sql deleted file mode 100644 index be7cd84da7..0000000000 --- a/core/src/main/resources/db/migration/V210__point_template.sql +++ /dev/null @@ -1,101 +0,0 @@ -#Create a table for keeping template of 'grading criterion points', this table should be initialized via DataInitializer when we run the application -CREATE TABLE IF NOT EXISTS `grading_criterion_point_template` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `gradingCriterionTemplate_id` bigint(20) NOT NULL, - `point` INT(11) NOT NULL, - `description` VARCHAR(600) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_gradingCriterionTemplate_id` (`gradingCriterionTemplate_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `grading_criterion_point_template` -ADD CONSTRAINT `FK_gradingCriterionTemplate_id` FOREIGN KEY (`gradingCriterionTemplate_id`) REFERENCES `grading_criterion_template` (`id`); - -#Since the template can change during the time, we need a table for keeping the template that we use at a time -CREATE TABLE IF NOT EXISTS `GradingCriterionPoint` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `GradingCriterion_id` bigint(20) NOT NULL, - `point` INT(11) NOT NULL, - `description` longtext DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_GradingCriterion_id` (`GradingCriterion_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `GradingCriterionPoint` -ADD CONSTRAINT `FK_GradingCriterion_id` FOREIGN KEY (`GradingCriterion_id`) REFERENCES `GradingCriterion` (`id`); - -#Now we need to fill GradingCroterionPoint via extracting the old data from GradingCriterion -#First of all we add a row with point equal zero and no description for each GradingCriterion, because each criterion has a point equal 0 with no description -INSERT INTO `GradingCriterionPoint` (dateCreated, lastModified, version, GradingCriterion_id, point) - (SELECT dateCreated, lastModified, version, id, 0 FROM scipro.GradingCriterion); - -#Now we need to extract descriptions for every individual point via the general description that we had before -#We start with point 1 and we try to extract the part of description which is belonged to point 1 -#and we do the same for the other points (2, 3 & 4) as well -SET @param="1"; -INSERT INTO `GradingCriterionPoint` (`dateCreated`, `lastModified`, `version`, `GradingCriterion_id`, `point`, `description`) - (SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(`description`, (INSTR(`description`,@param) + 8), (INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') )) - FROM `GradingCriterion` - Where INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') <> 0 - ) UNION ( - SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(description, (INSTR(description, @param) + 8), 2000) - FROM `GradingCriterion` - WHERE INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`, @param) + 8 ,2000), '\n') = 0); - - -SET @param="2"; -INSERT INTO `GradingCriterionPoint` (`dateCreated`, `lastModified`, `version`, `GradingCriterion_id`, `point`, `description`) - (SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(`description`, (INSTR(`description`,@param) + 8), (INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') )) - FROM `GradingCriterion` - Where INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') <> 0 - ) UNION ( - SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(description, (INSTR(description, @param) + 8), 2000) - FROM `GradingCriterion` - WHERE INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`, @param) + 8 ,2000), '\n') = 0); - - -SET @param="3"; -INSERT INTO `GradingCriterionPoint` (`dateCreated`, `lastModified`, `version`, `GradingCriterion_id`, `point`, `description`) - (SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(`description`, (INSTR(`description`,@param) + 8), (INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') )) - FROM `GradingCriterion` - Where INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') <> 0 - ) UNION ( - SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(description, (INSTR(description, @param) + 8), 2000) - FROM `GradingCriterion` - WHERE INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`, @param) + 8 ,2000), '\n') = 0); - - -SET @param="4"; -INSERT INTO `GradingCriterionPoint` (`dateCreated`, `lastModified`, `version`, `GradingCriterion_id`, `point`, `description`) - (SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(`description`, (INSTR(`description`,@param) + 8), (INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') )) - FROM `GradingCriterion` - Where INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`,@param) + 8 ,2000), '\n') <> 0 - ) UNION ( - SELECT - `dateCreated`, `lastModified`, `version`, `id`, @param, SUBSTRING(description, (INSTR(description, @param) + 8), 2000) - FROM `GradingCriterion` - WHERE INSTR(`description`,@param) <> 0 AND INSTR(SUBSTRING(`description` ,INSTR(`description`, @param) + 8 ,2000), '\n') = 0); - -#We do not need the old descriptions because now we have one description for each point separately in the new tables -UPDATE `GradingCriterion` SET `description`=NULL; -UPDATE `grading_criterion_template` SET `description`=NULL; - -#we don't need maxPoints and description because we should find the max points, and the descriptions via GradingCriterionPointTemplate and GradingCriterionPoint -ALTER TABLE `grading_criterion_template` -DROP COLUMN `maxPoints`, DROP COLUMN `description`; - -ALTER TABLE `GradingCriterion` -DROP COLUMN `maxPoints`, DROP COLUMN `description`; diff --git a/core/src/main/resources/db/migration/V211__point_templates_for_bachelor_0_credits.sql b/core/src/main/resources/db/migration/V211__point_templates_for_bachelor_0_credits.sql deleted file mode 100644 index af7905f80c..0000000000 --- a/core/src/main/resources/db/migration/V211__point_templates_for_bachelor_0_credits.sql +++ /dev/null @@ -1,751 +0,0 @@ -################################################################### -#Bachelor, 0 credits -################################################################### -SET @projectTypeName = 'Bachelor'; -SET @credit = 0; - -################################################################### -SET @title = 'U1 Sammanfattning'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduktion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Frågeställning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Vetenskaplig förankring'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Metodval'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Metodtillämpning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Resultat'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Slutsatser och diskussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Struktur och språk'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 Källhänvisningar och dokumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originalitet och signifikans'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Oppositionsrapport'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentationer'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Aktivitet vid seminarer och möten'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revision efter slutseminarium'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V212__point_templates_for_bachelor_15_credits.sql b/core/src/main/resources/db/migration/V212__point_templates_for_bachelor_15_credits.sql deleted file mode 100644 index d83f2d3639..0000000000 --- a/core/src/main/resources/db/migration/V212__point_templates_for_bachelor_15_credits.sql +++ /dev/null @@ -1,751 +0,0 @@ -################################################################### -#Bachelor, 15 credits -################################################################### -SET @projectTypeName = 'Bachelor'; -SET @credit = 15; - -################################################################### -SET @title = 'U1 Sammanfattning'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduktion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Frågeställning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Vetenskaplig förankring'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Metodval'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Metodtillämpning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Resultat'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Slutsatser och diskussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Struktur och språk'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 Källhänvisningar och dokumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originalitet och signifikans'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Oppositionsrapport'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentationer'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Aktivitet vid seminarer och möten'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revision efter slutseminarium'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V213__point_templates_for_bachelor_30_credits.sql b/core/src/main/resources/db/migration/V213__point_templates_for_bachelor_30_credits.sql deleted file mode 100644 index bf7c5758d8..0000000000 --- a/core/src/main/resources/db/migration/V213__point_templates_for_bachelor_30_credits.sql +++ /dev/null @@ -1,751 +0,0 @@ -################################################################### -#Bachelor, 30 credits -################################################################### -SET @projectTypeName = 'Bachelor'; -SET @credit = 30; - -################################################################### -SET @title = 'U1 Sammanfattning'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduktion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Frågeställning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Vetenskaplig förankring'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Metodval'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Metodtillämpning'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Resultat'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Slutsatser och diskussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Struktur och språk'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 Källhänvisningar och dokumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originalitet och signifikans'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Oppositionsrapport'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentationer'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Aktivitet vid seminarer och möten'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revision efter slutseminarium'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V214__point_templates_for_master_0_credits.sql b/core/src/main/resources/db/migration/V214__point_templates_for_master_0_credits.sql deleted file mode 100644 index 8523b72ec5..0000000000 --- a/core/src/main/resources/db/migration/V214__point_templates_for_master_0_credits.sql +++ /dev/null @@ -1,826 +0,0 @@ -################################################################### -#Master, 0 credits -################################################################### -SET @projectTypeName = 'Master'; -SET @credit = 0; - -################################################################### -SET @title = 'U1 Abstract'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduction'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis introduces the subject and problem of the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that a problem of general interest exists, that entirely or partially can be solved by answering the research question.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Research question'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Scientific base'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that a systematic and comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Choice of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Application of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that there is a real depth to the data analysis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Result'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Conclusions and discussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Form, structure and language'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the argumentation is well grounded, logically coherent, concise, clear and easily understood.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 References and documentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originality and significance'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 4; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Opposition report'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentations'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Participation in seminars and meetings'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revisions after the final seminar'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that only one smaller revision of the thesis is needed after the final seminar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V215__point_templates_for_master_15_credits.sql b/core/src/main/resources/db/migration/V215__point_templates_for_master_15_credits.sql deleted file mode 100644 index a4b562a58a..0000000000 --- a/core/src/main/resources/db/migration/V215__point_templates_for_master_15_credits.sql +++ /dev/null @@ -1,781 +0,0 @@ -################################################################### -#Master, 15 credits (Magister) -################################################################### -SET @projectTypeName = 'Master'; -SET @credit = 15; - -################################################################### -SET @title = 'U1 Abstract'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduction'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis introduces the subject and problem of the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that a problem of general interest exists, that entirely or partially can be solved by answering the research question.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Research question'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Scientific base'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Choice of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Application of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Result'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Conclusions and discussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Form, structure and language'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the argumentation is well grounded, logically coherent, concise, clear and easily understood.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 References and documentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originality and significance'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 4; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Opposition report'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentations'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Participation in seminars and meetings'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revisions after the final seminar'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that only one smaller revision of the thesis is needed after the final seminar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V216__point_templates_for_master_30_credits.sql b/core/src/main/resources/db/migration/V216__point_templates_for_master_30_credits.sql deleted file mode 100644 index faf64ddd26..0000000000 --- a/core/src/main/resources/db/migration/V216__point_templates_for_master_30_credits.sql +++ /dev/null @@ -1,826 +0,0 @@ -################################################################### -#Master, 30 credits -################################################################### -SET @projectTypeName = 'Master'; -SET @credit = 30; - -################################################################### -SET @title = 'U1 Abstract'; -################################################################### -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U2 Introduction'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis introduces the subject and problem of the thesis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U3 Problem'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that a problem of general interest exists, that entirely or partially can be solved by answering the research question.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) - SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description - FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id - WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U4 Research question'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U5 Scientific base'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that a systematic and comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U6 Choice of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U7 Application of research method'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that there is a real depth to the data analysis.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U8 Result'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U9 Conclusions and discussion'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U10 Form, structure and language'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U11 Argumentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the argumentation is well grounded, logically coherent, concise, clear and easily understood.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U12 References and documentation'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'U13 Originality and significance'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 3; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 4; -SET @description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö1 Opposition report'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 2; -SET @description = 'is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö2 Presentations'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö3 Participation in seminars and meetings'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö4 Deadlines'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -################################################################### -SET @title = 'Ö5 Revisions after the final seminar'; -################################################################### - -SET @point = 0; -SET @description = NULL; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; - -SET @point = 1; -SET @description = 'is required: that only one smaller revision of the thesis is needed after the final seminar.'; -INSERT INTO grading_criterion_point_template (`dateCreated`, `lastModified`, `version`, `gradingCriterionTemplate_id`, `point`, `description`) -SELECT - NOW(), - NOW(), - 0, - gct.id, - @point, - @description -FROM grading_criterion_template gct - INNER JOIN grading_report_template grt on gct.gradingReportTemplate_id = grt.id - INNER JOIN ProjectType pt on grt.projectType_id = pt.id -WHERE pt.name = @projectTypeName AND grt.credits = @credit AND gct.title = @title; diff --git a/core/src/main/resources/db/migration/V217__selected_role_in_user_profile.sql b/core/src/main/resources/db/migration/V217__selected_role_in_user_profile.sql deleted file mode 100644 index aa002f765b..0000000000 --- a/core/src/main/resources/db/migration/V217__selected_role_in_user_profile.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `user_profile` -ADD COLUMN `selectedRole` VARCHAR(255); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V218__remove_answers_not_in_join_column.sql b/core/src/main/resources/db/migration/V218__remove_answers_not_in_join_column.sql deleted file mode 100644 index 65961fc632..0000000000 --- a/core/src/main/resources/db/migration/V218__remove_answers_not_in_join_column.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `checklist_answer` WHERE `id` NOT IN (SELECT `answers_id` FROM `checklist_question_checklist_answer`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V219__adding_primary_key.sql b/core/src/main/resources/db/migration/V219__adding_primary_key.sql deleted file mode 100644 index 293fc245ec..0000000000 --- a/core/src/main/resources/db/migration/V219__adding_primary_key.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_languages` ADD PRIMARY KEY ( `user_id` , `language_id` ) ; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V21__cache_idea_status_for_filtering_and_paging.sql b/core/src/main/resources/db/migration/V21__cache_idea_status_for_filtering_and_paging.sql deleted file mode 100644 index 8e159a7bb5..0000000000 --- a/core/src/main/resources/db/migration/V21__cache_idea_status_for_filtering_and_paging.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `idea` ADD COLUMN `cachedStatus` VARCHAR(255); -UPDATE `idea` SET `cachedStatus` = (SELECT `status` FROM `idea_match` WHERE `idea_match`.`id` = `idea`.`match_id`); diff --git a/core/src/main/resources/db/migration/V220__removing_bad_rows.sql b/core/src/main/resources/db/migration/V220__removing_bad_rows.sql deleted file mode 100644 index 355bcc3538..0000000000 --- a/core/src/main/resources/db/migration/V220__removing_bad_rows.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM `checklist_question_checklist_answer` WHERE checklist_question_id IN (SELECT id FROM `checklist_question` WHERE `id` NOT IN (SELECT `questions_id` FROM `checklist_checklist_question`)); - -DELETE FROM `checklist_question` WHERE `id` NOT IN (SELECT `questions_id` FROM `checklist_checklist_question`); - -DELETE FROM `checklist_answer` WHERE `id` NOT IN (SELECT `answers_id` FROM `checklist_question_checklist_answer`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V221__proper_cascade_deletions_instead_of_java_handling.sql b/core/src/main/resources/db/migration/V221__proper_cascade_deletions_instead_of_java_handling.sql deleted file mode 100644 index f3f290d133..0000000000 --- a/core/src/main/resources/db/migration/V221__proper_cascade_deletions_instead_of_java_handling.sql +++ /dev/null @@ -1,33 +0,0 @@ -ALTER TABLE `mail_event_recipients` DROP FOREIGN KEY `FK41091C7B286D1B0`; -ALTER TABLE `mail_event_recipients` ADD CONSTRAINT `FK_mail_event_recipients_user` -FOREIGN KEY (`recipients_id`) REFERENCES `user` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `Notification` DROP FOREIGN KEY `FK2D45DD0B895349BF`; -ALTER TABLE `Notification` ADD CONSTRAINT `FK_notification_user` -FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `user_profile` DROP FOREIGN KEY `FK487E2135895349BF`; -ALTER TABLE `user_profile` ADD CONSTRAINT `FK_user_profile_user` -FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `user_profile_ProjectType` DROP FOREIGN KEY `FK_2blea2vk0b5cvgxjo1fy4p2j0`; -ALTER TABLE `user_profile_ProjectType` ADD CONSTRAINT `FK_user_profile_project_type_user_profile` -FOREIGN KEY (`user_profile_id`) REFERENCES `user_profile` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `UserProfile_defaultProjectStatusFilter` DROP FOREIGN KEY `FK_icub74l6htav89sx85ar4qcqg`; -ALTER TABLE `UserProfile_defaultProjectStatusFilter` ADD CONSTRAINT `FK_user_profile_project_status_user_profile` -FOREIGN KEY (`UserProfile_id`) REFERENCES `user_profile` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` DROP FOREIGN KEY `FK_ibub74l6htav89sx85ar4qcqg`; -ALTER TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` ADD CONSTRAINT `FK_user_profile_role_user_profile` -FOREIGN KEY (`UserProfile_id`) REFERENCES `user_profile` (`id`) - ON UPDATE CASCADE ON DELETE CASCADE; - -ALTER TABLE `hash` DROP FOREIGN KEY `hash_ibfk_1`; -ALTER TABLE `hash` ADD CONSTRAINT `FK_hash_user` -FOREIGN KEY (`user`) REFERENCES `user` (`id`); diff --git a/core/src/main/resources/db/migration/V222__changed_activity_thread_to_forum_thread.sql b/core/src/main/resources/db/migration/V222__changed_activity_thread_to_forum_thread.sql deleted file mode 100644 index 6660b81f5f..0000000000 --- a/core/src/main/resources/db/migration/V222__changed_activity_thread_to_forum_thread.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `activity_thread` DROP FOREIGN KEY `FK_activity_thread_thread`; -ALTER TABLE `activity_thread` -ADD CONSTRAINT `FK_activity_thread_thread` FOREIGN KEY (`thread_id`) - REFERENCES `forum_thread` (`id`) ON UPDATE CASCADE ON DELETE CASCADE; diff --git a/core/src/main/resources/db/migration/V223__changed_reviewer_thread_to_composition.sql b/core/src/main/resources/db/migration/V223__changed_reviewer_thread_to_composition.sql deleted file mode 100644 index 95b038644e..0000000000 --- a/core/src/main/resources/db/migration/V223__changed_reviewer_thread_to_composition.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE `reviewer_thread` ADD COLUMN `project_id` BIGINT(20) NOT NULL; -UPDATE `reviewer_thread` SET `project_id` = (SELECT `project` FROM `project_thread` WHERE `id` = `reviewer_thread`.`id`); -ALTER TABLE `reviewer_thread` ADD CONSTRAINT `FK_reviewer_thread_project` -FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); -ALTER TABLE `reviewer_thread` ADD UNIQUE KEY (`project_id`); - -ALTER TABLE `reviewer_thread` DROP FOREIGN KEY `reviewer_thread_ibfk_1`; -ALTER TABLE `reviewer_thread` CHANGE COLUMN `id` `thread_id` BIGINT(20) NOT NULL; - -ALTER TABLE `reviewer_thread` DROP PRIMARY KEY; -ALTER TABLE `reviewer_thread` ADD PRIMARY KEY (`project_id`, `thread_id`); - -ALTER TABLE `reviewer_thread` ADD CONSTRAINT `FK_reviewer_thread_thread` -FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`); diff --git a/core/src/main/resources/db/migration/V224_1__activity_thread_pre_change.sql b/core/src/main/resources/db/migration/V224_1__activity_thread_pre_change.sql deleted file mode 100644 index 9327f6e668..0000000000 --- a/core/src/main/resources/db/migration/V224_1__activity_thread_pre_change.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `activity_thread` DROP FOREIGN KEY `FK_activity_thread_thread`; diff --git a/core/src/main/resources/db/migration/V224_2__changed_forum_thread_to_composition.sql b/core/src/main/resources/db/migration/V224_2__changed_forum_thread_to_composition.sql deleted file mode 100644 index 94f48d2e90..0000000000 --- a/core/src/main/resources/db/migration/V224_2__changed_forum_thread_to_composition.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE `forum_thread` ADD COLUMN `project_id` BIGINT(20) NOT NULL; -UPDATE `forum_thread` SET `project_id` = (SELECT `project` FROM `project_thread` WHERE `id` = `forum_thread`.`id`); -ALTER TABLE `forum_thread` ADD CONSTRAINT `FK_forum_thread_project` -FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); - -ALTER TABLE `forum_thread` DROP FOREIGN KEY `forum_thread_ibfk_1`; -ALTER TABLE `forum_thread` CHANGE COLUMN `id` `thread_id` BIGINT(20) NOT NULL; - -ALTER TABLE `forum_thread` DROP PRIMARY KEY; -ALTER TABLE `forum_thread` ADD PRIMARY KEY (`project_id`, `thread_id`); - -ALTER TABLE `forum_thread` ADD CONSTRAINT `FK_forum_thread_thread` -FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`); diff --git a/core/src/main/resources/db/migration/V224_3__activity_thread_post_change.sql b/core/src/main/resources/db/migration/V224_3__activity_thread_post_change.sql deleted file mode 100644 index a267c0bb09..0000000000 --- a/core/src/main/resources/db/migration/V224_3__activity_thread_post_change.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE `activity_thread` ADD COLUMN `project_id` BIGINT(20) NOT NULL; -UPDATE `activity_thread` SET `project_id` = (SELECT `project_id` FROM `forum_thread` WHERE `forum_thread`.`thread_id` = `activity_thread`.`thread_id`); - -ALTER TABLE `activity_thread` DROP PRIMARY KEY; - -ALTER TABLE `activity_thread` ADD CONSTRAINT `FK_activity_thread_forum_thread_thread` -FOREIGN KEY (`thread_id`) REFERENCES `forum_thread` (`thread_id`) ON DELETE CASCADE ON UPDATE CASCADE; - -ALTER TABLE `activity_thread` ADD CONSTRAINT `FK_activity_thread_forum_thread_project` -FOREIGN KEY (`project_id`) REFERENCES `forum_thread` (`project_id`) ON DELETE CASCADE ON UPDATE CASCADE; - -ALTER TABLE `activity_thread` ADD PRIMARY KEY (`activity_id`, `project_id`, `thread_id`); diff --git a/core/src/main/resources/db/migration/V225__deleted_project_thread.sql b/core/src/main/resources/db/migration/V225__deleted_project_thread.sql deleted file mode 100644 index a212ce498d..0000000000 --- a/core/src/main/resources/db/migration/V225__deleted_project_thread.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `project_thread`; diff --git a/core/src/main/resources/db/migration/V226__renamed_forum_thread_to_project_thread.sql b/core/src/main/resources/db/migration/V226__renamed_forum_thread_to_project_thread.sql deleted file mode 100644 index d6ba858ebb..0000000000 --- a/core/src/main/resources/db/migration/V226__renamed_forum_thread_to_project_thread.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE `forum_thread` TO `project_thread`; diff --git a/core/src/main/resources/db/migration/V227_1__added_back_surrogate_keys_project_thread.sql b/core/src/main/resources/db/migration/V227_1__added_back_surrogate_keys_project_thread.sql deleted file mode 100644 index 66a023ce17..0000000000 --- a/core/src/main/resources/db/migration/V227_1__added_back_surrogate_keys_project_thread.sql +++ /dev/null @@ -1,18 +0,0 @@ -ALTER TABLE `activity_thread` DROP FOREIGN KEY `FK_activity_thread_forum_thread_project`; -ALTER TABLE `activity_thread` DROP FOREIGN KEY `FK_activity_thread_forum_thread_thread`; - -ALTER TABLE `project_thread` DROP FOREIGN KEY `FK_forum_thread_project`; -ALTER TABLE `project_thread` DROP FOREIGN KEY `FK_forum_thread_thread`; - -ALTER TABLE `project_thread` DROP PRIMARY KEY; -ALTER TABLE `project_thread` ADD COLUMN `id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ; - -ALTER TABLE `project_thread` ADD CONSTRAINT `FK_project_thread_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); -ALTER TABLE `project_thread` ADD CONSTRAINT `FK_project_thread_thread` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`); - -ALTER TABLE `activity_thread` ADD COLUMN `project_thread_id` BIGINT(20) NOT NULL; -UPDATE `activity_thread` SET `project_thread_id` = ( - SELECT `id` FROM `project_thread` WHERE - `project_thread`.`project_id` = `activity_thread`.`project_id` AND `project_thread`.`thread_id` = `activity_thread`.`thread_id` -); -ALTER TABLE `activity_thread` ADD CONSTRAINT `FK_activity_thread_project_thread` FOREIGN KEY (`project_thread_id`) REFERENCES `project_thread` (`id`); diff --git a/core/src/main/resources/db/migration/V227_2__added_back_surrogate_keys_group_thread.sql b/core/src/main/resources/db/migration/V227_2__added_back_surrogate_keys_group_thread.sql deleted file mode 100644 index 7443f4401d..0000000000 --- a/core/src/main/resources/db/migration/V227_2__added_back_surrogate_keys_group_thread.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE `project_group_thread` DROP FOREIGN KEY `project_group_thread_ibfk_1`; -ALTER TABLE `project_group_thread` DROP FOREIGN KEY `project_group_thread_ibfk_2`; - -ALTER TABLE `project_group_thread` CHANGE COLUMN `id` `thread_id` BIGINT(20) NOT NULL; -ALTER TABLE `project_group_thread` CHANGE COLUMN `project_group` `group_id` BIGINT(20) NOT NULL; - -ALTER TABLE `project_group_thread` DROP PRIMARY KEY; -ALTER TABLE `project_group_thread` ADD COLUMN `id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; - -ALTER TABLE `project_group_thread` ADD CONSTRAINT `FK_project_group_thread_group` FOREIGN KEY (`group_id`) REFERENCES `project_group` (`id`); -ALTER TABLE `project_group_thread` ADD CONSTRAINT `FK_project_group_thread_thread` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`); - -RENAME TABLE `project_group_thread` TO `group_thread`; diff --git a/core/src/main/resources/db/migration/V227_3__added_back_surrogate_keys_to_reviewer_thread.sql b/core/src/main/resources/db/migration/V227_3__added_back_surrogate_keys_to_reviewer_thread.sql deleted file mode 100644 index 1aaac383a6..0000000000 --- a/core/src/main/resources/db/migration/V227_3__added_back_surrogate_keys_to_reviewer_thread.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `reviewer_thread` DROP FOREIGN KEY `FK_reviewer_thread_project`; -ALTER TABLE `reviewer_thread` DROP FOREIGN KEY `FK_reviewer_thread_thread`; - -ALTER TABLE `reviewer_thread` DROP PRIMARY KEY; -ALTER TABLE `reviewer_thread` ADD COLUMN `id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; - -ALTER TABLE `reviewer_thread` ADD CONSTRAINT `FK_reviewer_thread_group` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); -ALTER TABLE `reviewer_thread` ADD CONSTRAINT `FK_reviewer_thread_thread` FOREIGN KEY (`thread_id`) REFERENCES `thread` (`id`); diff --git a/core/src/main/resources/db/migration/V228_1__added_different_kinds_of_forum_mail.sql b/core/src/main/resources/db/migration/V228_1__added_different_kinds_of_forum_mail.sql deleted file mode 100644 index 55ad1590ce..0000000000 --- a/core/src/main/resources/db/migration/V228_1__added_different_kinds_of_forum_mail.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE forum_mail_project ( - id BIGINT(20) NOT NULL PRIMARY KEY, - project_thread_id BIGINT(20) NOT NULL, - CONSTRAINT FK_forum_mail_project_forum_mail FOREIGN KEY (id) REFERENCES forum_mail(id), - CONSTRAINT FK_forum_mail_project_project_thread FOREIGN KEY (project_thread_id) REFERENCES project_thread(id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; - -CREATE TABLE forum_mail_group ( - id BIGINT(20) NOT NULL PRIMARY KEY, - group_thread_id BIGINT(20) NOT NULL, - CONSTRAINT FK_forum_mail_group_forum_mail FOREIGN KEY (id) REFERENCES forum_mail(id), - CONSTRAINT FK_forum_mail_group_group_thread FOREIGN KEY (group_thread_id) REFERENCES group_thread(id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; - -CREATE TABLE forum_mail_reviewer ( - id BIGINT(20) NOT NULL PRIMARY KEY, - reviewer_thread_id BIGINT(20) NOT NULL, - CONSTRAINT FK_forum_mail_reviewer_forum_mail FOREIGN KEY (id) REFERENCES forum_mail(id), - CONSTRAINT FK_forum_mail_reviewer_project FOREIGN KEY (reviewer_thread_id) REFERENCES reviewer_thread(id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V228_2__migrate_forum_mail_data_to_new_split_format.sql b/core/src/main/resources/db/migration/V228_2__migrate_forum_mail_data_to_new_split_format.sql deleted file mode 100644 index dd5ac5b104..0000000000 --- a/core/src/main/resources/db/migration/V228_2__migrate_forum_mail_data_to_new_split_format.sql +++ /dev/null @@ -1,17 +0,0 @@ -INSERT INTO forum_mail_project (id, project_thread_id) - SELECT forum_mail.id, project_thread.id - FROM forum_mail - INNER JOIN thread ON thread.id = forum_mail.thread_id - INNER JOIN project_thread ON thread.id = project_thread.thread_id; - -INSERT INTO forum_mail_group (id, group_thread_id) - SELECT forum_mail.id, group_thread.id - FROM forum_mail - INNER JOIN thread ON thread.id = forum_mail.thread_id - INNER JOIN group_thread ON thread.id = group_thread.thread_id; - -INSERT INTO forum_mail_reviewer (id, reviewer_thread_id) - SELECT forum_mail.id, reviewer_thread.id - FROM forum_mail - INNER JOIN thread ON thread.id = forum_mail.thread_id - INNER JOIN reviewer_thread ON thread.id = reviewer_thread.thread_id; diff --git a/core/src/main/resources/db/migration/V229__update_thesis_approval_request_events.sql b/core/src/main/resources/db/migration/V229__update_thesis_approval_request_events.sql deleted file mode 100644 index c6e4ba3f3c..0000000000 --- a/core/src/main/resources/db/migration/V229__update_thesis_approval_request_events.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TEMPORARY TABLE template AS SELECT project_id FROM NotificationData WHERE event ='THESIS_APPROVAL_REQUESTED' GROUP BY project_id HAVING COUNT(*)=1; - -UPDATE NotificationData AS x - JOIN ReviewerApproval AS y - ON x.project_id = y.project_id -SET x.event = 'ROUGH_DRAFT_APPROVAL_REQUESTED' -WHERE - x.event='THESIS_APPROVAL_REQUESTED' AND - y.type='RoughDraftApproval' AND - x.project_id IN (SELECT project_id FROM template); - -UPDATE NotificationData AS x - JOIN ReviewerApproval AS y - ON x.project_id = y.project_id -SET x.event = 'FINAL_SEMINAR_APPROVAL_REQUESTED' -WHERE - x.event='THESIS_APPROVAL_REQUESTED' AND - y.type='FinalSeminarApproval' AND - x.project_id IN (SELECT project_id FROM template); - -DROP TABLE template; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V22__remove_inactive_ideas.sql b/core/src/main/resources/db/migration/V22__remove_inactive_ideas.sql deleted file mode 100644 index 99d17513eb..0000000000 --- a/core/src/main/resources/db/migration/V22__remove_inactive_ideas.sql +++ /dev/null @@ -1,6 +0,0 @@ -delete from `idea_Keyword` where `idea_id` in (select `id` from `idea` where `cachedStatus` = "INACTIVE"); -update `idea` set match_id = null where `cachedStatus` = "INACTIVE"; -delete from `idea_match` where `idea_id` in (select `id` from `idea` where `cachedStatus` = "INACTIVE"); -delete from `idea_student` where `idea_id` in (select `id` from `idea` where `cachedStatus` = "INACTIVE"); -delete from `idea_first_meeting` where `idea_id` in (select `id` from `idea` where `cachedStatus` = "INACTIVE"); -delete from `idea` where `cachedStatus` = "INACTIVE"; diff --git a/core/src/main/resources/db/migration/V230__fixing_notes.sql b/core/src/main/resources/db/migration/V230__fixing_notes.sql deleted file mode 100644 index 6f8ba987ac..0000000000 --- a/core/src/main/resources/db/migration/V230__fixing_notes.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `note` CHANGE `content` `content` LONGTEXT NULL DEFAULT NULL ; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V231__receive_forum_mail_setting.sql b/core/src/main/resources/db/migration/V231__receive_forum_mail_setting.sql deleted file mode 100644 index da9077d75f..0000000000 --- a/core/src/main/resources/db/migration/V231__receive_forum_mail_setting.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` ADD `receiveForumMail` tinyint(1) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V232__update_descition_notifications.sql b/core/src/main/resources/db/migration/V232__update_descition_notifications.sql deleted file mode 100644 index 63143f5428..0000000000 --- a/core/src/main/resources/db/migration/V232__update_descition_notifications.sql +++ /dev/null @@ -1,62 +0,0 @@ -CREATE TEMPORARY TABLE approved_template AS SELECT project_id FROM NotificationData WHERE event ='THESIS_APPROVAL_APPROVED' GROUP BY project_id HAVING COUNT(*)=1; -CREATE TEMPORARY TABLE rejected_template AS SELECT project_id FROM NotificationData WHERE event ='THESIS_APPROVAL_REJECTED' GROUP BY project_id HAVING COUNT(*)=1; - -UPDATE NotificationData AS n - JOIN ReviewerApproval AS ra - ON n.project_id = ra.project_id - JOIN ReviewerApproval_Decision AS rad - on rad.ReviewerApproval_id = ra.id - JOIN Decision AS d - on d.id=rad.decisions_id -SET n.event = 'ROUGH_DRAFT_APPROVAL_APPROVED' -WHERE - n.event='THESIS_APPROVAL_APPROVED' AND - ra.type='RoughDraftApproval' AND - d.status = 'APPROVED' AND - n.project_id IN (SELECT project_id FROM approved_template); - -UPDATE NotificationData AS n - JOIN ReviewerApproval AS ra - ON n.project_id = ra.project_id - JOIN ReviewerApproval_Decision AS rad - on rad.ReviewerApproval_id = ra.id - JOIN Decision AS d - on d.id=rad.decisions_id -SET n.event = 'FINAL_SEMINAR_APPROVAL_APPROVED' -WHERE - n.event='THESIS_APPROVAL_APPROVED' AND - ra.type='FinalSeminarApproval' AND - d.status = 'APPROVED' AND - n.project_id IN (SELECT project_id FROM approved_template); - -UPDATE NotificationData AS n - JOIN ReviewerApproval AS ra - ON n.project_id = ra.project_id - JOIN ReviewerApproval_Decision AS rad - on rad.ReviewerApproval_id = ra.id - JOIN Decision AS d - on d.id=rad.decisions_id -SET n.event = 'ROUGH_DRAFT_APPROVAL_REJECTED' -WHERE - n.event='THESIS_APPROVAL_REJECTED' AND - ra.type='RoughDraftApproval' AND - d.status = 'REJECTED' AND - n.project_id IN (SELECT project_id FROM rejected_template); - -UPDATE NotificationData AS n - JOIN ReviewerApproval AS ra - ON n.project_id = ra.project_id - JOIN ReviewerApproval_Decision AS rad - on rad.ReviewerApproval_id = ra.id - JOIN Decision AS d - on d.id=rad.decisions_id -SET n.event = 'FINAL_SEMINAR_APPROVAL_REJECTED' -WHERE - n.event='THESIS_APPROVAL_REJECTED' AND - ra.type='FinalSeminarApproval' AND - d.status = 'REJECTED' AND - n.project_id IN (SELECT project_id FROM rejected_template); - - -DROP TABLE approved_template; -DROP TABLE rejected_template; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V233__removed_old_column_after_forum_refactoring.sql b/core/src/main/resources/db/migration/V233__removed_old_column_after_forum_refactoring.sql deleted file mode 100644 index 5a3c0f99d4..0000000000 --- a/core/src/main/resources/db/migration/V233__removed_old_column_after_forum_refactoring.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `forum_mail` DROP FOREIGN KEY `FK_forum_mail_thread`; -ALTER TABLE `forum_mail` DROP COLUMN `thread_id`; diff --git a/core/src/main/resources/db/migration/V234__remove_faulty_notifications.sql b/core/src/main/resources/db/migration/V234__remove_faulty_notifications.sql deleted file mode 100644 index 8f8072263c..0000000000 --- a/core/src/main/resources/db/migration/V234__remove_faulty_notifications.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM Notification WHERE notificationData_id IN (SELECT id FROM NotificationData WHERE event='THESIS_APPROVAL_REQUESTED' OR event='THESIS_APPROVAL_APPROVED' OR event='THESIS_APPROVAL_REJECTED'); -DELETE FROM NotificationData WHERE event='THESIS_APPROVAL_REQUESTED' OR event='THESIS_APPROVAL_APPROVED' OR event='THESIS_APPROVAL_REJECTED'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V235__add_start_to_exemption.sql b/core/src/main/resources/db/migration/V235__add_start_to_exemption.sql deleted file mode 100644 index cf41f25617..0000000000 --- a/core/src/main/resources/db/migration/V235__add_start_to_exemption.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `applicationperiodexemption` -ADD COLUMN `start` DATETIME NOT NULL; - -UPDATE `applicationperiodexemption` SET `start` = (DATE_SUB(date(`until`), INTERVAL 1 week)); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V236__expand_checklist_overview.sql b/core/src/main/resources/db/migration/V236__expand_checklist_overview.sql deleted file mode 100644 index 7a7224800f..0000000000 --- a/core/src/main/resources/db/migration/V236__expand_checklist_overview.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `expandChecklistOverview` tinyint(1) NOT NULL DEFAULT '1'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V237__changed_to_database_cascades.sql b/core/src/main/resources/db/migration/V237__changed_to_database_cascades.sql deleted file mode 100644 index a73a74473d..0000000000 --- a/core/src/main/resources/db/migration/V237__changed_to_database_cascades.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE `peer_request` DROP FOREIGN KEY `FK514488B2869F0235`; -ALTER TABLE `peer_request` DROP KEY `checkListTemplate_index`; -ALTER TABLE `peer_request` ADD CONSTRAINT `FK_peer_request_checklist_template` -FOREIGN KEY (`checkListTemplate_id`) REFERENCES `checklist_template` (`id`) - ON DELETE SET NULL; - -ALTER TABLE `ActivityTemplate` DROP FOREIGN KEY `FK_667ye6la0yb5obk64v21knimn`; -ALTER TABLE `ActivityTemplate` DROP KEY `checkListTemplate_index`; -ALTER TABLE `ActivityTemplate` ADD CONSTRAINT `FK_activity_template_checklist_template` -FOREIGN KEY (`checkListTemplate_id`) REFERENCES `checklist_template` (`id`) - ON DELETE SET NULL; diff --git a/core/src/main/resources/db/migration/V238__activity_thread_sql_bug_fix.sql b/core/src/main/resources/db/migration/V238__activity_thread_sql_bug_fix.sql deleted file mode 100644 index ba1158ec54..0000000000 --- a/core/src/main/resources/db/migration/V238__activity_thread_sql_bug_fix.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE activity_thread DROP FOREIGN KEY FK_activity_thread_activity ; -ALTER TABLE `activity_thread` DROP PRIMARY KEY ; -ALTER TABLE `activity_thread` DROP `project_id` ; -ALTER TABLE `activity_thread` DROP `thread_id` ; -ALTER TABLE `activity_thread` - ADD PRIMARY KEY( - `activity_id`, - `project_thread_id`); -ALTER TABLE `activity_thread` - ADD CONSTRAINT `FK_activity_thread_activity` - FOREIGN KEY (`activity_id`) - REFERENCES `Activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; - diff --git a/core/src/main/resources/db/migration/V239__added_grade_as_separate_entity.sql b/core/src/main/resources/db/migration/V239__added_grade_as_separate_entity.sql deleted file mode 100644 index 36f403b742..0000000000 --- a/core/src/main/resources/db/migration/V239__added_grade_as_separate_entity.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `grade` ( - `project_id` BIGINT(20) NOT NULL, - `value` VARCHAR(255) NOT NULL, - `reportedBy` BIGINT(20) NOT NULL, - `reportedOn` DATE NOT NULL, - PRIMARY KEY (`project_id`), - CONSTRAINT `FK_grade_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE, - CONSTRAINT `FK_grade_user_reportedBy` FOREIGN KEY (`reportedBy`) REFERENCES `user` (`id`) -) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; - -INSERT INTO `grade` (`project_id`, `value`, `reportedBy`, `reportedOn`) - SELECT `id`, `rwandaGrade`, `supervisor_id`, NOW() - FROM `project` - WHERE `rwandaGrade` IS NOT NULL; - -ALTER TABLE `project` DROP COLUMN `rwandaGrade`; diff --git a/core/src/main/resources/db/migration/V23__add_points_attribute.sql b/core/src/main/resources/db/migration/V23__add_points_attribute.sql deleted file mode 100644 index 1ab4457d80..0000000000 --- a/core/src/main/resources/db/migration/V23__add_points_attribute.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table `grading_criterion` add `maxPoints` int(11) NOT NULL; -update `grading_criterion` set `maxPoints` = (1); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V240__grade_surrogate_id.sql b/core/src/main/resources/db/migration/V240__grade_surrogate_id.sql deleted file mode 100644 index bf82906400..0000000000 --- a/core/src/main/resources/db/migration/V240__grade_surrogate_id.sql +++ /dev/null @@ -1,8 +0,0 @@ - -ALTER TABLE `grade` DROP FOREIGN KEY `FK_grade_project`; -ALTER TABLE `grade` DROP PRIMARY KEY; - -ALTER TABLE `grade` ADD COLUMN `id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY; -ALTER TABLE `grade` ADD UNIQUE KEY (`project_id`); - -ALTER TABLE `grade` ADD CONSTRAINT `FK_grade_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V241__exposed_file_descriptions.sql b/core/src/main/resources/db/migration/V241__exposed_file_descriptions.sql deleted file mode 100644 index 477448026c..0000000000 --- a/core/src/main/resources/db/migration/V241__exposed_file_descriptions.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description`ADD `exposed` tinyint(1) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V242__removed_absolute_url_from_notifications.sql b/core/src/main/resources/db/migration/V242__removed_absolute_url_from_notifications.sql deleted file mode 100644 index 4e5a247cef..0000000000 --- a/core/src/main/resources/db/migration/V242__removed_absolute_url_from_notifications.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `Notification` DROP COLUMN `absoluteURL`; diff --git a/core/src/main/resources/db/migration/V243__deleted_user_event.sql b/core/src/main/resources/db/migration/V243__deleted_user_event.sql deleted file mode 100644 index de8a48e957..0000000000 --- a/core/src/main/resources/db/migration/V243__deleted_user_event.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `NotificationData` DROP FOREIGN KEY `notificationdata_user_id`; -ALTER TABLE `NotificationData` DROP COLUMN `user_id`; - -DELETE FROM `NotificationData` WHERE `DTYPE` = 'UserEvent'; diff --git a/core/src/main/resources/db/migration/V244__change_source_type.sql b/core/src/main/resources/db/migration/V244__change_source_type.sql deleted file mode 100644 index b77786ace2..0000000000 --- a/core/src/main/resources/db/migration/V244__change_source_type.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `NotificationData` MODIFY COLUMN `source` LONGTEXT DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V245__removed_seminar_event_turnitin_error.sql b/core/src/main/resources/db/migration/V245__removed_seminar_event_turnitin_error.sql deleted file mode 100644 index 8b2e2f6918..0000000000 --- a/core/src/main/resources/db/migration/V245__removed_seminar_event_turnitin_error.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `NotificationData` WHERE `DTYPE` = 'SeminarEvent' AND `event` = 'TURNITIN_ERROR'; diff --git a/core/src/main/resources/db/migration/V246__removed_configuration_related_to_turnitin_error.sql b/core/src/main/resources/db/migration/V246__removed_configuration_related_to_turnitin_error.sql deleted file mode 100644 index 5980965bf7..0000000000 --- a/core/src/main/resources/db/migration/V246__removed_configuration_related_to_turnitin_error.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'FINAL_SEMINAR' and `event` = 'TURNITIN_ERROR'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'FINAL_SEMINAR' and `event` = 'TURNITIN_ERROR'; diff --git a/core/src/main/resources/db/migration/V247__removed_unused_idea_notification_events.sql b/core/src/main/resources/db/migration/V247__removed_unused_idea_notification_events.sql deleted file mode 100644 index 5ffee834ca..0000000000 --- a/core/src/main/resources/db/migration/V247__removed_unused_idea_notification_events.sql +++ /dev/null @@ -1,7 +0,0 @@ -DELETE FROM `NotificationData` WHERE `DTYPE` = 'IdeaEvent' AND `event` = 'IDEA_CREATED'; -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'IDEA' and `event` = 'IDEA_CREATED'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'IDEA' and `event` = 'IDEA_CREATED'; - -DELETE FROM `NotificationData` WHERE `DTYPE` = 'IdeaEvent' AND `event` = 'COURSE_START'; -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'IDEA' and `event` = 'COURSE_START'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'IDEA' and `event` = 'COURSE_START'; diff --git a/core/src/main/resources/db/migration/V248__removed_unused_event_configuration.sql b/core/src/main/resources/db/migration/V248__removed_unused_event_configuration.sql deleted file mode 100644 index 94aef88e62..0000000000 --- a/core/src/main/resources/db/migration/V248__removed_unused_event_configuration.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `notification_event_configuration`; diff --git a/core/src/main/resources/db/migration/V249__removed_unused_idea_event_partner_timeout.sql b/core/src/main/resources/db/migration/V249__removed_unused_idea_event_partner_timeout.sql deleted file mode 100644 index 0946b4903b..0000000000 --- a/core/src/main/resources/db/migration/V249__removed_unused_idea_event_partner_timeout.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `NotificationData` WHERE `DTYPE` = 'IdeaEvent' AND `event` = 'PARTNER_TIMEOUT'; -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'IDEA' and `event` = 'PARTNER_TIMEOUT'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'IDEA' and `event` = 'PARTNER_TIMEOUT'; diff --git a/core/src/main/resources/db/migration/V24__added_sort_order_to_grading_criterion.sql b/core/src/main/resources/db/migration/V24__added_sort_order_to_grading_criterion.sql deleted file mode 100644 index b5bb6c2110..0000000000 --- a/core/src/main/resources/db/migration/V24__added_sort_order_to_grading_criterion.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_criterion` ADD `sortOrder` INT(11) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V250__removed_unused_idea_event_supervisor_change.sql b/core/src/main/resources/db/migration/V250__removed_unused_idea_event_supervisor_change.sql deleted file mode 100644 index d52ca6bcc7..0000000000 --- a/core/src/main/resources/db/migration/V250__removed_unused_idea_event_supervisor_change.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `NotificationData` WHERE `DTYPE` = 'IdeaEvent' AND `event` = 'SUPERVISOR_CHANGE'; -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'IDEA' and `event` = 'SUPERVISOR_CHANGE'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'IDEA' and `event` = 'SUPERVISOR_CHANGE'; diff --git a/core/src/main/resources/db/migration/V251__removed_unused_peer_event_review_aborted.sql b/core/src/main/resources/db/migration/V251__removed_unused_peer_event_review_aborted.sql deleted file mode 100644 index 4c3e5a947c..0000000000 --- a/core/src/main/resources/db/migration/V251__removed_unused_peer_event_review_aborted.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `NotificationData` WHERE `DTYPE` = 'PeerEvent' AND `event` = 'REVIEW_ABORTED'; -DELETE FROM `notification_delivery_configuration` WHERE `type` = 'PEER' and `event` = 'REVIEW_ABORTED'; -DELETE FROM `notification_receiver_configuration` WHERE `type` = 'PEER' and `event` = 'REVIEW_ABORTED'; diff --git a/core/src/main/resources/db/migration/V252__preperation_for_project_delete_1.sql b/core/src/main/resources/db/migration/V252__preperation_for_project_delete_1.sql deleted file mode 100644 index e0e5c6d04f..0000000000 --- a/core/src/main/resources/db/migration/V252__preperation_for_project_delete_1.sql +++ /dev/null @@ -1,19 +0,0 @@ -DROP TABLE IF EXISTS project_checklist; -ALTER TABLE ActivityPlan DROP INDEX FK8F8BE4FDC1813915; -ALTER TABLE ActivityPlan DROP INDEX UK_86kwi5nttd0rkmu2nvxgdx984; -ALTER TABLE ActivityPlan DROP INDEX FK_86kwi5nttd0rkmu2nvxgdx984 ; -ALTER TABLE ActivityPlan DROP FOREIGN KEY FK_86kwi5nttd0rkmu2nvxgdx984 ; -ALTER TABLE ActivityPlan ADD CONSTRAINT fk_ActivityPlan_project_B FOREIGN KEY (project_id) REFERENCES project(id) ON DELETE CASCADE ON UPDATE RESTRICT; -ALTER TABLE Activity DROP FOREIGN KEY activityTemplate_id_index ; -ALTER TABLE Activity ADD CONSTRAINT FK_Activity_ActivityPlan FOREIGN KEY (activityTemplate_id) REFERENCES ActivityPlan(id) ON DELETE CASCADE ON UPDATE RESTRICT; -ALTER TABLE Activity DROP FOREIGN KEY fileUpload_id_index; -ALTER TABLE Activity ADD CONSTRAINT FK_Activity_file_description FOREIGN KEY (fileUpload_id) REFERENCES file_description(id) ON DELETE SET NULL ON UPDATE RESTRICT; -ALTER TABLE checklist ADD COLUMN activity_id BIGINT; -UPDATE checklist A, Activity B SET A.activity_id = B.id WHERE A.id = B.checkList_id; -ALTER TABLE Activity DROP FOREIGN KEY checkList_id_index; -ALTER TABLE Activity DROP INDEX checkList_id_index; -ALTER TABLE Activity DROP COLUMN checkList_id; -ALTER TABLE checklist ADD UNIQUE INDEX UK_checkList_activity (activity_id); -ALTER TABLE checklist ADD CONSTRAINT FK_checkList_activity FOREIGN KEY (activity_id) REFERENCES Activity(id) ON DELETE SET NULL ON UPDATE RESTRICT; -ALTER TABLE checklist DROP FOREIGN KEY FK17CCD1A6C1813915; -ALTER TABLE checklist DROP COLUMN project_id; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V253__added_grading_report_to_decision.sql b/core/src/main/resources/db/migration/V253__added_grading_report_to_decision.sql deleted file mode 100644 index 8194a5cd03..0000000000 --- a/core/src/main/resources/db/migration/V253__added_grading_report_to_decision.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `Decision` ADD COLUMN `gradingReport_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `Decision` ADD CONSTRAINT `FK_decision_file_description_grading_report` - FOREIGN KEY (`gradingReport_id`) REFERENCES `file_description` (`id`); diff --git a/core/src/main/resources/db/migration/V254__preperation_for_project_delete_1 rollback.sql b/core/src/main/resources/db/migration/V254__preperation_for_project_delete_1 rollback.sql deleted file mode 100644 index c25bd076ae..0000000000 --- a/core/src/main/resources/db/migration/V254__preperation_for_project_delete_1 rollback.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE Activity ADD COLUMN checklist_id BIGINT; -UPDATE checklist A, Activity B SET B.checklist_id = A.id WHERE B.id = A.activity_id; -ALTER TABLE checklist DROP FOREIGN KEY FK_checkList_activity; -ALTER TABLE checklist DROP INDEX UK_checkList_activity; -ALTER TABLE Activity ADD UNIQUE INDEX UK_activity_checkList (checklist_id); -ALTER TABLE Activity ADD CONSTRAINT FK_activity_checkList FOREIGN KEY (checklist_id) REFERENCES checklist(id) ON DELETE RESTRICT ON UPDATE RESTRICT; -ALTER TABLE checklist DROP COLUMN activity_id; -ALTER TABLE checklist ADD project_id BIGINT; -UPDATE checklist A, Activity B, ActivityPlan C, project D SET A.project_id = D.id - WHERE A.id = B.checklist_id AND B.activityTemplate_id = C.id AND C.project_id = D.id; -ALTER TABLE checklist ADD INDEX I_checkList_activity (project_id); -ALTER TABLE checklist ADD CONSTRAINT FK_checklist_project FOREIGN KEY (project_id) REFERENCES project(id) ON DELETE RESTRICT ON UPDATE RESTRICT; diff --git a/core/src/main/resources/db/migration/V255__added_action_type_to_activities.sql b/core/src/main/resources/db/migration/V255__added_action_type_to_activities.sql deleted file mode 100644 index 3ce988971d..0000000000 --- a/core/src/main/resources/db/migration/V255__added_action_type_to_activities.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `activity_action` ( - `activity_id` BIGINT(20) NOT NULL, - `action` VARCHAR(64) NOT NULL, - PRIMARY KEY (`activity_id`), - CONSTRAINT `activity_action_activity` FOREIGN KEY (`activity_id`) REFERENCES `Activity` (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V256__refactored_action_to_be_a_simple_attribute.sql b/core/src/main/resources/db/migration/V256__refactored_action_to_be_a_simple_attribute.sql deleted file mode 100644 index 8a240dcfff..0000000000 --- a/core/src/main/resources/db/migration/V256__refactored_action_to_be_a_simple_attribute.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE `activity_action`; - -ALTER TABLE `Activity` ADD COLUMN `action` VARCHAR(64) NOT NULL DEFAULT 'NONE'; diff --git a/core/src/main/resources/db/migration/V257__migrated_old_hand_in_to_new_action.sql b/core/src/main/resources/db/migration/V257__migrated_old_hand_in_to_new_action.sql deleted file mode 100644 index 1daac71563..0000000000 --- a/core/src/main/resources/db/migration/V257__migrated_old_hand_in_to_new_action.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `Activity` SET `action` = 'HAND_IN' WHERE `uploadRequired` IS TRUE; diff --git a/core/src/main/resources/db/migration/V258__removed_old_upload_required_column.sql b/core/src/main/resources/db/migration/V258__removed_old_upload_required_column.sql deleted file mode 100644 index 6f9a75ed01..0000000000 --- a/core/src/main/resources/db/migration/V258__removed_old_upload_required_column.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `Activity` DROP COLUMN `uploadRequired`; diff --git a/core/src/main/resources/db/migration/V259__migrated_activity_templates_to_support_actions.sql b/core/src/main/resources/db/migration/V259__migrated_activity_templates_to_support_actions.sql deleted file mode 100644 index 305a0cdb83..0000000000 --- a/core/src/main/resources/db/migration/V259__migrated_activity_templates_to_support_actions.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `ActivityTemplate` ADD COLUMN `action` VARCHAR(64) NOT NULL DEFAULT 'NONE'; - -UPDATE `ActivityTemplate` SET `action` = 'HAND_IN' WHERE `requireHandIn` IS TRUE; - -ALTER TABLE `ActivityTemplate` DROP COLUMN `requireHandIn`; diff --git a/core/src/main/resources/db/migration/V25__peer_review_is_no_longer_lazy_deleted.sql b/core/src/main/resources/db/migration/V25__peer_review_is_no_longer_lazy_deleted.sql deleted file mode 100644 index 31a4123c98..0000000000 --- a/core/src/main/resources/db/migration/V25__peer_review_is_no_longer_lazy_deleted.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `peer_review` DROP COLUMN `deleted`; diff --git a/core/src/main/resources/db/migration/V260__change_desc_in_activity_nullable.sql b/core/src/main/resources/db/migration/V260__change_desc_in_activity_nullable.sql deleted file mode 100644 index 78be4f2e55..0000000000 --- a/core/src/main/resources/db/migration/V260__change_desc_in_activity_nullable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `Activity` MODIFY `description` LONGTEXT; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V261__add_rough_draf_sent_to_reviewer_to_events.sql b/core/src/main/resources/db/migration/V261__add_rough_draf_sent_to_reviewer_to_events.sql deleted file mode 100644 index 8a636ca6ae..0000000000 --- a/core/src/main/resources/db/migration/V261__add_rough_draf_sent_to_reviewer_to_events.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `Event` (`name`, `description`) -VALUES ('RoughDraftApprovalRequested', 'Rough draft sent to reviewer for approval for the first time.'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V262__added_final_thesis_approved_event.sql b/core/src/main/resources/db/migration/V262__added_final_thesis_approved_event.sql deleted file mode 100644 index 943ef92bcc..0000000000 --- a/core/src/main/resources/db/migration/V262__added_final_thesis_approved_event.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `Event` (`name`, `description`) -VALUES ('FinalThesisApproved', 'Supervisor approves the final thesis.'); diff --git a/core/src/main/resources/db/migration/V263__migrated_exported_success_notfication_to_project_from_idea.sql b/core/src/main/resources/db/migration/V263__migrated_exported_success_notfication_to_project_from_idea.sql deleted file mode 100644 index 8109a29e0c..0000000000 --- a/core/src/main/resources/db/migration/V263__migrated_exported_success_notfication_to_project_from_idea.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE `NotificationData` SET `project_id` = (SELECT `project_id` FROM `idea` WHERE `id` = `idea_id`); -UPDATE `NotificationData` SET `DTYPE` = 'ProjectEvent', `type` = 'PROJECT' WHERE `event` = 'EXPORTED_SUCCESS'; -UPDATE `notification_delivery_configuration` SET `type` = 'PROJECT' where `event` = 'EXPORTED_SUCCESS'; -UPDATE `notification_receiver_configuration` SET `type` = 'PROJECT' where `event` = 'EXPORTED_SUCCESS'; diff --git a/core/src/main/resources/db/migration/V264__made_notification_source_columns_longer.sql b/core/src/main/resources/db/migration/V264__made_notification_source_columns_longer.sql deleted file mode 100644 index d59d46be11..0000000000 --- a/core/src/main/resources/db/migration/V264__made_notification_source_columns_longer.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `NotificationData` MODIFY COLUMN `additionalSource` LONGTEXT; diff --git a/core/src/main/resources/db/migration/V265__added_data_to_old_first_meeting_notifications.sql b/core/src/main/resources/db/migration/V265__added_data_to_old_first_meeting_notifications.sql deleted file mode 100644 index 06767d73d2..0000000000 --- a/core/src/main/resources/db/migration/V265__added_data_to_old_first_meeting_notifications.sql +++ /dev/null @@ -1,9 +0,0 @@ -UPDATE `NotificationData` -SET - `source` = (SELECT CONCAT(DATE_FORMAT(`firstMeetingDate`, '%Y-%m-%d %H:%i'), ' in ', `room`) - FROM `idea_first_meeting` - WHERE `idea_id` = `NotificationData`.`idea_id`), - `additionalSource` = (SELECT `description` - FROM `idea_first_meeting` - WHERE `idea_id` = `NotificationData`.`idea_id`) -WHERE `event` = 'FIRST_MEETING'; diff --git a/core/src/main/resources/db/migration/V266__add_supervisor_comment_to_decision.sql b/core/src/main/resources/db/migration/V266__add_supervisor_comment_to_decision.sql deleted file mode 100644 index b4f8e566df..0000000000 --- a/core/src/main/resources/db/migration/V266__add_supervisor_comment_to_decision.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE Decision ADD COLUMN comment LONGTEXT NULL AFTER reason; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V267__add_language_to_peer_request.sql b/core/src/main/resources/db/migration/V267__add_language_to_peer_request.sql deleted file mode 100644 index a18734dc7e..0000000000 --- a/core/src/main/resources/db/migration/V267__add_language_to_peer_request.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE peer_request - ADD language_id BIGINT NULL; - -ALTER TABLE peer_request - ADD CONSTRAINT fk_peer_request_language_id_language_id - FOREIGN KEY (language_id) - REFERENCES Language(id) - ON DELETE SET NULL - ON UPDATE RESTRICT; - -UPDATE peer_request pr, final_seminar fs - SET pr.language_id = fs.reportLanguage_id - WHERE fs.project_id = pr.project_id; - diff --git a/core/src/main/resources/db/migration/V268__added_order_to_footer_links.sql b/core/src/main/resources/db/migration/V268__added_order_to_footer_links.sql deleted file mode 100644 index ccd2b53485..0000000000 --- a/core/src/main/resources/db/migration/V268__added_order_to_footer_links.sql +++ /dev/null @@ -1,15 +0,0 @@ -ALTER TABLE `footer_link` ADD COLUMN `order` INT NOT NULL; - -CREATE TEMPORARY TABLE `flt` ( - `id` BIGINT, - `column` VARCHAR(10) -); - -INSERT INTO `flt` - SELECT id, footerColumn FROM `footer_link`; - -UPDATE `footer_link` AS `o` SET `o`.`order` = ( - SELECT COUNT(*) FROM `flt` WHERE `flt`.`column` = `o`.`footerColumn` AND `flt`.`id` < `o`.`id` -); - -DROP TABLE `flt`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V269__removed_forum_sort_ordering.sql b/core/src/main/resources/db/migration/V269__removed_forum_sort_ordering.sql deleted file mode 100644 index 5e4527e6a9..0000000000 --- a/core/src/main/resources/db/migration/V269__removed_forum_sort_ordering.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` DROP COLUMN `sortLatestForumPost`; diff --git a/core/src/main/resources/db/migration/V26__added_status_to_peer_review.sql b/core/src/main/resources/db/migration/V26__added_status_to_peer_review.sql deleted file mode 100644 index 479c5e5076..0000000000 --- a/core/src/main/resources/db/migration/V26__added_status_to_peer_review.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `peer_review` ADD COLUMN `status` VARCHAR(255); -UPDATE `peer_review` SET `status`='COMPLETED' WHERE `aborted` = FALSE AND `submitted` = TRUE; -UPDATE `peer_review` SET `status`='EXPIRED' WHERE `aborted` = TRUE AND `submitted` = FALSE; -UPDATE `peer_review` SET `status`='IN_PROGRESS' WHERE `status` IS NULL; -ALTER TABLE `peer_review` MODIFY COLUMN `status` VARCHAR(255) NOT NULL; - - diff --git a/core/src/main/resources/db/migration/V270__added_forum_notification_connection.sql b/core/src/main/resources/db/migration/V270__added_forum_notification_connection.sql deleted file mode 100644 index 5d6a0cc025..0000000000 --- a/core/src/main/resources/db/migration/V270__added_forum_notification_connection.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE `forum_notification` ( - forumPost_id BIGINT(20) NOT NULL, - notificationEvent_id BIGINT(20) NOT NULL, - PRIMARY KEY (forumPost_id, notificationEvent_id), - CONSTRAINT `FK_forum_notification_forum_post` - FOREIGN KEY (forumPost_id) REFERENCES forum_post (id) - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT `FK_forum_notification_notification_event` - FOREIGN KEY (notificationEvent_id) REFERENCES NotificationData (id) - ON UPDATE CASCADE ON DELETE CASCADE -) ENGINE = InnoDB DEFAULT CHARSET = utf8; - -INSERT INTO `forum_notification` -SELECT DISTINCT forumPost_id, id FROM NotificationData -WHERE forumPost_id IS NOT NULL; diff --git a/core/src/main/resources/db/migration/V271__removed_forum_post_link_from_notification_event.sql b/core/src/main/resources/db/migration/V271__removed_forum_post_link_from_notification_event.sql deleted file mode 100644 index b79c6fee76..0000000000 --- a/core/src/main/resources/db/migration/V271__removed_forum_post_link_from_notification_event.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `NotificationData` DROP FOREIGN KEY `notificationdata_forum_post_id`; -ALTER TABLE `NotificationData` DROP COLUMN `forumPost_id`; diff --git a/core/src/main/resources/db/migration/V272__added_database_cascades_for_all_notification_events.sql b/core/src/main/resources/db/migration/V272__added_database_cascades_for_all_notification_events.sql deleted file mode 100644 index 15dd9c0bef..0000000000 --- a/core/src/main/resources/db/migration/V272__added_database_cascades_for_all_notification_events.sql +++ /dev/null @@ -1,16 +0,0 @@ -ALTER TABLE `NotificationData` DROP FOREIGN KEY `FK2DCAC35542E9AC7B`; -ALTER TABLE `NotificationData` DROP FOREIGN KEY `FK2DCAC355B2E2AD78`; -ALTER TABLE `NotificationData` DROP FOREIGN KEY `FK2DCAC355C1813915`; -ALTER TABLE `NotificationData` DROP FOREIGN KEY `FK_sqjaj3jb6t9lsw1l2p8ex8jnb`; -ALTER TABLE `NotificationData` DROP FOREIGN KEY `notificationdata_group_id`; - -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_notification_data_peer_review` - FOREIGN KEY (`review_id`) REFERENCES `peer_review` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_notification_data_user_caused_by` - FOREIGN KEY (`causedBy_id`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_notification_data_project` - FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_notification_data_milestone` - FOREIGN KEY (`mileStone_id`) REFERENCES `milestone` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_notification_data_group` - FOREIGN KEY (`group_id`) REFERENCES `project_group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/core/src/main/resources/db/migration/V273__added_match_responsible_to_unit.sql b/core/src/main/resources/db/migration/V273__added_match_responsible_to_unit.sql deleted file mode 100644 index fca0c2c3dd..0000000000 --- a/core/src/main/resources/db/migration/V273__added_match_responsible_to_unit.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `unit` ADD COLUMN `matchResponsible` VARCHAR(255) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V274__added_reviewed_flag_to_project_type.sql b/core/src/main/resources/db/migration/V274__added_reviewed_flag_to_project_type.sql deleted file mode 100644 index cf30a8f765..0000000000 --- a/core/src/main/resources/db/migration/V274__added_reviewed_flag_to_project_type.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ProjectType` ADD COLUMN `reviewed` BOOLEAN NOT NULL DEFAULT TRUE; diff --git a/core/src/main/resources/db/migration/V275__add_reviewer_support_mail.sql b/core/src/main/resources/db/migration/V275__add_reviewer_support_mail.sql deleted file mode 100644 index 9874a86f8e..0000000000 --- a/core/src/main/resources/db/migration/V275__add_reviewer_support_mail.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD `reviewerSupportMail` varchar(255) DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V276__added_thesis_support_mail.sql b/core/src/main/resources/db/migration/V276__added_thesis_support_mail.sql deleted file mode 100644 index 53a7b0f393..0000000000 --- a/core/src/main/resources/db/migration/V276__added_thesis_support_mail.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD COLUMN `thesisSupportMail` VARCHAR(255) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V277__removed_expand_project_details_from_user_profile.sql b/core/src/main/resources/db/migration/V277__removed_expand_project_details_from_user_profile.sql deleted file mode 100644 index 93e59db46c..0000000000 --- a/core/src/main/resources/db/migration/V277__removed_expand_project_details_from_user_profile.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` DROP COLUMN `expandProjectDetails`; diff --git a/core/src/main/resources/db/migration/V278__removed_partner_confirmation.sql b/core/src/main/resources/db/migration/V278__removed_partner_confirmation.sql deleted file mode 100644 index 9d266b62c9..0000000000 --- a/core/src/main/resources/db/migration/V278__removed_partner_confirmation.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE `general_system_settings` DROP COLUMN `matchPartnerConfirmation`; -ALTER TABLE `idea_student` DROP COLUMN `confirmed`; -UPDATE `idea` SET `cachedStatus` = 'MATCHED' WHERE cachedStatus = 'PENDING' - AND `applicationPeriod_id` IS NOT NULL - AND (SELECT supervisor_id FROM idea_match WHERE idea_id = idea.id) IS NOT NULL - AND EXISTS (SELECT 1 FROM idea_student WHERE idea_id = idea.id); -UPDATE `idea` SET `cachedStatus` = 'UNMATCHED' WHERE cachedStatus = 'PENDING'; -DELETE FROM `NotificationData` WHERE `type` = 'IDEA' AND `event` = 'PARTNER_ADDED'; -DELETE FROM `NotificationData` WHERE `type` = 'IDEA' AND `event` = 'PARTNER_DECLINE'; -ALTER TABLE `general_system_settings` DROP COLUMN `confirmationDays`; diff --git a/core/src/main/resources/db/migration/V279__Add_Research_Area_To_Project.sql b/core/src/main/resources/db/migration/V279__Add_Research_Area_To_Project.sql deleted file mode 100644 index 8379b0b8dc..0000000000 --- a/core/src/main/resources/db/migration/V279__Add_Research_Area_To_Project.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `project` ADD COLUMN `researchArea_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `project` ADD CONSTRAINT `FK_research_area_id` FOREIGN KEY (`researchArea_id`) REFERENCES `researcharea` (`id`); diff --git a/core/src/main/resources/db/migration/V27__removed_submitted_and_aborted_columns_from_peer_review.sql b/core/src/main/resources/db/migration/V27__removed_submitted_and_aborted_columns_from_peer_review.sql deleted file mode 100644 index 498f4ccf4a..0000000000 --- a/core/src/main/resources/db/migration/V27__removed_submitted_and_aborted_columns_from_peer_review.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `peer_review` DROP COLUMN `submitted`; -ALTER TABLE `peer_review` DROP COLUMN `aborted`; diff --git a/core/src/main/resources/db/migration/V280__Remove_ReviewerApproval_Decision.sql b/core/src/main/resources/db/migration/V280__Remove_ReviewerApproval_Decision.sql deleted file mode 100644 index 8e05a2acd5..0000000000 --- a/core/src/main/resources/db/migration/V280__Remove_ReviewerApproval_Decision.sql +++ /dev/null @@ -1,16 +0,0 @@ -ALTER TABLE scipro.Decision ADD reviewerApproval_id BIGINT(20) NOT NULL; - -UPDATE Decision D, ReviewerApproval_Decision R set D.reviewerApproval_id = R.reviewerApproval_id WHERE D.id = R.decisions_id; -DELETE FROM scipro.`Decision` WHERE `reviewerApproval_id` NOT IN (SELECT `id` FROM scipro.ReviewerApproval); - -DROP TABLE ReviewerApproval_Decision; - -ALTER TABLE `scipro`.`Decision` -ADD INDEX `fk_ReviewerApproval_Decision_idx` (`reviewerApproval_id` ASC); - -ALTER TABLE `scipro`.`Decision` -ADD CONSTRAINT `fk_Decision_ReviewerApproval` -FOREIGN KEY (`reviewerApproval_id`) -REFERENCES `scipro`.`ReviewerApproval` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V281__changed_profile_picture_to_allow_more_options.sql b/core/src/main/resources/db/migration/V281__changed_profile_picture_to_allow_more_options.sql deleted file mode 100644 index 69a732cd9e..0000000000 --- a/core/src/main/resources/db/migration/V281__changed_profile_picture_to_allow_more_options.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `picture` VARCHAR(32) NOT NULL DEFAULT 'NONE'; -UPDATE `user_profile` SET `picture` = 'GRAVATAR' WHERE showGravatar IS TRUE; -ALTER TABLE `user_profile` DROP COLUMN `showGravatar`; diff --git a/core/src/main/resources/db/migration/V282__added_profile_picture_to_user_profile.sql b/core/src/main/resources/db/migration/V282__added_profile_picture_to_user_profile.sql deleted file mode 100644 index b831a7fb0c..0000000000 --- a/core/src/main/resources/db/migration/V282__added_profile_picture_to_user_profile.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `profilePicture_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `user_profile` ADD CONSTRAINT `FK_user_profile_file_description_picture` - FOREIGN KEY (`profilePicture_id`) REFERENCES `file_description` (`id`); diff --git a/core/src/main/resources/db/migration/V283__removed_research_plan.sql b/core/src/main/resources/db/migration/V283__removed_research_plan.sql deleted file mode 100644 index 5d84718c34..0000000000 --- a/core/src/main/resources/db/migration/V283__removed_research_plan.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `project_type_project_modules` WHERE `projectModules` = 'RESEARCH_PLAN'; -DROP TABLE `research_plan`; diff --git a/core/src/main/resources/db/migration/V284__Add_more_info_about_idea_link.sql b/core/src/main/resources/db/migration/V284__Add_more_info_about_idea_link.sql deleted file mode 100644 index 7e11d4b7eb..0000000000 --- a/core/src/main/resources/db/migration/V284__Add_more_info_about_idea_link.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `general_system_settings` ADD `externalGettingStartedWithIdeaURL` varchar(255) DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V285__remove_preliminary_grading_report_stuff.sql b/core/src/main/resources/db/migration/V285__remove_preliminary_grading_report_stuff.sql deleted file mode 100644 index d945a0aa9f..0000000000 --- a/core/src/main/resources/db/migration/V285__remove_preliminary_grading_report_stuff.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE FinalSeminarSettings -DROP daysAheadThesisCommentToRemind, -DROP daysAheadToUploadThesisReview, -DROP thesisReviewsEnabled; - -DROP TABLE preliminary_grading_report; - - diff --git a/core/src/main/resources/db/migration/V286__remove_thesis_review.sql b/core/src/main/resources/db/migration/V286__remove_thesis_review.sql deleted file mode 100644 index c289e37586..0000000000 --- a/core/src/main/resources/db/migration/V286__remove_thesis_review.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE final_seminar_thesis_review; diff --git a/core/src/main/resources/db/migration/V287__removed_examiner_from_final_seminar.sql b/core/src/main/resources/db/migration/V287__removed_examiner_from_final_seminar.sql deleted file mode 100644 index 2b51fa88cd..0000000000 --- a/core/src/main/resources/db/migration/V287__removed_examiner_from_final_seminar.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `final_seminar` DROP FOREIGN KEY `final_seminar_examiner_id`; -ALTER TABLE `final_seminar` DROP COLUMN `examiner_id`; diff --git a/core/src/main/resources/db/migration/V288__remove_column_from_general_system_settings.sql b/core/src/main/resources/db/migration/V288__remove_column_from_general_system_settings.sql deleted file mode 100644 index 9c165e7d28..0000000000 --- a/core/src/main/resources/db/migration/V288__remove_column_from_general_system_settings.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE general_system_settings DROP peerDisplayNumberOfReviewsPerformed; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V289__remove_column_from_user_profile.sql b/core/src/main/resources/db/migration/V289__remove_column_from_user_profile.sql deleted file mode 100644 index 7a0174fe94..0000000000 --- a/core/src/main/resources/db/migration/V289__remove_column_from_user_profile.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user_profile DROP expandProjectFilter; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V28__removed_unused_peer_request_deleted_column.sql b/core/src/main/resources/db/migration/V28__removed_unused_peer_request_deleted_column.sql deleted file mode 100644 index f21fd63f92..0000000000 --- a/core/src/main/resources/db/migration/V28__removed_unused_peer_request_deleted_column.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `peer_request` DROP COLUMN `deleted`; diff --git a/core/src/main/resources/db/migration/V290__make_matchResponsibleMail_nullable.sql b/core/src/main/resources/db/migration/V290__make_matchResponsibleMail_nullable.sql deleted file mode 100644 index 7e2be05550..0000000000 --- a/core/src/main/resources/db/migration/V290__make_matchResponsibleMail_nullable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE general_system_settings MODIFY matchResponsibleMail VARCHAR(255) NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V291__removed_old_notifications_whose_event_got_removed.sql b/core/src/main/resources/db/migration/V291__removed_old_notifications_whose_event_got_removed.sql deleted file mode 100644 index 6948bfe00e..0000000000 --- a/core/src/main/resources/db/migration/V291__removed_old_notifications_whose_event_got_removed.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `NotificationData` WHERE `type` = 'FINAL_SEMINAR' AND `event` = 'THESIS_COMMENT_UPLOADED'; -DELETE FROM `NotificationData` WHERE `type` = 'FINAL_SEMINAR' AND `event` = 'THESIS_COMMENT_REMIND'; diff --git a/core/src/main/resources/db/migration/V292__remove_date_settings.sql b/core/src/main/resources/db/migration/V292__remove_date_settings.sql deleted file mode 100644 index 35d5286b30..0000000000 --- a/core/src/main/resources/db/migration/V292__remove_date_settings.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE scipro.settings_date; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V293__added_deadline_to_reviewer_requests.sql b/core/src/main/resources/db/migration/V293__added_deadline_to_reviewer_requests.sql deleted file mode 100644 index b7a1b37a1e..0000000000 --- a/core/src/main/resources/db/migration/V293__added_deadline_to_reviewer_requests.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE `Decision` ADD COLUMN `deadline` DATETIME DEFAULT NULL; - -UPDATE `Decision` SET `deadline` = DATE_ADD(`requested`, INTERVAL (SELECT `roughDraftApproval` FROM `reviewer_deadline_settings`) DAY) - WHERE `reviewerApproval_id` IN (SELECT `id` FROM `ReviewerApproval` WHERE `type` = 'RoughDraftApproval'); -UPDATE `Decision` SET `deadline` = DATE_ADD(`requested`, INTERVAL (SELECT `finalSeminarApproval` FROM `reviewer_deadline_settings`) DAY) - WHERE `reviewerApproval_id` IN (SELECT `id` FROM `ReviewerApproval` WHERE `type` = 'FinalSeminarApproval'); -UPDATE `Decision` SET `deadline` = DATE_ADD(`deadline`, INTERVAL 2 DAY) WHERE WEEKDAY(`requested`) = 4; -UPDATE `Decision` SET `deadline` = DATE_ADD(`deadline`, INTERVAL 1 DAY) WHERE WEEKDAY(`requested`) = 5; -UPDATE `Decision` SET `deadline` = DATE_ADD(`deadline`, INTERVAL 2 DAY) WHERE WEEKDAY(`deadline`) <= WEEKDAY(`requested`) AND WEEKDAY(`requested`) < 4; -UPDATE `Decision` SET `deadline` = DATE_ADD(`deadline`, INTERVAL 2 DAY) WHERE WEEKDAY(`deadline`) = 5 OR WEEKDAY(`deadline`) = 6; -update Decision set deadline = DATE_ADD(deadline, interval 2 day) where requested < '2015-04-07' and deadline >= '2015-04-03'; -update Decision set deadline = DATE_ADD(deadline, interval 1 day) where requested < '2015-05-02' and deadline >= '2015-05-01'; -update Decision set deadline = DATE_ADD(deadline, interval 2 day) where requested < '2015-05-16' and deadline >= '2015-05-14'; -UPDATE `Decision` SET `deadline` = DATE_ADD(`deadline`, INTERVAL 2 DAY) WHERE WEEKDAY(`deadline`) = 5 OR WEEKDAY(`deadline`) = 6; diff --git a/core/src/main/resources/db/migration/V294__removed_unused_attribute_locked_from_activity_plan.sql b/core/src/main/resources/db/migration/V294__removed_unused_attribute_locked_from_activity_plan.sql deleted file mode 100644 index 5f5b783c50..0000000000 --- a/core/src/main/resources/db/migration/V294__removed_unused_attribute_locked_from_activity_plan.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ActivityPlan` DROP COLUMN `locked`; diff --git a/core/src/main/resources/db/migration/V295__change_project_partner_to_be_by_type.sql b/core/src/main/resources/db/migration/V295__change_project_partner_to_be_by_type.sql deleted file mode 100644 index cab035e1af..0000000000 --- a/core/src/main/resources/db/migration/V295__change_project_partner_to_be_by_type.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `projectPartner` ADD COLUMN `projectType_id` BIGINT(20); -ALTER TABLE `projectPartner` ADD CONSTRAINT `FK_project_partner_project_type` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); -UPDATE `projectPartner` SET `projectType_id` = ( - SELECT `ProjectType`.`id` FROM `ProjectType` - INNER JOIN `project_type_settings` ON ProjectType.id = project_type_settings.projectType_id - WHERE maxAuthors >= 2 - LIMIT 1 -); -ALTER TABLE `projectPartner` MODIFY COLUMN `projectType_id` BIGINT(20) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V296__added_project_first_meeting.sql b/core/src/main/resources/db/migration/V296__added_project_first_meeting.sql deleted file mode 100644 index ce6f58e200..0000000000 --- a/core/src/main/resources/db/migration/V296__added_project_first_meeting.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE IF NOT EXISTS project_first_meeting ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - activity_id BIGINT(20) NOT NULL, - room VARCHAR(255) NOT NULL, - dateCreated DATETIME NOT NULL, - lastModified DATETIME NOT NULL, - version INT(11) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY FK_project_first_meeting_activity (activity_id) REFERENCES Activity (id) - ON UPDATE CASCADE - ON DELETE CASCADE -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V297__split_project_file_to_own_table.sql b/core/src/main/resources/db/migration/V297__split_project_file_to_own_table.sql deleted file mode 100644 index 373f8a024e..0000000000 --- a/core/src/main/resources/db/migration/V297__split_project_file_to_own_table.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TABLE project_file ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - dateCreated DATETIME NOT NULL, - lastModified DATETIME NOT NULL, - version INT(11) NOT NULL, - fileDescription_id BIGINT(20) NOT NULL, - project_id BIGINT(20) NOT NULL, - fileSource VARCHAR(255) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY FK_project_file_file_description (fileDescription_id) REFERENCES file_description (id), - FOREIGN KEY FK_project_file_project (project_id) REFERENCES project (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; - -UPDATE file_description SET fileSource = 'FILES' WHERE project_id IS NOT NULL AND fileSource IS NULL; - -INSERT INTO project_file (dateCreated, lastModified, version, fileDescription_id, project_id, fileSource) - SELECT dateCreated, lastModified, version, id, project_id, fileSource FROM file_description WHERE project_id IS NOT NULL; - -ALTER TABLE file_description - DROP FOREIGN KEY file_description_project, - DROP COLUMN project_id, - DROP COLUMN fileSource, - DROP COLUMN deletable; diff --git a/core/src/main/resources/db/migration/V298__cascade_delete_project_file.sql b/core/src/main/resources/db/migration/V298__cascade_delete_project_file.sql deleted file mode 100644 index 149985791f..0000000000 --- a/core/src/main/resources/db/migration/V298__cascade_delete_project_file.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE project_file - DROP CONSTRAINT FK_project_file_file_description; - -ALTER TABLE project_file - ADD CONSTRAINT FK_project_file_file_description FOREIGN KEY - FK_project_file_file_description (fileDescription_id) - REFERENCES file_description (id) - ON UPDATE CASCADE - ON DELETE CASCADE; diff --git a/core/src/main/resources/db/migration/V299__urkund_integration.sql b/core/src/main/resources/db/migration/V299__urkund_integration.sql deleted file mode 100644 index 314f806fba..0000000000 --- a/core/src/main/resources/db/migration/V299__urkund_integration.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE plagiarism_request ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - fileDescription_id BIGINT(20) NOT NULL, - receiver_id BIGINT(20) NOT NULL, - PRIMARY KEY(id), - FOREIGN KEY FK_plagiarism_request_file_description (fileDescription_id) REFERENCES file_description (id), - FOREIGN KEY FK_plagiarism_request_receiver (receiver_id) REFERENCES user (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; - -CREATE TABLE urkund_submission ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - dateCreated DATETIME NOT NULL, - lastModified DATETIME NOT NULL, - version INT(4) NOT NULL, - fileDescription_id BIGINT(20) NOT NULL, - receiver_id BIGINT(20) NOT NULL, - submitted DATETIME NOT NULL, - state VARCHAR(32) NOT NULL, - nextPoll DATETIME NOT NULL, - pollingDelay VARCHAR(16) NOT NULL, - message VARCHAR(255), - reportUrl VARCHAR(255), - PRIMARY KEY (id), - FOREIGN KEY FK_urkund_submission_file_description (fileDescription_id) REFERENCES file_description (id), - FOREIGN KEY FK_urkund_submission_receiver (receiver_id) REFERENCES user (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V29__removing_unused_attribute_abort_reason.sql b/core/src/main/resources/db/migration/V29__removing_unused_attribute_abort_reason.sql deleted file mode 100644 index e8b42b26fa..0000000000 --- a/core/src/main/resources/db/migration/V29__removing_unused_attribute_abort_reason.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `peer_review` DROP COLUMN `abortReason`; diff --git a/core/src/main/resources/db/migration/V2__events.sql b/core/src/main/resources/db/migration/V2__events.sql new file mode 100644 index 0000000000..9fab63c61d --- /dev/null +++ b/core/src/main/resources/db/migration/V2__events.sql @@ -0,0 +1,19 @@ +-- +-- Dumping data for table `Event` +-- + +LOCK TABLES `event` WRITE; +INSERT INTO `event` VALUES +('FinalSeminarCreated','Final seminar created'), +('FinalSeminarThesisUploaded','Final seminar thesis uploaded'), +('FinalThesisApproved','Supervisor approves the final thesis.'), +('FirstPeerReviewCompleted','Author completes their first peer review'), +('OppositionGradingEvent','Supervisor grades an opponent on a final seminar.'), +('ParticipationGradingEvent','Supervisor grades an active participant on a final seminar.'), +('RespondentGradingEvent','Supervisor grades a respondent on a final seminar.'), +('RoughDraftApprovalRequested','Rough draft sent to reviewer for approval for the first time.'), +('SecondPeerReviewCompleted','Author completes their second peer review'), +('Step.FINAL_SEMINAR_APPROVAL','The thesis is approved for final seminar by the reviewer'), +('Step.ROUGH_DRAFT_APPROVAL','Rough draft is approved by the reviewer'), +('SupervisorGradingReportSubmitted','Supervisor has submitted their grading report'); +UNLOCK TABLES; diff --git a/core/src/main/resources/db/migration/V2__program_stuff.sql b/core/src/main/resources/db/migration/V2__program_stuff.sql deleted file mode 100644 index 52b86af09a..0000000000 --- a/core/src/main/resources/db/migration/V2__program_stuff.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM role_Program; -DELETE FROM Program; - -ALTER TABLE Program ADD nameEn varchar(255) DEFAULT NULL; -ALTER TABLE Program ADD code varchar(255) NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V300__urkund_settings_table.sql b/core/src/main/resources/db/migration/V300__urkund_settings_table.sql deleted file mode 100644 index a05ef48b4c..0000000000 --- a/core/src/main/resources/db/migration/V300__urkund_settings_table.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE urkund_settings ( - id INT NOT NULL, - enabled BOOLEAN NOT NULL DEFAULT FALSE, - username VARCHAR(255), - password VARCHAR(255), - PRIMARY KEY (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V301__added_deceased_flag_to_user_to_prevent_mail.sql b/core/src/main/resources/db/migration/V301__added_deceased_flag_to_user_to_prevent_mail.sql deleted file mode 100644 index 330cef5238..0000000000 --- a/core/src/main/resources/db/migration/V301__added_deceased_flag_to_user_to_prevent_mail.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user ADD COLUMN deceased BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V302__removed_turnitin.sql b/core/src/main/resources/db/migration/V302__removed_turnitin.sql deleted file mode 100644 index 5d7452301f..0000000000 --- a/core/src/main/resources/db/migration/V302__removed_turnitin.sql +++ /dev/null @@ -1,2 +0,0 @@ -# We save the tables for a while to aid in migration and possibly re-upload to URKUND -ALTER TABLE `turnitincheck` DROP FOREIGN KEY `FK_cqi2extqeqiycldjlfe7afx3j`; diff --git a/core/src/main/resources/db/migration/V303__added_literature_to_watson.sql b/core/src/main/resources/db/migration/V303__added_literature_to_watson.sql deleted file mode 100644 index cb4af806a6..0000000000 --- a/core/src/main/resources/db/migration/V303__added_literature_to_watson.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE idea ADD COLUMN literature LONGTEXT; diff --git a/core/src/main/resources/db/migration/V304__added_grading_url.sql b/core/src/main/resources/db/migration/V304__added_grading_url.sql deleted file mode 100644 index 5089c5e4f7..0000000000 --- a/core/src/main/resources/db/migration/V304__added_grading_url.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE general_system_settings ADD COLUMN externalGradingURL VARCHAR(255); diff --git a/core/src/main/resources/db/migration/V305__added_swedish_english_title_to_final_thesis.sql b/core/src/main/resources/db/migration/V305__added_swedish_english_title_to_final_thesis.sql deleted file mode 100644 index 35b84d8190..0000000000 --- a/core/src/main/resources/db/migration/V305__added_swedish_english_title_to_final_thesis.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE FinalThesis ADD COLUMN englishTitle VARCHAR(255); -ALTER TABLE FinalThesis ADD COLUMN swedishTitle VARCHAR(255); diff --git a/core/src/main/resources/db/migration/V306__made_language_static_to_enable_specific_behaviour.sql b/core/src/main/resources/db/migration/V306__made_language_static_to_enable_specific_behaviour.sql deleted file mode 100644 index 9d2044ed37..0000000000 --- a/core/src/main/resources/db/migration/V306__made_language_static_to_enable_specific_behaviour.sql +++ /dev/null @@ -1,46 +0,0 @@ -ALTER TABLE user_languages ADD COLUMN language VARCHAR(255); -UPDATE user_languages SET language = 'SWEDISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'Swedish'); -UPDATE user_languages SET language = 'ENGLISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'English'); -DELETE FROM user_languages WHERE language IS NULL; -ALTER TABLE user_languages DROP FOREIGN KEY FK_user_languages_language; -ALTER TABLE user_languages DROP PRIMARY KEY; -ALTER TABLE user_languages ADD PRIMARY KEY (user_id, language); -ALTER TABLE user_languages DROP COLUMN language_id; -ALTER TABLE user_languages MODIFY COLUMN language VARCHAR(255) NOT NULL; - -ALTER TABLE idea_language ADD COLUMN language VARCHAR(255); -UPDATE idea_language SET language = 'SWEDISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'Swedish'); -UPDATE idea_language SET language = 'ENGLISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'English'); -UPDATE idea_language SET language = 'SWEDISH' WHERE language IS NULL; -ALTER TABLE idea_language DROP FOREIGN KEY FK_idea_language_language; -alter table idea_language add key FK_idea_language_idea (idea_id); -ALTER TABLE idea_language DROP PRIMARY KEY; -ALTER TABLE idea_language ADD PRIMARY KEY (idea_id, language); -ALTER TABLE idea_language DROP COLUMN language_id; -ALTER TABLE idea_language MODIFY COLUMN language VARCHAR(255) NOT NULL; - -ALTER TABLE peer_request ADD COLUMN language VARCHAR(255); -UPDATE peer_request SET language = 'SWEDISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'Swedish'); -UPDATE peer_request SET language = 'ENGLISH' WHERE language_id = (SELECT id FROM Language WHERE name = 'English'); -UPDATE peer_request SET language = 'SWEDISH' WHERE language IS NULL; -ALTER TABLE peer_request DROP FOREIGN KEY fk_peer_request_language_id_language_id; -ALTER TABLE peer_request DROP COLUMN language_id; -ALTER TABLE peer_request MODIFY COLUMN language VARCHAR(255) NOT NULL; - -ALTER TABLE final_seminar ADD COLUMN reportLanguage VARCHAR(255); -UPDATE final_seminar SET reportLanguage = 'SWEDISH' WHERE reportLanguage_id = (SELECT id FROM Language WHERE name = 'Swedish'); -UPDATE final_seminar SET reportLanguage = 'ENGLISH' WHERE reportLanguage_id = (SELECT id FROM Language WHERE name = 'English'); -UPDATE final_seminar SET reportLanguage = 'SWEDISH' WHERE reportLanguage IS NULL; -ALTER TABLE final_seminar DROP FOREIGN KEY FK_final_seminar_report_language; -ALTER TABLE final_seminar DROP COLUMN reportLanguage_id; -ALTER TABLE final_seminar MODIFY COLUMN reportLanguage VARCHAR(255) NOT NULL; - -ALTER TABLE final_seminar ADD COLUMN presentationLanguage VARCHAR(255); -UPDATE final_seminar SET presentationLanguage = 'SWEDISH' WHERE presentationLanguage_id = (SELECT id FROM Language WHERE name = 'Swedish'); -UPDATE final_seminar SET presentationLanguage = 'ENGLISH' WHERE presentationLanguage_id = (SELECT id FROM Language WHERE name = 'English'); -UPDATE final_seminar SET presentationLanguage = 'SWEDISH' WHERE presentationLanguage IS NULL; -ALTER TABLE final_seminar DROP FOREIGN KEY FK_final_seminar_presentation_language; -ALTER TABLE final_seminar DROP COLUMN presentationLanguage_id; -ALTER TABLE final_seminar MODIFY COLUMN presentationLanguage VARCHAR(255) NOT NULL; - -DROP TABLE IF EXISTS Language; diff --git a/core/src/main/resources/db/migration/V307__added_new_tholander_box.sql b/core/src/main/resources/db/migration/V307__added_new_tholander_box.sql deleted file mode 100644 index 510c99c089..0000000000 --- a/core/src/main/resources/db/migration/V307__added_new_tholander_box.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE idea ADD COLUMN background LONGTEXT; -ALTER TABLE idea ADD COLUMN problem LONGTEXT; -ALTER TABLE idea ADD COLUMN method LONGTEXT; -ALTER TABLE idea ADD COLUMN interests LONGTEXT; diff --git a/core/src/main/resources/db/migration/V308__added_significance_to_text_matching_submissions.sql b/core/src/main/resources/db/migration/V308__added_significance_to_text_matching_submissions.sql deleted file mode 100644 index f1775e8ee7..0000000000 --- a/core/src/main/resources/db/migration/V308__added_significance_to_text_matching_submissions.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE urkund_submission ADD COLUMN significance FLOAT NULL; diff --git a/core/src/main/resources/db/migration/V309__deprecate_profile_picture.sql b/core/src/main/resources/db/migration/V309__deprecate_profile_picture.sql deleted file mode 100644 index bbad81e433..0000000000 --- a/core/src/main/resources/db/migration/V309__deprecate_profile_picture.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `user_profile` CHANGE COLUMN `picture` `remove_picture` VARCHAR(32) NOT NULL; -ALTER TABLE `user_profile` DROP FOREIGN KEY `FK_user_profile_file_description_picture`; -ALTER TABLE `user_profile` CHANGE COLUMN `profilePicture_id` `remove_profilePicture_id` BIGINT(20); -ALTER TABLE `user_profile` ADD CONSTRAINT `FK_user_profile_file_description_picture` FOREIGN KEY (remove_profilePicture_id) REFERENCES file_description (id); diff --git a/core/src/main/resources/db/migration/V30__made_grading_reports_relation_to_project_many_to_one.sql b/core/src/main/resources/db/migration/V30__made_grading_reports_relation_to_project_many_to_one.sql deleted file mode 100644 index 753ba67ccd..0000000000 --- a/core/src/main/resources/db/migration/V30__made_grading_reports_relation_to_project_many_to_one.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `grading_report` ADD COLUMN `student_id` BIGINT(20) NOT NULL; - -DELETE FROM `grading_report`; - -ALTER TABLE `grading_report` ADD CONSTRAINT `FK_student` FOREIGN KEY (`student_id`) REFERENCES role (`id`); - -ALTER TABLE `grading_report` DROP INDEX `UK_6YGPK1QQ218JGWUUYX0BP6VUI`; - -ALTER TABLE `grading_report` ADD CONSTRAINT `uc_project_student` UNIQUE (`project_id`, `student_id`); diff --git a/core/src/main/resources/db/migration/V310__changed_to_allow_null_on_removed_column.sql b/core/src/main/resources/db/migration/V310__changed_to_allow_null_on_removed_column.sql deleted file mode 100644 index 430eecd62d..0000000000 --- a/core/src/main/resources/db/migration/V310__changed_to_allow_null_on_removed_column.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` CHANGE COLUMN `remove_picture` `remove_picture` VARCHAR(32) NULL; diff --git a/core/src/main/resources/db/migration/V311__removed_watson.sql b/core/src/main/resources/db/migration/V311__removed_watson.sql deleted file mode 100644 index fc21092186..0000000000 --- a/core/src/main/resources/db/migration/V311__removed_watson.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE idea CHANGE COLUMN what remove_what LONGTEXT NULL DEFAULT NULL; -ALTER TABLE idea CHANGE COLUMN why remove_why LONGTEXT NULL DEFAULT NULL; -ALTER TABLE idea CHANGE COLUMN theoryHow remove_theoryHow LONGTEXT NULL DEFAULT NULL; -ALTER TABLE idea CHANGE COLUMN practicalHow remove_practicalHow LONGTEXT NULL DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V312__added_application_period_to_partner_ads.sql b/core/src/main/resources/db/migration/V312__added_application_period_to_partner_ads.sql deleted file mode 100644 index 5db4f69a65..0000000000 --- a/core/src/main/resources/db/migration/V312__added_application_period_to_partner_ads.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE projectPartner - ADD COLUMN `applicationPeriod_id` BIGINT(20) NULL, - ADD CONSTRAINT `FK_ProjectPartner_ApplicationPeriod_applicationPeriod` - FOREIGN KEY `FK_ProjectPartner_ApplicationPeriod_applicationPeriod` (applicationPeriod_id) REFERENCES ApplicationPeriod (id); - -UPDATE projectPartner SET applicationPeriod_id = ( - SELECT id - FROM ApplicationPeriod - WHERE DATEDIFF(endDate, startDate) > 10 -- Periods which were open for at least 10 days (aka not the dummy ones before exemptions) - AND courseStartDate > projectPartner.dateCreated - AND projectPartner.projectType_id IN ( - SELECT projectType_id - FROM ApplicationPeriodProjectType - WHERE applicationPeriod_id = ApplicationPeriod.id - ) - ORDER BY courseStartDate ASC - LIMIT 1 -); - -DELETE FROM projectPartner WHERE applicationPeriod_id IS NULL; - -ALTER TABLE projectPartner - MODIFY COLUMN `applicationPeriod_id` BIGINT(20) NOT NULL; diff --git a/core/src/main/resources/db/migration/V313__added_language_to_project.sql b/core/src/main/resources/db/migration/V313__added_language_to_project.sql deleted file mode 100644 index 5051643f33..0000000000 --- a/core/src/main/resources/db/migration/V313__added_language_to_project.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE project - ADD COLUMN language VARCHAR(255) NULL DEFAULT NULL; - -UPDATE project SET language = ( - SELECT reportLanguage FROM final_seminar WHERE project_id = project.id -); diff --git a/core/src/main/resources/db/migration/V314__removed_project_language_from_final_seminar.sql b/core/src/main/resources/db/migration/V314__removed_project_language_from_final_seminar.sql deleted file mode 100644 index 173032ddf5..0000000000 --- a/core/src/main/resources/db/migration/V314__removed_project_language_from_final_seminar.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE final_seminar DROP COLUMN reportLanguage; diff --git a/core/src/main/resources/db/migration/V315__added_preliminary_match.sql b/core/src/main/resources/db/migration/V315__added_preliminary_match.sql deleted file mode 100644 index a0eaf0a16d..0000000000 --- a/core/src/main/resources/db/migration/V315__added_preliminary_match.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE preliminary_match ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - dateCreated DATETIME NOT NULL, - lastModified DATETIME NOT NULL, - version INT NOT NULL DEFAULT 0, - idea_id BIGINT(20) NOT NULL, - supervisor_id BIGINT(20), - comment TEXT, - PRIMARY KEY (id), - KEY FK_preliminary_match_idea (idea_id), - KEY FK_preliminary_match_supervisor (supervisor_id), - CONSTRAINT FK_preliminary_match_idea FOREIGN KEY (idea_id) REFERENCES idea (id), - CONSTRAINT FK_preliminary_match_supervisor FOREIGN KEY (idea_id) REFERENCES user (id) -) CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V316__save_urkund_analysis_address.sql b/core/src/main/resources/db/migration/V316__save_urkund_analysis_address.sql deleted file mode 100644 index 0874a1d07d..0000000000 --- a/core/src/main/resources/db/migration/V316__save_urkund_analysis_address.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE urkund_submission ADD COLUMN analysisAddress VARCHAR(255); diff --git a/core/src/main/resources/db/migration/V317__removed_final_grade.sql b/core/src/main/resources/db/migration/V317__removed_final_grade.sql deleted file mode 100644 index 18ad0b15df..0000000000 --- a/core/src/main/resources/db/migration/V317__removed_final_grade.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM project_type_project_modules WHERE projectModules = 'FINAL_GRADING'; diff --git a/core/src/main/resources/db/migration/V318__oauth_settings.sql b/core/src/main/resources/db/migration/V318__oauth_settings.sql deleted file mode 100644 index 358a408389..0000000000 --- a/core/src/main/resources/db/migration/V318__oauth_settings.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE oauth_settings ( - id INT PRIMARY KEY, - uri VARCHAR(255), - redirect_uri VARCHAR(255), - client_id VARCHAR(255), - client_secret VARCHAR(255) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/core/src/main/resources/db/migration/V319__fix_fk_preliminary_match.sql b/core/src/main/resources/db/migration/V319__fix_fk_preliminary_match.sql deleted file mode 100644 index df2764b370..0000000000 --- a/core/src/main/resources/db/migration/V319__fix_fk_preliminary_match.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE preliminary_match DROP FOREIGN KEY FK_preliminary_match_supervisor; -ALTER TABLE preliminary_match ADD CONSTRAINT FK_preliminary_match_supervisor FOREIGN KEY (supervisor_id) REFERENCES user (id); diff --git a/core/src/main/resources/db/migration/V31__remove_grading_report_template_description.sql b/core/src/main/resources/db/migration/V31__remove_grading_report_template_description.sql deleted file mode 100644 index 3a4dbb5f70..0000000000 --- a/core/src/main/resources/db/migration/V31__remove_grading_report_template_description.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report_template` DROP COLUMN `description`; diff --git a/core/src/main/resources/db/migration/V320__updated_grading_criterions.sql b/core/src/main/resources/db/migration/V320__updated_grading_criterions.sql deleted file mode 100644 index d45cd9444f..0000000000 --- a/core/src/main/resources/db/migration/V320__updated_grading_criterions.sql +++ /dev/null @@ -1,47 +0,0 @@ -INSERT INTO grading_criterion_template (dateCreated, lastModified, version, title, gradingReportTemplate_id, sortOrder, pointsRequiredToPass, type, fx) - SELECT NOW(), NOW(), 0, 'Ö6 Reflection', id, 18, 1, 'IndividualGradingCriterionTemplate', FALSE FROM grading_report_template; - -INSERT INTO grading_criterion_point_template (dateCreated, lastModified, version, gradingCriterionTemplate_id, point, description) - SELECT NOW(), NOW(), 0, id, 0, NULL FROM grading_criterion_template WHERE title = 'Ö6 Reflection'; - -INSERT INTO grading_criterion_point_template (dateCreated, lastModified, version, gradingCriterionTemplate_id, point, description) - SELECT NOW(), NOW(), 0, id, 1, 'is required: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document' FROM grading_criterion_template WHERE title = 'Ö6 Reflection'; - -CREATE TEMPORARY TABLE rm_gr (id INT); - -INSERT INTO rm_gr -SELECT id -FROM GradingReport -WHERE project_id IN (SELECT id FROM project WHERE dateCreated > '2017-01-01') - AND NOT EXISTS (SELECT 1 FROM GradingCriterion WHERE (LENGTH(feedback) > 1 OR points IS NOT NULl) AND gradingReport_id = GradingReport.id); - -DELETE FROM GradingCriterionPoint -WHERE GradingCriterion_id IN ( - SELECT id FROM GradingCriterion WHERE gradingReport_id IN ( - SELECT id FROM rm_gr)); - -DELETE FROM GradingCriterion -WHERE gradingReport_id IN ( - SELECT id FROM rm_gr); - -DELETE FROM SupervisorGradingReport WHERE id IN (SELECT id FROM rm_gr); -DELETE FROM ReviewerGradingReport WHERE id IN (SELECT id FROM rm_gr); - -DELETE FROM rm_gr; - -INSERT INTO rm_gr - SELECT id - FROM GradingReport - WHERE project_id IN (SELECT id FROM project WHERE dateCreated > '2017-01-01') - AND EXISTS (SELECT 1 FROM GradingCriterion WHERE (LENGTH(feedback) > 1 OR points IS NOT NULl) AND gradingReport_id = GradingReport.id); - -INSERT INTO GradingCriterion (dateCreated, lastModified, version, points, gradingReport_id, feedback, title, sortOrder, pointsRequiredToPass, type, fx) - SELECT NOW(), NOW(), 0, NULL, id, NULL, 'Ö6 Reflection', 18, 1, 'IndividualGradingCriterion', FALSE FROM rm_gr; - -INSERT INTO GradingCriterionPoint (dateCreated, lastModified, version, GradingCriterion_id, point, description) - SELECT NOW(), NOW(), 0, id, 0, NULL FROM GradingCriterion WHERE title = 'Ö6 Reflection'; - -INSERT INTO GradingCriterionPoint (dateCreated, lastModified, version, GradingCriterion_id, point, description) - SELECT NOW(), NOW(), 0, id, 1, 'is required: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document' FROM GradingCriterion WHERE title = 'Ö6 Reflection'; - -DROP TABLE rm_gr; diff --git a/core/src/main/resources/db/migration/V321__added_text_matching_document_to_final_thesis.sql b/core/src/main/resources/db/migration/V321__added_text_matching_document_to_final_thesis.sql deleted file mode 100644 index 376053d83e..0000000000 --- a/core/src/main/resources/db/migration/V321__added_text_matching_document_to_final_thesis.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE FinalThesis - ADD COLUMN textMatchingDocument_id BIGINT(20); -ALTER TABLE FinalThesis - ADD CONSTRAINT FK_final_thesis_text_matching - FOREIGN KEY (textMatchingDocument_id) REFERENCES file_description (id) - ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/core/src/main/resources/db/migration/V322__removed_faulty_criterion_point.sql b/core/src/main/resources/db/migration/V322__removed_faulty_criterion_point.sql deleted file mode 100644 index 4b52f79622..0000000000 --- a/core/src/main/resources/db/migration/V322__removed_faulty_criterion_point.sql +++ /dev/null @@ -1,43 +0,0 @@ -UPDATE GradingCriterion -SET points = 3 -WHERE gradingReport_id IN ( - SELECT id - FROM GradingReport - WHERE project_id IN ( - SELECT id - FROM project - WHERE credits = 15 - ) -) AND points = 4; - -DELETE FROM GradingCriterionPoint -WHERE GradingCriterion_id IN ( - SELECT id - FROM GradingCriterion - WHERE gradingReport_id IN ( - SELECT id - FROM GradingReport - WHERE project_id IN ( - SELECT id - FROM project - WHERE credits = 15 - )) - AND title LIKE 'U13%' - AND point = 4 -); - -DELETE -FROM grading_criterion_point_template -WHERE gradingCriterionTemplate_id IN ( - SELECT id - FROM grading_criterion_template - WHERE gradingReportTemplate_id IN ( - SELECT id - FROM grading_report_template - WHERE projectType_id IN ( - 6 - ) AND credits = 15 - ) - AND title LIKE 'U13%' -) - AND point = 4; diff --git a/core/src/main/resources/db/migration/V323__remove_unused_column.sql b/core/src/main/resources/db/migration/V323__remove_unused_column.sql deleted file mode 100644 index e4943a839e..0000000000 --- a/core/src/main/resources/db/migration/V323__remove_unused_column.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE file_description DROP COLUMN path; diff --git a/core/src/main/resources/db/migration/V324__remove_hash.sql b/core/src/main/resources/db/migration/V324__remove_hash.sql deleted file mode 100644 index 50baa226fc..0000000000 --- a/core/src/main/resources/db/migration/V324__remove_hash.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `hash`; diff --git a/core/src/main/resources/db/migration/V325__emoji_support.sql b/core/src/main/resources/db/migration/V325__emoji_support.sql deleted file mode 100644 index b53a6252db..0000000000 --- a/core/src/main/resources/db/migration/V325__emoji_support.sql +++ /dev/null @@ -1,159 +0,0 @@ -ALTER TABLE `milestone_activity_template` DROP FOREIGN KEY milestone_activity_template_ibfk_1; - -ALTER TABLE `Event` MODIFY COLUMN `name` VARCHAR(191); -ALTER TABLE `checklist_category` MODIFY COLUMN `categoryName` VARCHAR(191); -ALTER TABLE `comment_thread` MODIFY COLUMN `commentableKey` VARCHAR(191) NOT NULL; -ALTER TABLE `general_system_settings_system_modules` MODIFY COLUMN `systemModules` VARCHAR(191) NOT NULL; -ALTER TABLE `idea_language` MODIFY COLUMN `language` VARCHAR(191) NOT NULL; -ALTER TABLE `milestone_activity_template` MODIFY COLUMN `code` VARCHAR(191); -ALTER TABLE `milestone_activity_template` MODIFY COLUMN `activatedBy` VARCHAR(191); -ALTER TABLE `notification_delivery_configuration` MODIFY COLUMN `type` VARCHAR(191) NOT NULL; -ALTER TABLE `notification_delivery_configuration` MODIFY COLUMN `event` VARCHAR(191) NOT NULL; -ALTER TABLE `notification_delivery_configuration` MODIFY COLUMN `method` VARCHAR(191) NOT NULL; -ALTER TABLE `notification_receiver_configuration` MODIFY COLUMN `type` VARCHAR(191) NOT NULL; -ALTER TABLE `notification_receiver_configuration` MODIFY COLUMN `event` VARCHAR(191) NOT NULL; -ALTER TABLE `notification_receiver_configuration` MODIFY COLUMN `member` VARCHAR(191) NOT NULL; -ALTER TABLE `plugin_settings` MODIFY COLUMN `pluginName` VARCHAR(191) NOT NULL; -ALTER TABLE `project_type_project_modules` MODIFY COLUMN `projectModules` VARCHAR(191) NOT NULL; -ALTER TABLE `user_languages` MODIFY COLUMN `language` VARCHAR(191) NOT NULL; -ALTER TABLE `user_role` MODIFY COLUMN `role` VARCHAR(191) NOT NULL; -ALTER TABLE `username` MODIFY COLUMN `username` VARCHAR(191) NOT NULL; -ALTER TABLE `worker_data` MODIFY COLUMN `name` VARCHAR(191) NOT NULL; - -ALTER TABLE `Activity` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ActivityPlan` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ActivityPlanTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ActivityTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `AnnualReview` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ApplicationPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ApplicationPeriodProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ChecklistTemplate_questions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Checklist_userLastOpenDate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Decision` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ExternalResource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `FinalSeminarSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `FinalSeminarSettings_punishMails` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `FinalThesis` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `GradingCriterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `GradingCriterionPoint` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `GradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Keyword_researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `MailEvent_nonUserRecipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `NonWorkDayPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `NotificationData` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Password` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `Program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ReviewerApproval` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `ReviewerGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `StudyPlan` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `SupervisorGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `TurnitinSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `TurnitinSettings_expirationMails` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `UserProfile_defaultProjectStatusFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `activity_final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `activity_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `applicationperiodexemption` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_question_checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `checklist_template_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `comment_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `criterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `department_service` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `externallink` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `final_seminar_active_participation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `final_seminar_opposition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `final_seminar_respondent` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `footer_address` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `footer_link` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_mail` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_mail_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_mail_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_mail_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_mail_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_post` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_post_file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `forum_post_read` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `general_system_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `general_system_settings_alarm_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `general_system_settings_supervisor_change_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `general_system_settings_system_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `grade` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `grading_criterion_point_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `grading_criterion_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `grading_report_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `group_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `hibernate_sequences` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_export` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_language` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `idea_student` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `mail_event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `mail_event_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `milestone` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `milestone_activity_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `milestone_activity_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `milestone_phase_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `note` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `notification_delivery_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `notification_receiver_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `oauth_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `opposition_report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `peer_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `peer_review` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `plagiarism_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `plugin_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `preliminary_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `projectPartner` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_cosupervisor` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_file` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_group_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_type_project_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_type_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `project_user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `reviewer_deadline_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `reviewer_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `target` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `transaction` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `turnitincheck` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `unit` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `urkund_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `urkund_submission` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_languages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_profile` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_profile_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_research_area` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `user_role` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `username` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `worker_data` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - -ALTER TABLE `milestone_activity_template` ADD FOREIGN KEY milestone_activity_template_ibfk_1 (`activatedBy`) REFERENCES `Event` (`name`); diff --git a/core/src/main/resources/db/migration/V326__add_constraint_to_only_one_report_per_opponent.sql b/core/src/main/resources/db/migration/V326__add_constraint_to_only_one_report_per_opponent.sql deleted file mode 100644 index b685aa681e..0000000000 --- a/core/src/main/resources/db/migration/V326__add_constraint_to_only_one_report_per_opponent.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `opposition_report` ADD UNIQUE KEY `UK_one_report_per_opponent` (`finalSeminarOpposition_id`); diff --git a/core/src/main/resources/db/migration/V327__remove_gdpr_role.sql b/core/src/main/resources/db/migration/V327__remove_gdpr_role.sql deleted file mode 100644 index c5d0cd306b..0000000000 --- a/core/src/main/resources/db/migration/V327__remove_gdpr_role.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM user_role WHERE role = 'GDPR'; diff --git a/core/src/main/resources/db/migration/V328__add_survey.sql b/core/src/main/resources/db/migration/V328__add_survey.sql deleted file mode 100644 index c5fc06a939..0000000000 --- a/core/src/main/resources/db/migration/V328__add_survey.sql +++ /dev/null @@ -1,54 +0,0 @@ -create table Survey -( - id bigint(20) not null auto_increment, - project_id bigint(20) not null, - user_id bigint(20) not null, - submitted boolean not null default false, - primary key (id), - key FK_survey_project (project_id), - key FK_survey_user (user_id), - constraint FK_survey_project foreign key (project_id) references project (id), - constraint FK_survey_user foreign key (user_id) references user (id) -) default charset = utf8mb4 - collate = utf8mb4_unicode_ci; - -create table Question -( - id bigint(20) not null auto_increment, - type varchar(255) not null, - text text not null, - primary key (id) -) default charset = utf8mb4 - collate = utf8mb4_unicode_ci; - -create table Question_choices -( - question_id bigint(20) not null, - choices text not null, - key FK_question_choices_question (question_id), - constraint FK_question_choices_question foreign key (question_id) references Question(id) -) default charset = utf8mb4 - collate = utf8mb4_unicode_ci; - -create table SurveyAnswer -( - id bigint(20) not null auto_increment, - survey_id bigint(20) not null, - question_id bigint(20) not null, - answer text, - primary key (id), - key FK_answer_survey (survey_id), - key FK_answer_question (question_id), - constraint FK_answer_survey foreign key (survey_id) references Survey (id), - constraint FK_answer_question foreign key (question_id) references Question (id) -) default charset = utf8mb4 - collate = utf8mb4_unicode_ci; - -create table SurveyAnswer_multipleAnswers -( - SurveyAnswer_id bigint(20) not null, - multipleAnswers text not null, - key FK_SA (SurveyAnswer_id), - constraint FK_SA foreign key (SurveyAnswer_id) references SurveyAnswer (id) -) default charset = utf8mb4 - collate = utf8mb4_unicode_ci; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V329__add_survey_availability_flag.sql b/core/src/main/resources/db/migration/V329__add_survey_availability_flag.sql deleted file mode 100644 index 1235be8c1a..0000000000 --- a/core/src/main/resources/db/migration/V329__add_survey_availability_flag.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE general_system_settings ADD COLUMN finalSurveyAvailable BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V32__renamed_grading_criterion_to_grading_criterion_template.sql b/core/src/main/resources/db/migration/V32__renamed_grading_criterion_to_grading_criterion_template.sql deleted file mode 100644 index 81ab29143d..0000000000 --- a/core/src/main/resources/db/migration/V32__renamed_grading_criterion_to_grading_criterion_template.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_criterion` RENAME TO `grading_criterion_template`; diff --git a/core/src/main/resources/db/migration/V330__add_degree_level_to_authors.sql b/core/src/main/resources/db/migration/V330__add_degree_level_to_authors.sql deleted file mode 100644 index 61027f69ca..0000000000 --- a/core/src/main/resources/db/migration/V330__add_degree_level_to_authors.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user ADD COLUMN thesisLevel VARCHAR(32) NOT NULL DEFAULT 'NONE'; diff --git a/core/src/main/resources/db/migration/V331__order_survey_questions.sql b/core/src/main/resources/db/migration/V331__order_survey_questions.sql deleted file mode 100644 index 84dcf4a247..0000000000 --- a/core/src/main/resources/db/migration/V331__order_survey_questions.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE Question ADD COLUMN `order` int; - -create temporary table question_migration (id int); -insert into question_migration select id from Question; --- 1-indexed -update Question set `order` = (select count(*) from question_migration where id <= Question.id); -drop temporary table question_migration; diff --git a/core/src/main/resources/db/migration/V332__save_deadline_for_peer_review.sql b/core/src/main/resources/db/migration/V332__save_deadline_for_peer_review.sql deleted file mode 100644 index 33f19ed9bb..0000000000 --- a/core/src/main/resources/db/migration/V332__save_deadline_for_peer_review.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE peer_review ADD COLUMN deadline DATETIME; - -UPDATE peer_review -SET deadline = DATE_ADD(dateCreated, INTERVAL ( - SELECT numDaysToSubmitPeerReview - FROM project_type_settings pts - INNER JOIN ProjectType pt on pts.projectType_id = pt.id - INNER JOIN project p on pt.id = p.projectType_id - INNER JOIN peer_request pr on p.id = pr.project_id - WHERE pr.id = peer_review.peerRequest_id) - DAY); - -ALTER TABLE peer_review MODIFY COLUMN deadline DATETIME NOT NULL; diff --git a/core/src/main/resources/db/migration/V333__turn_on_first_meeting_notifications_by_default.sql b/core/src/main/resources/db/migration/V333__turn_on_first_meeting_notifications_by_default.sql deleted file mode 100644 index 688b288ef6..0000000000 --- a/core/src/main/resources/db/migration/V333__turn_on_first_meeting_notifications_by_default.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT IGNORE INTO notification_receiver_configuration - (dateCreated, lastModified, version, type, event, member, enabled) - VALUES (NOW(), NOW(), 0, 'PROJECT', 'FIRST_MEETING', 'AUTHOR', TRUE); diff --git a/core/src/main/resources/db/migration/V334__add_expected_finish_date_to_application_periods.sql b/core/src/main/resources/db/migration/V334__add_expected_finish_date_to_application_periods.sql deleted file mode 100644 index 73f5fc108f..0000000000 --- a/core/src/main/resources/db/migration/V334__add_expected_finish_date_to_application_periods.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE ApplicationPeriod - ADD COLUMN courseEndDate DATE; - -ALTER TABLE ApplicationPeriod - MODIFY COLUMN startDate DATE NOT NULL, - MODIFY COLUMN endDate DATE NOT NULL; diff --git a/core/src/main/resources/db/migration/V335__add_expected_end_date_to_project.sql b/core/src/main/resources/db/migration/V335__add_expected_end_date_to_project.sql deleted file mode 100644 index 14819406b7..0000000000 --- a/core/src/main/resources/db/migration/V335__add_expected_end_date_to_project.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE project - ADD COLUMN expected_end_date DATE; diff --git a/core/src/main/resources/db/migration/V336__add_active_idea_suport_mail.sql b/core/src/main/resources/db/migration/V336__add_active_idea_suport_mail.sql deleted file mode 100644 index 5dc5799237..0000000000 --- a/core/src/main/resources/db/migration/V336__add_active_idea_suport_mail.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE general_system_settings - MODIFY COLUMN `mailFromName` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - MODIFY COLUMN `smtpServer` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - MODIFY COLUMN `systemFromMail` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - MODIFY COLUMN `sciproURL` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - MODIFY COLUMN `daisyProfileLinkBaseURL` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `matchResponsibleMail` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `externalRoomBookingURL` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `reviewerSupportMail` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `thesisSupportMail` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `externalGettingStartedWithIdeaURL` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - MODIFY COLUMN `externalGradingURL` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - ADD COLUMN activeProjectIdeaSupportMail VARCHAR(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V337__only_one_idea_may_lead_to_a_single_project.sql b/core/src/main/resources/db/migration/V337__only_one_idea_may_lead_to_a_single_project.sql deleted file mode 100644 index 4ecfd09a0c..0000000000 --- a/core/src/main/resources/db/migration/V337__only_one_idea_may_lead_to_a_single_project.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE idea ADD UNIQUE KEY `UK_only_one_idea_per_project` (project_id); diff --git a/core/src/main/resources/db/migration/V338__set_not_null_on_peer_request_file.sql b/core/src/main/resources/db/migration/V338__set_not_null_on_peer_request_file.sql deleted file mode 100644 index da20d1e679..0000000000 --- a/core/src/main/resources/db/migration/V338__set_not_null_on_peer_request_file.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM peer_request WHERE file_id IS NULL; -ALTER TABLE peer_request - MODIFY COLUMN file_id BIGINT(20) NOT NULL; diff --git a/core/src/main/resources/db/migration/V339__remove_unused_column.sql b/core/src/main/resources/db/migration/V339__remove_unused_column.sql deleted file mode 100644 index b2c8bf8f70..0000000000 --- a/core/src/main/resources/db/migration/V339__remove_unused_column.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE file_description DROP COLUMN exposed; diff --git a/core/src/main/resources/db/migration/V33__renamed_grading_answer_to_grading_criterion.sql b/core/src/main/resources/db/migration/V33__renamed_grading_answer_to_grading_criterion.sql deleted file mode 100644 index 038ba16ece..0000000000 --- a/core/src/main/resources/db/migration/V33__renamed_grading_answer_to_grading_criterion.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_answer` RENAME TO `grading_criterion`; diff --git a/core/src/main/resources/db/migration/V340__added_extra_info_to_final_seminar.sql b/core/src/main/resources/db/migration/V340__added_extra_info_to_final_seminar.sql deleted file mode 100644 index 8bb153a8e9..0000000000 --- a/core/src/main/resources/db/migration/V340__added_extra_info_to_final_seminar.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE final_seminar - ADD COLUMN extra_info TEXT NULL; diff --git a/core/src/main/resources/db/migration/V341__convert_non_work_days_to_localdate.sql b/core/src/main/resources/db/migration/V341__convert_non_work_days_to_localdate.sql deleted file mode 100644 index 425c8f210c..0000000000 --- a/core/src/main/resources/db/migration/V341__convert_non_work_days_to_localdate.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE NonWorkDayPeriod - MODIFY COLUMN startDate DATE NOT NULL, - MODIFY COLUMN endDate DATE NOT NULL; diff --git a/core/src/main/resources/db/migration/V342__remove_unused_code.sql b/core/src/main/resources/db/migration/V342__remove_unused_code.sql deleted file mode 100644 index e0ed8b2086..0000000000 --- a/core/src/main/resources/db/migration/V342__remove_unused_code.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE final_seminar_opposition DROP COLUMN dateReported; - -ALTER TABLE user_profile DROP COLUMN expandChecklistOverview; - -ALTER TABLE project DROP COLUMN statusMessage; - -ALTER TABLE general_system_settings DROP COLUMN remindMessage; - -ALTER TABLE FinalSeminarSettings DROP COLUMN examinerThesisReviewsMandatory; -ALTER TABLE FinalSeminarSettings DROP COLUMN supervisorThesisReviewsMandatory; -ALTER TABLE FinalSeminarSettings DROP COLUMN reviewerThesisReviewsMandatory; - -DROP TABLE IF EXISTS FinalSeminarSettings_punishMails; diff --git a/core/src/main/resources/db/migration/V343__active_flag_for_supervisors.sql b/core/src/main/resources/db/migration/V343__active_flag_for_supervisors.sql deleted file mode 100644 index 34ebce393e..0000000000 --- a/core/src/main/resources/db/migration/V343__active_flag_for_supervisors.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE user ADD COLUMN active_as_supervisor BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V344__allow_authors_to_subscribe_to_notifications_about_seminar_creation.sql b/core/src/main/resources/db/migration/V344__allow_authors_to_subscribe_to_notifications_about_seminar_creation.sql deleted file mode 100644 index 92e34229ba..0000000000 --- a/core/src/main/resources/db/migration/V344__allow_authors_to_subscribe_to_notifications_about_seminar_creation.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `project_user` - ADD COLUMN `subscribed_to_final_seminar_notifications` BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V345__migrate_degree_level_to_three_levels.sql b/core/src/main/resources/db/migration/V345__migrate_degree_level_to_three_levels.sql deleted file mode 100644 index 99bec596e2..0000000000 --- a/core/src/main/resources/db/migration/V345__migrate_degree_level_to_three_levels.sql +++ /dev/null @@ -1,8 +0,0 @@ --- Will be updated the next time import from Daisy runs -UPDATE user SET thesisLevel = 'NONE'; - -UPDATE ProjectType SET degreeLevel = 'BACHELOR' WHERE degreeLevel = 'FIRST_CYCLE'; -UPDATE ProjectType SET degreeLevel = 'MASTER' WHERE degreeLevel = 'SECOND_CYCLE'; --- special case -UPDATE ProjectType SET degreeLevel = 'MAGISTER' WHERE name = 'One-year-Master'; -UPDATE ProjectType SET degreeLevel = 'NONE' WHERE degreeLevel NOT IN ('NONE', 'BACHELOR', 'MAGISTER', 'MASTER'); -- fix remaining diff --git a/core/src/main/resources/db/migration/V346__rename_degree_level_to_degree_type.sql b/core/src/main/resources/db/migration/V346__rename_degree_level_to_degree_type.sql deleted file mode 100644 index f3252c76e8..0000000000 --- a/core/src/main/resources/db/migration/V346__rename_degree_level_to_degree_type.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE user CHANGE COLUMN thesisLevel degreeType VARCHAR(32) NOT NULL DEFAULT 'NONE'; -ALTER TABLE ProjectType CHANGE COLUMN degreeLevel degreeType VARCHAR(32) NOT NULL DEFAULT 'NONE'; diff --git a/core/src/main/resources/db/migration/V347__specify_rule_when_making_application_period_exemptions.sql b/core/src/main/resources/db/migration/V347__specify_rule_when_making_application_period_exemptions.sql deleted file mode 100644 index b86ca12e06..0000000000 --- a/core/src/main/resources/db/migration/V347__specify_rule_when_making_application_period_exemptions.sql +++ /dev/null @@ -1,50 +0,0 @@ -ALTER TABLE applicationperiodexemption - DROP FOREIGN KEY FK34182FD8790761A4, - DROP FOREIGN KEY applicationperiodexemption_user_id, - DROP INDEX FK34182FD8790761A4, - DROP INDEX FK34182FD8DEC4D3D8, - DROP PRIMARY KEY, - ADD COLUMN exemptionType VARCHAR(64), - ADD INDEX i_user (user_id), - ADD CONSTRAINT fk_application_period_exemption_user - FOREIGN KEY (user_id) REFERENCES user (id), - ADD INDEX i_application_period (applicationPeriodId), - ADD CONSTRAINT fk_application_period_exemption_application_period - FOREIGN KEY (applicationPeriodId) REFERENCES ApplicationPeriod (id), - ADD INDEX i_user_application_period (applicationPeriodId, user_id); - -CREATE TABLE temp_rule (exemptionType VARCHAR(64)); -INSERT INTO temp_rule (exemptionType) - VALUES ('SUBMIT_STUDENT_IDEA'), ('SELECT_SUPERVISOR_IDEA'), ('PROJECT_TYPE'), ('NUMBER_OF_AUTHORS'); - -INSERT INTO applicationperiodexemption - (applicationPeriodId, until, comment, grantedOn, grantedBy_id, user_id, start, exemptionType) - SELECT applicationPeriodId, until, comment, grantedOn, grantedBy_id, user_id, start, temp_rule.exemptionType - FROM applicationperiodexemption INNER JOIN temp_rule; - -DELETE FROM applicationperiodexemption WHERE exemptionType IS NULL; - -ALTER TABLE applicationperiodexemption - MODIFY COLUMN exemptionType VARCHAR(64) NOT NULL, - ADD PRIMARY KEY (applicationPeriodId, user_id, exemptionType); - -DROP TABLE temp_rule; - -ALTER TABLE applicationperiodexemption - MODIFY COLUMN until DATE NOT NULL, - MODIFY COLUMN start DATE NOT NULL; - -ALTER TABLE applicationperiodexemption - MODIFY COLUMN until DATE NULL, -DROP COLUMN start; - -UPDATE applicationperiodexemption SET until = NULL -WHERE exemptionType IN ('PROJECT_TYPE', 'NUMBER_OF_AUTHORS'); - -alter table applicationperiodexemption modify comment mediumtext null after grantedBy_id; -alter table applicationperiodexemption modify until date null after comment; -alter table applicationperiodexemption modify user_id bigint not null first; -alter table applicationperiodexemption modify exemptionType varchar(64) not null after applicationPeriodId; -alter table applicationperiodexemption change until newDate date; - -DELETE FROM applicationperiodexemption where newDate = (SELECT endDate FROM ApplicationPeriod where id = applicationPeriodId); diff --git a/core/src/main/resources/db/migration/V348__improved_column_names_for_application_period_exemptions.sql b/core/src/main/resources/db/migration/V348__improved_column_names_for_application_period_exemptions.sql deleted file mode 100644 index 4f1fc4f0bb..0000000000 --- a/core/src/main/resources/db/migration/V348__improved_column_names_for_application_period_exemptions.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE applicationperiodexemption - CHANGE COLUMN newDate endDate DATE NULL, - CHANGE COLUMN exemptionType type VARCHAR(64) NOT NULL; diff --git a/core/src/main/resources/db/migration/V349__remove_some_erroneous_end_dates.sql b/core/src/main/resources/db/migration/V349__remove_some_erroneous_end_dates.sql deleted file mode 100644 index 3c140e475e..0000000000 --- a/core/src/main/resources/db/migration/V349__remove_some_erroneous_end_dates.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE applicationperiodexemption - SET endDate = NULL - WHERE type IN ('PROJECT_TYPE', 'NUMBER_OF_AUTHORS'); diff --git a/core/src/main/resources/db/migration/V34__grading_criterion_now_copies_from_template_so_it_never_changes.sql b/core/src/main/resources/db/migration/V34__grading_criterion_now_copies_from_template_so_it_never_changes.sql deleted file mode 100644 index 43e975261f..0000000000 --- a/core/src/main/resources/db/migration/V34__grading_criterion_now_copies_from_template_so_it_never_changes.sql +++ /dev/null @@ -1,12 +0,0 @@ -DELETE FROM `grading_criterion`; -DELETE FROM `grading_report`; - -ALTER TABLE `grading_criterion` ADD COLUMN `description` VARCHAR(2000) DEFAULT NULL; -ALTER TABLE `grading_criterion` ADD COLUMN `title` VARCHAR(255) NOT NULL; -ALTER TABLE `grading_criterion` ADD COLUMN `maxPoints` INT(11) NOT NULL; -ALTER TABLE `grading_criterion` ADD COLUMN `sortOrder` INT(11) NOT NULL; - -ALTER TABLE grading_criterion DROP FOREIGN KEY `FK_b5bls1mdassp3q5jvndbtje82`; -ALTER TABLE `grading_criterion` DROP COLUMN `gradingQuestion_id`; -ALTER TABLE `grading_report` DROP FOREIGN KEY `FK_arfmrw6txbso765ll0maty58t`; -ALTER TABLE `grading_report` DROP COLUMN `gradingReportTemplate_id`; diff --git a/core/src/main/resources/db/migration/V350__forum_post_poster_optional.sql b/core/src/main/resources/db/migration/V350__forum_post_poster_optional.sql deleted file mode 100644 index de9a687b49..0000000000 --- a/core/src/main/resources/db/migration/V350__forum_post_poster_optional.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE forum_post - MODIFY COLUMN user BIGINT NULL; diff --git a/core/src/main/resources/db/migration/V351__add_select_research_area_daisy_url.sql b/core/src/main/resources/db/migration/V351__add_select_research_area_daisy_url.sql deleted file mode 100644 index 5611603b1f..0000000000 --- a/core/src/main/resources/db/migration/V351__add_select_research_area_daisy_url.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE general_system_settings - ADD COLUMN daisySelectResearchAreaURL varchar(100) null; diff --git a/core/src/main/resources/db/migration/V352__remove_fulfilled_partner_ads.sql b/core/src/main/resources/db/migration/V352__remove_fulfilled_partner_ads.sql deleted file mode 100644 index 80699cfc6b..0000000000 --- a/core/src/main/resources/db/migration/V352__remove_fulfilled_partner_ads.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE projectPartner - ADD COLUMN active BOOLEAN NOT NULL DEFAULT TRUE; diff --git a/core/src/main/resources/db/migration/V353__restore_old_watson.sql b/core/src/main/resources/db/migration/V353__restore_old_watson.sql deleted file mode 100644 index 5d6e3bb646..0000000000 --- a/core/src/main/resources/db/migration/V353__restore_old_watson.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE idea - CHANGE COLUMN remove_practicalHow practicalHow LONGTEXT, - CHANGE COLUMN remove_theoryHow theoryHow LONGTEXT, - CHANGE COLUMN remove_what what LONGTEXT, - CHANGE COLUMN remove_why why LONGTEXT; - diff --git a/core/src/main/resources/db/migration/V354__remove_phd.sql b/core/src/main/resources/db/migration/V354__remove_phd.sql deleted file mode 100644 index 556835da02..0000000000 --- a/core/src/main/resources/db/migration/V354__remove_phd.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE `transaction`; -DROP TABLE department_service; -DROP TABLE AnnualReview; -DROP TABLE StudyPlan; - -DELETE FROM project_type_project_modules WHERE projectModules IN ('ADMIN', 'BUDGET', 'DEPARTMENT_SERVICE', 'STUDY_PLAN'); diff --git a/core/src/main/resources/db/migration/V355_10__migrate_old_final_seminar_opposition_report.sql b/core/src/main/resources/db/migration/V355_10__migrate_old_final_seminar_opposition_report.sql deleted file mode 100644 index 1409ef0031..0000000000 --- a/core/src/main/resources/db/migration/V355_10__migrate_old_final_seminar_opposition_report.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE final_seminar_opposition DROP FOREIGN KEY FK_7j5k6jia1rrgxkmish6153hfp; -ALTER TABLE final_seminar_opposition DROP INDEX FK_7j5k6jia1rrgxkmish6153hfp; -ALTER TABLE final_seminar_opposition DROP INDEX FK8CD135812AFD4724; -ALTER TABLE final_seminar_opposition ADD COLUMN opponent_report_reference_id BIGINT; -ALTER TABLE final_seminar_opposition ADD CONSTRAINT FK_final_seminar_opposition_report - FOREIGN KEY (opponent_report_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, opponentReport_id FROM final_seminar_opposition WHERE opponentReport_id IS NOT NULL; - -UPDATE final_seminar_opposition SET final_seminar_opposition.opponent_report_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = final_seminar_opposition.id - AND file_reference.file_description_id = final_seminar_opposition.opponentReport_id -) WHERE final_seminar_opposition.opponentReport_id IS NOT NULL; - -ALTER TABLE final_seminar_opposition DROP COLUMN opponentReport_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_11__migrate_mail_event_attachments.sql b/core/src/main/resources/db/migration/V355_11__migrate_mail_event_attachments.sql deleted file mode 100644 index bd65585c52..0000000000 --- a/core/src/main/resources/db/migration/V355_11__migrate_mail_event_attachments.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE mail_event DROP FOREIGN KEY mail_event_ibfk_1; -ALTER TABLE mail_event DROP INDEX attachment_id; -ALTER TABLE mail_event ADD COLUMN attachment_reference_id BIGINT; -ALTER TABLE mail_event ADD CONSTRAINT FK_mail_event_attachment - FOREIGN KEY (attachment_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, attachment_id FROM mail_event WHERE attachment_id IS NOT NULL; - -UPDATE mail_event SET mail_event.attachment_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = mail_event.id - AND file_reference.file_description_id = mail_event.attachment_id -) WHERE mail_event.attachment_id IS NOT NULL; - -ALTER TABLE mail_event DROP COLUMN attachment_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_12__migrate_opposition_report_attachment.sql b/core/src/main/resources/db/migration/V355_12__migrate_opposition_report_attachment.sql deleted file mode 100644 index 3c795295d6..0000000000 --- a/core/src/main/resources/db/migration/V355_12__migrate_opposition_report_attachment.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE opposition_report DROP FOREIGN KEY opposition_report_attachment_id; -ALTER TABLE opposition_report DROP INDEX opposition_report_attachment_id; -ALTER TABLE opposition_report ADD COLUMN attachment_reference_id BIGINT; -ALTER TABLE opposition_report ADD CONSTRAINT FK_opposition_report_attachment - FOREIGN KEY (attachment_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, attachment_id FROM opposition_report WHERE attachment_id IS NOT NULL; - -UPDATE opposition_report SET opposition_report.attachment_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = opposition_report.id - AND file_reference.file_description_id = opposition_report.attachment_id -) WHERE opposition_report.attachment_id IS NOT NULL; - -ALTER TABLE opposition_report DROP COLUMN attachment_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_13__migrate_reviewer_decisions.sql b/core/src/main/resources/db/migration/V355_13__migrate_reviewer_decisions.sql deleted file mode 100644 index 3e008e7239..0000000000 --- a/core/src/main/resources/db/migration/V355_13__migrate_reviewer_decisions.sql +++ /dev/null @@ -1,66 +0,0 @@ --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - --- migrate thesis -ALTER TABLE Decision DROP FOREIGN KEY FK_s9cnrqblgomd6mhoaet3lgg1b; -ALTER TABLE Decision DROP INDEX FK_s9cnrqblgomd6mhoaet3lgg1b; -ALTER TABLE Decision ADD COLUMN thesis_reference_id BIGINT; -ALTER TABLE Decision ADD CONSTRAINT FK_Decision_thesis - FOREIGN KEY (thesis_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, thesis_id FROM Decision; - -UPDATE Decision SET Decision.thesis_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = Decision.id - AND file_reference.file_description_id = Decision.thesis_id -); - -ALTER TABLE Decision DROP COLUMN thesis_id; -ALTER TABLE Decision MODIFY COLUMN thesis_reference_id BIGINT NOT NULL; - -UPDATE file_reference SET temp = NULL; - --- migrate attachment -ALTER TABLE Decision DROP FOREIGN KEY FK_d3pbhn9dtb5oqmjhpgk5cs4t1; -ALTER TABLE Decision DROP INDEX FK_d3pbhn9dtb5oqmjhpgk5cs4t1; -ALTER TABLE Decision ADD COLUMN attachment_reference_id BIGINT; -ALTER TABLE Decision ADD CONSTRAINT FK_Decision_attachment - FOREIGN KEY (attachment_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, attachment_id FROM Decision WHERE attachment_id IS NOT NULL; - -UPDATE Decision SET Decision.attachment_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = Decision.id - AND file_reference.file_description_id = Decision.attachment_id -) WHERE attachment_id IS NOT NULL; - -ALTER TABLE Decision DROP COLUMN attachment_id; - -UPDATE file_reference SET temp = NULL; - --- migrate grading report -ALTER TABLE Decision DROP FOREIGN KEY FK_decision_file_description_grading_report; -ALTER TABLE Decision DROP INDEX FK_decision_file_description_grading_report; -ALTER TABLE Decision ADD COLUMN grading_report_reference_id BIGINT; -ALTER TABLE Decision ADD CONSTRAINT FK_Decision_grading_report - FOREIGN KEY (grading_report_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, gradingReport_id FROM Decision WHERE gradingReport_id IS NOT NULL; - -UPDATE Decision SET Decision.grading_report_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = Decision.id - AND file_reference.file_description_id = Decision.gradingReport_id -) WHERE gradingReport_id IS NOT NULL; - -ALTER TABLE Decision DROP COLUMN gradingReport_id; - --- drop migration aid -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_14__migrate_peer_request.sql b/core/src/main/resources/db/migration/V355_14__migrate_peer_request.sql deleted file mode 100644 index 8ef09a7c4c..0000000000 --- a/core/src/main/resources/db/migration/V355_14__migrate_peer_request.sql +++ /dev/null @@ -1,27 +0,0 @@ --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - --- migrate thesis -ALTER TABLE peer_request DROP FOREIGN KEY FK_e2s20f9ga6lgxa0r2uldjt4q; -ALTER TABLE peer_request DROP INDEX FK_e2s20f9ga6lgxa0r2uldjt4q; -ALTER TABLE peer_request DROP INDEX FK514488B2F3860A99; -ALTER TABLE peer_request ADD COLUMN file_reference_id BIGINT; -ALTER TABLE peer_request ADD CONSTRAINT FK_peer_request_file - FOREIGN KEY (file_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, file_id FROM peer_request; - -UPDATE peer_request SET peer_request.file_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = peer_request.id - AND file_reference.file_description_id = peer_request.file_id -); - -ALTER TABLE peer_request DROP COLUMN file_id; -ALTER TABLE peer_request MODIFY COLUMN file_reference_id BIGINT NOT NULL; - --- drop migration aid -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_15__migrate_peer_review.sql b/core/src/main/resources/db/migration/V355_15__migrate_peer_review.sql deleted file mode 100644 index e6ff632157..0000000000 --- a/core/src/main/resources/db/migration/V355_15__migrate_peer_review.sql +++ /dev/null @@ -1,26 +0,0 @@ --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - --- migrate thesis -ALTER TABLE peer_review DROP FOREIGN KEY FK_6vrh7sr7twvhsjrrs8rhefxt3; -ALTER TABLE peer_review DROP INDEX FK_6vrh7sr7twvhsjrrs8rhefxt3; -ALTER TABLE peer_review DROP INDEX FKB00C90D5F3860A99; -ALTER TABLE peer_review ADD COLUMN file_reference_id BIGINT; -ALTER TABLE peer_review ADD CONSTRAINT FK_peer_review_file - FOREIGN KEY (file_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, file_id FROM peer_review WHERE file_id IS NOT NULL; - -UPDATE peer_review SET peer_review.file_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = peer_review.id - AND file_reference.file_description_id = peer_review.file_id -) WHERE file_id IS NOT NULL; - -ALTER TABLE peer_review DROP COLUMN file_id; - --- drop migration aid -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_1__add_file_reference_table_to_allow_sharing_files.sql b/core/src/main/resources/db/migration/V355_1__add_file_reference_table_to_allow_sharing_files.sql deleted file mode 100644 index 3ef226475e..0000000000 --- a/core/src/main/resources/db/migration/V355_1__add_file_reference_table_to_allow_sharing_files.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE file_reference -( - id bigint not null auto_increment, - file_description_id bigint not null, - primary key (id), - index FK_file_reference_file_description (file_description_id), - foreign key FK_file_reference_file_description (file_description_id) references file_description (id) on delete restrict -); diff --git a/core/src/main/resources/db/migration/V355_2__migrate_project_files.sql b/core/src/main/resources/db/migration/V355_2__migrate_project_files.sql deleted file mode 100644 index a9c6adacc8..0000000000 --- a/core/src/main/resources/db/migration/V355_2__migrate_project_files.sql +++ /dev/null @@ -1,17 +0,0 @@ --- temporary aid for migration -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (file_description_id, temp) -SELECT fileDescription_id, id FROM project_file; - -ALTER TABLE project_file ADD COLUMN file_reference_id BIGINT NULL; -ALTER TABLE project_file ADD CONSTRAINT FK_project_file_file FOREIGN KEY (file_reference_id) REFERENCES file_reference (id); -ALTER TABLE project_file DROP CONSTRAINT FK_project_file_file_description; -ALTER TABLE project_file DROP KEY FK_project_file_file_description; -UPDATE project_file SET file_reference_id = (SELECT id FROM file_reference WHERE temp = project_file.id); -ALTER TABLE project_file DROP COLUMN fileDescription_id; -ALTER TABLE project_file MODIFY COLUMN file_reference_id BIGINT NOT NULL; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_3__migrate_forum_files.sql b/core/src/main/resources/db/migration/V355_3__migrate_forum_files.sql deleted file mode 100644 index 9d72421c3d..0000000000 --- a/core/src/main/resources/db/migration/V355_3__migrate_forum_files.sql +++ /dev/null @@ -1,27 +0,0 @@ --- temporary aid for migration -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - - -ALTER TABLE forum_post_file_description DROP CONSTRAINT forum_post_file_description_ibfk_1; -ALTER TABLE forum_post_file_description DROP CONSTRAINT forum_post_file_description_ibfk_2; -ALTER TABLE forum_post_file_description DROP INDEX file_description_id; -ALTER TABLE forum_post_file_description DROP PRIMARY KEY; -ALTER TABLE forum_post_file_description ADD COLUMN file_reference_id BIGINT NULL; -ALTER TABLE forum_post_file_description ADD CONSTRAINT FK_forum_post_file FOREIGN KEY (file_reference_id) REFERENCES file_reference (id); - -INSERT INTO file_reference (file_description_id, temp) -SELECT file_description_id, forum_post_id FROM forum_post_file_description; -UPDATE forum_post_file_description SET file_reference_id = ( - SELECT id - FROM file_reference - WHERE file_reference.temp = forum_post_file_description.forum_post_id - AND file_reference.file_description_id = forum_post_file_description.file_description_id); - -ALTER TABLE forum_post_file_description DROP COLUMN file_description_id; -ALTER TABLE forum_post_file_description MODIFY COLUMN file_reference_id BIGINT NOT NULL; -ALTER TABLE forum_post_file_description ADD PRIMARY KEY (forum_post_id, file_reference_id); -ALTER TABLE forum_post_file_description ADD INDEX I_forum_post_file_post (forum_post_id); - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_4__migrate_activity_plan_files.sql b/core/src/main/resources/db/migration/V355_4__migrate_activity_plan_files.sql deleted file mode 100644 index d2daf9c344..0000000000 --- a/core/src/main/resources/db/migration/V355_4__migrate_activity_plan_files.sql +++ /dev/null @@ -1,22 +0,0 @@ --- temporary aid for migration -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -ALTER TABLE Activity DROP CONSTRAINT FK_Activity_file_description; -ALTER TABLE Activity DROP INDEX fileUpload_id_index; -ALTER TABLE Activity ADD COLUMN file_upload_reference_id BIGINT NULL; -ALTER TABLE Activity ADD CONSTRAINT FK_Activity_file_upload FOREIGN KEY (file_upload_reference_id) REFERENCES file_reference (id); - -INSERT INTO file_reference (file_description_id, temp) -SELECT fileUpload_id, id FROM Activity WHERE fileUpload_id IS NOT NULL; -UPDATE Activity SET file_upload_reference_id = ( - SELECT id - FROM file_reference - WHERE file_reference.temp = Activity.id - AND file_reference.file_description_id = Activity.fileUpload_id) -WHERE fileUpload_id IS NOT NULL; - -ALTER TABLE Activity DROP COLUMN fileUpload_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_5__migrate_seminar.sql b/core/src/main/resources/db/migration/V355_5__migrate_seminar.sql deleted file mode 100644 index 64e9684b52..0000000000 --- a/core/src/main/resources/db/migration/V355_5__migrate_seminar.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE final_seminar DROP FOREIGN KEY FK_41udcn88r6uugt3ptbelflph6; -ALTER TABLE final_seminar DROP INDEX FK_41udcn88r6uugt3ptbelflph6; -ALTER TABLE final_seminar ADD COLUMN document_reference_id BIGINT; -ALTER TABLE final_seminar ADD CONSTRAINT FK_final_seminar_document_reference - FOREIGN KEY (document_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, document_id FROM final_seminar WHERE document_id IS NOT NULL; - -UPDATE final_seminar SET document_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = final_seminar.id - AND file_reference.file_description_id = final_seminar.document_id - ) -WHERE document_id IS NOT NULL; - -ALTER TABLE final_seminar DROP COLUMN document_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_6__migrate_plagiarism_request.sql b/core/src/main/resources/db/migration/V355_6__migrate_plagiarism_request.sql deleted file mode 100644 index 7cd2b5a212..0000000000 --- a/core/src/main/resources/db/migration/V355_6__migrate_plagiarism_request.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE plagiarism_request DROP FOREIGN KEY FK_plagiarism_request_file_description; -ALTER TABLE plagiarism_request DROP INDEX FK_plagiarism_request_file_description; -ALTER TABLE plagiarism_request ADD COLUMN document_reference_id BIGINT; -ALTER TABLE plagiarism_request ADD CONSTRAINT FK_plagiarism_request_document_reference - FOREIGN KEY (document_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, fileDescription_id FROM plagiarism_request; - -UPDATE plagiarism_request SET document_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = plagiarism_request.id - AND file_reference.file_description_id = plagiarism_request.fileDescription_id -); - -ALTER TABLE plagiarism_request DROP COLUMN fileDescription_id; -ALTER TABLE plagiarism_request MODIFY COLUMN document_reference_id BIGINT NOT NULL; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_7__migrate_urkund_submission.sql b/core/src/main/resources/db/migration/V355_7__migrate_urkund_submission.sql deleted file mode 100644 index b46327f9ad..0000000000 --- a/core/src/main/resources/db/migration/V355_7__migrate_urkund_submission.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE urkund_submission DROP FOREIGN KEY FK_urkund_submission_file_description; -ALTER TABLE urkund_submission DROP INDEX FK_urkund_submission_file_description; -ALTER TABLE urkund_submission ADD COLUMN document_reference_id BIGINT; -ALTER TABLE urkund_submission ADD CONSTRAINT FK_urkund_submission_document_reference - FOREIGN KEY (document_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, fileDescription_id FROM urkund_submission; - -UPDATE urkund_submission SET document_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = urkund_submission.id - AND file_reference.file_description_id = urkund_submission.fileDescription_id -); - -ALTER TABLE urkund_submission DROP COLUMN fileDescription_id; -ALTER TABLE urkund_submission MODIFY COLUMN document_reference_id BIGINT NOT NULL; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_8__migrate_final_thesis.sql b/core/src/main/resources/db/migration/V355_8__migrate_final_thesis.sql deleted file mode 100644 index 321250c076..0000000000 --- a/core/src/main/resources/db/migration/V355_8__migrate_final_thesis.sql +++ /dev/null @@ -1,25 +0,0 @@ -ALTER TABLE FinalThesis DROP FOREIGN KEY FK_final_thesis_file_description; -ALTER TABLE FinalThesis DROP INDEX FK_final_thesis_file_description; -ALTER TABLE FinalThesis DROP INDEX project_file_description; -ALTER TABLE FinalThesis ADD COLUMN document_reference_id BIGINT; -ALTER TABLE FinalThesis ADD CONSTRAINT FK_final_thesis_document_reference - FOREIGN KEY (document_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, fileDescription_id FROM FinalThesis; - -UPDATE FinalThesis SET document_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = FinalThesis.id - AND file_reference.file_description_id = FinalThesis.fileDescription_id -); - -ALTER TABLE FinalThesis DROP COLUMN fileDescription_id; -ALTER TABLE FinalThesis MODIFY COLUMN document_reference_id BIGINT NOT NULL; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V355_9__migrate_final_thesis_text_matching.sql b/core/src/main/resources/db/migration/V355_9__migrate_final_thesis_text_matching.sql deleted file mode 100644 index b6c4d79141..0000000000 --- a/core/src/main/resources/db/migration/V355_9__migrate_final_thesis_text_matching.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE FinalThesis DROP FOREIGN KEY FK_final_thesis_text_matching; -ALTER TABLE FinalThesis DROP INDEX FK_final_thesis_text_matching; -ALTER TABLE FinalThesis ADD COLUMN text_matching_document_reference_id BIGINT; -ALTER TABLE FinalThesis ADD CONSTRAINT FK_final_thesis_text_matching_document_reference - FOREIGN KEY (document_reference_id) REFERENCES file_reference (id) ON DELETE RESTRICT; - --- temporary migration aid -ALTER TABLE file_reference ADD COLUMN temp BIGINT; -ALTER TABLE file_reference ADD INDEX I_temp (temp); - -INSERT INTO file_reference (temp, file_description_id) -SELECT id, textMatchingDocument_id FROM FinalThesis WHERE textMatchingDocument_id IS NOT NULL; - -UPDATE FinalThesis SET document_reference_id = ( - SELECT id FROM file_reference - WHERE file_reference.temp = FinalThesis.id - AND file_reference.file_description_id = FinalThesis.textMatchingDocument_id -) WHERE textMatchingDocument_id IS NOT NULL; - -ALTER TABLE FinalThesis DROP COLUMN textMatchingDocument_id; - -ALTER TABLE file_reference DROP INDEX I_temp; -ALTER TABLE file_reference DROP COLUMN temp; diff --git a/core/src/main/resources/db/migration/V356__add_start_date_to_project.sql b/core/src/main/resources/db/migration/V356__add_start_date_to_project.sql deleted file mode 100644 index 663cb4a2c5..0000000000 --- a/core/src/main/resources/db/migration/V356__add_start_date_to_project.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE project ADD COLUMN start_date DATE; - -UPDATE project SET start_date = DATE(dateCreated); - -ALTER TABLE project MODIFY COLUMN start_date DATE NOT NULL; diff --git a/core/src/main/resources/db/migration/V357__externalize_oauth_settings.sql b/core/src/main/resources/db/migration/V357__externalize_oauth_settings.sql deleted file mode 100644 index e2ee75470b..0000000000 --- a/core/src/main/resources/db/migration/V357__externalize_oauth_settings.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE oauth_settings; diff --git a/core/src/main/resources/db/migration/V358__add_grading_requirements_per_project_type.sql b/core/src/main/resources/db/migration/V358__add_grading_requirements_per_project_type.sql deleted file mode 100644 index d8594023dc..0000000000 --- a/core/src/main/resources/db/migration/V358__add_grading_requirements_per_project_type.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE project_type_settings - ADD COLUMN minimumOppositionsToBeGraded INT NOT NULL DEFAULT 0, - ADD COLUMN minimumActiveParticipationsToBeGraded INT NOT NULL DEFAULT 0; diff --git a/core/src/main/resources/db/migration/V359__require_supervisors_to_provide_rejection_comment_feedback.sql b/core/src/main/resources/db/migration/V359__require_supervisors_to_provide_rejection_comment_feedback.sql deleted file mode 100644 index bd53424403..0000000000 --- a/core/src/main/resources/db/migration/V359__require_supervisors_to_provide_rejection_comment_feedback.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE SupervisorGradingReport - ADD COLUMN rejection_comment TEXT NULL; - -ALTER TABLE SupervisorGradingReport - ADD COLUMN rejection_comment_feedback TEXT NULL; diff --git a/core/src/main/resources/db/migration/V35__added_minimum_points_to_grading_criterion.sql b/core/src/main/resources/db/migration/V35__added_minimum_points_to_grading_criterion.sql deleted file mode 100644 index 571226980c..0000000000 --- a/core/src/main/resources/db/migration/V35__added_minimum_points_to_grading_criterion.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `grading_criterion` ADD COLUMN `pointsRequiredToPass` INT NOT NULL; -ALTER TABLE `grading_criterion_template` ADD COLUMN `pointsRequiredToPass` INT NOT NULL; diff --git a/core/src/main/resources/db/migration/V360__author_reflection.sql b/core/src/main/resources/db/migration/V360__author_reflection.sql deleted file mode 100644 index a7a5a96f55..0000000000 --- a/core/src/main/resources/db/migration/V360__author_reflection.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE project_user - ADD COLUMN reflection TEXT; diff --git a/core/src/main/resources/db/migration/V361__allow_sorting_tables_by_user_columns.sql b/core/src/main/resources/db/migration/V361__allow_sorting_tables_by_user_columns.sql deleted file mode 100644 index c045ce0510..0000000000 --- a/core/src/main/resources/db/migration/V361__allow_sorting_tables_by_user_columns.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE user -ADD COLUMN IF NOT EXISTS fullName VARCHAR(510) GENERATED ALWAYS AS (CONCAT(firstName, ' ', lastName)) AFTER lastName; diff --git a/core/src/main/resources/db/migration/V362__fix_database_encoding.sql b/core/src/main/resources/db/migration/V362__fix_database_encoding.sql deleted file mode 100644 index 452b52737e..0000000000 --- a/core/src/main/resources/db/migration/V362__fix_database_encoding.sql +++ /dev/null @@ -1,139 +0,0 @@ -ALTER TABLE `milestone_activity_template` DROP FOREIGN KEY milestone_activity_template_ibfk_1; - -ALTER TABLE `Activity` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ActivityPlan` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ActivityPlanTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ActivityTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ApplicationPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ApplicationPeriodProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ChecklistTemplate_questions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Checklist_userLastOpenDate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Decision` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ExternalResource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `FinalSeminarSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `FinalThesis` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `GradingCriterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `GradingCriterionPoint` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `GradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Keyword_researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `MailEvent_nonUserRecipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `NonWorkDayPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `NotificationData` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Password` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Question_choices` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ReviewerApproval` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `ReviewerGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `SupervisorGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `Survey` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `SurveyAnswer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `SurveyAnswer_multipleAnswers` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `TurnitinSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `TurnitinSettings_expirationMails` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `UserProfile_defaultProjectStatusFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `activity_final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `activity_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `applicationperiodexemption` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_question_checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `checklist_template_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `comment_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `criterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `externallink` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `file_reference` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `final_seminar_active_participation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `final_seminar_opposition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `final_seminar_respondent` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `footer_address` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `footer_link` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_mail` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_mail_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_mail_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_mail_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_mail_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_post` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_post_file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `forum_post_read` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `general_system_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `general_system_settings_alarm_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `general_system_settings_supervisor_change_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `general_system_settings_system_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `grade` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `grading_criterion_point_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `grading_criterion_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `grading_report_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `group_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `hibernate_sequences` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_export` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_language` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `idea_student` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `mail_event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `mail_event_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `milestone` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `milestone_activity_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `milestone_activity_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `milestone_phase_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `note` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `notification_delivery_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `notification_receiver_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `opposition_report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `peer_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `peer_review` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `plagiarism_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `plugin_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `preliminary_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `projectPartner` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_cosupervisor` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_file` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_group_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_type_project_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_type_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `project_user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `reviewer_deadline_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `reviewer_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `target` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `turnitincheck` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `unit` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `urkund_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `urkund_submission` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_languages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_profile` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_profile_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_research_area` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `user_role` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `username` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; -ALTER TABLE `worker_data` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - -ALTER TABLE `milestone_activity_template` ADD FOREIGN KEY milestone_activity_template_ibfk_1 (`activatedBy`) REFERENCES `Event` (`name`); diff --git a/core/src/main/resources/db/migration/V363__add_a_single_motivation_supervisors_grading_basis.sql b/core/src/main/resources/db/migration/V363__add_a_single_motivation_supervisors_grading_basis.sql deleted file mode 100644 index 59d3f9668b..0000000000 --- a/core/src/main/resources/db/migration/V363__add_a_single_motivation_supervisors_grading_basis.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE SupervisorGradingReport -ADD COLUMN IF NOT EXISTS motivation TEXT NULL; - -UPDATE SupervisorGradingReport -SET motivation = (SELECT GROUP_CONCAT(title, '\n', feedback SEPARATOR '\n\n') FROM GradingCriterion WHERE gradingReport_id = SupervisorGradingReport.id); - -UPDATE GradingCriterion SET feedback = NULL -WHERE gradingReport_id IN (SELECT GR.id FROM report INNER JOIN GradingReport GR on report.id = GR.id INNER JOIN SupervisorGradingReport SGR on GR.id = SGR.id); diff --git a/core/src/main/resources/db/migration/V364__fix_database_encoding_to_sort_swedish_properly.sql b/core/src/main/resources/db/migration/V364__fix_database_encoding_to_sort_swedish_properly.sql deleted file mode 100644 index ed2c511cd9..0000000000 --- a/core/src/main/resources/db/migration/V364__fix_database_encoding_to_sort_swedish_properly.sql +++ /dev/null @@ -1,139 +0,0 @@ -ALTER TABLE `milestone_activity_template` DROP FOREIGN KEY milestone_activity_template_ibfk_1; - -ALTER TABLE `Activity` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ActivityPlan` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ActivityPlanTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ActivityTemplate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ApplicationPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ApplicationPeriodProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ChecklistTemplate_questions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Checklist_userLastOpenDate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Decision` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ExternalResource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `FinalSeminarSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `FinalThesis` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `GradingCriterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `GradingCriterionPoint` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `GradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Keyword_researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `MailEvent_nonUserRecipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `NonWorkDayPeriod` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `NotificationData` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Password` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Question_choices` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ReviewerApproval` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `ReviewerGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `SupervisorGradingReport` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `Survey` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `SurveyAnswer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `SurveyAnswer_multipleAnswers` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `TurnitinSettings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `TurnitinSettings_expirationMails` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `UserProfile_defaultProjectStatusFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `activity_final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `activity_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `applicationperiodexemption` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_question` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_question_checklist_answer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `checklist_template_checklist_category` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `comment_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `criterion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `externallink` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `file_reference` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `final_seminar` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `final_seminar_active_participation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `final_seminar_opposition` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `final_seminar_respondent` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `footer_address` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `footer_link` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_mail` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_mail_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_mail_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_mail_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_mail_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_notification` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_post` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_post_file_description` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `forum_post_read` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `general_system_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `general_system_settings_alarm_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `general_system_settings_supervisor_change_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `general_system_settings_system_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `grade` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `grading_criterion_point_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `grading_criterion_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `grading_report_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `group_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `hibernate_sequences` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_Keyword` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_export` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_language` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `idea_student` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `mail_event` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `mail_event_recipients` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `milestone` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `milestone_activity_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `milestone_activity_template_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `milestone_phase_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `note` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `notification_delivery_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `notification_receiver_configuration` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `opposition_report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `peer_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `peer_review` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `plagiarism_request` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `plugin_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `preliminary_match` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `projectPartner` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_cosupervisor` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_file` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_first_meeting` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_group` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_group_project` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_reviewer` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_type_project_modules` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_type_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `project_user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `report` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `researcharea` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `reviewer_deadline_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `reviewer_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `target` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `turnitincheck` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `unit` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `urkund_settings` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `urkund_submission` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_languages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_profile` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_profile_ProjectType` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_program` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_research_area` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `user_role` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `username` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; -ALTER TABLE `worker_data` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; - -ALTER TABLE `milestone_activity_template` ADD FOREIGN KEY milestone_activity_template_ibfk_1 (`activatedBy`) REFERENCES `Event` (`name`); diff --git a/core/src/main/resources/db/migration/V365__remove_deprecated_columns.sql b/core/src/main/resources/db/migration/V365__remove_deprecated_columns.sql deleted file mode 100644 index 56d7362b6e..0000000000 --- a/core/src/main/resources/db/migration/V365__remove_deprecated_columns.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE user_profile DROP CONSTRAINT FK_user_profile_file_description_picture; - -DELETE FROM file_description WHERE id IN ( - SELECT remove_profilePicture_id FROM user_profile WHERE remove_profilePicture_id IS NOT NULL); - -ALTER TABLE user_profile DROP COLUMN remove_picture; -ALTER TABLE user_profile DROP COLUMN remove_profilePicture_id; diff --git a/core/src/main/resources/db/migration/V366__remove_reviewer_grading_report_milestone_event.sql b/core/src/main/resources/db/migration/V366__remove_reviewer_grading_report_milestone_event.sql deleted file mode 100644 index f84c0fa919..0000000000 --- a/core/src/main/resources/db/migration/V366__remove_reviewer_grading_report_milestone_event.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE milestone_activity_template - SET activatedBy = NULL - WHERE activatedBy = 'ReviewerGradingReportSubmitted'; - -DELETE FROM Event - WHERE name = 'ReviewerGradingReportSubmitted'; diff --git a/core/src/main/resources/db/migration/V367__remove_grading_report_snapshot_from_the_reviewer_process.sql b/core/src/main/resources/db/migration/V367__remove_grading_report_snapshot_from_the_reviewer_process.sql deleted file mode 100644 index 3a6117af01..0000000000 --- a/core/src/main/resources/db/migration/V367__remove_grading_report_snapshot_from_the_reviewer_process.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE Decision DROP FOREIGN KEY FK_Decision_grading_report; - -DELETE FROM file_reference WHERE id IN (SELECT grading_report_reference_id FROM Decision); - -ALTER TABLE Decision DROP COLUMN grading_report_reference_id; diff --git a/core/src/main/resources/db/migration/V368__publication_metadata.sql b/core/src/main/resources/db/migration/V368__publication_metadata.sql deleted file mode 100644 index ab56f8c04a..0000000000 --- a/core/src/main/resources/db/migration/V368__publication_metadata.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE IF NOT EXISTS publication_metadata ( - id BIGINT AUTO_INCREMENT NOT NULL, - project_id BIGINT NOT NULL, - abstract_swedish TEXT, - abstract_english TEXT, - keywords_swedish TEXT, - keywords_english TEXT, - PRIMARY KEY (id), - CONSTRAINT FK_publication_metadata_project FOREIGN KEY (project_id) REFERENCES project (id) ON DELETE CASCADE -) collate utf8mb4_swedish_ci; diff --git a/core/src/main/resources/db/migration/V369__add_grading_criterion_english_columns.sql b/core/src/main/resources/db/migration/V369__add_grading_criterion_english_columns.sql deleted file mode 100644 index 2aa383776a..0000000000 --- a/core/src/main/resources/db/migration/V369__add_grading_criterion_english_columns.sql +++ /dev/null @@ -1,16 +0,0 @@ -ALTER TABLE grading_criterion_template -ADD titleEn VARCHAR(255) NOT NULL DEFAULT '' AFTER title; - -ALTER TABLE grading_criterion_point_template -ADD descriptionEn VARCHAR(600) NULL; - -ALTER TABLE GradingCriterion -ADD titleEn VARCHAR(255) NOT NULL DEFAULT '' AFTER title; - -ALTER TABLE GradingCriterionPoint -ADD descriptionEn LONGTEXT NULL; - -ALTER TABLE criterion -ADD titleEn VARCHAR(255) NOT NULL DEFAULT '' AFTER title, -ADD descriptionEn VARCHAR(2000) NULL AFTER description; - diff --git a/core/src/main/resources/db/migration/V36__added_different_types_of_grading_criterion.sql b/core/src/main/resources/db/migration/V36__added_different_types_of_grading_criterion.sql deleted file mode 100644 index 75c481f81a..0000000000 --- a/core/src/main/resources/db/migration/V36__added_different_types_of_grading_criterion.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `grading_criterion_template`; -ALTER TABLE `grading_criterion_template` ADD COLUMN `type` VARCHAR(64) NOT NULL; diff --git a/core/src/main/resources/db/migration/V370__update_grading_criterion_titles.sql b/core/src/main/resources/db/migration/V370__update_grading_criterion_titles.sql deleted file mode 100644 index 79573b631b..0000000000 --- a/core/src/main/resources/db/migration/V370__update_grading_criterion_titles.sql +++ /dev/null @@ -1,48 +0,0 @@ -UPDATE grading_criterion_template SET title = 'U1 Sammanfattning', titleEn = 'U1 Abstract' WHERE title = 'U1 Sammanfattning' OR title = 'U1 Abstract'; -UPDATE grading_criterion_template SET title = 'U2 Introduktion', titleEn = 'U2 Introduction' WHERE title = 'U2 Introduktion' OR title = 'U2 Introduction'; -UPDATE grading_criterion_template SET title = 'U3 Problem', titleEn = 'U3 Problem' WHERE title = 'U3 Problem'; -UPDATE grading_criterion_template SET title = 'U4 Frågeställning', titleEn = 'U4 Research question' WHERE title = 'U4 Frågeställning' OR title = 'U4 Research question'; -UPDATE grading_criterion_template SET title = 'U5 Vetenskaplig förankring', titleEn = 'U5 Scientific base' WHERE title = 'U5 Vetenskaplig förankring' OR title = 'U5 Scientific base'; -UPDATE grading_criterion_template SET title = 'U6 Metodval', titleEn = 'U6 Choice of research method' WHERE title = 'U6 Metodval' OR title = 'U6 Choice of research method'; -UPDATE grading_criterion_template SET title = 'U7 Metodtillämpning', titleEn = 'U7 Application of research method' WHERE title = 'U7 Metodtillämpning' OR title = 'U7 Application of research method'; -UPDATE grading_criterion_template SET title = 'U8 Resultat', titleEn = 'U8 Result' WHERE title = 'U8 Resultat' OR title = 'U8 Result'; -UPDATE grading_criterion_template SET title = 'U9 Slutsatser och diskussion', titleEn = 'U9 Conclusions and discussion' WHERE title = 'U9 Slutsatser och diskussion' OR title = 'U9 Conclusions and discussion'; -UPDATE grading_criterion_template SET title = 'U10 Form, struktur och språk', titleEn = 'U10 Form, structure and language' WHERE title = 'U10 Struktur och språk' OR title = 'U10 Form, structure and language'; -UPDATE grading_criterion_template SET title = 'U11 Argumentation', titleEn = 'U11 Argumentation' WHERE title = 'U11 Argumentation'; -UPDATE grading_criterion_template SET title = 'U12 Källhänvisningar och dokumentation', titleEn = 'U12 References and documentation' WHERE title = 'U12 Källhänvisningar och dokumentation' OR title = 'U12 References and documentation'; -UPDATE grading_criterion_template SET title = 'U13 Originalitet och signifikans', titleEn = 'U13 Originality and significance' WHERE title = 'U13 Originalitet och signifikans' OR title = 'U13 Originality and significance'; - -UPDATE grading_criterion_template SET title = 'Ö1 Oppositionsrapport', titleEn = 'Ö1 Opposition report' WHERE title = 'Ö1 Oppositionsrapport' OR title = 'Ö1 Opposition report'; -UPDATE grading_criterion_template SET title = 'Ö2 Presentationer', titleEn = 'Ö2 Presentations' WHERE title = 'Ö2 Presentationer' OR title = 'Ö2 Presentations'; -UPDATE grading_criterion_template SET title = 'Ö3 Aktivitet vid seminarier och möten', titleEn = 'Ö3 Participation in seminars and meetings' WHERE title = 'Ö3 Aktivitet vid seminarier och möten' OR title = 'Ö3 Aktivitet vid seminarer och möten' OR title = 'Ö3 Participation in seminars and meetings'; -UPDATE grading_criterion_template SET title = 'Ö4 Deadlines', titleEn = 'Ö4 Deadlines' WHERE title = 'Ö4 Deadlines'; -UPDATE grading_criterion_template SET title = 'Ö5 Revision efter slutseminarium', titleEn = 'Ö5 Revisions after the final seminar' WHERE title = 'Ö5 Revision efter slutseminarium' OR title = 'Ö5 Revisions after the final seminar'; -UPDATE grading_criterion_template SET title = 'Ö6 Reflektion', titleEn = 'Ö6 Reflection' WHERE title = 'Ö6 Reflection'; - - -UPDATE GradingCriterion SET title = 'U1 Sammanfattning', titleEn = 'U1 Abstract' WHERE title = 'U1 Sammanfattning' OR title = 'U1 Abstract'; -UPDATE GradingCriterion SET title = 'U2 Introduktion', titleEn = 'U2 Introduction' WHERE title = 'U2 Introduktion' OR title = 'U2 Introduction'; -UPDATE GradingCriterion SET title = 'U3 Problem', titleEn = 'U3 Problem' WHERE title = 'U3 Problem'; -UPDATE GradingCriterion SET title = 'U4 Frågeställning', titleEn = 'U4 Research question' WHERE title = 'U4 Frågeställning' OR title = 'U4 Research question'; -UPDATE GradingCriterion SET title = 'U5 Vetenskaplig förankring', titleEn = 'U5 Scientific base' WHERE title = 'U5 Vetenskaplig förankring' OR title = 'U5 Scientific base'; -UPDATE GradingCriterion SET title = 'U6 Metodval', titleEn = 'U6 Choice of research method' WHERE title = 'U6 Metodval' OR title = 'U6 Choice of research method'; -UPDATE GradingCriterion SET title = 'U7 Metodtillämpning', titleEn = 'U7 Application of research method' WHERE title = 'U7 Metodtillämpning' OR title = 'U7 Application of research method'; -UPDATE GradingCriterion SET title = 'U8 Resultat', titleEn = 'U8 Result' WHERE title = 'U8 Resultat' OR title = 'U8 Result'; -UPDATE GradingCriterion SET title = 'U9 Slutsatser och diskussion', titleEn = 'U9 Conclusions and discussion' WHERE title = 'U9 Slutsatser och diskussion' OR title = 'U9 Conclusions and discussion'; -UPDATE GradingCriterion SET title = 'U10 Form, struktur och språk', titleEn = 'U10 Form, structure and language' WHERE title = 'U10 Struktur och språk' OR title = 'U10 Form, structure and language'; -UPDATE GradingCriterion SET title = 'U11 Argumentation', titleEn = 'U11 Argumentation' WHERE title = 'U11 Argumentation'; -UPDATE GradingCriterion SET title = 'U12 Källhänvisningar och dokumentation', titleEn = 'U12 References and documentation' WHERE title = 'U12 Källhänvisningar och dokumentation' OR title = 'U12 References and documentation'; -UPDATE GradingCriterion SET title = 'U13 Originalitet och signifikans', titleEn = 'U13 Originality and significance' WHERE title = 'U13 Originalitet och signifikans' OR title = 'U13 Originality and significance'; - -UPDATE GradingCriterion SET title = 'Ö1 Oppositionsrapport', titleEn = 'Ö1 Opposition report' WHERE title = 'Ö1 Oppositionsrapport' OR title = 'Ö1 Opposition report'; -UPDATE GradingCriterion SET title = 'Ö2 Presentationer', titleEn = 'Ö2 Presentations' WHERE title = 'Ö2 Presentationer' OR title = 'Ö2 Presentations'; -UPDATE GradingCriterion SET title = 'Ö3 Aktivitet vid seminarier och möten', titleEn = 'Ö3 Participation in seminars and meetings' WHERE title = 'Ö3 Aktivitet vid seminarier och möten' OR title = 'Ö3 Aktivitet vid seminarer och möten' OR title = 'Ö3 Participation in seminars and meetings'; -UPDATE GradingCriterion SET title = 'Ö4 Deadlines', titleEn = 'Ö4 Deadlines' WHERE title = 'Ö4 Deadlines'; -UPDATE GradingCriterion SET title = 'Ö5 Revision efter slutseminarium', titleEn = 'Ö5 Revisions after the final seminar' WHERE title = 'Ö5 Revision efter slutseminarium' OR title = 'Ö5 Revisions after the final seminar'; -UPDATE GradingCriterion SET title = 'Ö6 Reflektion', titleEn = 'Ö6 Reflection' WHERE title = 'Ö6 Reflection'; - -UPDATE criterion SET title = 'U10 Form, struktur och språk' WHERE title = 'U10 Struktur och språk'; -UPDATE criterion SET title = 'U12 References and documentation' WHERE title = 'U12 References and documentationä'; - -#copy values from the swedish columns to the english ones. -UPDATE criterion SET titleEn = title, descriptionEn = description; diff --git a/core/src/main/resources/db/migration/V371__update_grading_criterion_template_bachelor.sql b/core/src/main/resources/db/migration/V371__update_grading_criterion_template_bachelor.sql deleted file mode 100644 index 1ddaaf1c89..0000000000 --- a/core/src/main/resources/db/migration/V371__update_grading_criterion_template_bachelor.sql +++ /dev/null @@ -1,242 +0,0 @@ -#U1 Sammanfattning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis accurately portrays the contents of the thesis by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U1 Sammanfattning' AND point = 1); - -#U2 Introduktion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.', - descriptionEn = 'Requirement for 1 point: that the thesis introduces the subject and problem of the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U2 Introduktion' AND point = 1); - -#U3 Problem -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.', - descriptionEn = 'Requirement for 1 point: that a problem of general interest exists that entirely or partially can be solved by answering the research question.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U3 Problem' AND point = 1); - -#U4 Frågeställning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.', - descriptionEn = 'Requirement for 1 point: a clearly formulated and delimited research question that is of general interest. The student is responsible for identifying and formulating the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U4 Frågeställning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.', - descriptionEn = 'For 2 points the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U4 Frågeställning' AND point = 2); - -#U5 Vetenskaplig förankring -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.', - descriptionEn = 'Requirement for 1 point: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and systems sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U5 Vetenskaplig förankring' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.', - descriptionEn = 'For 2 points the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U5 Vetenskaplig förankring' AND point = 2); - -#U6 Metodval -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly described and motivated based on the research question, that at least one alternative research strategy and method that could be used to solve the research question is discussed, as well as that relevant ethical considerations are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U6 Metodval' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.', - descriptionEn = 'For 2 points the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U6 Metodval' AND point = 2); - -#U7 Metodtillämpning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U7 Metodtillämpning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.', - descriptionEn = 'For 2 points the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U7 Metodtillämpning' AND point = 2); - -#U8 Resultat -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.', - descriptionEn = 'Requirement for 1 point: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U8 Resultat' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U8 Resultat' AND point = 2); - -#U9 Slutsatser och diskussion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.', - descriptionEn = 'Requirement for 1 point: that the research question has a clear answer, that the limitations in the design of the study and their impact on the conclusions are discussed as well as how the results relate to previous research; that possible future research based on the study in the thesis is discussed; and that ethical and societal consequences of the conclusions in the thesis are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U9 Slutsatser och diskussion' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.', - descriptionEn = 'For 2 points the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U9 Slutsatser och diskussion' AND point = 2); - -#U10 Form, struktur och språk -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.', - descriptionEn = 'Requirement for 1 point: that the thesis is divided into distinct, logical, and coherent sections; that it fulfils the fundamental layout requirements; and that the text is written with an adequate and professional language.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U10 Form, struktur och språk' AND point = 1); - -#U11 Argumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.', - descriptionEn = 'Requirement for 1 point: that the argumentation is well grounded, logically coherent, concise, clear, and easily understood.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U11 Argumentation' AND point = 1); - -#U12 Källhänvisningar och dokumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.', - descriptionEn = 'Requirement for 1 point: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U12 Källhänvisningar och dokumentation' AND point = 1); - -#U13 Originalitet och signifikans -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.', - descriptionEn = 'Requirement for 1 point: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U13 Originalitet och signifikans' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.', - descriptionEn = 'For 2 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U13 Originalitet och signifikans' AND point = 2); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.', - descriptionEn = 'For 3 points the following is also required: that the research contributions are of such quality that the thesis could be presented at an academic conference of good quality or that they could be a basis for useful solutions, for example commercializable products.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'U13 Originalitet och signifikans' AND point = 3); - -#Ö1 Oppositionsrapport -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar; och att oppositionsrapporten inkluderar både redigering och korrekturläsning av uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements; and that the opposition report includes proofreading as well as editing of the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö1 Oppositionsrapport' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.', - descriptionEn = 'For 2 points the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö1 Oppositionsrapport' AND point = 2); - -#Ö2 Presentationer -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.', - descriptionEn = 'Requirement for 1 point: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö2 Presentationer' AND point = 1); - -#Ö3 Aktivitet vid seminarier och möten -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.', - descriptionEn = 'Requirement for 1 point: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö3 Aktivitet vid seminarier och möten' AND point = 1); - -#Ö4 Deadlines -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.', - descriptionEn = 'Requirement for 1 point: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö4 Deadlines' AND point = 1); - -#Ö5 Revision efter slutseminarium -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.', - descriptionEn = 'Requirement for 1 point: that only one smaller revision of the thesis is needed after the final seminar.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö5 Revision efter slutseminarium' AND point = 1); - -#Ö6 Reflektion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att reflektera över det genomförda examensarbetet genom individuellt författande av ett reflektionsdokument.', - descriptionEn = 'Requirement for 1 point: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'BACHELOR')) AND title = 'Ö6 Reflektion' AND point = 1); diff --git a/core/src/main/resources/db/migration/V372__update_and_insert_grading_criterion_template_master.sql b/core/src/main/resources/db/migration/V372__update_and_insert_grading_criterion_template_master.sql deleted file mode 100644 index 5397ea170d..0000000000 --- a/core/src/main/resources/db/migration/V372__update_and_insert_grading_criterion_template_master.sql +++ /dev/null @@ -1,311 +0,0 @@ -#U1 Sammanfattning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis accurately portrays the contents of the thesis by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U1 Sammanfattning' AND point = 1); - -#U2 Introduktion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.', - descriptionEn = 'Requirement for 1 point: that the thesis introduces the subject and problem of the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U2 Introduktion' AND point = 1); - -#U3 Problem -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.', - descriptionEn = 'Requirement for 1 point: that a problem of general interest exists that entirely or partially can be solved by answering the research question.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U3 Problem' AND point = 1); - -#U4 Frågeställning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.', - descriptionEn = 'Requirement for 1 point: a clearly formulated and delimited research question that is of general interest. The student is responsible for identifying and formulating the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U4 Frågeställning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.', - descriptionEn = 'For 2 points the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U4 Frågeställning' AND point = 2); - -#U5 Vetenskaplig förankring -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.', - descriptionEn = 'Requirement for 1 point: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and systems sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U5 Vetenskaplig förankring' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.', - descriptionEn = 'For 2 points the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U5 Vetenskaplig förankring' AND point = 2); - -SET @description = 'För 3 poäng krävs dessutom: att en omfattande litteraturstudie redovisas som ligger till grund för en positionering och värdering av uppsatsens kunskapsbidrag i ett vetenskapligt sammanhang.'; -SET @descriptionEn = 'For 3 points the following is also required: that a comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.'; -SET @point = 3; - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = @description, - descriptionEn = @descriptionEn -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U5 Vetenskaplig förankring' AND point = @point); - -INSERT INTO grading_criterion_point_template (datecreated, lastmodified, version, gradingcriteriontemplate_id, point, description, descriptionEn) -VALUES (NOW(), NOW(), 0, - (select id from grading_criterion_template where gradingReportTemplate_id in (select id from grading_report_template where credits = 15 and projectType_id in (select id from ProjectType WHERE degreeType = 'MASTER')) and title = 'U5 Vetenskaplig förankring'), - @point, @description, @descriptionEn); - -#U6 Metodval -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly described and motivated based on the research question, that at least one alternative research strategy and method that could be used to solve the research question is discussed, as well as that relevant ethical considerations are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U6 Metodval' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.', - descriptionEn = 'For 2 points the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U6 Metodval' AND point = 2); - -SET @description = 'För 3 poäng krävs dessutom: att metodvalet diskuteras i förhållande till forskningsstrategier och forskningsmetoder som tillämpats i relaterade aktuella vetenskapliga studier och som kan betraktas som state-of-the-art.'; -SET @descriptionEn = 'For 3 points the following is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art.'; -SET @point = 3; - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = @description, - descriptionEn = @descriptionEn -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U6 Metodval' AND point = @point); - -INSERT INTO grading_criterion_point_template (datecreated, lastmodified, version, gradingcriteriontemplate_id, point, description, descriptionEn) -VALUES (NOW(), NOW(), 0, - (select id from grading_criterion_template where gradingReportTemplate_id in (select id from grading_report_template where credits = 15 and projectType_id in (select id from ProjectType WHERE degreeType = 'MASTER')) and title = 'U6 Metodval'), - @point, @description, @descriptionEn); - -#U7 Metodtillämpning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U7 Metodtillämpning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.', - descriptionEn = 'For 2 points the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U7 Metodtillämpning' AND point = 2); - -SET @description = 'För 3 poäng krävs dessutom: att det finns ett betydande djup i dataanalysen.'; -SET @descriptionEn = 'For 3 points the following is also required: that there is a meaningful depth to the data analysis.'; -SET @point = 3; - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = @description, - descriptionEn = @descriptionEn -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U7 Metodtillämpning' AND point = @point); - -INSERT INTO grading_criterion_point_template (datecreated, lastmodified, version, gradingcriteriontemplate_id, point, description, descriptionEn) -VALUES (NOW(), NOW(), 0, - (select id from grading_criterion_template where gradingReportTemplate_id in (select id from grading_report_template where credits = 15 and projectType_id in (select id from ProjectType WHERE degreeType = 'MASTER')) and title = 'U7 Metodtillämpning'), - @point, @description, @descriptionEn); - -#U8 Resultat -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.', - descriptionEn = 'Requirement for 1 point: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U8 Resultat' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U8 Resultat' AND point = 2); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att resultaten är väl beskrivna, av betydande omfattning och av hög kvalitet, så att väl underbyggda slutsatser av relevans för frågeställningen kan dras.', - descriptionEn = 'For 3 points the following is also required: that the results are well written and of considerable magnitude and high quality so that well-grounded conclusions of the relevance for the research question can be made.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U8 Resultat' AND point = 3); - -#U9 Slutsatser och diskussion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.', - descriptionEn = 'Requirement for 1 point: that the research question has a clear answer, that the limitations in the design of the study and their impact on the conclusions are discussed as well as how the results relate to previous research; that possible future research based on the study in the thesis is discussed; and that ethical and societal consequences of the conclusions in the thesis are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U9 Slutsatser och diskussion' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.', - descriptionEn = 'For 2 points the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U9 Slutsatser och diskussion' AND point = 2); - -#U10 Form, struktur och språk -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.', - descriptionEn = 'Requirement for 1 point: that the thesis is divided into distinct, logical, and coherent sections; that it fulfils the fundamental layout requirements; and that the text is written with an adequate and professional language.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U10 Form, struktur och språk' AND point = 1); - -#U11 Argumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.', - descriptionEn = 'Requirement for 1 point: that the argumentation is well grounded, logically coherent, concise, clear, and easily understood.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U11 Argumentation' AND point = 1); - -#U12 Källhänvisningar och dokumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.', - descriptionEn = 'Requirement for 1 point: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U12 Källhänvisningar och dokumentation' AND point = 1); - -#U13 Originalitet och signifikans -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.', - descriptionEn = 'Requirement for 1 point: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U13 Originalitet och signifikans' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.', - descriptionEn = 'For 2 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U13 Originalitet och signifikans' AND point = 2); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.', - descriptionEn = 'For 3 points the following is also required: that the research contributions are of such quality that the thesis could be presented at an academic conference of good quality or that they could be a basis for useful solutions, for example commercializable products.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U13 Originalitet och signifikans' AND point = 3); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 4 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras i en vetenskaplig tidskrift av god kvalitet.', - descriptionEn = 'For 4 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'U13 Originalitet och signifikans' AND point = 4); - -#Ö1 Oppositionsrapport -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar; och att oppositionsrapporten inkluderar både redigering och korrekturläsning av uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements; and that the opposition report includes proofreading as well as editing of the thesis.' - -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö1 Oppositionsrapport' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.', - descriptionEn = 'For 2 points the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' - -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö1 Oppositionsrapport' AND point = 2); - -#Ö2 Presentationer -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.', - descriptionEn = 'Requirement for 1 point: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö2 Presentationer' AND point = 1); - -#Ö3 Aktivitet vid seminarier och möten -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.', - descriptionEn = 'Requirement for 1 point: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö3 Aktivitet vid seminarier och möten' AND point = 1); - -#Ö4 Deadlines -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.', - descriptionEn = 'Requirement for 1 point: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö4 Deadlines' AND point = 1); - -#Ö5 Revision efter slutseminarium -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.', - descriptionEn = 'Requirement for 1 point: that only one smaller revision of the thesis is needed after the final seminar.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö5 Revision efter slutseminarium' AND point = 1); - -#Ö6 Reflektion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att reflektera över det genomförda examensarbetet genom individuellt författande av ett reflektionsdokument.', - descriptionEn = 'Requirement for 1 point: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER')) AND title = 'Ö6 Reflektion' AND point = 1); diff --git a/core/src/main/resources/db/migration/V373__update_and_delete_grading_criterion_template_magister.sql b/core/src/main/resources/db/migration/V373__update_and_delete_grading_criterion_template_magister.sql deleted file mode 100644 index 7c36c63cb2..0000000000 --- a/core/src/main/resources/db/migration/V373__update_and_delete_grading_criterion_template_magister.sql +++ /dev/null @@ -1,276 +0,0 @@ -#U1 Sammanfattning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis accurately portrays the contents of the thesis by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U1 Sammanfattning' AND point = 1); - -#U2 Introduktion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.', - descriptionEn = 'Requirement for 1 point: that the thesis introduces the subject and problem of the thesis.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U2 Introduktion' AND point = 1); - -#U3 Problem -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.', - descriptionEn = 'Requirement for 1 point: that a problem of general interest exists that entirely or partially can be solved by answering the research question.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U3 Problem' AND point = 1); - -#U4 Frågeställning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.', - descriptionEn = 'Requirement for 1 point: a clearly formulated and delimited research question that is of general interest. The student is responsible for identifying and formulating the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U4 Frågeställning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.', - descriptionEn = 'For 2 points the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U4 Frågeställning' AND point = 2); - -#U5 Vetenskaplig förankring -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.', - descriptionEn = 'Requirement for 1 point: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and systems sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U5 Vetenskaplig förankring' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.', - descriptionEn = 'For 2 points the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U5 Vetenskaplig förankring' AND point = 2); - -DELETE FROM grading_criterion_point_template -WHERE gradingCriterionTemplate_id in ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id in ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id from ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U5 Vetenskaplig förankring' AND point = 3); - -#U6 Metodval -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly described and motivated based on the research question, that at least one alternative research strategy and method that could be used to solve the research question is discussed, as well as that relevant ethical considerations are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U6 Metodval' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.', - descriptionEn = 'For 2 points the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U6 Metodval' AND point = 2); - -DELETE FROM grading_criterion_point_template -WHERE gradingCriterionTemplate_id in ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id in ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id from ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U6 Metodval' AND point = 3); - -#U7 Metodtillämpning -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U7 Metodtillämpning' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.', - descriptionEn = 'For 2 points the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U7 Metodtillämpning' AND point = 2); - -DELETE FROM grading_criterion_point_template -WHERE gradingCriterionTemplate_id in ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id in ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id from ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U7 Metodtillämpning' AND point = 3); - -#U8 Resultat -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.', - descriptionEn = 'Requirement for 1 point: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U8 Resultat' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U8 Resultat' AND point = 2); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att resultaten är väl beskrivna, av betydande omfattning och av hög kvalitet, så att väl underbyggda slutsatser av relevans för frågeställningen kan dras.', - descriptionEn = 'For 3 points the following is also required: that the results are well written and of considerable magnitude and high quality so that well-grounded conclusions of the relevance for the research question can be made.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U8 Resultat' AND point = 3); - -#U9 Slutsatser och diskussion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.', - descriptionEn = 'Requirement for 1 point: that the research question has a clear answer, that the limitations in the design of the study and their impact on the conclusions are discussed as well as how the results relate to previous research; that possible future research based on the study in the thesis is discussed; and that ethical and societal consequences of the conclusions in the thesis are discussed.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U9 Slutsatser och diskussion' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.', - descriptionEn = 'For 2 points the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U9 Slutsatser och diskussion' AND point = 2); - -#U10 Form, struktur och språk -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.', - descriptionEn = 'Requirement for 1 point: that the thesis is divided into distinct, logical, and coherent sections; that it fulfils the fundamental layout requirements; and that the text is written with an adequate and professional language.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U10 Form, struktur och språk' AND point = 1); - -#U11 Argumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.', - descriptionEn = 'Requirement for 1 point: that the argumentation is well grounded, logically coherent, concise, clear, and easily understood.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U11 Argumentation' AND point = 1); - -#U12 Källhänvisningar och dokumentation -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.', - descriptionEn = 'Requirement for 1 point: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U12 Källhänvisningar och dokumentation' AND point = 1); - -#U13 Originalitet och signifikans -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.', - descriptionEn = 'Requirement for 1 point: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U13 Originalitet och signifikans' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.', - descriptionEn = 'For 2 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U13 Originalitet och signifikans' AND point = 2); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.', - descriptionEn = 'For 3 points the following is also required: that the research contributions are of such quality that the thesis could be presented at an academic conference of good quality or that they could be a basis for useful solutions, for example commercializable products.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U13 Originalitet och signifikans' AND point = 3); - -DELETE FROM grading_criterion_point_template -WHERE gradingCriterionTemplate_id in ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id in ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id from ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'U13 Originalitet och signifikans' AND point = 4); - -#Ö1 Oppositionsrapport -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar; och att oppositionsrapporten inkluderar både redigering och korrekturläsning av uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements; and that the opposition report includes proofreading as well as editing of the thesis.' - -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö1 Oppositionsrapport' AND point = 1); - -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.', - descriptionEn = 'For 2 points the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' - -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö1 Oppositionsrapport' AND point = 2); - -#Ö2 Presentationer -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.', - descriptionEn = 'Requirement for 1 point: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö2 Presentationer' AND point = 1); - -#Ö3 Aktivitet vid seminarier och möten -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.', - descriptionEn = 'Requirement for 1 point: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö3 Aktivitet vid seminarier och möten' AND point = 1); - -#Ö4 Deadlines -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.', - descriptionEn = 'Requirement for 1 point: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö4 Deadlines' AND point = 1); - -#Ö5 Revision efter slutseminarium -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.', - descriptionEn = 'Requirement for 1 point: that only one smaller revision of the thesis is needed after the final seminar.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö5 Revision efter slutseminarium' AND point = 1); - -#Ö6 Reflektion -UPDATE grading_criterion_point_template SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att reflektera över det genomförda examensarbetet genom individuellt författande av ett reflektionsdokument.', - descriptionEn = 'Requirement for 1 point: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document.' -WHERE gradingCriterionTemplate_id IN ( - SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER')) AND title = 'Ö6 Reflektion' AND point = 1); diff --git a/core/src/main/resources/db/migration/V374__update_grading_criterion_template_pointsrequiredtopass.sql b/core/src/main/resources/db/migration/V374__update_grading_criterion_template_pointsrequiredtopass.sql deleted file mode 100644 index c3e8e703e8..0000000000 --- a/core/src/main/resources/db/migration/V374__update_grading_criterion_template_pointsrequiredtopass.sql +++ /dev/null @@ -1,41 +0,0 @@ -#MASTER -UPDATE grading_criterion_template SET pointsRequiredToPass = 2 -WHERE title = 'U5 Vetenskaplig förankring' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER') AND credits = 15); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 2 -WHERE title = 'U6 Metodval' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER') AND credits = 15); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 2 -WHERE title = 'U7 Metodtillämpning' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER') AND credits = 15); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 2 -WHERE title = 'U13 Originalitet och signifikans' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MASTER') AND credits = 15); - -#MAGISTER -UPDATE grading_criterion_template SET pointsRequiredToPass = 1 -WHERE title = 'U5 Vetenskaplig förankring' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER') AND (credits = 0 OR credits = 30)); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 1 -WHERE title = 'U6 Metodval' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER') AND (credits = 0 or credits = 30)); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 1 -WHERE title = 'U7 Metodtillämpning' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER') AND (credits = 0 or credits = 30)); - -UPDATE grading_criterion_template SET pointsRequiredToPass = 1 -WHERE title = 'U13 Originalitet och signifikans' AND gradingReportTemplate_id IN ( - SELECT id FROM grading_report_template WHERE projectType_id IN ( - SELECT id FROM ProjectType WHERE degreeType = 'MAGISTER') AND (credits = 0 or credits = 30)); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V375__update_grading_criterion_descriptions.sql b/core/src/main/resources/db/migration/V375__update_grading_criterion_descriptions.sql deleted file mode 100644 index 9826163d9f..0000000000 --- a/core/src/main/resources/db/migration/V375__update_grading_criterion_descriptions.sql +++ /dev/null @@ -1,622 +0,0 @@ -#U1 Abstract (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U1 Abstract') -AND (description = ' that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis. -' -OR description = ' that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -OR description = 'is required: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.') -AND point = 1; - -#U1 Abstract (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis adequately reflects its contents by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U1 Abstract') -AND description = 'is required: that the abstract of the thesis adequately reflects its contents by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -AND point = 1; - -#U1 Sammanfattning (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis accurately portrays the contents of the thesis by describing the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U1 Sammanfattning') -AND description = 'krävs: att uppsatsens sammanfattning korrekt återspeglar uppsatsens innehåll genom att beskriva problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.' -AND point = 1; - -#U1 Sammanfattning (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.', - descriptionEn = 'Requirement for 1 point: that the abstract of the thesis describes the problem, the research question, the choice and application of the research methods, the result, and conclusions and that it can be read and understood separately from the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U1 Sammanfattning') -AND description = 'krävs: att uppsatsens sammanfattning återger problem, frågeställning, metodval, metodtillämpning, resultat och slutsatser samt att den kan läsas och förstås fristående från uppsatsen.' -AND point = 1; - -#U2 Introduction (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.', - descriptionEn = 'Requirement for 1 point: that the thesis introduces the subject and problem of the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U2 Introduction') -AND (description = ' that the thesis introduces the subject and problem of the thesis.' -OR description = 'is required: that the thesis introduces the subject and problem of the thesis.') -AND point = 1; - -#U2 Introduktion (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.', - descriptionEn = 'Requirement for 1 point: that the thesis introduces the subject and problem of the thesis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U2 Introduktion') -AND description = 'krävs: att uppsatsen ger en introduktion till uppsatsens ämne och problem.' -AND point = 1; - -#U3 Problem (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.', - descriptionEn = 'Requirement for 1 point: that a problem of general interest exists, that entirely or partially can be solved by answering the research question.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U3 Problem') -AND (description = ' that a problem of general interest exists, that entirely or partially can be solved by answering the research question.' -OR description = 'is required: that a problem of general interest exists, that entirely or partially can be solved by answering the research question.') -AND point = 1; - -#U3 Problem (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.', - descriptionEn = 'Requirement for 1 point: that a problem of general interest exists that entirely or partially can be solved by answering the research question.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U3 Problem') -AND description = 'krävs: att det finns ett problem av generellt intresse som helt eller delvis kan lösas genom att frågeställningen besvaras.' -AND point = 1; - -#U4 Research question (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.', - descriptionEn = 'Requirement for 1 point: a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U4 Research question') -AND (description = ' a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem. -' -OR description = 'is required: a clearly formulated and delimited research question that is of general interest. The student shall independently identify and formulate the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.') -AND point = 1; - -#U4 Research question (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.', - descriptionEn = 'For 2 points the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U4 Research question') -AND (description = ' the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -OR description = 'is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.') -AND point = 2; - -#U4 Frågeställning (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.', - descriptionEn = 'Requirement for 1 point: a clearly formulated and delimited research question that is of general interest. The student is responsible for identifying and formulating the research question. The research question should derive from the presented problem so that it is clear how the answer to the research question solves a portion or the entire problem.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U4 Frågeställning') -AND (description = 'krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet. -' -OR description = 'krävs: en tydligt formulerad och väl avgränsad frågeställning som är av generellt intresse. Studenten skall självständigt identifiera och formulera frågeställningen. Frågeställningen skall motiveras utifrån problemet så att det är tydligt hur svaret på frågan löser en del av eller hela problemet.') -AND point = 1; - -#U4 Frågeställning (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.', - descriptionEn = 'For 2 points the following is also required: an innovative research question that provides necessary conditions so that the thesis could provide a significant scientific contribution.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U4 Frågeställning') -AND description = 'krävs dessutom: en innovativ frågeställning som ger förutsättningar för att arbetet skall kunna ge ett signifikant bidrag.' -AND point = 2; - -#U5 Scientific base (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.', - descriptionEn = 'Requirement for 1 point: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U5 Scientific base') -AND (description = ' that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers. -' -OR description = 'is required: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and system sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.') -AND point = 1; - -#U5 Scientific base (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.', - descriptionEn = 'For 2 points the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U5 Scientific base') -AND (description = ' the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research. -' -OR description = ' the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -OR description = 'is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.') -AND point = 2; - -#U5 Scientific base (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att en omfattande litteraturstudie redovisas som ligger till grund för en positionering och värdering av uppsatsens kunskapsbidrag i ett vetenskapligt sammanhang.', - descriptionEn = 'For 3 points the following is also required: that a comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U5 Scientific base') -AND description = 'is also required: that a comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.' -AND point = 3; - -#U5 Scientific base (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att en omfattande litteraturstudie redovisas som ligger till grund för en positionering och värdering av uppsatsens kunskapsbidrag i ett vetenskapligt sammanhang.', - descriptionEn = 'For 3 points the following is also required: that a systematic and comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U5 Scientific base') -AND (description = ' the following is also required: that a systematic and comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.' -OR description = 'is also required: that a systematic and comprehensive literature study is presented that is the basis for placing and evaluating the research contribution of the thesis in a scientific context.') -AND point = 3; - -#U5 Vetenskaplig förankring (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.', - descriptionEn = 'Requirement for 1 point: that the thesis provides a base for the topic of the thesis based on previous scientific research. The area within computer and systems sciences to which the thesis contributes should also be named by presenting the scientific research to which the thesis refers.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U5 Vetenskaplig förankring') -AND (description = 'krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till. -' -OR description = 'krävs: att uppsatsen ger en ämnesmässig förankring utifrån tidigare vetenskapliga arbeten. Det skall också framgå till vilket område inom data- och systemvetenskap som arbetet bidrar genom en redovisning av de vetenskapliga arbeten som uppsatsen relaterar till.') -AND point = 1; - -#U5 Vetenskaplig förankring (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.', - descriptionEn = 'For 2 points the following is also required: that a deep and critical discussion is made about how the thesis builds upon previous scientific research.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U5 Vetenskaplig förankring') -AND description = 'krävs dessutom: att en djupgående och kritisk diskussion förs om hur arbetet bygger vidare på tidigare vetenskapliga arbeten.' -AND point = 2; - -#U6 Choice of research method (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U6 Choice of research method') -AND (description = ' that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed. -' -OR description = 'is required: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.') -AND point = 1; - -#U6 Choice of research method (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly described and justified based on the research question, that at least one alternative research strategy and method that could be used to solve the research question is discussed, as well as that relevant ethical considerations are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U6 Choice of research method') -AND description = 'is required: that the choice of a research strategy and research methods is clearly described and justified based on the research question, that at least one alternative research strategy and method that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.' -AND point = 1; - -#U6 Choice of research method (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.', - descriptionEn = 'For 2 points the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U6 Choice of research method') -AND (description = ' the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident. -' -OR description = ' the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -OR description = 'is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.') -AND point = 2; - -#U6 Choice of research method (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att metodvalet diskuteras i förhållande till forskningsstrategier och forskningsmetoder som tillämpats i relaterade aktuella vetenskapliga studier och som kan betraktas som state-of-the-art.', - descriptionEn = 'For 3 points the following is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U6 Choice of research method') -AND (description = ' the following is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art' -OR description = 'is also required: that the choice of method is discussed in relation to the research strategies and methods that are used in current, related research studies that can be regarded as state-of-the-art.') -AND point = 3; - -#U6 Metodval (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly motivated and described, that alternative research strategies and methods that could be used to solve the research question are discussed, as well as that relevant ethical considerations are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U6 Metodval') -AND (description = 'krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras. -' -OR description = 'krävs: att valet av forskningsstrategier och forskningsmetoder motiveras och tydligt beskrivs, att alternativa forskningsstrategier och forskningsmetoder som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.') -AND point = 1; - -#U6 Metodval (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.', - descriptionEn = 'Requirement for 1 point: that the choice of a research strategy and research methods is clearly described and motivated based on the research question, that at least one alternative research strategy and method that could be used to solve the research question is discussed, as well as that relevant ethical considerations are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U6 Metodval') -AND description = 'krävs: att valet av forskningsstrategier och forskningsmetoder tydligt beskrivs och motiveras utifrån forskningsfrågan, att minst en alternativ forskningsstrategi och forskningsmetod som kan användas för att angripa frågeställningen diskuteras, samt att relevanta etiska överväganden diskuteras.' -AND point = 1; - -#U6 Metodval (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.', - descriptionEn = 'For 2 points the following is also required: that alternative, applicable research strategies and methods are comprehensively discussed and that a profound reasoning about the chosen strategies and methods is made, where the motives for choices made are clearly evident.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U6 Metodval') -AND description = 'krävs dessutom: att alternativa tillämpliga forskningsstrategier och forskningsmetoder diskuteras utförligt och att ett djupgående resonemang kring strategi- och metodval förs, där motiven för gjorda val tydligt framgår.' -AND point = 2; - -#U7 Application of research method (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U7 Application of research method') -AND (description = ' that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed. -' -OR description = 'is required: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.') -AND point = 1; - -#U7 Application of research method (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U7 Application of research method') -AND description = 'is required: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -AND point = 1; - -#U7 Application of research method (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.', - descriptionEn = 'For 2 points the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U7 Application of research method') -AND (description = ' the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this. -' -OR description = ' the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -OR description = 'is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.') -AND point = 2; - -#U7 Application of research method (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att det finns ett betydande djup i dataanalysen.', - descriptionEn = 'For 3 points the following is also required: that there is a real depth to the data analysis.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U7 Application of research method') -AND (description = ' the following is also required: that there is a real depth to the data analysis -' -OR description = 'is also required: that there is a real depth to the data analysis.') -AND point = 3; - -#U7 Metodtillämpning (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described, that the use of software tools is described, and that relevant ethical aspects are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U7 Metodtillämpning') -AND description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, att användning av programvaruverktyg beskrivs, samt att relevanta etiska aspekter diskuteras.' -AND point = 1; - -#U7 Metodtillämpning (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.', - descriptionEn = 'Requirement for 1 point: that the application of the chosen scientific strategies and methods are clearly described and that relevant ethical aspects are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U7 Metodtillämpning') -AND (description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras. -' -OR description = 'krävs: att tillämpningen av valda forskningsstrategier och forskningsmetoder är tydligt beskriven, samt att relevanta etiska aspekter diskuteras.') -AND point = 1; - -#U7 Metodtillämpning (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.', - descriptionEn = 'For 2 points the following is also required: that the application of research strategies and methods are done in accordance to the demands of said methods and strategies and that a clear argumentation exists for this.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U7 Metodtillämpning') -AND description = 'krävs dessutom: att tillämpningen av forskningsstrategier och forskningsmetoder är genomförd i enlighet med de krav som dessa ställer och att det finns en tydlig argumentation för detta.' -AND point = 2; - -#U8 Result (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.', - descriptionEn = 'Requirement for 1 point: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U8 Result') -AND (description = ' that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered. -' -OR description = 'is required: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.') -AND point = 1; - -#U8 Result (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U8 Result') -AND (description = ' the following is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered. -' -OR description = 'is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.') -AND point = 2; - -#U8 Result (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U8 Result') -AND description = 'is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -AND point = 2; - -#U8 Result (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att resultaten är väl beskrivna, av betydande omfattning och av hög kvalitet, så att väl underbyggda slutsatser av relevans för frågeställningen kan dras.', - descriptionEn = 'For 3 points the following is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U8 Result') -AND (description = ' the following is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.' -OR description = 'is also required: that the results are well written and of considerable magnitude and high quality so that well grounded conclusions relevant for the research question can be made.') -AND point = 3; - -#U8 Resultat (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.', - descriptionEn = 'Requirement for 1 point: that the results are of such a magnitude and quality and are presented in such a way that the research question can to some extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U8 Resultat') -AND (description = 'krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras. -' -OR description = 'krävs: att resultaten är av sådan omfattning och kvalitet och presenteras på ett sådant sätt att frågeställningen till viss del kan besvaras.') -AND point = 1; - -#U8 Resultat (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of a considerable magnitude and high quality so that the research question can to a great extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U8 Resultat') -AND description = 'krävs dessutom: att resultaten är av betydande omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.' -AND point = 2; - -#U8 Resultat (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.', - descriptionEn = 'For 2 points the following is also required: that the results are of sufficient magnitude and high quality so that the research question can to a great extent be answered.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U8 Resultat') -AND description = 'krävs dessutom: att resultaten är av tillräcklig omfattning och av hög kvalitet, så att frågeställningen till stor del kan besvaras.' -AND point = 2; - -#U9 Conclusions and discussion (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.', - descriptionEn = 'Requirement for 1 point: that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U9 Conclusions and discussion') -AND (description = ' that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed. -' -OR description = 'is required: that the research question has a clear answer, that the limitations in the composition of the thesis and their impact on the conclusions are discussed as well as how the results relate to previous research, that possible future research based on the study in the thesis is discussed, and that ethical and societal consequences of the conclusions in the thesis are discussed.') -AND point = 1; - -#U9 Conclusions and discussion (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.', - descriptionEn = 'For 2 points the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U9 Conclusions and discussion') -AND (description = ' the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -OR description = 'is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.') -AND point = 2; - -#U9 Slutsatser och diskussion (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.', - descriptionEn = 'Requirement for 1 point: that the research question has a clear answer, that the limitations in the design of the study and their impact on the conclusions are discussed as well as how the results relate to previous research; that possible future research based on the study in the thesis is discussed; and that ethical and societal consequences of the conclusions in the thesis are discussed.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U9 Slutsatser och diskussion') -AND (description = 'krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras. -' -OR description = 'krävs: att frågeställningen ges ett tydligt svar, att begränsningar i studiens upplägg och deras påverkan på slutsatserna diskuteras liksom hur resultaten relaterar till tidigare studier, att möjliga framtida studier med utgångspunkt från den aktuella studien diskuteras, samt att etiska och samhälleliga konsekvenser av studiens slutsatser diskuteras.') -AND point = 1; - -#U9 Slutsatser och diskussion (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.', - descriptionEn = 'For 2 points the following is also required: that the limitations of the study are thoroughly discussed and that a profound reasoning about possible and relevant future studies is made.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U9 Slutsatser och diskussion') -AND description = 'krävs dessutom: att studiens begränsningar diskuteras utförligt och att ett djupgående resonemang om möjliga och relevanta framtida studier förs.' -AND point = 2; - -#U10 Form, structure and language (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.', - descriptionEn = 'Requirement for 1 point: that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U10 Form, structure and language') -AND (description = ' that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language' -OR description = ' that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.' -OR description = 'is required: that the thesis is divided into distinct and logical, coherent sections and fulfills the fundamental layout requirements and that the text is written with an adequate and professional language.') -AND point = 1; - -#U10 Form, struktur och språk (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.', - descriptionEn = 'Requirement for 1 point: that the thesis is divided into distinct, logical, and coherent sections; that it fulfils the fundamental layout requirements; and that the text is written with an adequate and professional language.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U10 Form, struktur och språk') -AND description = 'krävs: att uppsatsen är indelad i tydliga och väl sammanhållna avsnitt och uppfyller grundläggande krav på layout samt att texten är skriven med ett adekvat och professionellt språkbruk.' -AND point = 1; - -#U11 Argumentation (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.', - descriptionEn = 'Requirement for 1 point: that the argumentation is well grounded, logically coherent, concise, clear, and easily understood.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U11 Argumentation') -AND (description = ' that the argumentation is well grounded, logically coherent, concise, clear and easily understood.' -OR description = 'is required: that the argumentation is well grounded, logically coherent, concise, clear and easily understood.') -AND point = 1; - -#U11 Argumentation (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.', - descriptionEn = 'Requirement for 1 point: that the argumentation is well grounded, logically coherent, concise, clear, and easily understood.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U11 Argumentation') -AND description = 'krävs: att argumentationen är välgrundad, logiskt sammanhållen, koncis, tydlig och lättbegriplig.' -AND point = 1; - -#U12 References and documentation (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.', - descriptionEn = 'Requirement for 1 point: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U12 References and documentation') -AND (description = ' that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -OR description = 'is required: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.') -AND point = 1; - -#U12 Källhänvisningar och dokumentation (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.', - descriptionEn = 'Requirement for 1 point: that references in the thesis to previous research are made in a correct way according to a recognized reference system, that a clear listing of used references is made in the same system, that all quotes from previous work are clearly specified, and that relevant supplemental attachments are included.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U12 Källhänvisningar och dokumentation') -AND description = 'krävs: att tidigare arbeten refereras till på ett korrekt sätt enligt ett vedertaget referenssystem, att en tydlig förteckning över använda källor anges enligt samma system, att samtliga citat från tidigare arbeten anges tydligt, samt att relevanta bilagor inkluderas.' -AND point = 1; - -#U13 Originality and significance (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.', - descriptionEn = 'Requirement for 1 point: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U13 Originality and significance') -AND (description = ' that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services. -' -OR description = 'is required: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.') -AND point = 1; - -#U13 Originality and significance (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.', - descriptionEn = 'For 2 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U13 Originality and significance') -AND (description = ' the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality. -' -OR description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.') -AND point = 2; - -#U13 Originality and significance (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.', - descriptionEn = 'For 3 points the following is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U13 Originality and significance') -AND (description = ' the following is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products. -' -OR description = 'is also required: that the research contributions are of such quality that the thesis could be presented at a scientific conference of good quality or that they could be a basis for useful solutions, for example commercializable products.') -AND point = 3; - -#U13 Originality and significance (4p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 4 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras i en vetenskaplig tidskrift av god kvalitet.', - descriptionEn = 'For 4 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'U13 Originality and significance') -AND (description = ' the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.' -OR description = 'is also required: that the research contributions are of such quality that the thesis could be presented in a scientific journal of good quality.') -AND point = 4; - -#U13 Originalitet och signifikans (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.', - descriptionEn = 'Requirement for 1 point: that the thesis contributes with significant or original research contributions, in the form of new ideas, artifacts, products, or services.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U13 Originalitet och signifikans') -AND (description = 'krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster. -' -OR description = 'krävs: att arbetet ger originella och signifikanta kunskapsbidrag, till exempel i form av idéer, artefakter, produkter eller tjänster.') -AND point = 1; - -#U13 Originalitet och signifikans (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.', - descriptionEn = 'For 2 points the following is also required: that the research contributions are of such quality that the thesis could be presented in a scientific workshop of good quality.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U13 Originalitet och signifikans') -AND (description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet. -' -OR description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig workshop av god kvalitet.') -AND point = 2; - -#U13 Originalitet och signifikans (3p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 3 poäng krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.', - descriptionEn = 'For 3 points the following is also required: that the research contributions are of such quality that the thesis could be presented at an academic conference of good quality or that they could be a basis for useful solutions, for example commercializable products.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'U13 Originalitet och signifikans') -AND description = 'krävs dessutom: att kunskapsbidragen är av sådan kvalitet att arbetet skulle kunna presenteras på en vetenskaplig konferens av god kvalitet eller kunna ligga till grund för användbara lösningar, till exempel i form av kommersialiserbara produkter.' -AND point = 3; - -#Ö1 Opposition report (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.', - descriptionEn = 'Requirement for 1 point: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö1 Opposition report') -AND (description = ' that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements. -' -OR description = 'is required: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.') -AND point = 1; - -#Ö1 Opposition report (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.', - descriptionEn = 'For 2 points the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö1 Opposition report') -AND (description = ' the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' -OR description = 'is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.') -AND point = 2; - -#Ö1 Oppositionsrapport (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.', - descriptionEn = 'Requirement for 1 point: that the opposition report provides a short summary of the evaluated thesis, that it deliberates about the scientific basis, originality, significance, and formulation of the problem and research question, as well as that it contains clear suggestions for improvements.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö1 Oppositionsrapport') -AND (description = 'krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar. -' -OR description = 'krävs: att oppositionsrapporten ger en kort sammanfattning av det utvärderade arbetet, resonerar kring uppsatsens vetenskapliga förankring, originalitet, signifikans, formulering av problem och frågeställning, metodval och metodtillämpning, samt innehåller tydliga förslag till förbättringar.') -AND point = 1; - -#Ö1 Oppositionsrapport (2p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 2 poäng krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.', - descriptionEn = 'For 2 points the following is also required: that the opposition report thoroughly and in a well-balanced way describes from numerous aspects the strengths and weaknesses of the evaluated thesis and that it offers clear and well-motivated suggestions for improvements.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö1 Oppositionsrapport') -AND description = 'krävs dessutom: att oppositionsrapporten ingående och välbalanserat beskriver styrkor och svagheter hos det utvärderade arbetet ur flera aspekter samt att den innehåller tydliga och välmotiverade förslag till förbättringar.' -AND point = 2; - -#Ö2 Presentations (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.', - descriptionEn = 'Requirement for 1 point: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö2 Presentations') -AND (description = ' that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -OR description = 'is required: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.') -AND point = 1; - -#Ö2 Presentationer (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.', - descriptionEn = 'Requirement for 1 point: that oral presentations are of sufficient quality, that they have been given on the assigned dates, and that the ability to orally defend one’s own thesis has been shown.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö2 Presentationer') -AND description = 'krävs: att muntliga presentationer av tillräcklig kvalitet har hållits vid anvisade tillfällen samt att förmåga att muntligt försvara det egna arbetet har uppvisats.' -AND point = 1; - -#Ö3 Participation in seminars and meetings (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.', - descriptionEn = 'Requirement for 1 point: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö3 Participation in seminars and meetings') -AND (description = ' that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -OR description = 'is required: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.') -AND point = 1; - -#Ö3 Aktivitet vid seminarier och möten (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.', - descriptionEn = 'Requirement for 1 point: that the ability to orally discuss and provide constructive criticism regarding others’ work has been shown in seminars and meetings.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö3 Aktivitet vid seminarier och möten') -AND description = 'krävs: att förmåga att muntligt diskutera och ge konstruktiv kritik när det gäller andras arbete har uppvisats vid seminarier och möten.' -AND point = 1; - -#Ö4 Deadlines (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.', - descriptionEn = 'Requirement for 1 point: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö4 Deadlines') -AND (description = ' that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -OR description = 'is required: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.') -AND point = 1; - -#Ö4 Deadlines (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.', - descriptionEn = 'Requirement for 1 point: that the ability to prepare and deliver material and presentations on time has been demonstrated at all the necessary occasions.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö4 Deadlines') -AND description = 'krävs: att förmåga har uppvisats att i tid förbereda och leverera material och presentationer vid alla tillfällen som detta krävs.' -AND point = 1; - -#Ö5 Revisions after the final seminar (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.', - descriptionEn = 'Requirement for 1 point: that only one smaller revision of the thesis is needed after the final seminar.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö5 Revisions after the final seminar') -AND (description = ' that only one smaller revision of the thesis is needed after the final seminar.' -OR description = 'is required: that only one smaller revision of the thesis is needed after the final seminar.') -AND point = 1; - -#Ö5 Revision efter slutseminarium (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.', - descriptionEn = 'Requirement for 1 point: that only one smaller revision of the thesis is needed after the final seminar.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE title = 'Ö5 Revision efter slutseminarium') -AND description = 'krävs: att endast en mindre revision av uppsatsen krävs efter slutseminariet.' -AND point = 1; - -#Ö6 Reflection (1p) -UPDATE GradingCriterionPoint SET lastModified = NOW(), - description = 'För 1 poäng krävs: att förmåga har uppvisats att reflektera över det genomförda examensarbetet genom individuellt författande av ett reflektionsdokument.', - descriptionEn = 'Requirement for 1 point: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document.' -WHERE GradingCriterion_id in (SELECT id FROM GradingCriterion WHERE titleEn = 'Ö6 Reflection') -AND description = 'is required: that the ability to reflect about the thesis work has been demonstrated through the individual writing of a reflection document' -AND point = 1; diff --git a/core/src/main/resources/db/migration/V376__added_manual_participants_flag_to_final_Seminar.sql b/core/src/main/resources/db/migration/V376__added_manual_participants_flag_to_final_Seminar.sql deleted file mode 100644 index 6b2d158ab8..0000000000 --- a/core/src/main/resources/db/migration/V376__added_manual_participants_flag_to_final_Seminar.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE final_seminar ADD COLUMN manualParticipants BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V377__save_text_matching_analysis_once.sql b/core/src/main/resources/db/migration/V377__save_text_matching_analysis_once.sql deleted file mode 100644 index 52d5ff5cf8..0000000000 --- a/core/src/main/resources/db/migration/V377__save_text_matching_analysis_once.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE FinalThesis - ADD COLUMN text_matching_analysis TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci; - -UPDATE FinalThesis SET text_matching_analysis = ( - SELECT plagiarismFeedback FROM SupervisorGradingReport WHERE id = ( - SELECT MIN(id) FROM GradingReport INNER JOIN SupervisorGradingReport USING (id) WHERE GradingReport.project_id = FinalThesis.project_id AND plagiarismFeedback IS NOT NULL)); - -ALTER TABLE SupervisorGradingReport DROP COLUMN plagiarismFeedback; diff --git a/core/src/main/resources/db/migration/V378_1__rejection_event_history.sql b/core/src/main/resources/db/migration/V378_1__rejection_event_history.sql deleted file mode 100644 index 17b87edb27..0000000000 --- a/core/src/main/resources/db/migration/V378_1__rejection_event_history.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE IF NOT EXISTS `grading_history_rejections` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `project_id` BIGINT NOT NULL, - `when` TIMESTAMP NOT NULL DEFAULT 0, -- disable automatic CURRENT_TIMESTAMP behaviour - `reason` TEXT NOT NULL, - PRIMARY KEY (id), - CONSTRAINT `FK_grading_history_rejections_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) -) collate utf8mb4_swedish_ci; diff --git a/core/src/main/resources/db/migration/V378_2__approved_event_history.sql b/core/src/main/resources/db/migration/V378_2__approved_event_history.sql deleted file mode 100644 index 1c2f5b9742..0000000000 --- a/core/src/main/resources/db/migration/V378_2__approved_event_history.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS `grading_history_approvals` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `project_id` BIGINT NOT NULL, - `when` TIMESTAMP NOT NULL DEFAULT 0, -- disable automatic CURRENT_TIMESTAMP behaviour - PRIMARY KEY (id), - CONSTRAINT `FK_grading_history_approvals_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) -) collate utf8mb4_swedish_ci; diff --git a/core/src/main/resources/db/migration/V378_3__submission_event_history.sql b/core/src/main/resources/db/migration/V378_3__submission_event_history.sql deleted file mode 100644 index 4dc154ef16..0000000000 --- a/core/src/main/resources/db/migration/V378_3__submission_event_history.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE IF NOT EXISTS `grading_history_submissions` -( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `project_id` BIGINT NOT NULL, - `when` TIMESTAMP NOT NULL DEFAULT 0, -- disable automatic CURRENT_TIMESTAMP behaviour - `author_id` BIGINT NOT NULL, - `corrections` TEXT NULL, - PRIMARY KEY (id), - CONSTRAINT `FK_grading_history_submissions_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - CONSTRAINT `FK_grading_history_submissions_author` FOREIGN KEY (`author_id`) REFERENCES `user` (`id`) -) collate utf8mb4_swedish_ci; diff --git a/core/src/main/resources/db/migration/V379__remove_reviewer_as_role_for_supervisor_projects.sql b/core/src/main/resources/db/migration/V379__remove_reviewer_as_role_for_supervisor_projects.sql deleted file mode 100644 index ae796e1ab6..0000000000 --- a/core/src/main/resources/db/migration/V379__remove_reviewer_as_role_for_supervisor_projects.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM UserProfile_defaultProjectTeamMemberRolesFilter - WHERE defaultProjectTeamMemberRolesFilter = 'REVIEWER'; diff --git a/core/src/main/resources/db/migration/V37__added_different_types_of_grading_criterion.sql b/core/src/main/resources/db/migration/V37__added_different_types_of_grading_criterion.sql deleted file mode 100644 index 216277ac21..0000000000 --- a/core/src/main/resources/db/migration/V37__added_different_types_of_grading_criterion.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `grading_criterion`; -ALTER TABLE `grading_criterion` ADD COLUMN `type` VARCHAR(64) NOT NULL; -DELETE FROM `grading_report`; diff --git a/core/src/main/resources/db/migration/V380__save_rejection_comment_on_final_thesis.sql b/core/src/main/resources/db/migration/V380__save_rejection_comment_on_final_thesis.sql deleted file mode 100644 index bb10e667a4..0000000000 --- a/core/src/main/resources/db/migration/V380__save_rejection_comment_on_final_thesis.sql +++ /dev/null @@ -1,30 +0,0 @@ -alter table FinalThesis - add column rejection_comment TEXT NULL; - -update FinalThesis -set rejection_comment = ( - select content - from forum_post - inner join thread on forum_post.thread = thread.id - inner join project_thread on thread.id = project_thread.thread_id - where thread.subject = 'Final thesis revision needed' - and project_thread.project_id = FinalThesis.project_id - -- only get threads that were for this (or earlier) rejections - and thread.dateCreated <= date_add(FinalThesis.dateRejected, interval 1 day) - -- get the newest thread, and the oldest post (first one in the thread) - order by thread.id desc, forum_post.dateCreated asc - limit 1) -where dateRejected is not null; - -update FinalThesis -set rejection_comment = ( - select right(content, length(content) - 169) - from forum_post - inner join thread on forum_post.thread = thread.id - inner join project_thread on thread.id = project_thread.thread_id - where thread.subject = 'Thesis rejected by examiner' - and project_thread.project_id = FinalThesis.project_id - and thread.dateCreated <= date_add(FinalThesis.dateRejected, interval 1 day) - order by thread.id desc, forum_post.dateCreated asc - limit 1) -where dateRejected is not null and rejection_comment is null; diff --git a/core/src/main/resources/db/migration/V381__national_subject_category.sql b/core/src/main/resources/db/migration/V381__national_subject_category.sql deleted file mode 100644 index f17b68111d..0000000000 --- a/core/src/main/resources/db/migration/V381__national_subject_category.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE IF NOT EXISTS `national_subject_category` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `external_id` INT NOT NULL, - `swedish_name` VARCHAR(255) NOT NULL, - `english_name` VARCHAR(255) NOT NULL, - `active` BOOLEAN NOT NULL, - `preselected` BOOLEAN NOT NULL, - PRIMARY KEY (`id`), - UNIQUE INDEX `U_national_subject_category_external_id` (`external_id`) -); diff --git a/core/src/main/resources/db/migration/V382_1__reviewer_targets.sql b/core/src/main/resources/db/migration/V382_1__reviewer_targets.sql deleted file mode 100644 index d7cca14be3..0000000000 --- a/core/src/main/resources/db/migration/V382_1__reviewer_targets.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE IF NOT EXISTS `reviewer_target` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` INT NOT NULL, - `reviewer_id` BIGINT NOT NULL, - `target` INT NOT NULL, - `from_date` DATE NOT NULL, - `to_date` DATE NOT NULL, - PRIMARY KEY (`id`), - CONSTRAINT `FK_reviewer_target_user` FOREIGN KEY (`reviewer_id`) REFERENCES `user` (`id`) -); diff --git a/core/src/main/resources/db/migration/V382_2__reviewer_assignments.sql b/core/src/main/resources/db/migration/V382_2__reviewer_assignments.sql deleted file mode 100644 index eea093fa3e..0000000000 --- a/core/src/main/resources/db/migration/V382_2__reviewer_assignments.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `Decision` - ADD COLUMN `assigned_reviewer_id` BIGINT, - ADD COLUMN `assigned_reviewer_date` DATE; - -ALTER TABLE `Decision` - ADD CONSTRAINT `FK_decision_reviewer` FOREIGN KEY (`assigned_reviewer_id`) REFERENCES `user` (`id`); - -UPDATE `Decision` SET `assigned_reviewer_id` = (SELECT MAX(user_id) FROM project_reviewer WHERE project_id = (SELECT project_id FROM ReviewerApproval WHERE id = reviewerApproval_id)); -UPDATE `Decision` SET `assigned_reviewer_date` = DATE_SUB(deadline, INTERVAL 7 DAY) WHERE assigned_reviewer_id IS NOT NULL; -- approximation of 5 work days diff --git a/core/src/main/resources/db/migration/V383_3__reviewer_target_period_note.sql b/core/src/main/resources/db/migration/V383_3__reviewer_target_period_note.sql deleted file mode 100644 index 83dd0a19a1..0000000000 --- a/core/src/main/resources/db/migration/V383_3__reviewer_target_period_note.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `reviewer_target` - ADD COLUMN `note` TEXT NULL; diff --git a/core/src/main/resources/db/migration/V383_4__reviewer_targets_per_calendar_year.sql b/core/src/main/resources/db/migration/V383_4__reviewer_targets_per_calendar_year.sql deleted file mode 100644 index 55c7e3d719..0000000000 --- a/core/src/main/resources/db/migration/V383_4__reviewer_targets_per_calendar_year.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE `reviewer_target_migration` -( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` INT NOT NULL, - `reviewer_id` BIGINT NOT NULL, - `year` INT NOT NULL, - `spring` INT NOT NULL, - `autumn` INT NOT NULL, - `note` TEXT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_ReviewerTarget_ReviewerId_Year` (`reviewer_id`, `year`), - CONSTRAINT `FK_ReviewerTarget_ReviewerId` FOREIGN KEY (`reviewer_id`) REFERENCES `user` (`id`) -); - -INSERT INTO `reviewer_target_migration` - (`dateCreated`, `lastModified`, `version`, `reviewer_id`, `year`, `spring`, `autumn`, `note`) - SELECT MIN(`dateCreated`), MAX(`lastModified`), MAX(`version`), `reviewer_id`, YEAR(`from_date`), 0, 0, NULL - FROM `reviewer_target` - GROUP BY `reviewer_id`, YEAR(`from_date`); - -UPDATE `reviewer_target_migration` -SET `spring` = COALESCE((SELECT SUM(`target`) FROM `reviewer_target` WHERE `reviewer_target`.`reviewer_id` = `reviewer_target_migration`.`reviewer_id` AND `reviewer_target`.`from_date` >= CONCAT(`year`, '-01-01') AND `reviewer_target`.`from_date` < CONCAT(`year`, '-07-01')), 0), - `autumn` = COALESCE((SELECT SUM(`target`) FROM `reviewer_target` WHERE `reviewer_target`.`reviewer_id` = `reviewer_target_migration`.`reviewer_id` AND `reviewer_target`.`from_date` >= CONCAT(`year`, '-07-01') AND `reviewer_target`.`from_date` < CONCAT(`year` + 1, '-01-01')), 0); - -UPDATE `reviewer_target_migration` -SET note = (SELECT GROUP_CONCAT(`note`) FROM `reviewer_target` WHERE `reviewer_target`.`reviewer_id` = `reviewer_target_migration`.`reviewer_id` AND YEAR(`from_date`) = `year` AND `note` IS NOT NULL) -WHERE `note` IS NULL; - -DROP TABLE `reviewer_target`; -RENAME TABLE `reviewer_target_migration` TO `reviewer_target`; diff --git a/core/src/main/resources/db/migration/V384__national_subject_category_for_projects.sql b/core/src/main/resources/db/migration/V384__national_subject_category_for_projects.sql deleted file mode 100644 index 219b6eef72..0000000000 --- a/core/src/main/resources/db/migration/V384__national_subject_category_for_projects.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE publication_metadata ADD COLUMN national_subject_category_id BIGINT NULL; -ALTER TABLE publication_metadata - ADD CONSTRAINT FK_publication_metadata_national_subject_category - FOREIGN KEY (national_subject_category_id) REFERENCES national_subject_category(id); diff --git a/core/src/main/resources/db/migration/V385__grading_report_date_submitted_to_examiner.sql b/core/src/main/resources/db/migration/V385__grading_report_date_submitted_to_examiner.sql deleted file mode 100644 index b188b7dbbc..0000000000 --- a/core/src/main/resources/db/migration/V385__grading_report_date_submitted_to_examiner.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table GradingReport - add date_submitted_to_examiner datetime null; diff --git a/core/src/main/resources/db/migration/V386__remove_forum_replies_via_mail.sql b/core/src/main/resources/db/migration/V386__remove_forum_replies_via_mail.sql deleted file mode 100644 index 9075019530..0000000000 --- a/core/src/main/resources/db/migration/V386__remove_forum_replies_via_mail.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `user_profile` DROP COLUMN `receiveForumMail`; -DROP TABLE `forum_mail_settings`; -DROP TABLE `forum_mail_project`; -DROP TABLE `forum_mail_group`; -DROP TABLE `forum_mail_reviewer`; -DROP TABLE `forum_mail`; diff --git a/core/src/main/resources/db/migration/V387__support_for_information_url_about_review_process.sql b/core/src/main/resources/db/migration/V387__support_for_information_url_about_review_process.sql deleted file mode 100644 index f40cd40bb9..0000000000 --- a/core/src/main/resources/db/migration/V387__support_for_information_url_about_review_process.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `project_type_settings` - ADD COLUMN `review_process_information_url_for_supervisor` VARCHAR(255) NULL; diff --git a/core/src/main/resources/db/migration/V388__user_notes_for_projects.sql b/core/src/main/resources/db/migration/V388__user_notes_for_projects.sql deleted file mode 100644 index 334caad59b..0000000000 --- a/core/src/main/resources/db/migration/V388__user_notes_for_projects.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE IF NOT EXISTS `project_user_note` ( - `project_id` bigint NOT NULL, - `user_id` bigint NOT NULL, - `note` text NULL, - PRIMARY KEY (`project_id`, `user_id`), - CONSTRAINT `FK_project_user_note_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `FK_project_user_note_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -); - -ALTER TABLE `user_profile` - ADD COLUMN `supervisor_project_note_display` VARCHAR(15) NOT NULL DEFAULT 'COMPACT'; diff --git a/core/src/main/resources/db/migration/V389_1__grading_report_template_valid_timespans.sql b/core/src/main/resources/db/migration/V389_1__grading_report_template_valid_timespans.sql deleted file mode 100644 index 04e804ea63..0000000000 --- a/core/src/main/resources/db/migration/V389_1__grading_report_template_valid_timespans.sql +++ /dev/null @@ -1,46 +0,0 @@ -# For any given date there is only ever one valid template for a project type -# That template is valid until the date a new template is valid from -ALTER TABLE `grading_report_template` - ADD COLUMN `valid_from` DATE NOT NULL DEFAULT '2001-01-01'; - -CREATE TEMPORARY TABLE pt_points -( - pt_id INT, - credits INT, - count INT -); - -# Count how many projects/credits each project type has -INSERT INTO pt_points -SELECT pt.id, credits, COUNT(*) -FROM ProjectType pt - INNER JOIN project p ON pt.id = p.projectType_id -WHERE pt.id IN (SELECT projectType_id FROM grading_report_template) -GROUP BY pt.id, credits; - -CREATE TEMPORARY TABLE grading_templates_to_keep -( - id INT -); - -# Keep the most used grading template for each project type (based on projects/credits) -INSERT INTO grading_templates_to_keep (id) -SELECT t.id -FROM grading_report_template t -WHERE credits = (SELECT credits - FROM pt_points m - WHERE m.pt_id = t.projectType_id - AND m.`count` = (SELECT MAX(count) - FROM pt_points n - WHERE n.pt_id = t.projectType_id)); - -DELETE FROM grading_criterion_point_template WHERE gradingCriterionTemplate_id IN (SELECT id FROM grading_criterion_template WHERE gradingReportTemplate_id NOT IN (SELECT id FROM grading_templates_to_keep)); -DELETE FROM grading_criterion_template WHERE gradingReportTemplate_id NOT IN (SELECT id FROM grading_templates_to_keep); -DELETE FROM grading_report_template WHERE id NOT IN (SELECT id FROM grading_templates_to_keep); - -DROP TABLE grading_templates_to_keep; -DROP TABLE pt_points; - -ALTER TABLE `grading_report_template` - DROP COLUMN `credits`, - ADD UNIQUE `UK_only_one_template_per_date_and_type` (`projectType_id`, `valid_from`); diff --git a/core/src/main/resources/db/migration/V389_2__failing_grade_and_note_on_templates.sql b/core/src/main/resources/db/migration/V389_2__failing_grade_and_note_on_templates.sql deleted file mode 100644 index 31d85e8edf..0000000000 --- a/core/src/main/resources/db/migration/V389_2__failing_grade_and_note_on_templates.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `grading_report_template` - ADD COLUMN `note` TEXT, - ADD COLUMN `failing_grade` VARCHAR(32); diff --git a/core/src/main/resources/db/migration/V389_3__grade_limits_on_grading_templates.sql b/core/src/main/resources/db/migration/V389_3__grade_limits_on_grading_templates.sql deleted file mode 100644 index 80a2cc6439..0000000000 --- a/core/src/main/resources/db/migration/V389_3__grade_limits_on_grading_templates.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `grading_report_template_grade_limits` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `grading_report_template_id` BIGINT, -- can't be NOT NULL because of Hibernate using an INSERT followed by an UPDATE - `grade` VARCHAR(32) NOT NULL, - `lower_limit` INT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_one_grade_per_template` (`grading_report_template_id`, `grade`), - FOREIGN KEY `FK_grade_limit_grading_report_template `(`grading_report_template_id`) - REFERENCES `grading_report_template` (`id`) ON DELETE CASCADE -); diff --git a/core/src/main/resources/db/migration/V389_4__grading_criterion_flags.sql b/core/src/main/resources/db/migration/V389_4__grading_criterion_flags.sql deleted file mode 100644 index 9faf8c121e..0000000000 --- a/core/src/main/resources/db/migration/V389_4__grading_criterion_flags.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `grading_criterion_template` - ADD COLUMN `flag` VARCHAR(64); -ALTER TABLE `GradingCriterion` - ADD COLUMN `flag` VARCHAR(64); diff --git a/core/src/main/resources/db/migration/V389_5__migrate_opposition_criteria_to_flag.sql b/core/src/main/resources/db/migration/V389_5__migrate_opposition_criteria_to_flag.sql deleted file mode 100644 index d4ffffc008..0000000000 --- a/core/src/main/resources/db/migration/V389_5__migrate_opposition_criteria_to_flag.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `GradingCriterion` SET `flag` = 'OPPOSITION' WHERE title like 'Ö1 %'; -UPDATE `grading_criterion_template` SET `flag` = 'OPPOSITION' WHERE title like 'Ö1 %'; diff --git a/core/src/main/resources/db/migration/V389_6__migrate_reflection_criteria_to_flag.sql b/core/src/main/resources/db/migration/V389_6__migrate_reflection_criteria_to_flag.sql deleted file mode 100644 index 0ad60ce957..0000000000 --- a/core/src/main/resources/db/migration/V389_6__migrate_reflection_criteria_to_flag.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `GradingCriterion` SET `flag` = 'REFLECTION' WHERE title like 'Ö6 %'; -UPDATE `grading_criterion_template` SET `flag` = 'REFLECTION' WHERE title like 'Ö6 %'; diff --git a/core/src/main/resources/db/migration/V38__added_stupid_fx_flag.sql b/core/src/main/resources/db/migration/V38__added_stupid_fx_flag.sql deleted file mode 100644 index 45ae2ec4e2..0000000000 --- a/core/src/main/resources/db/migration/V38__added_stupid_fx_flag.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `grading_criterion` ADD COLUMN `fx` BOOLEAN NOT NULL DEFAULT TRUE; -ALTER TABLE `grading_criterion_template` ADD COLUMN `fx` BOOLEAN NOT NULL DEFAULT TRUE; diff --git a/core/src/main/resources/db/migration/V390__longer_titles_in_final_thesis.sql b/core/src/main/resources/db/migration/V390__longer_titles_in_final_thesis.sql deleted file mode 100644 index 3edeeb923b..0000000000 --- a/core/src/main/resources/db/migration/V390__longer_titles_in_final_thesis.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Match what project.title allows -ALTER TABLE `FinalThesis` MODIFY `englishTitle` LONGTEXT NULL; -ALTER TABLE `FinalThesis` MODIFY `swedishTitle` LONGTEXT NULL; diff --git a/core/src/main/resources/db/migration/V391__harmonize_table_attribute_name.sql b/core/src/main/resources/db/migration/V391__harmonize_table_attribute_name.sql deleted file mode 100644 index 15c116c0ff..0000000000 --- a/core/src/main/resources/db/migration/V391__harmonize_table_attribute_name.sql +++ /dev/null @@ -1,3222 +0,0 @@ -/* - * Step 1: Remove obsolete tables - */ - -drop table plugin_settings; -drop table turnitincheck; - -alter table TurnitinSettings_expirationMails drop foreign key FK_lji32bekgobx76otvw7syu4hb; -drop table TurnitinSettings_expirationMails; - -drop table TurnitinSettings; - -/* - * Step 2: DomainObject related classes and tables. - * - * Many entity classes inherit directly or indirectly from abstract super class DomainObject. Two attributes - * dateCreated and lastModified, have changed mapping to column name with snake case, date_created and last_modified. - * This change affects many, many tables, which are to be managed at first. - */ - --- table: ActivityPlan - -alter table `ActivityPlan` rename column `dateCreated` to `date_created`; -alter table `ActivityPlan` rename column `lastModified` to `last_modified`; - --- table: ActivityPlanTemplate - -alter table `ActivityPlanTemplate` rename column `dateCreated` to `date_created`; -alter table `ActivityPlanTemplate` rename column `lastModified` to `last_modified`; - --- table: ActivityTemplate - -alter table `ActivityTemplate` rename column `dateCreated` to `date_created`; -alter table `ActivityTemplate` rename column `lastModified` to `last_modified`; - --- table: file_description - -alter table `file_description` rename column `dateCreated` to `date_created`; -alter table `file_description` rename column `lastModified` to `last_modified`; - --- table: answer - -alter table `answer` rename column `dateCreated` to `date_created`; -alter table `answer` rename column `lastModified` to `last_modified`; - --- table: ApplicationPeriod - -alter table `ApplicationPeriod` rename column `dateCreated` to `date_created`; -alter table `ApplicationPeriod` rename column `lastModified` to `last_modified`; - --- table: checklist - -alter table `checklist` rename column `dateCreated` to `date_created`; -alter table `checklist` rename column `lastModified` to `last_modified`; - --- table: checklist_answer - -alter table `checklist_answer` rename column `dateCreated` to `date_created`; -alter table `checklist_answer` rename column `lastModified` to `last_modified`; - --- table: checklist_category - -alter table `checklist_category` rename column `dateCreated` to `date_created`; -alter table `checklist_category` rename column `lastModified` to `last_modified`; - --- table: checklist_question - -alter table `checklist_question` rename column `dateCreated` to `date_created`; -alter table `checklist_question` rename column `lastModified` to `last_modified`; - --- table: checklist_template - -alter table `checklist_template` rename column `dateCreated` to `date_created`; -alter table `checklist_template` rename column `lastModified` to `last_modified`; - --- table: comment - -alter table `comment` rename column `dateCreated` to `date_created`; -alter table `comment` rename column `lastModified` to `last_modified`; - --- table: externallink - -alter table `externallink` rename column `dateCreated` to `date_created`; -alter table `externallink` rename column `lastModified` to `last_modified`; - --- table: comment_thread - -alter table `comment_thread` rename column `dateCreated` to `date_created`; -alter table `comment_thread` rename column `lastModified` to `last_modified`; - --- table: FinalSeminarSettings - -alter table `FinalSeminarSettings` rename column `dateCreated` to `date_created`; -alter table `FinalSeminarSettings` rename column `lastModified` to `last_modified`; - --- table: FinalThesis - -alter table `FinalThesis` rename column `dateCreated` to `date_created`; -alter table `FinalThesis` rename column `lastModified` to `last_modified`; - --- table: footer_address - -alter table `footer_address` rename column `dateCreated` to `date_created`; -alter table `footer_address` rename column `lastModified` to `last_modified`; - --- table: footer_link - -alter table `footer_link` rename column `dateCreated` to `date_created`; -alter table `footer_link` rename column `lastModified` to `last_modified`; - --- table: general_system_settings - -alter table `general_system_settings` rename column `dateCreated` to `date_created`; -alter table `general_system_settings` rename column `lastModified` to `last_modified`; - --- table: grading_report_template - -alter table `grading_report_template` rename column `dateCreated` to `date_created`; -alter table `grading_report_template` rename column `lastModified` to `last_modified`; - --- table: project_group - -alter table `project_group` rename column `dateCreated` to `date_created`; -alter table `project_group` rename column `lastModified` to `last_modified`; - --- table: idea - -alter table `idea` rename column `dateCreated` to `date_created`; -alter table `idea` rename column `lastModified` to `last_modified`; - --- table: idea_export - -alter table `idea_export` rename column `dateCreated` to `date_created`; -alter table `idea_export` rename column `lastModified` to `last_modified`; - --- table: mail_event - -alter table `mail_event` rename column `dateCreated` to `date_created`; -alter table `mail_event` rename column `lastModified` to `last_modified`; - --- table: idea_match - -alter table `idea_match` rename column `dateCreated` to `date_created`; -alter table `idea_match` rename column `lastModified` to `last_modified`; - --- table: milestone - -alter table `milestone` rename column `dateCreated` to `date_created`; -alter table `milestone` rename column `lastModified` to `last_modified`; - --- table: NonWorkDayPeriod - -alter table `NonWorkDayPeriod` rename column `dateCreated` to `date_created`; -alter table `NonWorkDayPeriod` rename column `lastModified` to `last_modified`; - --- table: note - -alter table `note` rename column `dateCreated` to `date_created`; -alter table `note` rename column `lastModified` to `last_modified`; - --- table: Notification - -alter table `Notification` rename column `dateCreated` to `date_created`; -alter table `Notification` rename column `lastModified` to `last_modified`; - --- table: NotificationData - -alter table `NotificationData` rename column `dateCreated` to `date_created`; -alter table `NotificationData` rename column `lastModified` to `last_modified`; - --- table: peer_request - -alter table `peer_request` rename column `dateCreated` to `date_created`; -alter table `peer_request` rename column `lastModified` to `last_modified`; - --- table: peer_review - -alter table `peer_review` rename column `dateCreated` to `date_created`; -alter table `peer_review` rename column `lastModified` to `last_modified`; - --- table: preliminary_match - -alter table `preliminary_match` rename column `dateCreated` to `date_created`; -alter table `preliminary_match` rename column `lastModified` to `last_modified`; - --- table: Program - -alter table `Program` rename column `dateCreated` to `date_created`; -alter table `Program` rename column `lastModified` to `last_modified`; - --- table: project - -alter table `project` rename column `dateCreated` to `date_created`; -alter table `project` rename column `lastModified` to `last_modified`; - --- table: project_file - -alter table `project_file` rename column `dateCreated` to `date_created`; -alter table `project_file` rename column `lastModified` to `last_modified`; - --- table: project_first_meeting - -alter table `project_first_meeting` rename column `dateCreated` to `date_created`; -alter table `project_first_meeting` rename column `lastModified` to `last_modified`; - --- table: projectPartner - -alter table `projectPartner` rename column `dateCreated` to `date_created`; -alter table `projectPartner` rename column `lastModified` to `last_modified`; - --- table: project_type_settings - -alter table `project_type_settings` rename column `dateCreated` to `date_created`; -alter table `project_type_settings` rename column `lastModified` to `last_modified`; - --- table: reviewer_deadline_settings - -alter table `reviewer_deadline_settings` rename column `dateCreated` to `date_created`; -alter table `reviewer_deadline_settings` rename column `lastModified` to `last_modified`; - --- table: reviewer_target - -alter table `reviewer_target` rename column `dateCreated` to `date_created`; -alter table `reviewer_target` rename column `lastModified` to `last_modified`; - --- table: unit - -alter table `unit` rename column `dateCreated` to `date_created`; -alter table `unit` rename column `lastModified` to `last_modified`; - --- table: urkund_submission - -alter table `urkund_submission` rename column `dateCreated` to `date_created`; -alter table `urkund_submission` rename column `lastModified` to `last_modified`; - --- table: username - -alter table `username` rename column `dateCreated` to `date_created`; -alter table `username` rename column `lastModified` to `last_modified`; - --- table: user_profile - -alter table `user_profile` rename column `dateCreated` to `date_created`; -alter table `user_profile` rename column `lastModified` to `last_modified`; - --- table: worker_data - -alter table `worker_data` rename column `dateCreated` to `date_created`; -alter table `worker_data` rename column `lastModified` to `last_modified`; - --- table: criterion - -alter table `criterion` rename column `dateCreated` to `date_created`; -alter table `criterion` rename column `lastModified` to `last_modified`; - --- table: grading_criterion_template - -alter table `grading_criterion_template` rename column `dateCreated` to `date_created`; -alter table `grading_criterion_template` rename column `lastModified` to `last_modified`; - --- table: GradingCriterion - -alter table `GradingCriterion` rename column `dateCreated` to `date_created`; -alter table `GradingCriterion` rename column `lastModified` to `last_modified`; - --- table: GradingCriterionPoint - -alter table `GradingCriterionPoint` rename column `dateCreated` to `date_created`; -alter table `GradingCriterionPoint` rename column `lastModified` to `last_modified`; - --- table: grading_criterion_point_template - -alter table `grading_criterion_point_template` rename column `dateCreated` to `date_created`; -alter table `grading_criterion_point_template` rename column `lastModified` to `last_modified`; - --- table: ReviewerApproval - -alter table `ReviewerApproval` rename column `dateCreated` to `date_created`; -alter table `ReviewerApproval` rename column `lastModified` to `last_modified`; - --- table: final_seminar_active_participation - -alter table `final_seminar_active_participation` rename column `dateCreated` to `date_created`; -alter table `final_seminar_active_participation` rename column `lastModified` to `last_modified`; - --- table: final_seminar_opposition - -alter table `final_seminar_opposition` rename column `dateCreated` to `date_created`; -alter table `final_seminar_opposition` rename column `lastModified` to `last_modified`; - --- table: final_seminar_respondent - -alter table `final_seminar_respondent` rename column `dateCreated` to `date_created`; -alter table `final_seminar_respondent` rename column `lastModified` to `last_modified`; - --- table: report - -alter table `report` rename column `dateCreated` to `date_created`; -alter table `report` rename column `lastModified` to `last_modified`; - --- table: notification_delivery_configuration - -alter table `notification_delivery_configuration` rename column `dateCreated` to `date_created`; -alter table `notification_delivery_configuration` rename column `lastModified` to `last_modified`; - --- table: notification_receiver_configuration - -alter table `notification_receiver_configuration` rename column `dateCreated` to `date_created`; -alter table `notification_receiver_configuration` rename column `lastModified` to `last_modified`; - --- table: Activity - -alter table `Activity` rename column `dateCreated` to `date_created`; -alter table `Activity` rename column `lastModified` to `last_modified`; - --- table: final_seminar - -alter table `final_seminar` rename column `dateCreated` to `date_created`; -alter table `final_seminar` rename column `lastModified` to `last_modified`; - --- table: forum_post - -alter table `forum_post` rename column `dateCreated` to `date_created`; -alter table `forum_post` rename column `lastModified` to `last_modified`; - --- table: thread - -alter table `thread` rename column `dateCreated` to `date_created`; -alter table `thread` rename column `lastModified` to `last_modified`; - --- table: Keyword - -alter table `Keyword` rename column `dateCreated` to `date_created`; -alter table `Keyword` rename column `lastModified` to `last_modified`; - --- table: milestone_activity_template - -alter table `milestone_activity_template` rename column `dateCreated` to `date_created`; -alter table `milestone_activity_template` rename column `lastModified` to `last_modified`; - --- table: milestone_phase_template - -alter table `milestone_phase_template` rename column `dateCreated` to `date_created`; -alter table `milestone_phase_template` rename column `lastModified` to `last_modified`; - --- table: Password - -alter table `Password` rename column `dateCreated` to `date_created`; -alter table `Password` rename column `lastModified` to `last_modified`; - --- table: ProjectType - -alter table `ProjectType` rename column `dateCreated` to `date_created`; -alter table `ProjectType` rename column `lastModified` to `last_modified`; - --- table: researcharea - -alter table `researcharea` rename column `dateCreated` to `date_created`; -alter table `researcharea` rename column `lastModified` to `last_modified`; - --- table: user - -alter table `user` rename column `dateCreated` to `date_created`; -alter table `user` rename column `lastModified` to `last_modified`; - -/* - * Step 3: standalone tables - */ - --- table: worker_data - -alter table `worker_data` rename column `lastRun` to `last_run`; -alter table `worker_data` rename column `lastSuccessfulRun` to `last_successful_run`; - --- table: footer_link - -alter table `footer_link` rename column `footerColumn` to `footer_column`; - --- table: NonWorkDayPeriod - -alter table `NonWorkDayPeriod` rename column `endDate` to `end_date`; -alter table `NonWorkDayPeriod` rename column `startDate` to `start_date`; - -rename table `NonWorkDayPeriod` to `non_work_day_period`; - --- table: reviewer_deadline_settings - -alter table `reviewer_deadline_settings` rename column `roughDraftApproval` to `rough_draft_approval`; -alter table `reviewer_deadline_settings` rename column `finalSeminarApproval` to `final_seminar_approval`; -alter table `reviewer_deadline_settings` rename column `finalGrading` to `final_grading`; - --- table: final_seminar_settings - -alter table `FinalSeminarSettings` rename column `daysAheadToCreate` to `days_ahead_to_create`; -alter table `FinalSeminarSettings` rename column `daysAheadToRegisterParticipation` to `days_ahead_to_register_participation`; -alter table `FinalSeminarSettings` rename column `daysAheadToRegisterOpposition` to `days_ahead_to_register_opposition`; -alter table `FinalSeminarSettings` rename column `daysAheadToUploadThesis` to `days_ahead_to_upload_thesis`; -alter table `FinalSeminarSettings` rename column `thesisMustBePDF` to `thesis_must_be_pdf`; -alter table `FinalSeminarSettings` rename column `evaluationURL` to `evaluation_url`; -alter table `FinalSeminarSettings` rename column `oppositionPriorityDays` to `opposition_priority_days`; - -rename table `FinalSeminarSettings` to `final_seminar_settings`; - -/* - * Step 4: general_system_settings and three related tables. - */ - --- table: general_system_settings_system_module - -alter table `general_system_settings_system_modules` drop foreign key `general_system_settings_system_modules_ibfk_1`; -alter table `general_system_settings_system_modules` drop key `GeneralSystemSettings_id`; -alter table `general_system_settings_system_modules` drop primary key; - -alter table `general_system_settings_system_modules` rename column `GeneralSystemSettings_id` to `general_system_settings_id`; -alter table `general_system_settings_system_modules` rename column `systemModules` to `system_module`; - -rename table `general_system_settings_system_modules` to `general_system_settings_system_module`; - -alter table `general_system_settings_system_module` add primary key (general_system_settings_id, system_module); - -alter table `general_system_settings_system_module` - add constraint fk_general_system_settings_system_module_id - foreign key (general_system_settings_id) references general_system_settings (id) - on delete cascade on update cascade; - --- table: general_system_settings_supervisor_change_recipient - -alter table `general_system_settings_supervisor_change_recipients` drop foreign key `FK7DA712D52AC37675`; -alter table `general_system_settings_supervisor_change_recipients` drop key `FK7DA712D52AC37675`; - -alter table `general_system_settings_supervisor_change_recipients` rename column `GeneralSystemSettings_id` to `general_system_settings_id`; - -rename table `general_system_settings_supervisor_change_recipients` to `general_system_settings_supervisor_change_recipient`; - -alter table `general_system_settings_supervisor_change_recipient` add primary key (general_system_settings_id, mail); - -alter table `general_system_settings_supervisor_change_recipient` - add constraint fk_general_system_settings_supervisor_change_recipient_id - foreign key (general_system_settings_id) references general_system_settings (id) - on delete cascade on update cascade; - --- table: general_system_settings_alarm_recipient - -alter table `general_system_settings_alarm_recipients` drop foreign key `FK3C9272B2AC37675`; -alter table `general_system_settings_alarm_recipients` drop key `FK3C9272B2AC37675`; - -alter table `general_system_settings_alarm_recipients` rename column `GeneralSystemSettings_id` to `general_system_settings_id`; - -rename table `general_system_settings_alarm_recipients` to `general_system_settings_alarm_recipient`; - -alter table `general_system_settings_alarm_recipient` add primary key (general_system_settings_id, mail); - -alter table `general_system_settings_alarm_recipient` - add constraint fk_general_system_settings_alarm_recipient_id - foreign key (general_system_settings_id) references general_system_settings (id) - on delete cascade on update cascade; - --- table: general_system_settings - -alter table `general_system_settings` rename column `daisyProfileLinkBaseURL` to `daisy_profile_link_base_url`; -alter table `general_system_settings` rename column `daisySelectResearchAreaURL` to `daisy_select_research_area_url`; -alter table `general_system_settings` rename column `projectPartnerDaysToLive` to `project_partner_days_to_live`; -alter table `general_system_settings` rename column `mailNotifications` to `mail_notifications`; -alter table `general_system_settings` rename column `mailFromName` to `mail_from_name`; -alter table `general_system_settings` rename column `systemFromMail` to `system_from_mail`; -alter table `general_system_settings` rename column `smtpServer` to `smtp_server`; -alter table `general_system_settings` rename column `peerDisplayLatestReviews` to `peer_display_latest_reviews`; -alter table `general_system_settings` rename column `numberOfLatestReviewsDisplayed` to `number_of_latest_reviews_displayed`; -alter table `general_system_settings` rename column `publicReviewsActivated` to `public_reviews_activated`; -alter table `general_system_settings` rename column `peerDownloadEnabled` to `peer_download_enabled`; -alter table `general_system_settings` rename column `sciproURL` to `scipro_url`; -alter table `general_system_settings` rename column `showSingleSignOn` to `show_single_sign_on`; -alter table `general_system_settings` rename column `matchResponsibleMail` to `match_responsible_mail`; -alter table `general_system_settings` rename column `reviewerSupportMail` to `reviewer_support_mail`; -alter table `general_system_settings` rename column `thesisSupportMail` to `thesis_support_mail`; -alter table `general_system_settings` rename column `externalRoomBookingURL` to `external_room_booking_url`; -alter table `general_system_settings` rename column `externalGettingStartedWithIdeaURL` to `external_getting_started_with_idea_url`; -alter table `general_system_settings` rename column `externalGradingURL` to `external_grading_url`; -alter table `general_system_settings` rename column `finalSurveyAvailable` to `final_survey_available`; -alter table `general_system_settings` rename column `activeProjectIdeaSupportMail` to `active_project_idea_support_mail`; - -/* - * Step 5: table user and related tables. - * - * Table user is one of four fundamental tables (other three: project, file_reference, ProjectType). All four - * tables have many foreign keys referenced to them. - * - * Related tables of table user are the tables which have no relationship with other three fundamental tables. Their - * foreign key references end at table user. - */ - --- table: Program and user_program - -alter table `user_program` drop foreign key `user_program_program_id`; -alter table `user_program` drop key `user_program_program_id`; - -alter table `user_program` drop foreign key `user_program_user_id`; - -rename table `Program` to `program`; - -alter table `program` rename column `externalId` to `external_id`; -alter table `program` rename column `name` to `name_sv`; -alter table `program` rename column `nameEn` to `name_en`; - -alter table `user_program` - add constraint fk_user_program_program_id - foreign key (program_id) references program (id) - on delete cascade on update cascade; - -alter table `user_program` - add constraint fk_user_program_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: note - -alter table `note` drop foreign key `note_ibfk_1`; -alter table `note` drop key `user_id`; - -alter table `note` - add constraint fk_note_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: comment and comment_thread - -alter table `comment` drop foreign key `FK38A5EE5FE44F4DBE`; -alter table `comment` drop foreign key `FK38A5EE5F45F802F5`; -alter table `comment` drop key `FK38A5EE5FE44F4DBE`; -alter table `comment` drop key `FK38A5EE5F45F802F5`; - -alter table `comment_thread` drop key `UK_s0ve8ppa3snl8i1wocqwiuwn2`; -alter table `comment_thread` drop key `commentableKey`; - -alter table comment_thread rename column `commentableId` to `commentable_id`; -alter table comment_thread rename column `commentableKey` to `commentable_key`; - -alter table `comment_thread` add constraint uk_comment_thread_id_key unique(commentable_id, commentable_key); - -alter table comment rename column `commentThread_id` to `comment_thread_id`; -alter table comment rename column `creator_id` to `creator_user_id`; - -alter table `comment` - add constraint fk_comment_creator_user_id - foreign key (creator_user_id) references user (id) - on delete cascade on update cascade; - -alter table `comment` - add constraint fk_comment_comment_thread_id - foreign key (comment_thread_id) references comment_thread (id) - on delete cascade on update cascade; - --- table: reviewer_target - -alter table `reviewer_target` drop foreign key `FK_ReviewerTarget_ReviewerId`; -alter table `reviewer_target` drop key `UK_ReviewerTarget_ReviewerId_Year`; - -alter table `reviewer_target` rename column `reviewer_id` to `reviewer_user_id`; - -alter table `reviewer_target` add constraint uk_reviewer_target_reviewer_user_id_year unique(reviewer_user_id, year); - -alter table `reviewer_target` - add constraint fk_reviewer_target_reviewer_user_id - foreign key (reviewer_user_id) references user (id) - on delete cascade on update cascade; - --- table: notification_delivery_configuration - -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; - --- table: username - -alter table `username` drop foreign key `FK_17moq4bksxe30ihucce3jovdc`; -alter table `username` drop key `FK_17moq4bksxe30ihucce3jovdc`; -alter table `username` drop key `username_must_be_unique`; - -alter table `username` add constraint uk_username unique(username); - -alter table `username` - add constraint fk_username_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: user_role - -alter table `user_role` drop foreign key `user_role_user_id`; - -alter table `user_role` - add constraint fk_user_role_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: user_languages - -alter table `user_languages` drop foreign key `user_languages_user_id`; -alter table `user_languages` drop key `user_languages_user_id`; - -rename table `user_languages` to `user_language`; - -alter table `user_language` - add constraint fk_user_language_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - -/* - * table: user, unit and Password - */ - -alter table `user` drop foreign key `FK_hpmviec1b7vdg23xtxsalwxw8`; -alter table `user` drop key `FK_hpmviec1b7vdg23xtxsalwxw8`; - -alter table `user` drop foreign key `user_unit_id`; -alter table `user` drop key `user_unit_id`; - -alter table `user` drop key `identifier`; -alter table `user` drop key `deleted_index`; - --- rename columns in table user - -alter table `user` rename column `emailAddress` to `email_address`; -alter table `user` rename column `firstName` to `first_name`; -alter table `user` rename column `lastName` to `last_name`; -alter table `user` rename column `fullName` to `full_name`; -alter table `user` rename column `degreeType` to `degree_type`; - -alter table `user` add constraint uk_user_identifier unique(identifier); -create index idx_user_deleted on user(deleted); - --- table: unit - -alter table `unit` drop key `identifier`; - -alter table `unit` rename column `matchResponsible` to `match_responsible`; - -alter table `unit` add constraint uk_unit_identifier unique(identifier); - --- add FK from user to unit - -alter table `user` - add constraint fk_user_unit_id - foreign key (unit_id) references unit (id) - on delete cascade on update cascade; - --- table: Password - -alter table `Password` drop foreign key `FK_43erxladp39q03wrco68hi9iq`; -alter table `Password` drop key `FK_43erxladp39q03wrco68hi9iq`; -alter table `Password` drop key `FK4C641EBB895349BF`; -alter table `Password` drop key `deleted_index`; -alter table `Password` drop key `UK_43erxladp39q03wrco68hi9iq`; -alter table `Password` drop key `user_id`; - -rename table `Password` to `password`; - -alter table `password` add constraint uk_password_user_id unique(user_id); -create index idx_password_deleted on password(deleted); - -alter table `password` - add constraint fk_password_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- add FK from user till password - -alter table `user` - add constraint fk_user_password_id - foreign key (password_id) references password (id) - on delete cascade on update cascade; - --- table: user_profile - -alter table `user_profile` drop foreign key `FK_user_profile_user`; -alter table `user_profile` drop key `FK487E2135895349BF`; -alter table `user_profile` drop key `UK_ebc21hy5j7scdvcjt0jy6xxrv`; -alter table `user_profile` drop key `user_id`; - -alter table `user_profile` rename column `otherInfo` to `other_info`; -alter table `user_profile` rename column `phoneNumber` to `phone_number`; -alter table `user_profile` rename column `skypeId` to `skype_id`; -alter table `user_profile` rename column `mailCompilation` to `mail_compilation`; -alter table `user_profile` drop column `threadedForum`; -alter table `user_profile` rename column `defaultSupervisorFilter` to `default_supervisor_filter`; -alter table `user_profile` rename column `selectedRole` to `selected_role`; - -alter table `user_profile` add constraint uk_user_profile_user_id unique(user_id); - -alter table `user_profile` - add constraint fk_user_profile_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: user_profile_default_project_status_filter - -alter table `UserProfile_defaultProjectStatusFilter` drop foreign key `FK_user_profile_project_status_user_profile`; -alter table `UserProfile_defaultProjectStatusFilter` drop key `FK_icub74l6htav89sx85ar4qcqg`; - -rename table `UserProfile_defaultProjectStatusFilter` to `user_profile_default_project_status_filter`; - -alter table `user_profile_default_project_status_filter` rename column `UserProfile_id` to `user_profile_id`; -alter table `user_profile_default_project_status_filter` rename column `defaultProjectStatusFilter` to `default_project_status_filter`; - -alter table `user_profile_default_project_status_filter` - add constraint fk_user_profile_default_project_status_filter_user_profile_id - foreign key (user_profile_id) references user_profile (id) - on delete cascade on update cascade; - --- table: user_profile_default_project_team_member_roles_filter - -alter table `UserProfile_defaultProjectTeamMemberRolesFilter` drop foreign key `FK_user_profile_role_user_profile`; -alter table `UserProfile_defaultProjectTeamMemberRolesFilter` drop key `FK_ibub74l6htav89sx85ar4qcqg`; - -rename table `UserProfile_defaultProjectTeamMemberRolesFilter` to `user_profile_default_project_team_member_roles_filter`; - -alter table `user_profile_default_project_team_member_roles_filter` rename column `UserProfile_id` to `user_profile_id`; -alter table `user_profile_default_project_team_member_roles_filter` rename column `defaultProjectTeamMemberRolesFilter` to `default_project_team_member_roles_filter`; - -alter table `user_profile_default_project_team_member_roles_filter` - add constraint fk_up_dp_tm_roles_filter_user_profile_id - foreign key (user_profile_id) references user_profile (id) - on delete cascade on update cascade; - -/* - * Step 6: table ProjectType and related tables. - * - * Table ProjectType is one of four fundamental tables (other three: project, file_reference, user). All four - * tables have many foreign keys referenced to them. - * - * Table ProjectType has 12 foreign keys referenced to it, this part is the most complex part of this refactoring. - */ - --- table: user_profile_ProjectType, except foreign key to coming table project_type - -alter table `user_profile_ProjectType` drop foreign key `FK_user_profile_project_type_user_profile`; -alter table `user_profile_ProjectType` drop foreign key `FK_76s8320kw3w7bxp6lw7pmawfh`; -alter table `user_profile_ProjectType` drop key `FK_2blea2vk0b5cvgxjo1fy4p2j0`; -alter table `user_profile_ProjectType` drop key `FK_76s8320kw3w7bxp6lw7pmawfh`; - -rename table `user_profile_ProjectType` to `user_profile_project_type`; - -alter table `user_profile_project_type` rename column `defaultProjectTypeFilter_id` to `project_type_id`; - -alter table `user_profile_project_type` - add constraint fk_user_profile_project_type_user_profile_id - foreign key (user_profile_id) references user_profile (id) - on delete cascade on update cascade; - --- table: ExternalResource, except foreign key to coming table project_type - -alter table `ExternalResource` drop foreign key `ExternalResource_ProjectType_relevantFor`; -alter table `ExternalResource` drop key `ExternalResource_ProjectType_relevantFor`; - -rename table `ExternalResource` to `external_resource`; - -alter table `external_resource` rename column `relevantFor_id` to `project_type_id`; - --- table: project_type_project_modules, except foreign key to coming table project_type - -alter table `project_type_project_modules` drop foreign key `FK_4attsf1e22qpveesgl6o9b7lg`; -alter table `project_type_project_modules` drop key `FK_4attsf1e22qpveesgl6o9b7lg`; -alter table `project_type_project_modules` drop primary key; - -rename table `project_type_project_modules` to `project_type_project_module`; - -alter table `project_type_project_module` rename column `ProjectType_id` to `project_type_id`; -alter table `project_type_project_module` rename column `projectModules` to `project_module`; - -alter table `project_type_project_module` add primary key (project_type_id, project_module); - --- table: project_type_settings, except foreign key to coming table project_type - -alter table `project_type_settings` drop foreign key `FK_project_class_settings_projectType`; -alter table `project_type_settings` drop key `FK_oxqyb1t8jo7cq2fx8j9slvloa`; -alter table `project_type_settings` drop key `UK_project_class_settings_projectType`; - -alter table `project_type_settings` rename column `numDaysBetweenPeerReviewsOnSameProject` to `num_days_between_peer_reviews_on_same_project`; -alter table `project_type_settings` rename column `numDaysToSubmitPeerReview` to `num_days_to_submit_peer_review`; -alter table `project_type_settings` rename column `projectType_id` to `project_type_id`; -alter table `project_type_settings` rename column `numDaysBeforePeerGetsCancelled` to `num_days_before_peer_gets_cancelled`; -alter table `project_type_settings` rename column `minAuthors` to `min_authors`; -alter table `project_type_settings` rename column `maxAuthors` to `max_authors`; -alter table `project_type_settings` rename column `maxFinalSeminarActiveParticipation` to `max_final_seminar_active_participation`; -alter table `project_type_settings` rename column `maxOpponentsOnFinalSeminar` to `max_opponents_on_final_seminar`; -alter table `project_type_settings` rename column `minFinalSeminarActiveParticipation` to `min_final_seminar_active_participation`; -alter table `project_type_settings` rename column `minOpponentsOnFinalSeminar` to `min_opponents_on_final_seminar`; -alter table `project_type_settings` rename column `minimumOppositionsToBeGraded` to `min_oppositions_to_be_graded`; -alter table `project_type_settings` rename column `minimumActiveParticipationsToBeGraded` to `min_active_participations_to_be_graded`; - -alter table `project_type_settings` add constraint uk_project_type_settings_project_type_id unique(project_type_id); - --- table: grading_report_template, except foreign key to coming table project_type - -alter table `grading_report_template` drop foreign key `FK_grading_report_template_projectType`; -alter table `grading_report_template` drop key `FK_qovbb9ql33oaxprfr01w7ss9u`; -alter table `grading_report_template` drop key `UK_only_one_template_per_date_and_type`; - -alter table `grading_report_template` change `projectType_id` `project_type_id` bigint(20) not null after `failing_grade`; - -alter table `grading_report_template` add constraint uk_grading_report_template_project_type_id_valid_from unique(project_type_id, valid_from); - --- table: grading_report_template_grade_limits - -alter table `grading_report_template_grade_limits` drop foreign key `FK_grade_limit_grading_report_template `; -alter table `grading_report_template_grade_limits` drop key `UK_one_grade_per_template`; - -rename table `grading_report_template_grade_limits` to `grading_report_template_grade_limit`; - -alter table `grading_report_template_grade_limit` change `grading_report_template_id` `grading_report_template_id` bigint(20) default null after `lower_limit`; - -alter table `grading_report_template_grade_limit` add constraint uk_grt_gl_grading_report_template_id_grade unique (grading_report_template_id, grade); - -alter table `grading_report_template_grade_limit` - add constraint fk_grt_gl_grading_report_template_id - foreign key (grading_report_template_id) references grading_report_template (id) - on delete cascade on update cascade; - -/* >>> START: table grading_criterion_template, GradingCriterion and criterion share same JPA MappedSuperclass, must be handled together. */ - --- table: criterion (partially, only rename three columns, since this table criterion shares same --- JPA MappedSuperclass AbstractCriterion with grading_criterion_template, and GradingCriterion - -alter table `criterion` rename column `title` to `title_sv`; -alter table `criterion` rename column `titleEn` to `title_en`; -alter table `criterion` rename column `sortOrder` to `sort_order`; - --- table: GradingCriterion (partially, only rename four columns, since this table GradingCriterion shares same --- JPA MappedSuperclass AbstractCriterion and AbstractGradingCriterion with grading_criterion_template. - -alter table `GradingCriterion` rename column `title` to `title_sv`; -alter table `GradingCriterion` rename column `titleEn` to `title_en`; -alter table `GradingCriterion` rename column `sortOrder` to `sort_order`; -alter table `GradingCriterion` rename column `pointsRequiredToPass` to `points_required_to_pass`; - --- table: grading_criterion_template - -alter table `grading_criterion_template` drop foreign key `FK_b37xw6uyfj98ff2tsn5t8x5q`; -alter table `grading_criterion_template` drop key `FK_b37xw6uyfj98ff2tsn5t8x5q`; - -alter table `grading_criterion_template` rename column `title` to `title_sv`; -alter table `grading_criterion_template` rename column `titleEn` to `title_en`; -alter table `grading_criterion_template` rename column `sortOrder` to `sort_order`; -alter table `grading_criterion_template` rename column `pointsRequiredToPass` to `points_required_to_pass`; -alter table `grading_criterion_template` rename column `gradingReportTemplate_id` to `grading_report_template_id`; - -alter table `grading_criterion_template` - add constraint fk_gct_grading_report_template_id - foreign key (grading_report_template_id) references grading_report_template (id) - on delete cascade on update cascade; - -/* >>> END: */ - -/* >>> START: table grading_criterion_point_template and GradingCriterionPoint share same JPA MappedSuperclass, must be handled together. */ - --- table: GradingCriterionPoint (partially, only rename two columns since this table and grading_criterion_pint_template --- shares same MappedSuperclass AbstractGradingCriterionPoint. - -alter table `GradingCriterionPoint` rename column `description` to `description_sv`; -alter table `GradingCriterionPoint` rename column `descriptionEn` to `description_en`; - --- table: grading_criterion_point_template - -alter table `grading_criterion_point_template` drop foreign key `FK_gradingCriterionTemplate_id`; -alter table `grading_criterion_point_template` drop key `FK_gradingCriterionTemplate_id`; - -alter table `grading_criterion_point_template` rename column `description` to `description_sv`; -alter table `grading_criterion_point_template` rename column `descriptionEn` to `description_en`; -alter table `grading_criterion_point_template` rename column `gradingCriterionTemplate_id` to `grading_criterion_template_id`; - -alter table `grading_criterion_point_template` - add constraint fk_gc_pt_grading_criterion_template_id - foreign key (grading_criterion_template_id) references grading_criterion_template (id) - on delete cascade on update cascade; - -/* >>> END: */ - --- table: checklist_template_ProjectType, except foreign key to coming table project_type - -alter table `checklist_template_ProjectType` drop foreign key `FK_checklist_template_projectType_id`; -alter table `checklist_template_ProjectType` drop foreign key `FK_checklist_template_degree_level_checklist_template_id`; -alter table `checklist_template_ProjectType` drop key `FK_checklist_template_projectType_id`; -alter table `checklist_template_ProjectType` drop primary key; - -rename table `checklist_template_ProjectType` to `checklist_template_project_type`; - -alter table `checklist_template_project_type` rename column `projectType_id` to `project_type_id`; - -alter table `checklist_template_project_type` add primary key (checklist_template_id, project_type_id); - -alter table `checklist_template_project_type` - add constraint fk_ct_pt_checklist_template_id - foreign key (checklist_template_id) references checklist_template (id) - on delete cascade on update cascade; - --- table: milestone_activity_template_ProjectType, except foreign key to coming table project_type - -alter table `milestone_activity_template_ProjectType` drop foreign key `FKFB3FC75180E42A0F`; -alter table `milestone_activity_template_ProjectType` drop foreign key `FKFB3FC75157F6B071`; -alter table `milestone_activity_template_ProjectType` drop key `FKFB3FC75180E42A0F`; -alter table `milestone_activity_template_ProjectType` drop key `FKFB3FC75157F6B071`; -alter table `milestone_activity_template_ProjectType` drop primary key; - -rename table `milestone_activity_template_ProjectType` to `milestone_activity_template_project_type`; - -alter table `milestone_activity_template_project_type` rename column `projectTypes_id` to `project_type_id`; - -alter table `milestone_activity_template_project_type` add primary key (`milestone_activity_template_id`, `project_type_id`); - -alter table `milestone_activity_template_project_type` - add constraint fk_ma_tpt_milestone_activity_template_id - foreign key (milestone_activity_template_id) references milestone_activity_template (id) - 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`; - --- table: project, we only remove foreign key from project to ProjectType and rename the column projectType_id here. --- This table has many related tables and will be fixed later. - -alter table `project` drop foreign key `FK_project_projectType`; -alter table `project` drop key `FKED904B19B2B6081F`; - -alter table `project` rename column `projectType_id` to `project_type_id`; - -/* - * Table target, projectPartner and ApplicationPeriodProjectType has not only foreign key referencing table ProjectType, - * but also foreign key referencing table ApplicationPeriod. Table ApplicationPeriodProjectType references to - * ActivityPlanTemplate as well. - * - * Table ActivityTemplate, ActivityPlanTemplate, ApplicationPeriod using camel case naming convention, - * ApplicationPeriod has a related table, applicationperiodexemption, and they all need to - * fixed as well, before ProjectType can be fixed. A foreign key from table idea to ApplicationPeriod needs to be removed - * before table ApplicationPeriod can be fixed. - * - * Removal of foreign keys and renaming of columns and table name must be fixed in following order: - * - * 1. target, projectPartner, ApplicationPeriodProjectType - * 2. ActivityTemplate and ActivityPlanTemplate - * 3. ApplicationPeriod, applicationperiodexcemption, and idea as well - * - * Foreign keys will be then added in reverse order, it's like a stack pop. - */ - --- >>> STACK PUSH: 1st table group: target, projectPartner, ApplicationPeriodProjectType - --- table: target, except foreign key to coming table project_type, and application_period - -alter table `target` drop foreign key `target_user_id`; -alter table `target` drop foreign key `FKCB7E7191A520201Eb`; -alter table `target` drop foreign key `FKCB7E7191790761A4b`; -alter table `target` drop key `FKCB7E7191A520201E`; -alter table `target` drop key `FKCB7E7191790761A4`; -alter table `target` drop primary key; - -alter table `target` rename column `applicationPeriodId` to `application_period_id`; -alter table `target` rename column `projectTypeId` to `project_type_id`; - -alter table `target` add primary key (application_period_id, project_type_id, user_id); - -alter table `target` - add constraint fk_target_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: projectPartner, except foreign key to coming table project_type, and application_period - -alter table `projectPartner` drop foreign key `FK_project_partner_project_type`; -alter table `projectPartner` drop foreign key `FK_ProjectPartner_ApplicationPeriod_applicationPeriod`; -alter table `projectPartner` drop foreign key `FK1882B6F895349BF`; -alter table `projectPartner` drop key `FK_ProjectPartner_ApplicationPeriod_applicationPeriod`; -alter table `projectPartner` drop key `FK_project_partner_project_type`; -alter table `projectPartner` drop key `FK1882B6F895349BF`; - -rename table `projectPartner` to `project_partner`; - -alter table `project_partner` rename column `infotext` to `info_text`; -alter table `project_partner` rename column `projectType_id` to `project_type_id`; -alter table `project_partner` rename column `applicationPeriod_id` to `application_period_id`; - -alter table `project_partner` - add constraint fk_project_partner_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: ApplicationPeriodProjectType, except foreign key to coming table application_period, project_type and activity_plan_template. - -alter table `ApplicationPeriodProjectType` drop foreign key `FK_hqebt63rl2mhogp66dy5m7upo`; -alter table `ApplicationPeriodProjectType` drop foreign key `FK_546usee339qh4g5otguwka3hi`; -alter table `ApplicationPeriodProjectType` drop foreign key `FK_3ku67jvegs1xxh8ykk023i7sb`; -alter table `ApplicationPeriodProjectType` drop key `FK_3ku67jvegs1xxh8ykk023i7sb`; -alter table `ApplicationPeriodProjectType` drop key `FK_546usee339qh4g5otguwka3hi`; -alter table `ApplicationPeriodProjectType` drop key `FK_hqebt63rl2mhogp66dy5m7upo`; -alter table `ApplicationPeriodProjectType` drop primary key; - -rename table `ApplicationPeriodProjectType` to `application_period_project_type`; - -alter table `application_period_project_type` rename column `applicationPeriod_id` to `application_period_id`; -alter table `application_period_project_type` rename column `projectType_id` to `project_type_id`; -alter table `application_period_project_type` rename column `activityPlanTemplate_id` to `activity_plan_template_id`; - -alter table `application_period_project_type` add primary key (application_period_id, project_type_id); - --- >>> STACK PUSH: 2nd table group: ActivityPlanTemplate and ActivityTemplate - --- table: ActivityTemplate, except foreign key to coming table activity_plan_template - -alter table `ActivityTemplate` drop foreign key `FK_ca5bhq3i6p2g292fo5l4fqtf`; -alter table `ActivityTemplate` drop foreign key `FK_activity_template_checklist_template`; -alter table `ActivityTemplate` drop key `FKD4434665C5FC509F`; -alter table `ActivityTemplate` drop key `FK_ca5bhq3i6p2g292fo5l4fqtf`; -alter table `ActivityTemplate` drop key `FK_667ye6la0yb5obk64v21knimn`; - -rename table `ActivityTemplate` to `activity_template`; - -alter table `activity_template` rename column `numberInOrder` to `number_in_order`; -alter table `activity_template` rename column `activityPlanTemplate_id` to `activity_plan_template_id`; -alter table `activity_template` rename column `daysOffset` to `days_offset`; -alter table `activity_template` rename column `checkListTemplate_id` to `checklist_template_id`; - -alter table `activity_template` - add constraint fk_activity_template_checklist_template_id - foreign key (checklist_template_id) references checklist_template (id) - on delete set null on update cascade; - --- table: ActivityPlanTemplate (at this stage, no any foreign key is referenced to ActivityPlanTemplate) - -alter table `ActivityPlanTemplate` drop foreign key `FK_rgwf80yvcy2msbb6g80bae10p`; -alter table `ActivityPlanTemplate` drop key `FK_rgwf80yvcy2msbb6g80bae10p`; -alter table `ActivityPlanTemplate` drop key `FKACCF6522E44F4DBE`; - -rename table `ActivityPlanTemplate` to `activity_plan_template`; - -alter table `activity_plan_template` rename column `isSysAdminTemplate` to `is_sys_admin_template`; -alter table `activity_plan_template` rename column `creator_id` to `creator_user_id`; - -alter table `activity_plan_template` - add constraint fk_activity_plan_template_creator_user_id - foreign key (creator_user_id) references user (id) - on delete cascade on update cascade; - --- Add back all foreign key references to activity_plan_template - --- add foreign key reference from activity_template to activity_plan_template -alter table `activity_template` - add constraint fk_activity_template_activity_plan_template_id - foreign key (activity_plan_template_id) references activity_plan_template (id) - on delete cascade on update cascade; - --- add foreign key reference from application_period_project_type to activity_plan_template -alter table `application_period_project_type` - add constraint fk_ap_pt_activity_plan_template_id - foreign key (activity_plan_template_id) references activity_plan_template (id) - on delete cascade on update cascade; - --- >>> STACK POP: 2nd table group (ActivityPlanTemplate and ActivityTemplate) is done!!! - --- >>> STACK PUSH: 3rd table group: ApplicationPeriod, applicationperiodexemption, idea - --- table: applicationperiodexeption, except foreign key reference to coming table application_period - -alter table `applicationperiodexemption` drop foreign key `fk_application_period_exemption_user`; -alter table `applicationperiodexemption` drop foreign key `fk_application_period_exemption_application_period`; -alter table `applicationperiodexemption` drop foreign key `FK_4p3he5fymtmdgbkl3xwrodq36`; -alter table `applicationperiodexemption` drop key `i_user_application_period`; -alter table `applicationperiodexemption` drop key `i_application_period`; -alter table `applicationperiodexemption` drop key `i_user`; -alter table `applicationperiodexemption` drop key `FK_4p3he5fymtmdgbkl3xwrodq36`; -alter table `applicationperiodexemption` drop primary key; - -rename table `applicationperiodexemption` to `application_period_exemption`; - -alter table `application_period_exemption` rename column `endDate` to `end_date`; -alter table `application_period_exemption` rename column `grantedBy_id` to `granted_by_id`; -alter table `application_period_exemption` rename column `grantedOn` to `granted_on`; -alter table `application_period_exemption` rename column `applicationPeriodId` to `application_period_id`; - -alter table `application_period_exemption` add primary key (`application_period_id`,`user_id`,`type`); - -alter table `application_period_exemption` - add constraint fk_ape_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - -alter table `application_period_exemption` - add constraint fk_ape_granted_by_id - foreign key (granted_by_id) references user (id) - on delete cascade on update cascade; - --- table: idea, we only remove foreign key from idea to ApplicationPeriod and rename the column applicationPeriod_id here. --- This table has many related tables and will be fixed later. - -alter table `idea` drop foreign key `FK6E051897BEC322C1`; -alter table `idea` drop key `FK6E051897BEC322C1`; - -alter table `idea` rename column `applicationPeriod_id` to `application_period_id`; - --- table: ApplicationPeriod (at this stage, no any foreign key is referenced to ApplicationPeriod) - -rename table `ApplicationPeriod` to `application_period`; - -alter table `application_period` rename column `endDate` to `end_date`; -alter table `application_period` rename column `startDate` to `start_date`; -alter table `application_period` rename column `courseStartDate` to `course_start_date`; -alter table `application_period` rename column `courseEndDate` to `course_end_date`; - --- Add back all foreign key references to application_period, since table application_period is ready - --- add back foreign key reference from ide to application_period -alter table `idea` - add constraint fk_idea_application_period_id - foreign key (application_period_id) references application_period (id) - on delete cascade on update cascade; - --- add back foreign key reference from application_period_exemption to application_period -alter table `application_period_exemption` - add constraint fk_ape_application_period_id - foreign key (application_period_id) references application_period (id) - on delete cascade on update cascade; - --- >>> STACK POP: 3rd table group: ApplicationPeriod, applicationperiodexemption, idea is done!!! - --- add back foreign key reference from application_period_project_type to application_period -alter table `application_period_project_type` - add constraint fk_ap_pt_application_period_id - foreign key (application_period_id) references application_period (id) - on delete cascade on update cascade; - --- add back foreign key reference from project_partner to application_period -alter table `project_partner` - add constraint fk_project_partner_application_period_id - foreign key (application_period_id) references application_period (id) - on delete cascade on update cascade; - --- add back foreign key reference from target to application_period -alter table `target` - add constraint fk_target_application_period_id - foreign key (application_period_id) references application_period (id) - on delete cascade on update cascade; - --- table: ProjectType (finally!! at this stage, no any foreign key is referenced to ProjectType) - -rename table `ProjectType` to `project_type`; - -alter table `project_type` rename column `degreeType` to `degree_type`; - --- Add back all foreign key references to project_type - --- add back foreign key reference from application_period_project_type to project_type -alter table `application_period_project_type` - add constraint fk_ap_pt_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from project_partner to project_type -alter table `project_partner` - add constraint fk_project_partner_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from target to project_type -alter table `target` - add constraint fk_target_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- >>> STACK POP: 1st table group: target, projectPartner, ApplicationPeriodProjectType is done!!! - --- add back foreign key reference from project to project_type -alter table `project` - add constraint fk_project_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back 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 back foreign key reference from milestone_activity_template_project_type to project_type -alter table `milestone_activity_template_project_type` - add constraint fk_ma_tpt_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from checklist_template_project_type to project_type -alter table `checklist_template_project_type` - add constraint fk_ct_pt_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from grading_report_template to project_type -alter table `grading_report_template` - add constraint fk_grading_report_template_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from project_type_settings to project_type -alter table `project_type_settings` - add constraint fk_project_type_settings_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from project_type_project_module to project_type -alter table `project_type_project_module` - add constraint fk_project_type_project_module_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from external_resource to project_type -alter table `external_resource` - add constraint fk_external_resource_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - --- add back foreign key reference from user_profile_project_type to project_type. -alter table `user_profile_project_type` - add constraint fk_user_profile_project_type_project_type_id - foreign key (project_type_id) references project_type (id) - on delete cascade on update cascade; - -/* - * Step 7: checklist related tables - */ - --- table: checklist_checklist_question - -alter table `checklist_checklist_question` drop foreign key `FKC77ED98C64F9D54`; -alter table `checklist_checklist_question` drop foreign key `FKC77ED981F327355`; -alter table `checklist_checklist_question` drop key `FKC77ED981F327355`; -alter table `checklist_checklist_question` drop key `FKC77ED98C64F9D54`; -alter table `checklist_checklist_question` drop key `UK_o5ndj9lydqv17attv7uf8wlr`; -alter table `checklist_checklist_question` drop key `questions_id`; -alter table `checklist_checklist_question` drop primary key; - -alter table `checklist_checklist_question` rename column `questions_id` to `checklist_question_id`; - -alter table `checklist_checklist_question` add primary key (checklist_id, checklist_question_id); - -alter table `checklist_checklist_question` add constraint uk_ccq_checklist_question_id unique(checklist_question_id); - -alter table `checklist_checklist_question` - add constraint fk_ccq_checklist_question_id - foreign key (checklist_question_id) references checklist_question (id) - on delete cascade on update cascade; - -alter table `checklist_checklist_question` - add constraint fk_ccq_checklist_id - foreign key (checklist_id) references checklist (id) - on delete cascade on update cascade; - --- table: Checklist_userLastOpenDate - -alter table `Checklist_userLastOpenDate` drop foreign key `FKF7E07AB26D025A9`; -alter table `Checklist_userLastOpenDate` drop foreign key `FKF7E07AB21F327355`; -alter table `Checklist_userLastOpenDate` drop key `FKF7E07AB26D025A9`; -alter table `Checklist_userLastOpenDate` drop key `FKF7E07AB21F327355`; -alter table `Checklist_userLastOpenDate` drop primary key; - -rename table `Checklist_userLastOpenDate` to `checklist_user_last_open_date`; - -alter table `checklist_user_last_open_date` rename column `CheckList_id` to `checklist_id`; -alter table `checklist_user_last_open_date` rename column `userLastOpenDate` to `last_open_date`; -alter table `checklist_user_last_open_date` rename column `userLastOpenDate_KEY` to `user_id`; - -alter table `checklist_user_last_open_date` add primary key (checklist_id, user_id); - -alter table `checklist_user_last_open_date` - add constraint fk_cu_lod_checklist_id - foreign key (checklist_id) references checklist(id) - on delete cascade on update cascade; - -alter table `checklist_user_last_open_date` - add constraint fk_cu_lod_user_id - foreign key (user_id) references user(id) - on delete cascade on update cascade; - --- table: checklist_checklist_category - -alter table `checklist_checklist_category` drop foreign key `FK54F86EB08725F1D`; -alter table `checklist_checklist_category` drop foreign key `FK54F86EB01F327355`; -alter table `checklist_checklist_category` drop key `FK54F86EB08725F1D`; -alter table `checklist_checklist_category` drop key `FK54F86EB01F327355`; - -alter table `checklist_checklist_category` rename column `categories_id` to `checklist_category_id`; - -alter table `checklist_checklist_category` - add constraint fk_cca_checklist_id - foreign key (checklist_id) references checklist (id) - on delete cascade on update cascade; - -alter table `checklist_checklist_category` - add constraint fk_cca_checklist_category_id - foreign key (checklist_category_id) references checklist_category (id) - on delete cascade on update cascade; - --- table: checklist_category - -alter table `checklist_category` drop key `categoryName`; -alter table `checklist_category` rename column `categoryName` to `category_name`; - -alter table `checklist_category` add constraint uk_checklist_category_category_name unique(category_name); - --- table: checklist - -alter table `checklist` drop foreign key `FK_checklist_project`; -alter table `checklist` drop key `I_checkList_activity`; - -alter table `checklist` - add constraint fk_checklist_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table : checklist_question_checklist_answer - -alter table `checklist_question_checklist_answer` drop foreign key `FK86395A5787D18D44`; -alter table `checklist_question_checklist_answer` drop foreign key `FK86395A574BFBD702`; -alter table `checklist_question_checklist_answer` drop key `FK86395A574BFBD702`; -alter table `checklist_question_checklist_answer` drop key `UK_47is0po5b69467hxbgr4a2gph`; -alter table `checklist_question_checklist_answer` drop key `answers_id`; - -alter table `checklist_question_checklist_answer` rename column `answers_id` to `checklist_answer_id`; - -alter table `checklist_question_checklist_answer` add constraint uk_cq_ca_checklist_answer_id unique(checklist_answer_id); - -alter table `checklist_question_checklist_answer` - add constraint fk_cq_ca_checklist_answer_id - foreign key (checklist_answer_id) references checklist_answer (id) - on delete cascade on update cascade; - -alter table `checklist_question_checklist_answer` - add constraint fk_cq_ca_checklist_question_id - foreign key (checklist_question_id) references checklist_question (id) - on delete cascade on update cascade; - --- table: checklist_answer - -alter table `checklist_answer` drop foreign key `FK49936477895349BF`; -alter table `checklist_answer` drop key `FK49936477895349BF`; - -alter table `checklist_answer` - add constraint fk_checklist_answer_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- update to NOT_APPLICABLE because of typo in code -update `checklist_answer` set answer = 'NOT_APPLICABLE' where answer = 'NOT_APLICABLE'; -update `answer` set answer = 'NOT_APPLICABLE' where answer = 'NOT_APLICABLE'; - --- table: checklist_question - -alter table `checklist_question` rename column `questionNumber` to `question_number`; - --- table: ChecklistTemplate_questions - -alter table `ChecklistTemplate_questions` drop foreign key `FK872F7C0E869F0235`; -alter table `ChecklistTemplate_questions` drop key `FK872F7C0E869F0235`; - -rename table `ChecklistTemplate_questions` to `checklist_template_question`; - -alter table `checklist_template_question` rename column `CheckListTemplate_id` to `checklist_template_id`; -alter table `checklist_template_question` rename column `questions` to `question`; - -alter table `checklist_template_question` - add constraint fk_ctq_checklist_template_id - foreign key (checklist_template_id) references checklist_template (id) - on delete cascade on update cascade; - --- table: checklist_template_checklist_category - -alter table `checklist_template_checklist_category` drop foreign key `FK4E82F4438725F1D`; -alter table `checklist_template_checklist_category` drop foreign key `FK4E82F44372B51E82`; -alter table `checklist_template_checklist_category` drop key `FK4E82F4438725F1D`; -alter table `checklist_template_checklist_category` drop key `FK4E82F44372B51E82`; - -alter table `checklist_template_checklist_category` rename column `categories_id` to `checklist_category_id`; - -alter table `checklist_template_checklist_category` - add constraint fk_ct_cc_checklist_template_id - foreign key (checklist_template_id) references checklist_template (id) - on delete cascade on update cascade; - -alter table `checklist_template_checklist_category` - add constraint fk_ct_cc_checklist_category_id - foreign key (checklist_category_id) references checklist_category (id) - on delete cascade on update cascade; - --- table: checklist_template - -alter table `checklist_template` drop foreign key `FK14DA6F3E44F4DBE`; -alter table `checklist_template` drop key `FK14DA6F3E44F4DBE`; - -alter table `checklist_template` rename column `creator_id` to `creator_user_id`; -alter table `checklist_template` rename column `templateNumber` to `template_number`; - -alter table `checklist_template` - add constraint fk_checklist_template_creator_user_id - foreign key (creator_user_id) references user (id) - on delete cascade on update cascade; - -/* - * Step 8: Survey related related tables - */ - --- table: SurveyAnswer_multipleAnswers, except foreign key to coming table survey_answer - -alter table `SurveyAnswer_multipleAnswers` drop foreign key `FK_SA`; -alter table `SurveyAnswer_multipleAnswers` drop key `FK_SA`; - -rename table `SurveyAnswer_multipleAnswers` to `survey_answer_multiple_answers`; - -alter table `survey_answer_multiple_answers` rename column `SurveyAnswer_id` to `survey_answer_id`; -alter table `survey_answer_multiple_answers` rename column `multipleAnswers` to `multiple_answers`; - --- table: SurveyAnswer, except foreign key to coming table survey and question - -alter table `SurveyAnswer` drop foreign key `FK_answer_question`; -alter table `SurveyAnswer` drop foreign key `FK_answer_survey`; -alter table `SurveyAnswer` drop key `FK_answer_question`; -alter table `SurveyAnswer` drop key `FK_answer_survey`; - -rename table `SurveyAnswer` to `survey_answer`; - --- add back foreign key reference from survey_answer_multiple_answers to survey_answer - -alter table `survey_answer_multiple_answers` - add constraint fk_sama_survey_answer_id - foreign key (survey_answer_id) references survey_answer (id) - on delete cascade on update cascade; - --- table: Question_choices, except foreign key to coming table question - -alter table `Question_choices` drop foreign key `FK_question_choices_question`; -alter table `Question_choices` drop key `FK_question_choices_question`; - -rename table `Question_choices` to `question_choices`; - --- table: Question - -rename table `Question` to `question`; - --- add back foreign key reference from question_choices to question - -alter table `question_choices` - add constraint fk_question_choices_question_id - foreign key (question_id) references question (id) - on delete cascade on update cascade; - --- add back foreign key references from survey_answer to question - -alter table `survey_answer` - add constraint fk_survey_answer_question_id - foreign key (question_id) references question (id) - on delete cascade on update cascade; - --- table: survey - -alter table `Survey` drop foreign key `FK_survey_project`; -alter table `Survey` drop key `FK_survey_project`; -alter table `Survey` drop foreign key `FK_survey_user`; -alter table `Survey` drop key `FK_survey_user`; - -rename table `Survey` to `survey`; - -alter table `survey` - add constraint fk_survey_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `survey` - add constraint fk_survey_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- add back foreign key references from survey_answer to survey - -alter table `survey_answer` - add constraint fk_survey_answer_survey_id - foreign key (survey_id) references survey (id) - on delete cascade on update cascade; - -/* - * Step 9: Keyword and Research Area related tables - */ - --- table: Keyword_researcharea, except foreign keys to coming table keyword and research_area - -alter table `Keyword_researcharea` drop foreign key `FKF8C66F5E98ED461`; -alter table `Keyword_researcharea` drop key `FKF8C66F5E98ED461`; -alter table `Keyword_researcharea` drop foreign key `FKF8C66F5E6F20ECBC`; -alter table `Keyword_researcharea` drop key `FKF8C66F5E6F20ECBC`; - -rename table `Keyword_researcharea` to `keyword_research_area`; - -alter table `keyword_research_area` rename column `Keyword_id` to `keyword_id`; -alter table `keyword_research_area` rename column `researchAreas_id` to `research_area_id`; - --- table: idea_Keyword - -alter table `idea_Keyword` drop foreign key `FK3707EE21AE316F00`; -alter table `idea_Keyword` drop key `FK3707EE21AE316F00`; -alter table `idea_Keyword` drop foreign key `FK3707EE21BD1521C1`; - -alter table `idea_Keyword` drop primary key; - -rename table `idea_Keyword` to `idea_keyword`; - -alter table `idea_keyword` rename column `keywords_id` to `keyword_id`; - -alter table `idea_keyword` add primary key (idea_id, keyword_id); - -alter table `idea_keyword` - add constraint fk_idea_keyword_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - --- table: keyword - -alter table `Keyword` drop key `deleted_index`; - -rename table `Keyword` to `keyword`; - -create index idx_keyword_deleted on keyword (deleted); - --- add back foreign key reference from table idea_keyword to table keyword - -alter table `idea_keyword` - add constraint fk_idea_keyword_keyword_id - foreign key (keyword_id) references keyword (id) - on delete cascade on update cascade; - --- add back foreign key reference from table keyword_research_area to table keyword - -alter table `keyword_research_area` - add constraint fk_kra_keyword_id - foreign key (keyword_id) references keyword (id) - on delete cascade on update cascade; - --- table: user_research_area - -alter table `user_research_area` drop foreign key `user_research_area_user_id`; -alter table `user_research_area` drop foreign key `user_research_area_research_area_id`; -alter table `user_research_area` drop key `user_research_area_research_area_id`; - -alter table `user_research_area` - add constraint fk_ura_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- drop foreign key from idea to table researcharea before we can proceed with that table, --- change foreign key column name as well - -alter table `idea` drop foreign key `FK6E0518974E257FBF`; -alter table `idea` drop key `FK6E0518974E257FBF`; - -alter table `idea` rename column `researchArea_id` to `research_area_id`; - --- drop foreign key from project to table researcharea before we can proceed with that table, --- change foreign key column name as well - -alter table `project` drop foreign key `FK_research_area_id`; -alter table `project` drop key `FK_research_area_id`; - -alter table `project` rename column `researchArea_id` to `research_area_id`; - --- table: researcharea - -alter table `researcharea` drop key `deleted_index`; -alter table `researcharea` drop key `identifier`; - -rename table `researcharea` to `research_area`; - -create index idx_research_area_deleted on research_area (deleted); - -alter table `research_area` add constraint uk_research_area_identifier unique (identifier); - --- add back foreign key reference from table project to table research_area - -alter table `project` - add constraint fk_project_research_area_id - foreign key (research_area_id) references research_area (id) - on delete cascade on update cascade; - --- add back foreign key reference from table idea to table research_area - -alter table `idea` - add constraint fk_idea_research_area_id - foreign key (research_area_id) references research_area (id) - on delete cascade on update cascade; - --- add back foreign key reference from table user_research_area to table research_area - -alter table `user_research_area` - add constraint fk_ura_research_area_id - foreign key (research_area_id) references research_area (id) - on delete cascade on update cascade; - --- add back foreign key reference from table keyword_research_area to table research_area - -alter table `keyword_research_area` - add constraint fk_kra_research_area_id - foreign key (research_area_id) references research_area (id) - on delete cascade on update cascade; - -/* - * Step 10: idea related tables - */ - --- table: idea - -alter table `idea` drop foreign key `FK6E051897B9431B73`; -alter table `idea` drop foreign key `FK6E051897C1813915`; -alter table `idea` drop foreign key `FK6E051897E44F4DBE`; - -alter table `idea` drop key `FK6E051897C1813915`; -alter table `idea` drop key `FK6E051897B9431B73`; -alter table `idea` drop key `FK6E051897E44F4DBE`; - -alter table `idea` drop key `UK_only_one_idea_per_project`; - -alter table `idea` change `published` `published` bit(1) not null default b'1' after `type`; -alter table `idea` change `cachedStatus` `cached_status` varchar(255) default null after `published`; -alter table `idea` change `inactive` `inactive` tinyint(1) not null default 0 after `cached_status`; - -alter table `idea` change `practicalHow` `practical_how` longtext default null after `inactive`; -alter table `idea` change `theoryHow` `theory_how` longtext default null after `practical_how`; -alter table `idea` change `literature` `literature` longtext default null after `why`; - -alter table `idea` change `background` `background` longtext default null after `literature`; -alter table `idea` change `problem` `problem` longtext default null after `background`; -alter table `idea` change `method` `method` longtext default null after `problem`; -alter table `idea` change `interests` `interests` longtext default null after `method`; - -alter table `idea` rename column `creator_id` to `creator_user_id`; -alter table `idea` rename column `match_id` to `latest_match_id`; - -alter table `idea` add constraint uk_idea_project_id unique(project_id); - -alter table `idea` - add constraint fk_idea_creator_user_id - foreign key (creator_user_id) references user (id) - on delete cascade on update cascade; - -alter table `idea` - add constraint fk_idea_latest_match_id - foreign key (latest_match_id) references idea_match (id) - on delete cascade on update cascade; - -alter table `idea` - add constraint fk_idea_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: idea_language - -alter table `idea_language` drop foreign key `FK_idea_language_idea`; -alter table `idea_language` drop key `FK_idea_language_idea`; - -alter table `idea_language` - add constraint fk_idea_language_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - --- table: idea_export - -alter table `idea_export` drop foreign key `FK68FA705CFCDADF61`; -alter table `idea_export` drop key `FK68FA705CFCDADF61`; - -alter table `idea_export` - add constraint fk_idea_export_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - --- table: idea_first_meeting - -alter table `idea_first_meeting` drop foreign key `FK9393AA04FCDADF61`; -alter table `idea_first_meeting` drop key `FK9393AA04FCDADF61`; - -alter table `idea_first_meeting` drop key `UK_k4m4tupnikallbq3cq3llvlmk`; -alter table `idea_first_meeting` drop key `idea_id`; - -alter table `idea_first_meeting` rename column `firstMeetingDate` to `first_meeting_date`; -alter table `idea_first_meeting` change `room` `room` longtext not null after `first_meeting_date`; - -alter table `idea_first_meeting` - add constraint fk_idea_first_meeting_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - -alter table `idea_first_meeting` - add constraint uk_idea_first_meeting_idea_id unique(idea_id); - --- table: idea_match - -alter table `idea_match` drop foreign key `FK87EA481DFCDADF61`; -alter table `idea_match` drop foreign key `FK87EA481DA89FFB7F`; -alter table `idea_match` drop foreign key `idea_match_supervisor_id`; - -alter table `idea_match` drop key `FK87EA481DFCDADF61`; -alter table `idea_match` drop key `FK87EA481DA89FFB7F`; -alter table `idea_match` drop key `idea_match_supervisor_id`; - -alter table `idea_match` rename column `changedBy_id` to `changed_by_user_id`; -alter table `idea_match` rename column `supervisor_id` to `supervisor_user_id`; - -alter table `idea_match` - add constraint fk_idea_match_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - -alter table `idea_match` - add constraint fk_idea_match_changed_by_user_id - foreign key (changed_by_user_id) references user (id) - on delete cascade on update cascade; - -alter table `idea_match` - add constraint fk_idea_match_supervisor_user_id - foreign key (supervisor_user_id) references user (id) - on delete cascade on update cascade; - --- table: preliminary_match - -alter table `preliminary_match` drop foreign key `FK_preliminary_match_supervisor`; -alter table `preliminary_match` drop foreign key `FK_preliminary_match_idea`; - -alter table `preliminary_match` drop key `FK_preliminary_match_supervisor`; -alter table `preliminary_match` drop key `FK_preliminary_match_idea`; - -alter table `preliminary_match` change `comment` `comment` mediumtext default null after `version`; -alter table `preliminary_match` rename column `supervisor_id` to `supervisor_user_id`; - -alter table `preliminary_match` - add constraint fk_preliminary_match_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - -alter table `preliminary_match` - add constraint fk_preliminary_match_supervisor_user_id - foreign key (supervisor_user_id) references user (id) - on delete cascade on update cascade; - --- table: idea_student - -alter table `idea_student` drop foreign key `idea_student_user_id`; -alter table `idea_student` drop foreign key `FK9458BA93FCDADF61`; - -alter table `idea_student` drop key `idea_student_user_id`; -alter table `idea_student` drop key `FK9458BA93FCDADF61`; -alter table `idea_student` drop key `FK_c5py593l4g261jdkuvwdmcmgj`; - -alter table `idea_student` rename column `dateCreated` to `date_created`; -alter table `idea_student` change `id` `id` bigint(20) not null auto_increment first; - -alter table `idea_student` - add constraint fk_idea_student_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - -alter table `idea_student` - add constraint fk_idea_student_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - -/* - * Step 11: activity related tables - * - * Some tables of this group of tables need to be renamed. Because of how foreign keys reference to each other - * between them, the order and behavior of how the tables will be fixed looks like stack again. - * - * 1. Remove references from activity_final_seminar, activity_thread, project_first_meeting to activity, - * the fix these three tables, but wait to later before foreign keys are added back to becoming activity table. - * 2. Remove reference from Activity to ActivtyPlan, and fix table Activity, without adding back foreign key to - * becoming activity_plan table. - * 3. Fix ActivityPlan table, rename it to activity_plan. - * 4. Add back foreign key reference from activity to activity_plan - * 5. Add back foreign key reference from activity_final_seminar, activity_thread, project_first_meeting to - * activity table. - */ - --- table: activity_final_seminar, except foreign key to becoming table activity - -alter table `activity_final_seminar` drop foreign key `activity_final_seminar_ibfk_2`; -alter table `activity_final_seminar` drop foreign key `activity_final_seminar_ibfk_1`; - -alter table `activity_final_seminar` drop key `activity_id`; - -alter table `activity_final_seminar` - add constraint fk_afs_final_seminar_id - foreign key (final_seminar_id) references final_seminar (id) - on delete cascade on update cascade; - --- table: activity_thread, except foreign key to becoming table activity - -alter table `activity_thread` drop foreign key `FK_activity_thread_project_thread`; -alter table `activity_thread` drop foreign key `FK_activity_thread_activity`; - -alter table `activity_thread` drop key `FK_activity_thread_project_thread`; - -alter table `activity_thread` - add constraint fk_activity_thread_project_thread_id - foreign key (project_thread_id) references project_thread (id) - on delete cascade on update cascade; - --- table: project_first_meeting, except foreign key to becoming table activity - -alter table `project_first_meeting` drop foreign key `FK_project_first_meeting_activity`; - -alter table `project_first_meeting` drop key `FK_project_first_meeting_activity`; - -alter table `project_first_meeting` change `room` `room` longtext not null after `version`; - -alter table `project_first_meeting` change `activity_id` `activity_id` bigint(20) not null after `room`; - --- table: activity - -alter table `Activity` drop foreign key `FK_Activity_file_upload`; -alter table `Activity` drop foreign key `FK_Activity_ActivityPlan`; -alter table `Activity` drop foreign key `FK_activity_checkList`; - -alter table `Activity` drop key `FK_Activity_file_upload`; -alter table `Activity` drop key `activityTemplate_id_index`; -alter table `Activity` drop key `deleted_index`; -alter table `Activity` drop key `UK_activity_checkList`; - -rename table `Activity` to `activity`; - -alter table `activity` change `title` `title` varchar(500) not null after `deleted`; -alter table `activity` change `action` `action` varchar(64) not null default 'none' after `description`; -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 `upload_file_reference_id`; - -alter table `activity` add constraint uk_activity_checklist_id unique (checklist_id); -create index idx_activity_deleted on activity(deleted); - -alter table `activity` - add constraint `fk_activity_checklist_id` - foreign key (checklist_id) references checklist (id) - on delete cascade on update cascade ; - -alter table `activity` - 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 - -alter table `ActivityPlan` drop foreign key `fk_ActivityPlan_project_B`; -alter table `ActivityPlan` drop key `project_id`; - -rename table `ActivityPlan` to `activity_plan`; - -alter table `activity_plan` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `activity_plan` change `startDate` `start_date` datetime default null after `version`; - -alter table `activity_plan` add constraint uk_activity_plan_project_id unique (project_id); - -alter table `activity_plan` - add constraint `fk_activity_plan_project_id` - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- add foreign key reference from activity to activity_plan - -alter table `activity` - add constraint fk_activity_activity_plan_id - foreign key (activity_plan_id) references activity_plan (id) - on delete cascade on update cascade; - --- Add back all foreign key references to activity - --- add foreign key reference from project_first_meeting to activity - -alter table `project_first_meeting` - add constraint fk_project_first_meeting_activity_id - foreign key (activity_id) references activity (id) - on delete cascade on update cascade; - --- add foreign key reference from activity_thread to activity - -alter table `activity_thread` - add constraint fk_activity_thread_activity_id - foreign key (activity_id) references activity (id) - on delete cascade on update cascade; - --- add foreign key reference from activity_final_seminar to activity - -alter table `activity_final_seminar` - add constraint fk_afs_activity_id - foreign key (activity_id) references activity (id) - on delete cascade on update cascade; - -/* - * Step 12: Peer Review related tables - */ - --- table: peer_request - -alter table `peer_request` drop foreign key `FK_peer_request_checklist_template`; -alter table `peer_request` drop foreign key `FK_peer_request_file`; -alter table `peer_request` drop foreign key `FK_ppnisfed4ipbg17rts8vbuqt8`; -alter table `peer_request` drop foreign key `peer_request_reviewer_id`; - -alter table `peer_request` drop key `FK_peer_request_file`; -alter table `peer_request` drop key `FK_ppnisfed4ipbg17rts8vbuqt8`; -alter table `peer_request` drop key `peer_request_reviewer_id`; -alter table `peer_request` drop key `FK514488B2869F0235`; -alter table `peer_request` drop key `FK514488B2C1813915`; - -alter table `peer_request` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `peer_request` change `language` `language` varchar(255) not null after `status`; - -alter table `peer_request` rename column `checkListTemplate_id` to `checklist_template_id`; -alter table `peer_request` rename column `requester_id` to `requester_user_id`; - -alter table `peer_request` change `checklist_template_id` `checklist_template_id` bigint(20) default null after `language`; -alter table `peer_request` change `file_reference_id` `file_reference_id` bigint(20) not null after `checklist_template_id`; - -alter table `peer_request` - add constraint fk_peer_request_checklist_template_id - foreign key (checklist_template_id) references checklist_template (id) - on delete set null on update cascade; - -alter table `peer_request` - add constraint fk_peer_request_file_reference_id - foreign key (file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `peer_request` - add constraint fk_peer_request_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `peer_request` - add constraint fk_peer_request_requester_user_id - foreign key (requester_user_id) references user (id) - on delete cascade on update cascade; - --- table: peer_review - -alter table `peer_review` drop foreign key `peer_review_reviewer_id`; -alter table `peer_review` drop foreign key `FK_n5wj0qsev5cf8acm0xhfrqlpg`; -alter table `peer_review` drop foreign key `FK_9ke7armwg3tfnghmschgo011f`; -alter table `peer_review` drop foreign key `FK_peer_review_file`; - -alter table `peer_review` drop key `peer_review_reviewer_id`; -alter table `peer_review` drop key `FK_n5wj0qsev5cf8acm0xhfrqlpg`; -alter table `peer_review` drop key `FKB00C90D5C1813915`; -alter table `peer_review` drop key `FK_9ke7armwg3tfnghmschgo011f`; -alter table `peer_review` drop key `FKB00C90D5CEE8709B`; -alter table `peer_review` drop key `FK_peer_review_file`; - -alter table `peer_review` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `peer_review` change `status` `status` varchar(255) not null after `comment`; -alter table `peer_review` change `deadline` `deadline` datetime not null after `status`; - -alter table `peer_review` change `file_reference_id` `file_reference_id` bigint(20) default null after `deadline`; -alter table `peer_review` change `peerRequest_id` `peer_request_id` bigint(20) not null; -alter table `peer_review` change `reviewer_id` `reviewer_user_id` bigint(20) not null; - -alter table `peer_review` - add constraint fk_peer_review_file_reference_id - foreign key (file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `peer_review` - add constraint fk_peer_review_peer_request_id - foreign key (peer_request_id) references peer_request (id) - on delete cascade on update cascade; - -alter table `peer_review` - add constraint fk_peer_review_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `peer_review` - add constraint fk_peer_review_reviewer_user_id - foreign key (reviewer_user_id) references user (id) - on delete cascade on update cascade; - --- table: answer - -alter table `answer` drop foreign key `FK_64r70sbiishrkuj1vn87vo53k`; - -alter table `answer` drop key `FK_64r70sbiishrkuj1vn87vo53k`; -alter table `answer` drop key `FKABCA3FBE2C41A959`; - -alter table `answer` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `answer` change `question` `question` longtext not null after `version`; -alter table `answer` change `answer` `answer` varchar(255) not null after `question`; - -alter table `answer` rename column `peerReview_id` to `peer_review_id`; - -alter table `answer` - add constraint fk_answer_peer_review_id - foreign key (peer_review_id) references peer_review (id) - on delete cascade on update cascade; - -/* - * Step 13: Milestone related tables - */ - --- table: milestone - -alter table `milestone` drop foreign key `FKC0841970667E5A5E`; -alter table `milestone` drop foreign key `FKC0841970C1813915`; -alter table `milestone` drop foreign key `milestone_user_id`; - -alter table `milestone` drop key `FKC0841970667E5A5E`; -alter table `milestone` drop key `FKC0841970C1813915`; -alter table `milestone` drop key `milestone_user_id`; - -alter table `milestone` rename column `activity_id` to `milestone_activity_template_id`; - -alter table `milestone` - add constraint fk_milestone_milestone_activity_template_id - foreign key (milestone_activity_template_id) references milestone_activity_template (id) - on delete cascade on update cascade; - -alter table `milestone` - add constraint fk_milestone_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `milestone` - add constraint fk_milestone_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: milestone_activity_template, except foreign key to becoming table event - -alter table `milestone_activity_template` drop foreign key `milestone_activity_template_ibfk_1`; -alter table `milestone_activity_template` drop foreign key `FK42DAA8FE233E1A72`; - -alter table `milestone_activity_template` drop key `milestone_activity_template_ibfk_1`; -alter table `milestone_activity_template` drop key `FK42DAA8FE233E1A72`; -alter table `milestone_activity_template` drop key `deleted_index`; -alter table `milestone_activity_template` drop key `code`; - -alter table `milestone_activity_template` change `description` `description` varchar(255) default null after `title`; -alter table `milestone_activity_template` change `sortOrder` `sort_order` int(11) default null; -alter table `milestone_activity_template` change `editableByStudents` `editable_by_students` bit(1) not null default b'0' after `sort_order`; - -alter table `milestone_activity_template` change `phase` `milestone_phase_template_id` bigint(20) not null; -alter table `milestone_activity_template` change `activatedBy` `activated_by_event_name` varchar(191) default null; - -alter table `milestone_activity_template` add constraint uk_milestone_activity_template_code unique(code); - -create index idx_milestone_activity_template_deleted on milestone_activity_template (deleted); - -alter table `milestone_activity_template` - add constraint fk_mat_milestone_phase_template_id - foreign key (milestone_phase_template_id) references milestone_phase_template (id) - on delete cascade on update cascade; - --- table: event - -rename table `Event` to `event`; - --- add foreign key reference from milestone_activity_template to event -alter table `milestone_activity_template` - add constraint fk_mat_activated_by_event_name - foreign key (activated_by_event_name) references event (name) - on delete cascade on update cascade; - --- table: milestone_phase_template - -alter table `milestone_phase_template` drop key `deleted_index`; - -alter table `milestone_phase_template` change `description` `description` varchar(255) default null after `title`; - -alter table `milestone_phase_template` rename column `sortOrder` to `sort_order`; - -create index idx_milestone_phase_template_deleted on milestone_phase_template (deleted); - -/* - * Step 14: Final Seminar related tables - */ - --- table: final_seminar - -alter table `final_seminar` drop foreign key `FK_rv1p7wl0dnj25saiarmk55yvr`; -alter table `final_seminar` drop foreign key `FK_final_seminar_document_reference`; - -alter table `final_seminar` drop key `FK_final_seminar_document_reference`; -alter table `final_seminar` drop key `FK_rv1p7wl0dnj25saiarmk55yvr`; -alter table `final_seminar` drop key `deleted_index`; -alter table `final_seminar` drop key `FK49900D28C1813915`; - -alter table `final_seminar` drop key `UK_rv1p7wl0dnj25saiarmk55yvr`; - -alter table `final_seminar` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `final_seminar` change `deleted` `deleted` tinyint(1) not null after `version`; - -alter table `final_seminar` change `startDate` `start_date` datetime not null after `deleted`; -alter table `final_seminar` change `room` `room` varchar(255) not null after start_date; -alter table `final_seminar` change `maxOpponents` `max_opponents` int(11) not null after `room`; -alter table `final_seminar` change `maxParticipants` `max_participants` int(11) not null after `max_opponents`; -alter table `final_seminar` change `presentationLanguage` `presentation_lang` varchar(255) not null after `max_participants`; -alter table `final_seminar` change `documentUploadDate` `document_upload_date` datetime default null after `presentation_lang`; -alter table `final_seminar` change `extra_info` `extra_info` text default null after `document_upload_date`; -alter table `final_seminar` change `creationReason` `creation_reason` mediumtext default null after `extra_info`; -alter table `final_seminar` change `manualParticipants` `manual_participants` tinyint(1) not null default 0 after `creation_reason`; -alter table `final_seminar` change `project_id` `project_id` bigint(20) not null after `document_reference_id`; - -alter table `final_seminar` rename column `document_reference_id` to `document_file_reference_id`; - -alter table `final_seminar` add constraint uk_final_seminar_project_id unique(project_id); - -create index idx_final_seminar_deleted on final_seminar (deleted); - -alter table `final_seminar` - add constraint fk_final_seminar_document_file_reference_id - foreign key (document_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `final_seminar` - add constraint fk_final_seminar_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: final_seminar_active_participation - -alter table `final_seminar_active_participation` drop foreign key `final_seminar_active_participation_user_id`; -alter table `final_seminar_active_participation` drop foreign key `FK_mk920fce29yhjgv33wr69fe8a`; -alter table `final_seminar_active_participation` drop foreign key `FK_3si3rx7tv6ke9oeiq0hts3lm0`; - -alter table `final_seminar_active_participation` drop key `FK35AB727FF583C69F`; -alter table `final_seminar_active_participation` drop key `FK35AB727FC1813915`; -alter table `final_seminar_active_participation` drop key `FK_mk920fce29yhjgv33wr69fe8a`; -alter table `final_seminar_active_participation` drop key `FK_3si3rx7tv6ke9oeiq0hts3lm0`; -alter table `final_seminar_active_participation` drop key `final_seminar_active_participation_user_id`; - -alter table `final_seminar_active_participation` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `final_seminar_active_participation` change `grade` `grade` varchar(20) default null after `version`; - -alter table `final_seminar_active_participation` rename column `finalSeminar_id` to `final_seminar_id`; - -alter table `final_seminar_active_participation` - add constraint fk_fsap_final_seminar_id - foreign key (final_seminar_id) references final_seminar (id) - on delete cascade on update cascade; - -alter table `final_seminar_active_participation` - add constraint fk_fsap_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - -alter table `final_seminar_active_participation` - add constraint fk_fsap_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: final_seminar_opposition - -alter table `final_seminar_opposition` drop foreign key `FK_62i59u7j6x5ma0iydx9no6m4i`; -alter table `final_seminar_opposition` drop foreign key `FK_final_seminar_opposition_report`; -alter table `final_seminar_opposition` drop foreign key `FK_hilhyo3tgq89pm27i4pxjaua`; -alter table `final_seminar_opposition` drop foreign key `final_seminar_opposition_user_id`; - -alter table `final_seminar_opposition` drop key `FK8CD13581F583C69F`; -alter table `final_seminar_opposition` drop key `FK8CD13581C1813915`; -alter table `final_seminar_opposition` drop key `FK_62i59u7j6x5ma0iydx9no6m4i`; -alter table `final_seminar_opposition` drop key `FK_hilhyo3tgq89pm27i4pxjaua`; -alter table `final_seminar_opposition` drop key `final_seminar_opposition_user_id`; -alter table `final_seminar_opposition` drop key `FK_final_seminar_opposition_report`; - -alter table `final_seminar_opposition` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `final_seminar_opposition` change `finalSeminar_id` `final_seminar_id` bigint(20) not null after `feedback`; -alter table `final_seminar_opposition` change `opponent_report_reference_id` - `opponent_report_file_reference_id` bigint(20) default null after `final_seminar_id`; -alter table `final_seminar_opposition` change `project_id` `project_id` bigint(20) not null - after `opponent_report_file_reference_id`; - -alter table `final_seminar_opposition` - add constraint fk_fso_final_seminar_id - foreign key (final_seminar_id) references final_seminar (id) - on delete cascade on update cascade; - -alter table `final_seminar_opposition` - add constraint fk_fso_opponent_report_file_reference_id - foreign key (opponent_report_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `final_seminar_opposition` - add constraint fk_fso_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `final_seminar_opposition` - add constraint fk_fso_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: final_seminar_respondent - -alter table `final_seminar_respondent` drop foreign key `final_seminar_respondent_user_id`; -alter table `final_seminar_respondent` drop foreign key `FK_final_seminar_respondent_id`; - -alter table `final_seminar_respondent` drop key `FK_final_seminar_respondent_id`; -alter table `final_seminar_respondent` drop key `final_seminar_respondent_user_id`; - -alter table `final_seminar_respondent` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `final_seminar_respondent` change `grade` `grade` varchar(20) default null after `version`; -alter table `final_seminar_respondent` change `finalSeminar_id` `final_seminar_id` bigint(20) not null after `grade`; - -alter table `final_seminar_respondent` - add constraint fk_fsr_final_seminar_id - foreign key (final_seminar_id) references final_seminar (id) - on delete cascade on update cascade; - -alter table `final_seminar_respondent` - add constraint fk_fsr_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - -/* - * Step 14: Report and Criterion related tables - */ - --- table: report - -alter table `report` change `submitted` `submitted` tinyint(1) not null default 0 after `version`; - --- table: opposition_report - -alter table `opposition_report` drop foreign key `opposition_report_ibfk_1`; -alter table `opposition_report` drop foreign key `FK_opposition_report_seminar_opposition`; -alter table `opposition_report` drop foreign key `FK_opposition_report_attachment`; - -alter table `opposition_report` drop key `FK_opposition_report_attachment`; -alter table `opposition_report` drop key `FK_opposition_report_seminar_opposition`; - -alter table `opposition_report` drop key `UK_one_report_per_opponent`; - -alter table `opposition_report` change `thesisSummary` `thesis_summary` longtext default null after `id`; - -alter table `opposition_report` change `attachment_reference_id` `attachment_file_reference_id` - bigint(20) default null after `thesis_summary`; - -alter table `opposition_report` change `finalSeminarOpposition_id` `final_seminar_opposition_id` - bigint(20) not null after `attachment_file_reference_id`; - -alter table `opposition_report` add constraint uk_or_final_seminar_opposition_id - unique(final_seminar_opposition_id); - -alter table `opposition_report` - add constraint fk_or_id - foreign key (id) references report (id) - on delete cascade on update cascade; - -alter table `opposition_report` - add constraint fk_or_attachment_file_reference_id - foreign key (attachment_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `opposition_report` - add constraint fk_or_final_seminar_opposition_id - foreign key (final_seminar_opposition_id) references final_seminar_opposition (id) - on delete cascade on update cascade; - --- table: criterion - -alter table `criterion` drop foreign key `FK_criterion_report`; - -alter table `criterion` drop key `FK_criterion_report`; - -alter table `criterion` change `title_sv` `title_sv` varchar(255) not null after `version`; -alter table `criterion` change `title_en` `title_en` varchar(255) not null default '' after `title_sv`; -alter table `criterion` change `description` `description_sv` varchar(2000) default null after `title_en`; -alter table `criterion` change `descriptionEn` `description_en` varchar(2000) default null after `description_sv`; -alter table `criterion` change `feedback` `feedback` longtext default null after `description_en`; -alter table `criterion` change `report_id` `report_id` bigint(20) not null after `sort_order`; - -alter table `criterion` - add constraint fk_criterion_report_id - foreign key (report_id) references report (id) - on delete cascade on update cascade; - --- table: GradingCriterionPoint, except foreign key to becoming table grading_criterion - -alter table `GradingCriterionPoint` drop foreign key `FK_GradingCriterion_id`; - -alter table `GradingCriterionPoint` drop key `FK_GradingCriterion_id`; - -alter table `GradingCriterionPoint` change `GradingCriterion_id` `grading_criterion_id` bigint(20) not null - after `description_en`; - -rename table `GradingCriterionPoint` to `grading_criterion_point`; - --- table: GradingCriterion, except foreign key to becoming table grading_report - -alter table `GradingCriterion` drop foreign key `FK_k2ynx2lcpdl969alj5nt3f7xx`; - -alter table `GradingCriterion` drop key `FK_k2ynx2lcpdl969alj5nt3f7xx`; - -alter table `GradingCriterion` change `title_sv` `title_sv` varchar(255) not null after `version`; -alter table `GradingCriterion` change `title_en` `title_en` varchar(255) not null default '' after `title_sv`; -alter table `GradingCriterion` change `type` `type` varchar(64) not null after `title_en`; -alter table `GradingCriterion` change `points_required_to_pass` `points_required_to_pass` int(11) not null after `type`; -alter table `GradingCriterion` change `feedback` `feedback` longtext default null after `points`; -alter table `GradingCriterion` change `gradingReport_id` `grading_report_id` bigint(20) not null after `flag`; - -rename table `GradingCriterion` to `grading_criterion`; - --- add foreign key reference from grading_criterion_point to grading_criterion - -alter table `grading_criterion_point` - add constraint fk_gcp_grading_criterion_id - foreign key (grading_criterion_id) references grading_criterion (id) - on delete cascade on update cascade; - --- table: SupervisorGradingReport, except foreign key to becoming table grading_report - -alter table `SupervisorGradingReport` drop foreign key `supervisor_grading_report_user_id`; -alter table `SupervisorGradingReport` drop foreign key `FK_cwxdypciob8dmndx5elwi3fe5`; - -alter table `SupervisorGradingReport` drop key `supervisor_grading_report_user_id`; -alter table `SupervisorGradingReport` drop key `FK_cwxdypciob8dmndx5elwi3fe5`; - -rename table `SupervisorGradingReport` to `supervisor_grading_report`; - -alter table `supervisor_grading_report` - add constraint fk_sgr_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: ReviewerGradingReport, except foreign key to becoming table grading_report - -alter table `ReviewerGradingReport` drop foreign key `FK_axsaeqbamfc41dhih1s62g998`; - -alter table `ReviewerGradingReport` drop key `FK_axsaeqbamfc41dhih1s62g998`; - -rename table `ReviewerGradingReport` to `reviewer_grading_report`; - --- table: GradingReport - -alter table `GradingReport` drop foreign key `GradingReport_ibfk_1`; -alter table `GradingReport` drop foreign key `FK_6ygpk1qq218jgwuuyx0bp6vui`; - -alter table `GradingReport` drop key `FK_6ygpk1qq218jgwuuyx0bp6vui`; - -rename table `GradingReport` to `grading_report`; - -alter table `grading_report` - add constraint fk_grading_report_id - foreign key (id) references report (id) - on delete cascade on update cascade; - -alter table `grading_report` - add constraint fk_grading_report_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- add foreign key reference from reviewer_grading_report to grading_report - -alter table `reviewer_grading_report` - add constraint fk_reviewer_grading_report_id - foreign key (id) references grading_report (id) - on delete cascade on update cascade; - --- add foreign key reference from supervisor_grading_report to grading_report - -alter table `supervisor_grading_report` - add constraint fk_sgr_id - foreign key (id) references grading_report (id) - on delete cascade on update cascade; - --- add foreign key reference from grading_criterion to grading_report - -alter table `grading_criterion` - add constraint fk_grading_criterion_grading_report_id - foreign key (grading_report_id) references grading_report (id) - on delete cascade on update cascade; - -/* - * Step 15: project and related tables - */ - --- table: project - -alter table `project` drop foreign key `project_supervisor_id`; -alter table `project` drop key `project_supervisor_id`; -alter table `project` drop key `identifier`; - -alter table `project` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `project` change `title` `title` longtext not null after `version`; -alter table `project` change `credits` `credits` int(11) not null default 0 after `title`; -alter table `project` change `language` `language` varchar(255) default null after credits; -alter table `project` change `start_date` `start_date` date not null after language; -alter table `project` change `expected_end_date` `expected_end_date` date default null after `start_date`; -alter table `project` change `externalOrganization` `external_organization` varchar(255) default null after `expected_end_date`; -alter table `project` change `projectStatus` `project_status` varchar(255) default null after `external_organization`; -alter table `project` change `fs_rule_exmpt` `final_seminar_rule_exmpt` bit(1) not null default b'0' after `project_status`; -alter table `project` change `stateOfMind` `state_of_mind` varchar(255) default null after `final_seminar_rule_exmpt`; -alter table `project` change `stateOfMindReason` `state_of_mind_reason` varchar(255) default null after `state_of_mind`; -alter table `project` change `stateOfMindDate` `state_of_mind_date` datetime default null after `state_of_mind_reason`; -alter table `project` change `identifier` `daisy_identifier` bigint(20) default null after `state_of_mind_date`; -alter table `project` change `supervisor_id` `supervisor_id` bigint(20) not null after `research_area_id`; - -alter table `project` add constraint uk_project_daisy_identifier unique(daisy_identifier); - -alter table `project` - add constraint fk_project_supervisor_id - foreign key (supervisor_id) references user (id) - on delete cascade on update cascade; - --- table: grading_history_rejections - -alter table `grading_history_rejections` drop foreign key `FK_grading_history_rejections_project`; - -alter table `grading_history_rejections` drop key `FK_grading_history_rejections_project`; - -alter table `grading_history_rejections` change `reason` `reason` text not null after `id`; -alter table `grading_history_rejections` change `when` `when` timestamp not null default '0000-00-00 00:00:00' after `reason`; - -rename table `grading_history_rejections` to `grading_history_rejection`; - -alter table `grading_history_rejection` - add constraint fk_grading_history_rejections_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: grading_history_approvals - -alter table `grading_history_approvals` drop foreign key `FK_grading_history_approvals_project`; - -alter table `grading_history_approvals` drop key `FK_grading_history_approvals_project`; - -alter table `grading_history_approvals` change `when` `when` timestamp not null default '0000-00-00 00:00:00' after `id`; - -rename table `grading_history_approvals` to `grading_history_approval`; - -alter table `grading_history_approval` - add constraint fk_grading_history_approval_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: national_subject_category - -alter table `national_subject_category` drop key `U_national_subject_category_external_id`; - -alter table `national_subject_category` change `swedish_name` `name_sv` varchar(255) not null after `id`; -alter table `national_subject_category` change `english_name` `name_en` varchar(255) not null after `name_sv`; -alter table `national_subject_category` change `external_id` `external_id` int(11) not null after `preselected`; - -alter table `national_subject_category` - add constraint uk_national_subject_category_external_id unique(external_id); - --- table: publication_metadata - -alter table `publication_metadata` drop foreign key `FK_publication_metadata_project`; -alter table `publication_metadata` drop foreign key `FK_publication_metadata_national_subject_category`; - -alter table `publication_metadata` drop key `FK_publication_metadata_project`; -alter table `publication_metadata` drop key `FK_publication_metadata_national_subject_category`; - -alter table `publication_metadata` change `project_id` `project_id` bigint(20) not null after `national_subject_category_id`; - -alter table `publication_metadata` change `abstract_swedish` `abstract_sv` text default null after `id`; -alter table `publication_metadata` change `abstract_english` `abstract_en` text default null after `abstract_sv`; -alter table `publication_metadata` change `keywords_swedish` `keywords_sv` text default null after `abstract_en`; -alter table `publication_metadata` change `keywords_english` `keywords_en` text default null after `keywords_sv`; - -alter table `publication_metadata` - add constraint fk_publication_metadata_national_subject_category_id - foreign key (national_subject_category_id) references national_subject_category (id) - on delete cascade on update cascade; - -alter table `publication_metadata` - add constraint fk_publication_metadata_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -/* - * Step 16: Many-to-Many tables between project and user. - */ - --- table: project_user_note (new changes from develop branch) - -alter table `project_user_note` drop foreign key `FK_project_user_note_user`; -alter table `project_user_note` drop foreign key `FK_project_user_note_project`; -alter table `project_user_note` drop key `FK_project_user_note_user`; - -alter table `project_user_note` - add constraint fk_project_user_note_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `project_user_note` - add constraint fk_project_user_note_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: project_cosupervisor - -alter table `project_cosupervisor` drop foreign key `FK_fj57t069dymdrnnhdxcnfvvnn`; -alter table `project_cosupervisor` drop foreign key `FK_18x2poxkt8s2bw9kpr7vbmd5j`; - -alter table `project_cosupervisor` drop key `FK_fj57t069dymdrnnhdxcnfvvnn`; -alter table `project_cosupervisor` drop key `FK_18x2poxkt8s2bw9kpr7vbmd5j`; - -alter table `project_cosupervisor` change `user_id` `user_id` bigint(20) not null after `project_id`; - -alter table `project_cosupervisor` - add constraint fk_project_cosupervisor_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `project_cosupervisor` - add constraint fk_project_cosupervisor_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: project_reviewer - -alter table `project_reviewer` drop foreign key `FK_g7yryw3e0dtmuuvgw5qjhphjm`; -alter table `project_reviewer` drop foreign key `FK_6aik0jd18kv3383fbt09xd0pi`; - -alter table `project_reviewer` drop key `FK_6aik0jd18kv3383fbt09xd0pi`; -alter table `project_reviewer` drop key `FK_g7yryw3e0dtmuuvgw5qjhphjm`; - -alter table `project_reviewer` - add constraint fk_project_reviewer_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `project_reviewer` - add constraint fk_project_reviewer_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: project_user - -alter table `project_user` drop foreign key `project_user_user_id`; -alter table `project_user` drop foreign key `project_user_project_id`; - -alter table `project_user` drop key `project_user_project_id`; - -alter table `project_user` change `user_id` `user_id` bigint(20) not null after `project_id`; -alter table `project_user` change `reflection` `reflection` text default null after `user_id`; - -alter table `project_user` - add constraint fk_project_user_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `project_user` - add constraint fk_project_user_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: grading_history_submissions - -alter table `grading_history_submissions` drop foreign key `FK_grading_history_submissions_project`; -alter table `grading_history_submissions` drop foreign key `FK_grading_history_submissions_author`; - -alter table `grading_history_submissions` drop key `FK_grading_history_submissions_project`; -alter table `grading_history_submissions` drop key `FK_grading_history_submissions_author`; - -rename table `grading_history_submissions` to `grading_history_submission`; - -alter table `grading_history_submission` change `when` `when` timestamp not null default '0000-00-00 00:00:00' after `id`; -alter table `grading_history_submission` change `corrections` `corrections` text default null after `when`; -alter table `grading_history_submission` change `author_id` `author_user_id` bigint(20) not null after `corrections`; - -alter table `grading_history_submission` - add constraint fk_grading_history_submission_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `grading_history_submission` - add constraint fk_grading_history_submission_author_user_id - foreign key (author_user_id) references user (id) - on delete cascade on update cascade; - --- table: externallink - -alter table `externallink` drop foreign key `FK_PROJECT`; -alter table `externallink` drop foreign key `FK_USER`; - -alter table `externallink` drop key `FK_PROJECT`; -alter table `externallink` drop key `FK_USER`; - -rename table `externallink` to `external_link`; - -alter table `external_link` change `description` `description` varchar(255) default null after `url`; - -alter table `external_link` - add constraint fk_external_link_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `external_link` - add constraint fk_external_link_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: grade - -alter table `grade` drop foreign key `FK_grade_user_reportedBy`; -alter table `grade` drop foreign key `FK_grade_project`; - -alter table `grade` drop key `FK_grade_user_reportedBy`; -alter table `grade` drop key `project_id`; - -alter table `grade` change `value` `value` varchar(255) not null after `id`; -alter table `grade` change `reportedOn` `reported_when` date not null after `value`; -alter table `grade` change `project_id` `project_id` bigint(20) not null after `reported_when`; -alter table `grade` change `reportedBy` `reported_by_user_id` bigint(20) not null after `project_id`; - -alter table `grade` add constraint uk_grade_project_id unique(project_id); - -alter table `grade` - add constraint fk_grade_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `grade` - add constraint fk_grade_reported_by_user_id - foreign key (reported_by_user_id) references user (id) - on delete cascade on update cascade; - -/* - * Step 17: file_reference & file_description, FinalThesis and project_file - */ - --- table: file_description - -alter table `file_description` drop foreign key `file_description_user`; - -alter table `file_description` drop key `file_description_user`; -alter table `file_description` drop key `file_description_identifier_index`; - -alter table `file_description` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `file_description` change `name` `name` varchar(255) default null after `version`; -alter table `file_description` change `mimeType` `mime_type` varchar(255) default null after `name`; -alter table `file_description` change `size` `size` bigint(20) default null after `mime_type`; -alter table `file_description` change `identifier` `file_identifier` varchar(255) default null after `size`; -alter table `file_description` change `type` `type` varchar(255) default null after `file_identifier`; -alter table `file_description` change `userId` `user_id` bigint(20) default null after `type`; - -alter table `file_description` - add constraint fk_file_description_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: file_reference - -alter table file_reference drop foreign key `FK_file_reference_file_description`; - -alter table file_reference drop key `FK_file_reference_file_description`; - -alter table file_reference - add constraint fk_file_reference_file_description_id - foreign key (file_description_id) references file_description (id) - on delete cascade on update cascade; - --- table: FinalThesis - -alter table FinalThesis drop foreign key `FK_final_thesis_text_matching_document_reference`; -alter table FinalThesis drop foreign key `FK_final_thesis_project`; -alter table FinalThesis drop foreign key `FK_final_thesis_document_reference`; - -alter table FinalThesis drop key `FK_final_thesis_text_matching_document_reference`; -alter table FinalThesis drop key `FK_final_thesis_project`; - -rename table FinalThesis to `final_thesis`; - -alter table `final_thesis` change `swedishTitle` `title_sv` longtext default null after `version`; -alter table `final_thesis` change `englishTitle` `title_en` longtext default null after `title_sv`; -alter table `final_thesis` change `status` `status` varchar(32) not null after `title_en`; -alter table `final_thesis` change `dateApproved` `date_approved` date default null after `status`; -alter table `final_thesis` change `dateRejected` `date_rejected` date default null after `date_approved`; -alter table `final_thesis` change `rejection_comment` `rejection_comment` text default null after `date_rejected`; -alter table `final_thesis` change `text_matching_analysis` `text_matching_analysis` text default null after `rejection_comment`; -alter table `final_thesis` change `text_matching_document_reference_id` `text_matching_document_reference_id` bigint(20) default null after `text_matching_analysis`; -alter table `final_thesis` change `project_id` `project_id` bigint(20) not null after `document_reference_id`; - -alter table `final_thesis` - add constraint fk_final_thesis_text_matching_document_reference_id - foreign key (text_matching_document_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `final_thesis` - add constraint fk_final_thesis_document_reference_id - foreign key (document_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `final_thesis` - add constraint fk_final_thesis_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- table: project_file - -alter table `project_file` drop foreign key FK_project_file_project; -alter table `project_file` drop foreign key FK_project_file_file; - -alter table `project_file` drop key FK_project_file_file; -alter table `project_file` drop key FK_project_file_project; - -alter table `project_file` change `fileSource` `file_source` varchar(255) not null after `version`; -alter table `project_file` change `project_id` `project_id` bigint(20) not null after `file_reference_id`; - -alter table `project_file` - add constraint fk_project_file_file_reference_id - foreign key (file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `project_file` - add constraint fk_project_file_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -/* - * Step 18: Decision & ReviewerApproval - */ - --- table: Decision - -alter table `Decision` drop foreign key `fk_Decision_ReviewerApproval`; -alter table `Decision` drop foreign key `FK_decision_reviewer`; -alter table `Decision` drop foreign key `FK_Decision_thesis`; -alter table `Decision` drop foreign key `FK_Decision_attachment`; - -alter table `Decision` drop key `FK_decision_reviewer`; -alter table `Decision` drop key `FK_Decision_attachment`; -alter table `Decision` drop key `FK_Decision_thesis`; -alter table `Decision` drop key `fk_ReviewerApproval_Decision_idx`; - -rename table `Decision` to `decision`; - -alter table `decision` change `status` `status` varchar(255) default null after `id`; -alter table `decision` change `requested` `requested_date` datetime not null; -alter table `decision` change `decisionDate` `decision_date` datetime default null; -alter table `decision` change `deadline` `deadline` datetime default null after `decision_date`; -alter table `decision` change `assigned_reviewer_date` `assigned_reviewer_date` date default null after `deadline`; -alter table `decision` change `assigned_reviewer_id` `assigned_reviewer_id` bigint(20) default null after `assigned_reviewer_date`; -alter table `decision` change `attachment_reference_id` `attachment_reference_id` bigint(20) default null after `assigned_reviewer_id`; -alter table `decision` change `reviewerApproval_id` `reviewer_approval_id` bigint(20) not null; - -alter table `decision` - add constraint fk_decision_assigned_reviewer_id - foreign key (assigned_reviewer_id) references user (id) - on delete cascade on update cascade; - -alter table `decision` - add constraint fk_decision_attachment_reference_id - foreign key (attachment_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `decision` - add constraint fk_decision_thesis_reference_id - foreign key (thesis_reference_id) references file_reference (id) - on delete cascade on update cascade; - --- table: ReviewerApproval - -alter table `ReviewerApproval` drop foreign key `FK_9lr1dn8boyfc5a0477ld4q8rw`; - -alter table `ReviewerApproval` drop key `FK_9lr1dn8boyfc5a0477ld4q8rw`; - -rename table `ReviewerApproval` to `reviewer_approval`; - -alter table `reviewer_approval` change `type` `type` varchar(64) not null after `version`; -alter table `reviewer_approval` change `project_id` `project_id` bigint(20) not null after `type`; - -alter table `reviewer_approval` - add constraint fk_reviewer_approval_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - --- add foreign key from decision to reviewer_approval - -alter table `decision` - add constraint fk_decision_reviewer_approval_id - foreign key (reviewer_approval_id) references reviewer_approval (id) - on delete cascade on update cascade; - -/* - * Step 19: urkund_submission & plagiarium_request - */ - --- table: urkund_submission - -alter table `urkund_submission` drop foreign key `FK_urkund_submission_receiver`; -alter table `urkund_submission` drop foreign key `FK_urkund_submission_document_reference`; - -alter table `urkund_submission` drop key `FK_urkund_submission_document_reference`; -alter table `urkund_submission` drop key `FK_urkund_submission_receiver`; - -alter table `urkund_submission` change `document_reference_id` `document_file_reference_id` bigint(20) not null; -alter table `urkund_submission` change `receiver_id` `receiver_user_id` bigint(20) not null after `document_file_reference_id`; -alter table `urkund_submission` change `submitted` `submitted_date` datetime not null; -alter table `urkund_submission` change `nextPoll` `next_poll_date` datetime not null; -alter table `urkund_submission` change `pollingDelay` `polling_delay` varchar(16) not null; -alter table `urkund_submission` change `reportUrl` `report_url` varchar(255) default null; -alter table `urkund_submission` change `analysisAddress` `analysis_address` varchar(255) default null; - -alter table `urkund_submission` - add constraint fk_urkund_submission_document_file_reference_id - foreign key (document_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `urkund_submission` - add constraint fk_urkund_submission_receiver_user_id - foreign key (receiver_user_id) references user (id) - on delete cascade on update cascade; - --- table: plagiarism_request - -alter table `plagiarism_request` drop foreign key `FK_plagiarism_request_receiver`; -alter table `plagiarism_request` drop foreign key `FK_plagiarism_request_document_reference`; - -alter table `plagiarism_request` drop key `FK_plagiarism_request_document_reference`; -alter table `plagiarism_request` drop key `FK_plagiarism_request_receiver`; - -alter table `plagiarism_request` change `document_reference_id` `document_file_reference_id` bigint(20) not null; -alter table `plagiarism_request` change `receiver_id` `receiver_user_id` bigint(20) not null after `document_file_reference_id`; - -alter table `plagiarism_request` - add constraint fk_plagiarism_request_document_file_reference_id - foreign key (document_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -alter table `plagiarism_request` - add constraint fk_plagiarism_request_receiver_user_id - foreign key (receiver_user_id) references user (id) - on delete cascade on update cascade; - -/* - * Step 20: mail_event, mail_event_recipients and MailEvent_nonUserRecipients - */ - --- table: mail_event - -alter table `mail_event` drop foreign key `FK_mail_event_attachment`; - -alter table `mail_event` drop key `FK_mail_event_attachment`; - -alter table `mail_event` change `version` `version` int(4) not null default 0 after `last_modified`; -alter table `mail_event` change `subject` `subject` varchar(255) not null after `version`; -alter table `mail_event` change `fromName` `from_name` varchar(255) default null after `subject`; -alter table `mail_event` change `fromEmail` `from_email` varchar(255) default null after `from_name`; -alter table `mail_event` change `messageBody` `message_body` longtext not null after `from_email`; -alter table `mail_event` change `sent` `sent` tinyint(1) not null default 0 after `message_body`; -alter table `mail_event` change `messageID` `message_id` varchar(255) default null after `sent`; -alter table `mail_event` change `notificationEventType` `notification_event_type` varchar(255) default null after `message_id`; -alter table `mail_event` change `attachment_reference_id` `attachment_file_reference_id` bigint(20) default null after `notification_event_type`; - -alter table `mail_event` - add constraint fk_mail_event_attachment_file_reference_id - foreign key (attachment_file_reference_id) references file_reference (id) - on delete cascade on update cascade; - --- table: mail_event_recipients - -alter table `mail_event_recipients` drop foreign key `FK_mail_event_recipients_user`; -alter table `mail_event_recipients` drop foreign key `FK41091C7FE7F98C6`; - -alter table `mail_event_recipients` drop key `FK41091C7B286D1B0`; -alter table `mail_event_recipients` drop key `FK41091C7FE7F98C6`; - -alter table `mail_event_recipients` drop primary key; - -rename table `mail_event_recipients` to `mail_event_recipient`; - -alter table `mail_event_recipient` change `recipients_id` `recipient_id` bigint(20) not null after `mail_event_id`; - -alter table `mail_event_recipient` add primary key (mail_event_id, recipient_id); - -alter table `mail_event_recipient` - add constraint fk_mail_event_recipient_mail_event_id - foreign key (mail_event_id) references mail_event (id) - on delete cascade on update cascade; - -alter table `mail_event_recipient` - add constraint fk_mail_event_recipient_recipient_id - foreign key (recipient_id) references user (id) - on delete cascade on update cascade; - --- table: MailEvent_nonUserRecipients - -alter table `MailEvent_nonUserRecipients` drop foreign key `FKD7F8996D0814DF5`; -alter table `MailEvent_nonUserRecipients` drop key `FKD7F8996D0814DF5`; - -rename table `MailEvent_nonUserRecipients` to `mail_event_non_user_recipient`; - -alter table `mail_event_non_user_recipient` change `MailEvent_id` `mail_event_id` bigint(20) not null; -alter table `mail_event_non_user_recipient` change `nonUserRecipients` `non_user_recipient` varchar(255) default null; - -alter table `mail_event_non_user_recipient` - add constraint fk_mail_event_non_user_recipient_mail_event_id - foreign key (mail_event_id) references mail_event (id) - on delete cascade on update cascade; - -/* - * Step 21: project_group and project_group_project - */ - --- table: project_group - -alter table `project_group` drop foreign key `FK_user_id`; -alter table `project_group` drop key `FK_user_id`; - -alter table `project_group` change `active` `active` bit(1) not null after `description`; - -alter table `project_group` - add constraint fk_project_group_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: project_group_project - -alter table `project_group_project` drop foreign key `FK_project_id`; -alter table `project_group_project` drop foreign key `FK_project_group_id`; - -alter table `project_group_project` drop key `FK_project_id`; -alter table `project_group_project` drop key `FK_project_group_id`; - -alter table `project_group_project` - add constraint fk_project_group_project_project_group_id - foreign key (project_group_id) references project_group (id) - on delete cascade on update cascade; - -alter table `project_group_project` - add constraint fk_project_group_project_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -/* - * Step 22: thread, forum_post and forum_post_file_description - */ - --- table: thread - -alter table `thread` change `deleted` `deleted` tinyint(1) not null after `subject`; - --- table: forum_post - -alter table `forum_post` drop foreign key `forum_posts_thread`; -alter table `forum_post` drop foreign key `FKEDDC4F35924F477B`; - -alter table `forum_post` drop key `deleted_index`; -alter table `forum_post` drop key `FKEDDC4F355E9380A1`; -alter table `forum_post` drop key `FKEDDC4F35924F477B`; - -alter table `forum_post` change `content` `content` longtext not null after `version`; -alter table `forum_post` change `thread` `thread_id` bigint(20) not null after `deleted`; -alter table `forum_post` change `user` `user_id` bigint(20) default null after `thread_id`; - -create index idx_forum_post_deleted on forum_post (deleted); - -alter table `forum_post` - add constraint fk_forum_post_thread_id - foreign key (thread_id) references thread (id) - on delete cascade on update cascade; - -alter table `forum_post` - add constraint fk_forum_post_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: forum_post_file_description - -alter table `forum_post_file_description` drop foreign key `FK_forum_post_file`; - -alter table `forum_post_file_description` drop key `I_forum_post_file_post`; -alter table `forum_post_file_description` drop key `FK_forum_post_file`; - -rename table `forum_post_file_description` to `forum_post_file_reference`; - -alter table `forum_post_file_reference` - add constraint fk_forum_post_file_reference_forum_post_id - foreign key (forum_post_id) references forum_post (id) - on delete cascade on update cascade; - -alter table `forum_post_file_reference` - add constraint fk_forum_post_file_reference_file_reference_id - foreign key (file_reference_id) references file_reference (id) - on delete cascade on update cascade; - -/* - * Step 23: forum_post_read, project_thread, reviewer_thread and group_thread - */ - --- table: forum_post_read - -alter table `forum_post_read` drop foreign key `FK8A5DFC60DD74550D`; -alter table `forum_post_read` drop foreign key `FK8A5DFC60924F477B`; - -alter table `forum_post_read` drop key `FK8A5DFC60DD74550D`; -alter table `forum_post_read` drop key `FK8A5DFC60924F477B`; - -alter table `forum_post_read` drop primary key; - -rename table `forum_post_read` to `forum_post_read_state`; - -alter table `forum_post_read_state` change `read` `read` tinyint(1) not null after `post`; -alter table `forum_post_read_state` change `user` `user_id` bigint(20) not null after `post`; -alter table `forum_post_read_state` change `post` `forum_post_id` bigint(20) not null; - -alter table `forum_post_read_state` add primary key (forum_post_id, user_id); - -alter table `forum_post_read_state` - add constraint fk_forum_post_read_state_forum_post_id - foreign key (forum_post_id) references forum_post (id) - on delete cascade on update cascade; - -alter table `forum_post_read_state` - add constraint fk_forum_post_read_state_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: project_thread - -alter table `project_thread` drop foreign key `FK_project_thread_thread`; -alter table `project_thread` drop foreign key `FK_project_thread_project`; - -alter table `project_thread` drop key `FK_project_thread_thread`; -alter table `project_thread` drop key `FK_project_thread_project`; - -alter table `project_thread` change `project_id` `project_id` bigint(20) not null after `id`; - -alter table `project_thread` - add constraint fk_project_thread_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `project_thread` - add constraint fk_project_thread_thread_id - foreign key (thread_id) references thread (id) - on delete cascade on update cascade; - --- table: reviewer_thread - -alter table `reviewer_thread` drop foreign key `FK_reviewer_thread_thread`; -alter table `reviewer_thread` drop foreign key `FK_reviewer_thread_group`; - -alter table `reviewer_thread` drop key `FK_reviewer_thread_thread`; -alter table `reviewer_thread` drop key `project_id`; - -alter table `reviewer_thread` change `thread_id` `thread_id` bigint(20) not null after `project_id`; - -alter table `reviewer_thread` add constraint uk_reviewer_thread_project_id unique(project_id, thread_id); - -alter table `reviewer_thread` - add constraint fk_reviewer_thread_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `reviewer_thread` - add constraint fk_reviewer_thread_thread_id - foreign key (thread_id) references thread (id) - on delete cascade on update cascade; - --- table: group_thread - -alter table `group_thread` drop foreign key `FK_project_group_thread_thread`; -alter table `group_thread` drop foreign key `FK_project_group_thread_group`; - -alter table `group_thread` drop key `FK_project_group_thread_thread`; -alter table `group_thread` drop key `project_group`; - -rename table `group_thread` to `project_group_thread`; - -alter table `project_group_thread` change `group_id` `project_group_id` bigint(20) not null after `id`; - -alter table `project_group_thread` - add constraint fk_project_group_thread_project_group_id - foreign key (project_group_id) references project_group (id) - on delete cascade on update cascade; - -alter table `project_group_thread` - add constraint fk_project_group_thread_thread_id - foreign key (thread_id) references thread (id) - on delete cascade on update cascade; - -/* - * Step 24: forum_notification, Notification, NotificationData - */ - --- table: forum_notification, - -alter table `forum_notification` drop foreign key `FK_forum_notification_notification_event`; -alter table `forum_notification` drop foreign key `FK_forum_notification_forum_post`; - -alter table `forum_notification` drop key `FK_forum_notification_notification_event`; - -alter table `forum_notification` drop primary key; - -alter table `forum_notification` change `forumPost_id` `forum_post_id` bigint(20) not null; -alter table `forum_notification` change `notificationEvent_id` `notification_data_id` bigint(20) not null; - -alter table `forum_notification` add primary key (forum_post_id, notification_data_id); - -alter table `forum_notification` - add constraint fk_forum_notification_forum_post_id - foreign key (forum_post_id) references forum_post (id) - on delete cascade on update cascade; - --- table: Notification - -alter table `Notification` drop foreign key `FK_notification_user`; -alter table `Notification` drop foreign key `FK2D45DD0B599425F6`; - -alter table `Notification` drop key `FK2D45DD0B599425F6`; -alter table `Notification` drop key `FK2D45DD0B895349BF`; - -rename table `Notification` to `notification`; - -alter table `notification` change `mailed` `mailed` bit(1) not null after `version`; -alter table `notification` change `notificationData_id` `notification_data_id` bigint(20) default null; - -alter table `notification` - add constraint fk_notification_user_id - foreign key (user_id) references user (id) - on delete cascade on update cascade; - --- table: NotificationData - -alter table `NotificationData` drop foreign key `FK_notification_data_user_caused_by`; -alter table `NotificationData` drop foreign key `FK_notification_data_project`; -alter table `NotificationData` drop foreign key `FK_notification_data_peer_review`; -alter table `NotificationData` drop foreign key `FK_notification_data_milestone`; -alter table `NotificationData` drop foreign key `FK_notification_data_group`; -alter table `NotificationData` drop foreign key `FK2DCAC355FCDADF61`; -alter table `NotificationData` drop foreign key `FK2DCAC3558D40D1B9`; -alter table `NotificationData` drop foreign key `FK2DCAC3554D07E0A9`; - -alter table `NotificationData` drop key `FK_notification_data_group`; -alter table `NotificationData` drop key `FK_notification_data_milestone`; -alter table `NotificationData` drop key `FK2DCAC355FCDADF61`; -alter table `NotificationData` drop key `FK2DCAC355B2E2AD78`; -alter table `NotificationData` drop key `FK2DCAC3558D40D1B9`; -alter table `NotificationData` drop key `FK2DCAC35542E9AC7B`; -alter table `NotificationData` drop key `FK2DCAC355C1813915`; -alter table `NotificationData` drop key `FK2DCAC3554D07E0A9`; - -rename table `NotificationData` to `notification_data`; - -alter table `notification_data` change `type` `type` varchar(255) default null after `event`; -alter table `notification_data` change `source` `source` longtext default null after `type`; -alter table `notification_data` change `additionalSource` `additional_source` longtext default null after `source`; -alter table `notification_data` change `DTYPE` `subclass` varchar(31) not null after `additional_source`; - -alter table `notification_data` change `seminar_id` `final_seminar_id` bigint(20) default null after `subclass`; -alter table `notification_data` change `idea_id` `idea_id` bigint(20) default null after `final_seminar_id`; -alter table `notification_data` change `mileStone_id` `milestone_id` bigint(20) default null after `idea_id`; -alter table `notification_data` change `request_id` `peer_request_id` bigint(20) default null after `milestone_id`; -alter table `notification_data` change `review_id` `peer_review_id` bigint(20) default null after `peer_request_id`; -alter table `notification_data` change `project_id` `project_id` bigint(20) default null after `peer_review_id`; -alter table `notification_data` change `group_id` `project_group_id` bigint(20) default null after `project_id`; -alter table `notification_data` change `causedBy_id` `caused_by_user_id` bigint(20) default null after `project_group_id`; - -alter table `notification_data` - add constraint fk_notification_data_final_seminar_id - foreign key (final_seminar_id) references final_seminar (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_idea_id - foreign key (idea_id) references idea (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_milestone_id - foreign key (milestone_id) references milestone (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_peer_request_id - foreign key (peer_request_id) references peer_request (id) - on delete set null on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_peer_review_id - foreign key (peer_review_id) references peer_review (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_project_id - foreign key (project_id) references project (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_project_group_id - foreign key (project_group_id) references project_group (id) - on delete cascade on update cascade; - -alter table `notification_data` - add constraint fk_notification_data_caused_by_user_id - foreign key (caused_by_user_id) references user (id) - on delete set null on update cascade; - --- add foreign key from notification to notification_data - -alter table `notification` - add constraint fk_notification_notification_data_id - foreign key (notification_data_id) references notification_data (id) - on delete cascade on update cascade; - --- add foreign key from forum_notification to notification_data - -alter table `forum_notification` - add constraint fk_forum_notification_notification_data_id - foreign key (notification_data_id) references notification_data (id) - on delete cascade on update cascade; diff --git a/core/src/main/resources/db/migration/V392_1__reflection_resubmission.sql b/core/src/main/resources/db/migration/V392_1__reflection_resubmission.sql deleted file mode 100644 index d80e266c9d..0000000000 --- a/core/src/main/resources/db/migration/V392_1__reflection_resubmission.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `project_user` - ADD COLUMN `reflection_status` VARCHAR(32) NOT NULL DEFAULT 'NOT_SUBMITTED'; - -UPDATE `project_user` SET `reflection_status` = 'SUBMITTED' WHERE `reflection` IS NOT NULL; diff --git a/core/src/main/resources/db/migration/V392_2__reflection_comment_by_supervisor.sql b/core/src/main/resources/db/migration/V392_2__reflection_comment_by_supervisor.sql deleted file mode 100644 index f3cc5f2ce1..0000000000 --- a/core/src/main/resources/db/migration/V392_2__reflection_comment_by_supervisor.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project_user` ADD COLUMN `reflection_comment_by_supervisor` TEXT NULL; diff --git a/core/src/main/resources/db/migration/V39__clean_up_around_grading_report.sql b/core/src/main/resources/db/migration/V39__clean_up_around_grading_report.sql deleted file mode 100644 index b4329eda0c..0000000000 --- a/core/src/main/resources/db/migration/V39__clean_up_around_grading_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `grading_report` DROP COLUMN `grade`; -ALTER TABLE `grading_report` DROP COLUMN `finished`; diff --git a/core/src/main/resources/db/migration/V3__clean_up_old_schema_history.sql b/core/src/main/resources/db/migration/V3__clean_up_old_schema_history.sql new file mode 100644 index 0000000000..e215f0958b --- /dev/null +++ b/core/src/main/resources/db/migration/V3__clean_up_old_schema_history.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS `schema_version`; diff --git a/core/src/main/resources/db/migration/V3__milestone_notification.sql b/core/src/main/resources/db/migration/V3__milestone_notification.sql deleted file mode 100644 index 131d8511a7..0000000000 --- a/core/src/main/resources/db/migration/V3__milestone_notification.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `NotificationData` ADD `mileStone_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `NotificationData` ADD CONSTRAINT `FK_sqjaj3jb6t9lsw1l2p8ex8jnb` FOREIGN KEY (`mileStone_id`) REFERENCES `milestone` (`id`); diff --git a/core/src/main/resources/db/migration/V40__removed_unused_columns.sql b/core/src/main/resources/db/migration/V40__removed_unused_columns.sql deleted file mode 100644 index 6b2f3e3217..0000000000 --- a/core/src/main/resources/db/migration/V40__removed_unused_columns.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `idea` DROP COLUMN `externalSupervisorInfo`; -ALTER TABLE `idea` DROP FOREIGN KEY `FK6E051897E20156A5`; -ALTER TABLE `idea` DROP KEY `FK6E051897E20156A5`; -ALTER TABLE `idea` DROP COLUMN `suggestedReviewer_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V41__idea_inactive_attribute.sql b/core/src/main/resources/db/migration/V41__idea_inactive_attribute.sql deleted file mode 100644 index fe7eb0d042..0000000000 --- a/core/src/main/resources/db/migration/V41__idea_inactive_attribute.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `idea` ADD COLUMN `inactive` BOOLEAN DEFAULT FALSE NOT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V42__add_project_class_to_checklist_template.sql b/core/src/main/resources/db/migration/V42__add_project_class_to_checklist_template.sql deleted file mode 100644 index cdce230301..0000000000 --- a/core/src/main/resources/db/migration/V42__add_project_class_to_checklist_template.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE `checklist_template_degree_level` ( - `checklist_template_id` BIGINT(20) NOT NULL, - `degree_level_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`checklist_template_id`, `degree_level_id`), - CONSTRAINT `FK_checklist_template_degree_level_checklist_template_id` FOREIGN KEY (`checklist_template_id`) REFERENCES `checklist_template` (`id`), - CONSTRAINT `FK_checklist_template_degree_level_degree_level_id` FOREIGN KEY (`degree_level_id`) REFERENCES `project_class` (`id`) -) - ENGINE =InnoDB - DEFAULT CHARSET =utf8; - -INSERT INTO `checklist_template_degree_level` (`checklist_template_id`, `degree_level_id`) -SELECT - t.checklist_template_id, - p.id -FROM checklist_template_checklist_category AS t - INNER JOIN checklist_category AS c - ON t.categories_id = c.id - INNER JOIN project_class AS p - ON p.name = c.categoryName; diff --git a/core/src/main/resources/db/migration/V43__removed_old_degree_level_categories.sql b/core/src/main/resources/db/migration/V43__removed_old_degree_level_categories.sql deleted file mode 100644 index a6485a1748..0000000000 --- a/core/src/main/resources/db/migration/V43__removed_old_degree_level_categories.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM `checklist_template_checklist_category` WHERE `categories_id` IN (SELECT `id` FROM `checklist_category` WHERE `categoryName` IN (SELECT `name` FROM `project_class`)); -DELETE FROM `checklist_checklist_category` WHERE `categories_id` IN (SELECT `id` FROM `checklist_category` WHERE `categoryName` IN (SELECT `name` FROM `project_class`)); -DELETE FROM `checklist_category` WHERE `categoryName` IN (SELECT `name` FROM `project_class`); diff --git a/core/src/main/resources/db/migration/V44__added_degree_level_to_project_type.sql b/core/src/main/resources/db/migration/V44__added_degree_level_to_project_type.sql deleted file mode 100644 index 42a36c3a8c..0000000000 --- a/core/src/main/resources/db/migration/V44__added_degree_level_to_project_type.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `project_class` ADD COLUMN `degreeLevel` VARCHAR(255) DEFAULT NULL; -UPDATE `project_class` SET `degreeLevel` = 'NONE' WHERE `code` = 'ICT4D'; -UPDATE `project_class` SET `degreeLevel` = 'FIRST_CYCLE' WHERE `code` = 'BACHELOR'; -UPDATE `project_class` SET `degreeLevel` = 'SECOND_CYCLE' WHERE `code` = 'MASTER'; -UPDATE `project_class` SET `degreeLevel` = 'NONE' WHERE `code` = 'UNKNOWN'; diff --git a/core/src/main/resources/db/migration/V45__rename_project_class_to_project_type.sql b/core/src/main/resources/db/migration/V45__rename_project_class_to_project_type.sql deleted file mode 100644 index 126624b774..0000000000 --- a/core/src/main/resources/db/migration/V45__rename_project_class_to_project_type.sql +++ /dev/null @@ -1,47 +0,0 @@ -RENAME TABLE `project_class` TO `ProjectType`; - -ALTER TABLE `grading_report_template` DROP KEY `UK_qovbb9ql33oaxprfr01w7ss9u`; -ALTER TABLE `grading_report_template` DROP FOREIGN KEY `FK_qovbb9ql33oaxprfr01w7ss9u`; -ALTER TABLE `grading_report_template` CHANGE `projectClass_id` `projectType_id` bigint(20) not null; -ALTER TABLE `grading_report_template` ADD CONSTRAINT `FK_grading_report_template_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -ALTER TABLE `project` DROP FOREIGN KEY `FKED904B19B2B6081F`; -ALTER TABLE `project` CHANGE `projectClass_id` `projectType_id` bigint(20) not null; -ALTER TABLE `project` ADD CONSTRAINT `FK_project_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -ALTER TABLE `project_class_settings` DROP KEY `UK_oxqyb1t8jo7cq2fx8j9slvloa`; -ALTER TABLE `project_class_settings` DROP KEY `projectClass_id`; -ALTER TABLE `project_class_settings` DROP KEY `FK3918D8F0B2B6081F`; -ALTER TABLE `project_class_settings` DROP FOREIGN KEY `FK_oxqyb1t8jo7cq2fx8j9slvloa`; -ALTER TABLE `project_class_settings` CHANGE `projectClass_id` `projectType_id` bigint(20) not null; -ALTER TABLE `project_class_settings` ADD CONSTRAINT `FK_project_class_settings_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); -ALTER TABLE `project_class_settings` ADD UNIQUE KEY `UK_project_class_settings_projectType` (`projectType_id`); - -ALTER TABLE `projectPartner` DROP FOREIGN KEY `FK_2ar5my1wm4p3uevf1xrrv4cgd`; -ALTER TABLE `projectPartner` DROP KEY `FK_2ar5my1wm4p3uevf1xrrv4cgd`; -ALTER TABLE `projectPartner` CHANGE `projectClass_id` `projectType_id` bigint(20) not null; -ALTER TABLE `projectPartner` ADD CONSTRAINT `FK_projectPartner_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -ALTER TABLE `schedule_template` DROP FOREIGN KEY `FK_s8jm2o7uguo5wcjd41bheteu6`; -ALTER TABLE `schedule_template` DROP KEY `FK_s8jm2o7uguo5wcjd41bheteu6`; -ALTER TABLE `schedule_template` CHANGE `projectClass_id` `projectType_id` bigint(20) DEFAULT NULL; -ALTER TABLE `schedule_template` ADD CONSTRAINT `FK_schedule_template_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -ALTER TABLE `idea` DROP FOREIGN KEY `FK6E051897B2B6081F`; -ALTER TABLE `idea` DROP KEY `FK6E051897B2B6081F`; -ALTER TABLE `idea` CHANGE `projectClass_id` `projectType_id` bigint(20) not null; -ALTER TABLE `idea` ADD CONSTRAINT `FK_idea_projectType` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -RENAME TABLE `milestone_activity_project_class` TO `milestone_activity_ProjectType`; -ALTER TABLE `milestone_activity_ProjectType` DROP PRIMARY KEY; -ALTER TABLE `milestone_activity_ProjectType` DROP FOREIGN KEY `FKFB3FC75157F6B071`; -ALTER TABLE `milestone_activity_ProjectType` CHANGE `projectClasses_id` `projectTypes_id` bigint(20) not null; -ALTER TABLE `milestone_activity_ProjectType` ADD CONSTRAINT `FKFB3FC75157F6B071` FOREIGN KEY (`projectTypes_id`) REFERENCES `ProjectType` (`id`); -ALTER TABLE `milestone_activity_ProjectType` ADD PRIMARY KEY ( `milestone_activity_id` , `projectTypes_id` ) ; - -RENAME TABLE `ApplicationPeriod_project_class` TO `ApplicationPeriod_ProjectType`; -ALTER TABLE `ApplicationPeriod_ProjectType` DROP PRIMARY KEY; -ALTER TABLE `ApplicationPeriod_ProjectType` DROP FOREIGN KEY `FK97FDEC24B2B6081F`; -ALTER TABLE `ApplicationPeriod_ProjectType` CHANGE `projectClass_id` `projectTypes_id` bigint(20) not null; -ALTER TABLE `ApplicationPeriod_ProjectType` ADD CONSTRAINT `FK97FDEC24B2B6081F` FOREIGN KEY (`projectTypes_id`) REFERENCES `ProjectType` (`id`); -ALTER TABLE `ApplicationPeriod_ProjectType` ADD PRIMARY KEY ( `ApplicationPeriod_id` , `projectTypes_id` ) ; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V46__plagiarism_feedback_to_grading_report.sql b/core/src/main/resources/db/migration/V46__plagiarism_feedback_to_grading_report.sql deleted file mode 100644 index c9263452bd..0000000000 --- a/core/src/main/resources/db/migration/V46__plagiarism_feedback_to_grading_report.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report` ADD COLUMN `plagiarismFeedback` VARCHAR(2000) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V47__made_degree_column_not_null_in_project_type.sql b/core/src/main/resources/db/migration/V47__made_degree_column_not_null_in_project_type.sql deleted file mode 100644 index d0d97a42bb..0000000000 --- a/core/src/main/resources/db/migration/V47__made_degree_column_not_null_in_project_type.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `ProjectType` MODIFY COLUMN `degreeLevel` VARCHAR(255) NOT NULL DEFAULT 'NONE'; -UPDATE `ProjectType` SET `degreeLevel` = 'NONE' WHERE `degreeLevel` = ''; diff --git a/core/src/main/resources/db/migration/V48__remove_code_column_from_project_type.sql b/core/src/main/resources/db/migration/V48__remove_code_column_from_project_type.sql deleted file mode 100644 index f82c495cb6..0000000000 --- a/core/src/main/resources/db/migration/V48__remove_code_column_from_project_type.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ProjectType` DROP COLUMN `code`; diff --git a/core/src/main/resources/db/migration/V49__addedd_default_project_status_to_user_profile.sql b/core/src/main/resources/db/migration/V49__addedd_default_project_status_to_user_profile.sql deleted file mode 100644 index 571ce0ce28..0000000000 --- a/core/src/main/resources/db/migration/V49__addedd_default_project_status_to_user_profile.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `UserProfile_defaultProjectStatusFilter` ( - `UserProfile_id` BIGINT(20) NOT NULL, - `defaultProjectStatusFilter` VARCHAR(255) DEFAULT NULL, - KEY `FK_icub74l6htav89sx85ar4qcqg` (`UserProfile_id`), - CONSTRAINT `FK_icub74l6htav89sx85ar4qcqg` FOREIGN KEY (`UserProfile_id`) REFERENCES `user_profile` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V4__rename_newidea_tables.sql b/core/src/main/resources/db/migration/V4__rename_newidea_tables.sql deleted file mode 100644 index d251adf2f3..0000000000 --- a/core/src/main/resources/db/migration/V4__rename_newidea_tables.sql +++ /dev/null @@ -1,11 +0,0 @@ -RENAME TABLE `newidea_first_meeting` TO `idea_first_meeting`; -RENAME TABLE `newidea` TO `idea`; -RENAME TABLE `newidea_export` TO `idea_export`; -RENAME TABLE `newidea_student` TO `idea_student`; -RENAME TABLE `newidea_match` TO `idea_match`; -RENAME TABLE `newidea_Keyword` TO `idea_Keyword`; - -ALTER TABLE `idea_Keyword` DROP KEY `FK3707EE21BD1521C1`; -ALTER TABLE `idea_Keyword` DROP FOREIGN KEY `FK3707EE21BD1521C1`; -ALTER TABLE `idea_Keyword` CHANGE COLUMN `newidea_id` `idea_id` BIGINT(20) NOT NULL; -ALTER TABLE `idea_Keyword` ADD CONSTRAINT `FK3707EE21BD1521C1` FOREIGN KEY (`idea_id`) REFERENCES `idea` (`id`); diff --git a/core/src/main/resources/db/migration/V50__renaming_checklist_template_projectType_join_table.sql b/core/src/main/resources/db/migration/V50__renaming_checklist_template_projectType_join_table.sql deleted file mode 100644 index f85aeaa5dd..0000000000 --- a/core/src/main/resources/db/migration/V50__renaming_checklist_template_projectType_join_table.sql +++ /dev/null @@ -1,14 +0,0 @@ -RENAME TABLE `checklist_template_degree_level` TO `checklist_template_ProjectType`; -ALTER TABLE `checklist_template_ProjectType` DROP FOREIGN KEY `FK_checklist_template_degree_level_degree_level_id`; -ALTER TABLE `checklist_template_ProjectType` DROP KEY `FK_checklist_template_degree_level_degree_level_id`; -ALTER TABLE `checklist_template_ProjectType` CHANGE `degree_level_id` `projectType_id` bigint(20) not null; -ALTER TABLE `checklist_template_ProjectType` ADD KEY `FK_checklist_template_projectType_id` (`projectType_id`); -ALTER TABLE `checklist_template_ProjectType` ADD CONSTRAINT `FK_checklist_template_projectType_id` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`); - -RENAME TABLE `project_class_settings` TO `project_type_settings`; - -ALTER TABLE `target` DROP FOREIGN KEY `FKCB7E7191A520201Eb`; -ALTER TABLE `target` DROP KEY `FKCB7E7191A520201E`; -ALTER TABLE `target` CHANGE `projectClassId` `projectTypeId` bigint(20) NOT NULL; -ALTER TABLE `target` ADD KEY `FKCB7E7191A520201E` (`projectTypeId`); -ALTER TABLE `target` ADD CONSTRAINT `FKCB7E7191A520201Eb` FOREIGN KEY (`projectTypeId`) REFERENCES `ProjectType` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V51__added_default_project_team_member_roles_to_user_profile.sql b/core/src/main/resources/db/migration/V51__added_default_project_team_member_roles_to_user_profile.sql deleted file mode 100644 index 02f6de79f2..0000000000 --- a/core/src/main/resources/db/migration/V51__added_default_project_team_member_roles_to_user_profile.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `UserProfile_defaultProjectTeamMemberRolesFilter` ( - `UserProfile_id` BIGINT(20) NOT NULL, - `defaultProjectTeamMemberRolesFilter` VARCHAR(255) DEFAULT NULL, - KEY `FK_ibub74l6htav89sx85ar4qcqg` (`UserProfile_id`), - CONSTRAINT `FK_ibub74l6htav89sx85ar4qcqg` FOREIGN KEY (`UserProfile_id`) REFERENCES `user_profile` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V52__added_default_supervisor_filter_to_user_profile.sql b/core/src/main/resources/db/migration/V52__added_default_supervisor_filter_to_user_profile.sql deleted file mode 100644 index 452830e9c2..0000000000 --- a/core/src/main/resources/db/migration/V52__added_default_supervisor_filter_to_user_profile.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `defaultSupervisorFilter` BOOLEAN NOT NULL DEFAULT TRUE; diff --git a/core/src/main/resources/db/migration/V53__added_default_project_type_filter_to_user_profile.sql b/core/src/main/resources/db/migration/V53__added_default_project_type_filter_to_user_profile.sql deleted file mode 100644 index 4c5d753dd7..0000000000 --- a/core/src/main/resources/db/migration/V53__added_default_project_type_filter_to_user_profile.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `user_profile_ProjectType` ( - `user_profile_id` bigint(20) NOT NULL, - `defaultProjectTypeFilter_id` bigint(20) NOT NULL, - KEY `FK_76s8320kw3w7bxp6lw7pmawfh` (`defaultProjectTypeFilter_id`), - KEY `FK_2blea2vk0b5cvgxjo1fy4p2j0` (`user_profile_id`), - CONSTRAINT `FK_2blea2vk0b5cvgxjo1fy4p2j0` FOREIGN KEY (`user_profile_id`) REFERENCES `user_profile` (`id`), - CONSTRAINT `FK_76s8320kw3w7bxp6lw7pmawfh` FOREIGN KEY (`defaultProjectTypeFilter_id`) REFERENCES `ProjectType` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V54_1__add_question_string_to_answer.sql b/core/src/main/resources/db/migration/V54_1__add_question_string_to_answer.sql deleted file mode 100644 index fa2b819e44..0000000000 --- a/core/src/main/resources/db/migration/V54_1__add_question_string_to_answer.sql +++ /dev/null @@ -1 +0,0 @@ -alter table answer add column question longtext not null; diff --git a/core/src/main/resources/db/migration/V54_2__move_question_string_to_answer.sql b/core/src/main/resources/db/migration/V54_2__move_question_string_to_answer.sql deleted file mode 100644 index cc03d00447..0000000000 --- a/core/src/main/resources/db/migration/V54_2__move_question_string_to_answer.sql +++ /dev/null @@ -1 +0,0 @@ -update answer as t1 inner join question as t2 on t1.question_id=t2.id set t1.question=t2.question; diff --git a/core/src/main/resources/db/migration/V54_3__drop_table_question.sql b/core/src/main/resources/db/migration/V54_3__drop_table_question.sql deleted file mode 100644 index a35d5cb7c6..0000000000 --- a/core/src/main/resources/db/migration/V54_3__drop_table_question.sql +++ /dev/null @@ -1,3 +0,0 @@ -alter table answer drop foreign key FK_eix9du6u2r4wxwu415wq8yb99; -alter table answer drop column question_id; -drop table question; diff --git a/core/src/main/resources/db/migration/V55__set_up_default_filter_for_lazy_supervisors.sql b/core/src/main/resources/db/migration/V55__set_up_default_filter_for_lazy_supervisors.sql deleted file mode 100644 index 29b362c9ce..0000000000 --- a/core/src/main/resources/db/migration/V55__set_up_default_filter_for_lazy_supervisors.sql +++ /dev/null @@ -1,13 +0,0 @@ -DELETE FROM `UserProfile_defaultProjectStatusFilter`; -INSERT INTO `UserProfile_defaultProjectStatusFilter` (`UserProfile_id`, `defaultProjectStatusFilter`) - SELECT `id`, 'ACTIVE' FROM `user_profile`; - -DELETE FROM `UserProfile_defaultProjectTeamMemberRolesFilter`; -INSERT INTO `UserProfile_defaultProjectTeamMemberRolesFilter` (`UserProfile_id`, `defaultProjectTeamMemberRolesFilter`) - SELECT `id`, 'REVIEWER' FROM `user_profile`; -INSERT INTO `UserProfile_defaultProjectTeamMemberRolesFilter` (`UserProfile_id`, `defaultProjectTeamMemberRolesFilter`) - SELECT `id`, 'CO_SUPERVISOR' FROM `user_profile`; - -DELETE FROM `user_profile_ProjectType`; -INSERT INTO `user_profile_ProjectType` (`user_profile_id`, `defaultProjectTypeFilter_id`) - SELECT `p`.`id`, `t`.`id` FROM `user_profile` AS `p`, `ProjectType` AS `t` WHERE `t`.`degreeLevel` != 'NONE'; diff --git a/core/src/main/resources/db/migration/V56__expanded_filter_to_user_profile.sql b/core/src/main/resources/db/migration/V56__expanded_filter_to_user_profile.sql deleted file mode 100644 index cd8ad12747..0000000000 --- a/core/src/main/resources/db/migration/V56__expanded_filter_to_user_profile.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `user_profile` ADD COLUMN `expandProjectFilter` TINYINT(1) NOT NULL DEFAULT 1; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V57__reviewer_report_added_to_grading_report.sql b/core/src/main/resources/db/migration/V57__reviewer_report_added_to_grading_report.sql deleted file mode 100644 index 0a5139f986..0000000000 --- a/core/src/main/resources/db/migration/V57__reviewer_report_added_to_grading_report.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report` ADD COLUMN `reviewerReport` TINYINT(1) NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V58__submitted_added_to_grading_report.sql b/core/src/main/resources/db/migration/V58__submitted_added_to_grading_report.sql deleted file mode 100644 index 4ca326a6eb..0000000000 --- a/core/src/main/resources/db/migration/V58__submitted_added_to_grading_report.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `grading_report` ADD COLUMN `submitted` TINYINT(1) NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V59__change_constraint_on_grading_report.sql b/core/src/main/resources/db/migration/V59__change_constraint_on_grading_report.sql deleted file mode 100644 index 3ef2aae21c..0000000000 --- a/core/src/main/resources/db/migration/V59__change_constraint_on_grading_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `grading_report` DROP INDEX `uc_project_student`; -ALTER TABLE grading_report ADD UNIQUE INDEX `uc_project_student` (`student_id`, `reviewerReport`, `project_id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V5__final_thesis_entity_table.sql b/core/src/main/resources/db/migration/V5__final_thesis_entity_table.sql deleted file mode 100644 index 7965c076b4..0000000000 --- a/core/src/main/resources/db/migration/V5__final_thesis_entity_table.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE `FinalThesis` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `fileDescription_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `project_file_description` (`project_id`,`fileDescription_id`), - KEY `FK_final_thesis_file_description` (`fileDescription_id`), - KEY `FK_final_thesis_project` (`project_id`), - CONSTRAINT `FK_final_thesis_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - CONSTRAINT `FK_final_thesis_file_description` FOREIGN KEY (`fileDescription_id`) REFERENCES `file_description` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/core/src/main/resources/db/migration/V60__added_default_activity_plan_template_to_project_type.sql b/core/src/main/resources/db/migration/V60__added_default_activity_plan_template_to_project_type.sql deleted file mode 100644 index fb00173811..0000000000 --- a/core/src/main/resources/db/migration/V60__added_default_activity_plan_template_to_project_type.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `ProjectType` ADD COLUMN `defaultActivityPlanTemplate_id` BIGINT(20) DEFAULT NULL; -ALTER TABLE `ProjectType` ADD CONSTRAINT `ProjectType_ibfk_1` FOREIGN KEY (`defaultActivityPlanTemplate_id`) REFERENCES `schedule_template` (`id`); diff --git a/core/src/main/resources/db/migration/V61__added_student_boolean_to_milestoneactivity.sql b/core/src/main/resources/db/migration/V61__added_student_boolean_to_milestoneactivity.sql deleted file mode 100644 index 778dd8bdb2..0000000000 --- a/core/src/main/resources/db/migration/V61__added_student_boolean_to_milestoneactivity.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `milestone_activity` ADD `editableByStudents` bit(1) NOT NULL DEFAULT b'0'; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V62__adding_thesislink.sql b/core/src/main/resources/db/migration/V62__adding_thesislink.sql deleted file mode 100644 index 86a782c8fa..0000000000 --- a/core/src/main/resources/db/migration/V62__adding_thesislink.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE IF NOT EXISTS `thesislink` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `URL` varchar(255) DEFAULT NULL, - `visibleToCoSupervisor` tinyint(1) DEFAULT 1, - `visibleToHeadSupervisor` tinyint(1) DEFAULT 1, - `visibleToReviewer` tinyint(1) DEFAULT 0, - `project_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_a7qgw98iyparu1ycgy6jmvky5` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - -ALTER TABLE `thesislink` - ADD CONSTRAINT `FK_a7qgw98iyparu1ycgy6jmvky5` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V63__opposition_report_and_opposition_criterion.sql b/core/src/main/resources/db/migration/V63__opposition_report_and_opposition_criterion.sql deleted file mode 100644 index 08cc2ff378..0000000000 --- a/core/src/main/resources/db/migration/V63__opposition_report_and_opposition_criterion.sql +++ /dev/null @@ -1,25 +0,0 @@ -CREATE TABLE `opposition_report` ( -`id` bigint(20) NOT NULL AUTO_INCREMENT, -`dateCreated` datetime NOT NULL, -`lastModified` datetime NOT NULL, -`version` int(11) NOT NULL, -`finalSeminarOpposition_id` bigint(20) NOT NULL, -PRIMARY KEY (`id`), -KEY `FK_opposition_report_seminar_opposition` (`finalSeminarOpposition_id`), -CONSTRAINT `FK_opposition_report_seminar_opposition` FOREIGN KEY (`finalSeminarOpposition_id`) REFERENCES `final_seminar_opposition` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `opposition_criterion` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `oppositionReport_id` bigint(20) NOT NULL, - `feedback` varchar(2000) DEFAULT NULL, - `description` varchar(2000) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `sortOrder` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_opposition_criterion_opposition_report` (`oppositionReport_id`), - CONSTRAINT `FK_opposition_criterion_opposition_report` FOREIGN KEY (`oppositionReport_id`) REFERENCES `opposition_report` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V64__summary_and_submitted_to_opposition_report.sql b/core/src/main/resources/db/migration/V64__summary_and_submitted_to_opposition_report.sql deleted file mode 100644 index 1f2dc3e80b..0000000000 --- a/core/src/main/resources/db/migration/V64__summary_and_submitted_to_opposition_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `opposition_report` ADD COLUMN `thesisSummary` VARCHAR(2000) DEFAULT NULL; -ALTER TABLE `opposition_report` ADD COLUMN `submitted` TINYINT(1) NOT NULL DEFAULT 0; diff --git a/core/src/main/resources/db/migration/V65__preliminary_grading_report_and_preliminary_grading_criterion.sql b/core/src/main/resources/db/migration/V65__preliminary_grading_report_and_preliminary_grading_criterion.sql deleted file mode 100644 index 943eba1856..0000000000 --- a/core/src/main/resources/db/migration/V65__preliminary_grading_report_and_preliminary_grading_criterion.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE `preliminary_grading_report` ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` INT(11) NOT NULL, - `submitted` TINYINT(1) NOT NULL, - `user_id` BIGINT(20) NOT NULL, - `finalSeminar_id` BIGINT(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_user_id` (`user_id`), - CONSTRAINT `FK_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), - KEY `FK_finalSeminar_id` (`finalSeminar_id`), - CONSTRAINT `FK_finalSeminar_id` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`) -) - ENGINE =InnoDB - DEFAULT CHARSET =utf8; - -CREATE TABLE `preliminary_grading_criterion` ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `version` INT(11) NOT NULL, - `feedback` VARCHAR(2000) DEFAULT NULL, - `description` VARCHAR(2000) DEFAULT NULL, - `title` VARCHAR(255) NOT NULL, - `sortOrder` INT(11) NOT NULL, - PRIMARY KEY (`id`) -) - ENGINE =InnoDB - DEFAULT CHARSET =utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V66__convert_thesis_link_table_to_utf8.sql b/core/src/main/resources/db/migration/V66__convert_thesis_link_table_to_utf8.sql deleted file mode 100644 index f7767ad4a3..0000000000 --- a/core/src/main/resources/db/migration/V66__convert_thesis_link_table_to_utf8.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `thesislink` CONVERT TO CHARACTER SET utf8; diff --git a/core/src/main/resources/db/migration/V67__removed_user_attribute_from_preliminary_report.sql b/core/src/main/resources/db/migration/V67__removed_user_attribute_from_preliminary_report.sql deleted file mode 100644 index 6ea451a3dc..0000000000 --- a/core/src/main/resources/db/migration/V67__removed_user_attribute_from_preliminary_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table `preliminary_grading_report` drop foreign key `FK_user_id`; -alter table `preliminary_grading_report` drop column `user_id`; diff --git a/core/src/main/resources/db/migration/V68__add_fk_to_preliminary_grading_criterion.sql b/core/src/main/resources/db/migration/V68__add_fk_to_preliminary_grading_criterion.sql deleted file mode 100644 index eefddbbd56..0000000000 --- a/core/src/main/resources/db/migration/V68__add_fk_to_preliminary_grading_criterion.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `preliminary_grading_criterion` ADD COLUMN `preliminaryGradingReport_id` BIGINT(20) NOT NULL; - -ALTER TABLE `preliminary_grading_criterion` -ADD KEY `FK_preliminary_grading_criterion_preliminary_grading_report` (`preliminaryGradingReport_id`); - -ALTER TABLE `preliminary_grading_criterion` -ADD CONSTRAINT `FK_preliminary_grading_criterion_preliminary_grading_report` -FOREIGN KEY (`preliminaryGradingReport_id`) REFERENCES `preliminary_grading_report` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V69__added_back_author_to_preliminary_grading_report.sql b/core/src/main/resources/db/migration/V69__added_back_author_to_preliminary_grading_report.sql deleted file mode 100644 index 4ffc57d896..0000000000 --- a/core/src/main/resources/db/migration/V69__added_back_author_to_preliminary_grading_report.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `preliminary_grading_report` ADD COLUMN `author_id` BIGINT(20) NOT NULL; -ALTER TABLE `preliminary_grading_report` ADD CONSTRAINT `FK_author_id` FOREIGN KEY `FK_author_id` (`author_id`) REFERENCES `user` (`id`); diff --git a/core/src/main/resources/db/migration/V6__removed_final_seminar_end_date.sql b/core/src/main/resources/db/migration/V6__removed_final_seminar_end_date.sql deleted file mode 100644 index 6ab7f7e88f..0000000000 --- a/core/src/main/resources/db/migration/V6__removed_final_seminar_end_date.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `final_seminar` DROP COLUMN `endDate`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V70__removed_visibility_options_from_thesis_link.sql b/core/src/main/resources/db/migration/V70__removed_visibility_options_from_thesis_link.sql deleted file mode 100644 index 27c57e0b5f..0000000000 --- a/core/src/main/resources/db/migration/V70__removed_visibility_options_from_thesis_link.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `thesislink` DROP COLUMN `visibleToCoSupervisor`; -ALTER TABLE `thesislink` DROP COLUMN `visibleToHeadSupervisor`; -ALTER TABLE `thesislink` DROP COLUMN `visibleToReviewer`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V71__added_points_column_to_project.sql b/core/src/main/resources/db/migration/V71__added_points_column_to_project.sql deleted file mode 100644 index adf1571c6e..0000000000 --- a/core/src/main/resources/db/migration/V71__added_points_column_to_project.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project` ADD COLUMN `credits` INT NOT NULL DEFAULT 0; diff --git a/core/src/main/resources/db/migration/V72__merged_opposition_and_preliminary_criterion.sql b/core/src/main/resources/db/migration/V72__merged_opposition_and_preliminary_criterion.sql deleted file mode 100644 index c93a9a857a..0000000000 --- a/core/src/main/resources/db/migration/V72__merged_opposition_and_preliminary_criterion.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE `report` ( - `id` BIGINT(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, - `submitted` BOOLEAN NOT NULL DEFAULT FALSE -) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; - -DELETE FROM `preliminary_grading_criterion`; -DELETE FROM `preliminary_grading_report`; -DELETE FROM `opposition_criterion`; -DELETE FROM `opposition_report`; -DELETE FROM `grading_criterion`; -DELETE FROM `grading_report`; - -ALTER TABLE `preliminary_grading_report` ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `report` (`id`); -ALTER TABLE `opposition_report` ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `report` (`id`); -ALTER TABLE `grading_report` ADD CONSTRAINT FOREIGN KEY (`id`) REFERENCES `report` (`id`); - -ALTER TABLE `preliminary_grading_report` DROP COLUMN `submitted`; -ALTER TABLE `opposition_report` DROP COLUMN `submitted`; -ALTER TABLE `grading_report` DROP COLUMN `submitted`; diff --git a/core/src/main/resources/db/migration/V73__added_domain_object_columns.sql b/core/src/main/resources/db/migration/V73__added_domain_object_columns.sql deleted file mode 100644 index c66d4094f5..0000000000 --- a/core/src/main/resources/db/migration/V73__added_domain_object_columns.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE `report` ADD COLUMN `dateCreated` DATETIME NOT NULL; -ALTER TABLE `report` ADD COLUMN `lastModified` DATETIME NOT NULL; -ALTER TABLE `report` ADD COLUMN `version` INT(4) NOT NULL DEFAULT '0'; - -ALTER TABLE `preliminary_grading_report` DROP COLUMN `dateCreated`; -ALTER TABLE `preliminary_grading_report` DROP COLUMN `lastModified`; -ALTER TABLE `preliminary_grading_report` DROP COLUMN `version`; -ALTER TABLE `opposition_report` DROP COLUMN `dateCreated`; -ALTER TABLE `opposition_report` DROP COLUMN `lastModified`; -ALTER TABLE `opposition_report` DROP COLUMN `version`; -ALTER TABLE `grading_report` DROP COLUMN `dateCreated`; -ALTER TABLE `grading_report` DROP COLUMN `lastModified`; -ALTER TABLE `grading_report` DROP COLUMN `version`; - -DROP TABLE `preliminary_grading_criterion`; - -RENAME TABLE `opposition_criterion` TO `criterion`; - -ALTER TABLE `criterion` DROP FOREIGN KEY `FK_opposition_criterion_opposition_report`; -ALTER TABLE `criterion` DROP KEY `FK_opposition_criterion_opposition_report`; - -ALTER TABLE `criterion` CHANGE COLUMN `oppositionReport_id` `report_id` BIGINT(20) NOT NULL; - -ALTER TABLE `criterion` ADD CONSTRAINT `FK_criterion_report` FOREIGN KEY `FK_criterion_report` (`report_id`) REFERENCES `report` (`id`); diff --git a/core/src/main/resources/db/migration/V74__added_grade_to_final_seminar_opposition.sql b/core/src/main/resources/db/migration/V74__added_grade_to_final_seminar_opposition.sql deleted file mode 100644 index fbdf4f9202..0000000000 --- a/core/src/main/resources/db/migration/V74__added_grade_to_final_seminar_opposition.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `final_seminar_opposition` ADD COLUMN `oppositionGrade` VARCHAR(20) DEFAULT NULL; -ALTER TABLE `final_seminar_active_participation` ADD COLUMN `activeParticipationGrade` VARCHAR(20) DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V75__added_events.sql b/core/src/main/resources/db/migration/V75__added_events.sql deleted file mode 100644 index 4ac5f95a91..0000000000 --- a/core/src/main/resources/db/migration/V75__added_events.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `Event` ( - `name` VARCHAR(255) PRIMARY KEY, - `description` TEXT -) DEFAULT CHARACTER SET = utf8 ENGINE = InnoDB; - -INSERT INTO `Event` (`name`, `description`) -VALUES ('OppositionApprovedEvent', 'Supervisor approves an opponent on a final seminar.'); - -ALTER TABLE `milestone_activity` ADD COLUMN `activatedBy` VARCHAR(255) DEFAULT NULL; -ALTER TABLE `milestone_activity` ADD FOREIGN KEY (`activatedBy`) REFERENCES `Event` (`name`); diff --git a/core/src/main/resources/db/migration/V76__added_participation_approved_event.sql b/core/src/main/resources/db/migration/V76__added_participation_approved_event.sql deleted file mode 100644 index 5bd487e670..0000000000 --- a/core/src/main/resources/db/migration/V76__added_participation_approved_event.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `Event` (`name`, `description`) VALUES - ('ParticipationApprovedEvent', 'Supervisor approves an active participant on a final seminar.'); diff --git a/core/src/main/resources/db/migration/V77__added_final_seminar_respondent.sql b/core/src/main/resources/db/migration/V77__added_final_seminar_respondent.sql deleted file mode 100644 index 3fb9c3b35a..0000000000 --- a/core/src/main/resources/db/migration/V77__added_final_seminar_respondent.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `final_seminar_respondent` ( - `id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `dateCreated` DATETIME NOT NULL, - `lastModified` DATETIME NOT NULL, - `finalSeminar_id` BIGINT(20) NOT NULL, - `student_id` BIGINT(20) NOT NULL, - `version` INT(4) NOT NULL DEFAULT '0', - `respondentGrade` VARCHAR(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_final_seminar_respondent_id` (`finalSeminar_id`), - KEY `FK_student_respondent_id` (`student_id`), - CONSTRAINT `FK_student_respondent_id` FOREIGN KEY (`student_id`) REFERENCES `role` (`id`), - CONSTRAINT `FK_final_seminar_respondent_id` FOREIGN KEY (`finalSeminar_id`) REFERENCES `final_seminar` (`id`) -) - ENGINE =InnoDB - DEFAULT CHARSET =utf8; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V78__added_respondent_approved_event.sql b/core/src/main/resources/db/migration/V78__added_respondent_approved_event.sql deleted file mode 100644 index e02f8019c7..0000000000 --- a/core/src/main/resources/db/migration/V78__added_respondent_approved_event.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `Event` (`name`, `description`) VALUES - ('RespondentApprovedEvent', 'Supervisor approves a respondent on a final seminar.'); diff --git a/core/src/main/resources/db/migration/V79__renamed_opposition_grade_and_respondent_grade.sql b/core/src/main/resources/db/migration/V79__renamed_opposition_grade_and_respondent_grade.sql deleted file mode 100644 index 5e9c2c981e..0000000000 --- a/core/src/main/resources/db/migration/V79__renamed_opposition_grade_and_respondent_grade.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `final_seminar_opposition` CHANGE `oppositionGrade` `grade` VARCHAR( 20 ) DEFAULT NULL; -ALTER TABLE `final_seminar_respondent` CHANGE `respondentGrade` `grade` VARCHAR( 20 ) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V7__removed_uselses_columns.sql b/core/src/main/resources/db/migration/V7__removed_uselses_columns.sql deleted file mode 100644 index 9178063a1d..0000000000 --- a/core/src/main/resources/db/migration/V7__removed_uselses_columns.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `final_seminar` DROP COLUMN `turnitinId`; -ALTER TABLE `final_seminar` DROP COLUMN `documentUploader_id`; -ALTER TABLE `final_seminar` DROP COLUMN `checkedForPlagirism`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V80__renamed_opponent_id_in_final_seminar_opposition.sql b/core/src/main/resources/db/migration/V80__renamed_opponent_id_in_final_seminar_opposition.sql deleted file mode 100644 index 2bdc51154b..0000000000 --- a/core/src/main/resources/db/migration/V80__renamed_opponent_id_in_final_seminar_opposition.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `final_seminar_opposition` DROP FOREIGN KEY `FK_esjegfl5vokjy9u63u1dh1muh`; -ALTER TABLE `final_seminar_opposition` DROP KEY `FK8CD135819EC40373`; -ALTER TABLE `final_seminar_opposition` DROP KEY `FK_esjegfl5vokjy9u63u1dh1muh`; -ALTER TABLE `final_seminar_opposition` CHANGE `opponent_id` `student_id` BIGINT( 20 ) NOT NULL; -ALTER TABLE `final_seminar_opposition` ADD CONSTRAINT `FK_opposition_student_id` FOREIGN KEY (`student_id`) REFERENCES `role` (`id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V81__final_seminar_active_participation_changes.sql b/core/src/main/resources/db/migration/V81__final_seminar_active_participation_changes.sql deleted file mode 100644 index 8316315426..0000000000 --- a/core/src/main/resources/db/migration/V81__final_seminar_active_participation_changes.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE `final_seminar_active_participation` CHANGE `activeParticipationGrade` `grade` VARCHAR( 20 ) DEFAULT NULL; -ALTER TABLE `final_seminar_active_participation` DROP COLUMN `preDeleted`; - -ALTER TABLE `final_seminar_active_participation` ADD COLUMN `student_id` BIGINT(20) DEFAULT NULL; -UPDATE `final_seminar_active_participation` set student_id = (select id from role where rolename="Student" and user_id = final_seminar_active_participation.user_id); -ALTER TABLE `final_seminar_active_participation` ADD CONSTRAINT `FK_active_participation_student_id` FOREIGN KEY (`student_id`) REFERENCES `role` (`id`); -ALTER TABLE `final_seminar_active_participation` MODIFY `student_id` BIGINT(20) NOT NULL; - -ALTER TABLE `final_seminar_active_participation` DROP FOREIGN KEY `FK_hf9puequi3ygf518hi6b1js2m`; -ALTER TABLE `final_seminar_active_participation` DROP KEY `FK35AB727F895349BF`; -ALTER TABLE `final_seminar_active_participation` DROP KEY `FK_hf9puequi3ygf518hi6b1js2m`; -ALTER TABLE `final_seminar_active_participation` DROP COLUMN `user_id`; diff --git a/core/src/main/resources/db/migration/V82__unique_constraint_to_thesislink.sql b/core/src/main/resources/db/migration/V82__unique_constraint_to_thesislink.sql deleted file mode 100644 index 209c412bd1..0000000000 --- a/core/src/main/resources/db/migration/V82__unique_constraint_to_thesislink.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `thesislink` ADD UNIQUE (`project_id`); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V83__added_type_column_to_grading_report.sql b/core/src/main/resources/db/migration/V83__added_type_column_to_grading_report.sql deleted file mode 100644 index cabf759c30..0000000000 --- a/core/src/main/resources/db/migration/V83__added_type_column_to_grading_report.sql +++ /dev/null @@ -1,30 +0,0 @@ -DELETE FROM `grading_criterion`; -DELETE FROM `grading_report`; - -RENAME TABLE `grading_report` TO `GradingReport`; -RENAME TABLE `grading_criterion` TO `GradingCriterion`; - -ALTER TABLE `GradingReport` DROP FOREIGN KEY `FK_student`; -ALTER TABLE `GradingReport` DROP INDEX `uc_project_student`; - -ALTER TABLE `GradingReport` DROP COLUMN `student_id`; -ALTER TABLE `GradingReport` DROP COLUMN `plagiarismFeedback`; -ALTER TABLE `GradingReport` DROP COLUMN `reviewerReport`; - -CREATE TABLE `SupervisorGradingReport` ( - `plagiarismFeedback` longtext, - `id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_2vi1wacprhrqlc8agx08btx34` (`student_id`), - KEY `FK_cwxdypciob8dmndx5elwi3fe5` (`id`), - CONSTRAINT `FK_cwxdypciob8dmndx5elwi3fe5` FOREIGN KEY (`id`) REFERENCES `GradingReport` (`id`), - CONSTRAINT `FK_2vi1wacprhrqlc8agx08btx34` FOREIGN KEY (`student_id`) REFERENCES `role` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `ReviewerGradingReport` ( - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_axsaeqbamfc41dhih1s62g998` (`id`), - CONSTRAINT `FK_axsaeqbamfc41dhih1s62g998` FOREIGN KEY (`id`) REFERENCES `GradingReport` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/core/src/main/resources/db/migration/V84__made_project_title_longtext_to_match_idea.sql b/core/src/main/resources/db/migration/V84__made_project_title_longtext_to_match_idea.sql deleted file mode 100644 index 6625587717..0000000000 --- a/core/src/main/resources/db/migration/V84__made_project_title_longtext_to_match_idea.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project` MODIFY COLUMN `title` LONGTEXT NOT NULL; diff --git a/core/src/main/resources/db/migration/V85__renamed_events.sql b/core/src/main/resources/db/migration/V85__renamed_events.sql deleted file mode 100644 index b715ad8366..0000000000 --- a/core/src/main/resources/db/migration/V85__renamed_events.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE `milestone_activity` DROP FOREIGN KEY `milestone_activity_ibfk_1`; -ALTER TABLE `milestone_activity` DROP KEY `activatedBy`; - -ALTER TABLE `milestone_activity` ADD FOREIGN KEY (`activatedBy`) REFERENCES `Event` (`name`) - ON DELETE SET NULL - ON UPDATE CASCADE; - -UPDATE `Event` -SET - `name` = 'OppositionGradingEvent', - `description` = 'Supervisor grades an opponent on a final seminar.' -WHERE `name` = 'OppositionApprovedEvent'; - -UPDATE `Event` -SET - `name` = 'ParticipationGradingEvent', - `description` = 'Supervisor grades an active participant on a final seminar.' -WHERE `name` = 'ParticipationApprovedEvent'; - -UPDATE `Event` -SET - `name` = 'RespondentGradingEvent', - `description` = 'Supervisor grades a respondent on a final seminar.' -WHERE `name` = 'RespondentApprovedEvent'; diff --git a/core/src/main/resources/db/migration/V86__renamed_milestone_activity_to_template.sql b/core/src/main/resources/db/migration/V86__renamed_milestone_activity_to_template.sql deleted file mode 100644 index 6b51d612c1..0000000000 --- a/core/src/main/resources/db/migration/V86__renamed_milestone_activity_to_template.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE `milestone_activity` TO `milestone_activity_template`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V87__renamed_mile_stone_phase_to_template.sql b/core/src/main/resources/db/migration/V87__renamed_mile_stone_phase_to_template.sql deleted file mode 100644 index 4472c54e05..0000000000 --- a/core/src/main/resources/db/migration/V87__renamed_mile_stone_phase_to_template.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE `milestone_phase` TO `milestone_phase_template`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V88__renamed_many_to_many_table.sql b/core/src/main/resources/db/migration/V88__renamed_many_to_many_table.sql deleted file mode 100644 index 5104ec5463..0000000000 --- a/core/src/main/resources/db/migration/V88__renamed_many_to_many_table.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE `milestone_activity_ProjectType` TO `milestone_activity_template_ProjectType`; diff --git a/core/src/main/resources/db/migration/V89__fix_join_column_name.sql b/core/src/main/resources/db/migration/V89__fix_join_column_name.sql deleted file mode 100644 index 26d3a37391..0000000000 --- a/core/src/main/resources/db/migration/V89__fix_join_column_name.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `milestone_activity_template_ProjectType` DROP FOREIGN KEY `FKFB3FC75180E42A0F`; -ALTER TABLE `milestone_activity_template_ProjectType` CHANGE COLUMN `milestone_activity_id` `milestone_activity_template_id` BIGINT(20) NOT NULL; -ALTER TABLE `milestone_activity_template_ProjectType` ADD FOREIGN KEY `FKFB3FC75180E42A0F` (`milestone_activity_template_id`) REFERENCES `milestone_activity_template` (`id`); - diff --git a/core/src/main/resources/db/migration/V8__final_thesis_status.sql b/core/src/main/resources/db/migration/V8__final_thesis_status.sql deleted file mode 100644 index 10514b7d7c..0000000000 --- a/core/src/main/resources/db/migration/V8__final_thesis_status.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `FinalThesis` ADD COLUMN `status` VARCHAR(32) NOT NULL; -UPDATE `FinalThesis` SET `status` = 'NO_DECISION'; diff --git a/core/src/main/resources/db/migration/V90__added_peer_review_completed_event.sql b/core/src/main/resources/db/migration/V90__added_peer_review_completed_event.sql deleted file mode 100644 index 93e95e6206..0000000000 --- a/core/src/main/resources/db/migration/V90__added_peer_review_completed_event.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `Event` (`name`, `description`) VALUES -('FirstPeerReviewCompleted', 'Author completes their first peer review'), -('SecondPeerReviewCompleted', 'Author completes their second peer review'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V91__added_schedule_template.sql b/core/src/main/resources/db/migration/V91__added_schedule_template.sql deleted file mode 100644 index 05f5088295..0000000000 --- a/core/src/main/resources/db/migration/V91__added_schedule_template.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TABLE IF NOT EXISTS `ApplicationPeriodProjectType` ( - `applicationPeriod_id` bigint(20) NOT NULL DEFAULT '0', - `projectType_id` bigint(20) NOT NULL DEFAULT '0', - `scheduleTemplate_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`applicationPeriod_id`,`projectType_id`), - KEY `FK_hqebt63rl2mhogp66dy5m7upo` (`applicationPeriod_id`), - KEY `FK_546usee339qh4g5otguwka3hi` (`projectType_id`), - KEY `FK_3ku67jvegs1xxh8ykk023i7sb` (`scheduleTemplate_id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - -ALTER TABLE `ApplicationPeriodProjectType` - ADD CONSTRAINT `FK_3ku67jvegs1xxh8ykk023i7sb` FOREIGN KEY (`scheduleTemplate_id`) REFERENCES `schedule_template` (`id`), - ADD CONSTRAINT `FK_546usee339qh4g5otguwka3hi` FOREIGN KEY (`projectType_id`) REFERENCES `ProjectType` (`id`), - ADD CONSTRAINT `FK_hqebt63rl2mhogp66dy5m7upo` FOREIGN KEY (`applicationPeriod_id`) REFERENCES `ApplicationPeriod` (`id`); - -INSERT INTO `ApplicationPeriodProjectType` (`applicationPeriod_id`, `projectType_id`) -SELECT `ApplicationPeriod_id`, `projectTypes_id` -FROM `ApplicationPeriod_ProjectType`; - -DROP TABLE `ApplicationPeriod_ProjectType`; - -ALTER TABLE `ProjectType` DROP FOREIGN KEY `ProjectType_ibfk_1`; -ALTER TABLE `ProjectType` DROP `defaultActivityPlanTemplate_id`; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V92__added_sent_field_to_mail_events.sql b/core/src/main/resources/db/migration/V92__added_sent_field_to_mail_events.sql deleted file mode 100644 index 050fd6323b..0000000000 --- a/core/src/main/resources/db/migration/V92__added_sent_field_to_mail_events.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `mail_event` ADD COLUMN `sent` BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/core/src/main/resources/db/migration/V93__renamed_checklists.sql b/core/src/main/resources/db/migration/V93__renamed_checklists.sql deleted file mode 100644 index f81d0dcb0c..0000000000 --- a/core/src/main/resources/db/migration/V93__renamed_checklists.sql +++ /dev/null @@ -1,2 +0,0 @@ -RENAME TABLE CheckListTemplate_questions TO ChecklistTemplate__questions, CheckList_userLastOpenDate TO Checklist__userLastOpenDate; -RENAME TABLE ChecklistTemplate__questions TO ChecklistTemplate_questions, Checklist__userLastOpenDate TO Checklist_userLastOpenDate; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V94__added_points_and_feedback_to_opposition.sql b/core/src/main/resources/db/migration/V94__added_points_and_feedback_to_opposition.sql deleted file mode 100644 index d4a8a33099..0000000000 --- a/core/src/main/resources/db/migration/V94__added_points_and_feedback_to_opposition.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `final_seminar_opposition` ADD COLUMN `points` INT(11) DEFAULT NULL; -ALTER TABLE `final_seminar_opposition` ADD COLUMN `feedback` VARCHAR(2000) DEFAULT NULL; diff --git a/core/src/main/resources/db/migration/V95__max_file_size_to_turnitin_settings.sql b/core/src/main/resources/db/migration/V95__max_file_size_to_turnitin_settings.sql deleted file mode 100644 index 88c36180a8..0000000000 --- a/core/src/main/resources/db/migration/V95__max_file_size_to_turnitin_settings.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `TurnitinSettings` ADD COLUMN `maxFileSize` INT(11) DEFAULT 20; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V96__added_final_thesis_uploaded_evet.sql b/core/src/main/resources/db/migration/V96__added_final_thesis_uploaded_evet.sql deleted file mode 100644 index 6fe06a47ad..0000000000 --- a/core/src/main/resources/db/migration/V96__added_final_thesis_uploaded_evet.sql +++ /dev/null @@ -1 +0,0 @@ -insert into Event values ('FinalSeminarThesisUploaded', 'Final seminar thesis uploaded'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V97__submit_grading_report_event_for_supervisor_and_reviewer.sql b/core/src/main/resources/db/migration/V97__submit_grading_report_event_for_supervisor_and_reviewer.sql deleted file mode 100644 index 674f1a7a8a..0000000000 --- a/core/src/main/resources/db/migration/V97__submit_grading_report_event_for_supervisor_and_reviewer.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO Event VALUES ('SupervisorGradingReportSubmitted', 'Supervisor has submitted their grading report'); -INSERT INTO Event VALUES ('ReviewerGradingReportSubmitted', 'Reviewer has submitted their grading report'); \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V98__description_to_checklist_templates.sql b/core/src/main/resources/db/migration/V98__description_to_checklist_templates.sql deleted file mode 100644 index 288a9ae6c5..0000000000 --- a/core/src/main/resources/db/migration/V98__description_to_checklist_templates.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `checklist_template` ADD COLUMN `description` LONGTEXT DEFAULT NULL; \ No newline at end of file diff --git a/core/src/main/resources/db/migration/V99_1__added_data_column_to_file_description.sql b/core/src/main/resources/db/migration/V99_1__added_data_column_to_file_description.sql deleted file mode 100644 index 36c3ae1f8e..0000000000 --- a/core/src/main/resources/db/migration/V99_1__added_data_column_to_file_description.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `file_description` ADD COLUMN `data` LONGBLOB; diff --git a/core/src/main/resources/db/migration/V99_2__added_type_and_project_to_support_project_file_to_file_description.sql b/core/src/main/resources/db/migration/V99_2__added_type_and_project_to_support_project_file_to_file_description.sql deleted file mode 100644 index aaa49dcd1c..0000000000 --- a/core/src/main/resources/db/migration/V99_2__added_type_and_project_to_support_project_file_to_file_description.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `file_description` ADD COLUMN `type` VARCHAR(255) NOT NULL; -UPDATE `file_description` SET `type` = 'FileDescription'; -ALTER TABLE `file_description` ADD COLUMN `project_id` BIGINT(20); -ALTER TABLE `file_description` ADD CONSTRAINT `file_description_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`); diff --git a/core/src/main/resources/db/migration/V9__grading_report_entities.sql b/core/src/main/resources/db/migration/V9__grading_report_entities.sql deleted file mode 100644 index 42a98f72f3..0000000000 --- a/core/src/main/resources/db/migration/V9__grading_report_entities.sql +++ /dev/null @@ -1,56 +0,0 @@ -CREATE TABLE `grading_report_template` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `description` varchar(255) NOT NULL, - `projectClass_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_qovbb9ql33oaxprfr01w7ss9u` (`projectClass_id`), - KEY `FK_qovbb9ql33oaxprfr01w7ss9u` (`projectClass_id`), - CONSTRAINT `FK_qovbb9ql33oaxprfr01w7ss9u` FOREIGN KEY (`projectClass_id`) REFERENCES `project_class` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - -CREATE TABLE `grading_report` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `grade` varchar(255) DEFAULT NULL, - `gradingReportTemplate_id` bigint(20) NOT NULL, - `project_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_6ygpk1qq218jgwuuyx0bp6vui` (`project_id`), - KEY `FK_arfmrw6txbso765ll0maty58t` (`gradingReportTemplate_id`), - KEY `FK_6ygpk1qq218jgwuuyx0bp6vui` (`project_id`), - CONSTRAINT `FK_6ygpk1qq218jgwuuyx0bp6vui` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`), - CONSTRAINT `FK_arfmrw6txbso765ll0maty58t` FOREIGN KEY (`gradingReportTemplate_id`) REFERENCES `grading_report_template` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - -CREATE TABLE `grading_question` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `description` varchar(255) NOT NULL, - `title` varchar(255) NOT NULL, - `gradingReportTemplate_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_b37xw6uyfj98ff2tsn5t8x5q` (`gradingReportTemplate_id`), - CONSTRAINT `FK_b37xw6uyfj98ff2tsn5t8x5q` FOREIGN KEY (`gradingReportTemplate_id`) REFERENCES `grading_report_template` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - -CREATE TABLE `grading_answer` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `dateCreated` datetime NOT NULL, - `lastModified` datetime NOT NULL, - `version` int(11) NOT NULL, - `points` int(11) DEFAULT NULL, - `gradingQuestion_id` bigint(20) NOT NULL, - `gradingReport_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_b5bls1mdassp3q5jvndbtje82` (`gradingQuestion_id`), - KEY `FK_k2ynx2lcpdl969alj5nt3f7xx` (`gradingReport_id`), - CONSTRAINT `FK_k2ynx2lcpdl969alj5nt3f7xx` FOREIGN KEY (`gradingReport_id`) REFERENCES `grading_report` (`id`), - CONSTRAINT `FK_b5bls1mdassp3q5jvndbtje82` FOREIGN KEY (`gradingQuestion_id`) REFERENCES `grading_question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; \ No newline at end of file diff --git a/daisy-integration/src/main/java/se/su/dsv/scipro/daisyExternal/impl/ImporterTransactionsImpl.java b/daisy-integration/src/main/java/se/su/dsv/scipro/daisyExternal/impl/ImporterTransactionsImpl.java index 9e6ea05554..eaa367e3d0 100644 --- a/daisy-integration/src/main/java/se/su/dsv/scipro/daisyExternal/impl/ImporterTransactionsImpl.java +++ b/daisy-integration/src/main/java/se/su/dsv/scipro/daisyExternal/impl/ImporterTransactionsImpl.java @@ -157,6 +157,7 @@ public class ImporterTransactionsImpl implements ImporterTransactions { username.setUsername(completeUsername); username.setUser(local); userNameService.save(username); + local.getUsernames().add(username); } } } diff --git a/docker-compose.yml b/docker-compose.yml index 637455a39e..aac221e274 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,3 +13,14 @@ services: - CLIENT_REDIRECT_URI=http://localhost:59732/ - RESOURCE_SERVER_ID=scipro-api-client - RESOURCE_SERVER_SECRET=scipro-api-secret + oauth2-wicket: + build: + context: https://github.com/dsv-su/toker.git + dockerfile: embedded.Dockerfile + restart: on-failure + ports: + - '59734:8080' + environment: + - CLIENT_ID=scipro + - CLIENT_SECRET=s3cr3t + - CLIENT_REDIRECT_URI=http://localhost:8080/login/oauth2/code/scipro diff --git a/view/src/main/java/se/su/dsv/scipro/CurrentUserFromWicketSession.java b/view/src/main/java/se/su/dsv/scipro/CurrentUserFromWicketSession.java deleted file mode 100644 index 808992e771..0000000000 --- a/view/src/main/java/se/su/dsv/scipro/CurrentUserFromWicketSession.java +++ /dev/null @@ -1,13 +0,0 @@ -package se.su.dsv.scipro; - -import org.apache.wicket.Session; -import se.su.dsv.scipro.session.SciProSession; -import se.su.dsv.scipro.system.CurrentUser; -import se.su.dsv.scipro.system.User; - -public class CurrentUserFromWicketSession implements CurrentUser { - @Override - public User get() { - return Session.exists() ? SciProSession.get().getUser() : null; - } -} diff --git a/view/src/main/java/se/su/dsv/scipro/loginlogout/pages/SSOPage.java b/view/src/main/java/se/su/dsv/scipro/loginlogout/pages/SSOPage.java index 5ebf9f0f0f..371c58afe8 100644 --- a/view/src/main/java/se/su/dsv/scipro/loginlogout/pages/SSOPage.java +++ b/view/src/main/java/se/su/dsv/scipro/loginlogout/pages/SSOPage.java @@ -4,11 +4,12 @@ import se.su.dsv.scipro.basepages.PublicPage; import se.su.dsv.scipro.security.auth.Authorization; import se.su.dsv.scipro.session.SciProSession; import se.su.dsv.scipro.system.User; +import se.su.dsv.scipro.system.AuthenticationContext; import se.su.dsv.scipro.system.UserImportService; import se.su.dsv.scipro.system.UserService; import jakarta.inject.Inject; -import jakarta.servlet.http.HttpServletRequest; + import java.util.Optional; import java.util.Set; @@ -21,8 +22,11 @@ public class SSOPage extends PublicPage { @Inject private UserService userService; + @Inject + private AuthenticationContext authenticationContext; + public SSOPage() { - String remoteUserName = ((HttpServletRequest) getRequest().getContainerRequest()).getRemoteUser(); + String remoteUserName = authenticationContext.getPrincipalName(); User user = userService.findByUsername(remoteUserName); if (user != null) { diff --git a/view/src/main/java/se/su/dsv/scipro/security/auth/MockRemoteUserFilter.java b/view/src/main/java/se/su/dsv/scipro/security/auth/MockRemoteUserFilter.java deleted file mode 100755 index b67ea8916d..0000000000 --- a/view/src/main/java/se/su/dsv/scipro/security/auth/MockRemoteUserFilter.java +++ /dev/null @@ -1,70 +0,0 @@ -package se.su.dsv.scipro.security.auth; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import jakarta.servlet.*; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; -import java.io.IOException; - -/** - * Throw-away implementation of a servlet filter, main task is to fake the getRemoteUser() call for the request chain. - */ -public final class MockRemoteUserFilter implements Filter { - private static final Logger LOGGER = LoggerFactory.getLogger(MockRemoteUserFilter.class); - //Default value unless supplied via init parameter - private String fakedUser = "SOME_GUY"; - private FilterConfig cfg = null; - /** - * Default constructor. - */ - public MockRemoteUserFilter() { - } - /** - * @see Filter#destroy() - */ - @Override - public void destroy() { - cfg = null; - } - /** - * Wraps the passed request and alters the behavior of getRemoteUser() for later links of the chain. - * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) - */ - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - LOGGER.debug("Faking external authentication user: " + fakedUser); - if(cfg != null){ - HttpServletRequestWrapper wrapper = new ModifiedRemoteUserRequestWrapper((HttpServletRequest)request,fakedUser); - // pass the request along the filter chain - chain.doFilter(wrapper, response); - return; - } - chain.doFilter(request, response); - } - /** - * @see Filter#init(FilterConfig) - */ - @Override - public void init(FilterConfig fConfig) { - cfg = fConfig; - if(cfg!=null){ - fakedUser = cfg.getInitParameter("fakedUser"); - } - } - /** - * Private RequestWrapper, of no interest to anyone outside of this class. - */ - static class ModifiedRemoteUserRequestWrapper extends HttpServletRequestWrapper{ - private final String fakedUser; - ModifiedRemoteUserRequestWrapper(final HttpServletRequest request,final String fakedUser){ - super(request); - this.fakedUser = fakedUser; - } - @Override - public String getRemoteUser(){ - return fakedUser; - } - } -} diff --git a/view/src/main/java/se/su/dsv/scipro/session/SciProSession.java b/view/src/main/java/se/su/dsv/scipro/session/SciProSession.java index 6d7d573de8..62b9a3a4ee 100755 --- a/view/src/main/java/se/su/dsv/scipro/session/SciProSession.java +++ b/view/src/main/java/se/su/dsv/scipro/session/SciProSession.java @@ -1,6 +1,5 @@ package se.su.dsv.scipro.session; -import org.apache.wicket.MetaDataKey; import org.apache.wicket.Session; import org.apache.wicket.injection.Injector; import org.apache.wicket.protocol.http.WebSession; @@ -10,9 +9,10 @@ import se.su.dsv.scipro.security.auth.roles.Roles; import se.su.dsv.scipro.system.ProjectModule; import se.su.dsv.scipro.system.SystemModule; import se.su.dsv.scipro.system.User; -import se.su.dsv.scipro.system.UserService; import jakarta.inject.Inject; +import se.su.dsv.scipro.system.AuthenticationContext; + import java.util.Collections; import java.util.HashSet; import java.util.Locale; @@ -20,10 +20,8 @@ import java.util.Set; public class SciProSession extends WebSession { - private final static MetaDataKey LOGGED_IN_USER_ID = new MetaDataKey<>() {}; - @Inject - private UserService userService; + private AuthenticationContext authenticationContext; private Set projectModules = new HashSet<>(); private Set systemModules = new HashSet<>(); @@ -38,15 +36,15 @@ public class SciProSession extends WebSession { } public synchronized void setUser(User user) { - setMetaData(LOGGED_IN_USER_ID, user.getId()); + authenticationContext.set(user); } public synchronized User getUser() { - return isLoggedIn() ? userService.findOne(getMetaData(LOGGED_IN_USER_ID)) : null; + return authenticationContext.get(); } public synchronized boolean isLoggedIn() { - return getMetaData(LOGGED_IN_USER_ID) != null; + return authenticationContext.get() != null; } public synchronized boolean authorizedForRole(Roles role) { diff --git a/view/src/test/java/se/su/dsv/scipro/SciProTest.java b/view/src/test/java/se/su/dsv/scipro/SciProTest.java index 2b469c39ec..0b9bbef520 100755 --- a/view/src/test/java/se/su/dsv/scipro/SciProTest.java +++ b/view/src/test/java/se/su/dsv/scipro/SciProTest.java @@ -111,12 +111,10 @@ import se.su.dsv.scipro.springdata.services.UnitService; import se.su.dsv.scipro.springdata.services.UserProfileService; import se.su.dsv.scipro.supervisor.pages.SupervisorStartPage; import se.su.dsv.scipro.survey.SurveyService; -import se.su.dsv.scipro.system.CurrentUser; import se.su.dsv.scipro.system.ExternalResourceService; import se.su.dsv.scipro.system.FooterAddressRepo; import se.su.dsv.scipro.system.FooterLinkService; import se.su.dsv.scipro.system.GenericService; -import se.su.dsv.scipro.system.Lifecycle; import se.su.dsv.scipro.system.PasswordRepo; import se.su.dsv.scipro.system.PasswordService; import se.su.dsv.scipro.system.ProjectModule; @@ -124,6 +122,7 @@ import se.su.dsv.scipro.system.ProjectTypeService; import se.su.dsv.scipro.system.ResearchAreaService; import se.su.dsv.scipro.system.SystemModule; import se.su.dsv.scipro.system.User; +import se.su.dsv.scipro.system.AuthenticationContext; import se.su.dsv.scipro.system.UserImportService; import se.su.dsv.scipro.system.UserNameService; import se.su.dsv.scipro.system.UserSearchService; @@ -298,7 +297,7 @@ public abstract class SciProTest { @Mock protected ChecklistAnswerService checklistAnswerService; @Mock - protected CurrentUser currentUser; + protected AuthenticationContext authenticationContext; @Mock private Scheduler scheduler; @Mock diff --git a/war/pom.xml b/war/pom.xml index 2c4ad17242..619682ae94 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -12,6 +12,10 @@ war war + + tomcat + + org.springframework.boot @@ -41,6 +45,10 @@ spring-boot-starter-tomcat provided + + org.springframework.boot + spring-boot-starter-oauth2-client + org.springframework spring-orm @@ -84,7 +92,26 @@ + + + src/main/resources + true + + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + ${project.build.sourceEncoding} + + + @ + + false + + org.apache.maven.plugins maven-compiler-plugin @@ -106,4 +133,48 @@ + + + branch + + branch + + + + docker-dependencies + + + + org.jboss.logging + jboss-logging + + + com.fasterxml + classmate + + + net.bytebuddy + byte-buddy-agent + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + + + org.assertj + assertj-core + test + + + net.minidev + json-smart + + + + diff --git a/war/src/main/java/se/su/dsv/scipro/war/CurrentUserFromSpringSecurity.java b/war/src/main/java/se/su/dsv/scipro/war/CurrentUserFromSpringSecurity.java new file mode 100644 index 0000000000..5ee19ed06d --- /dev/null +++ b/war/src/main/java/se/su/dsv/scipro/war/CurrentUserFromSpringSecurity.java @@ -0,0 +1,97 @@ +package se.su.dsv.scipro.war; + +import jakarta.inject.Inject; +import jakarta.inject.Provider; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.context.SecurityContextHolderStrategy; +import org.springframework.security.web.context.HttpSessionSecurityContextRepository; +import org.springframework.security.web.context.SecurityContextRepository; +import se.su.dsv.scipro.system.User; +import se.su.dsv.scipro.system.AuthenticationContext; +import se.su.dsv.scipro.system.UserService; +import se.su.dsv.scipro.system.Username; + +import java.security.Principal; +import java.util.Collections; + +public class CurrentUserFromSpringSecurity implements AuthenticationContext { + private final UserService userService; + + // injecting providers since this is a singleton and the request and response are not + private final Provider currentRequest; + private final Provider currentResponse; + + // hardcoded since that is what Spring Security does (see SwitchUserFilter) + private final SecurityContextRepository securityContextRepository = new HttpSessionSecurityContextRepository(); + + @Inject + public CurrentUserFromSpringSecurity( + UserService userService, + Provider currentRequest, + Provider currentResponse) + { + this.userService = userService; + this.currentRequest = currentRequest; + this.currentResponse = currentResponse; + } + + @Override + public User get() { + SecurityContext context = SecurityContextHolder.getContext(); + Authentication authentication = context.getAuthentication(); + if (authentication == null) { + return null; + } + String username = authentication.getName(); + return userService.findByUsername(username); + } + + // Implementing switch user manually rather than using the built-in Spring Security switch user feature + // due to compatibility with Wicket. + // Wicket does not supply a form with a username field since it has some JavaScript based auto-complete + // person finder. + // See Spring's SwitchUserFilter for the built-in switch user feature from where most of the code is copied. + @Override + public void set(User user) { + SecurityContextHolderStrategy strategy = SecurityContextHolder.getContextHolderStrategy(); + SecurityContext context = strategy.createEmptyContext(); + SwitchUser principal = new SwitchUser(user); + UsernamePasswordAuthenticationToken targetUser = UsernamePasswordAuthenticationToken.authenticated( + principal, null, Collections.emptyList()); + context.setAuthentication(targetUser); + strategy.setContext(context); + this.securityContextRepository.saveContext(context, currentRequest.get(), currentResponse.get()); + } + + @Override + public String getPrincipalName() { + SecurityContext context = SecurityContextHolder.getContext(); + Authentication authentication = context.getAuthentication(); + if (authentication == null) { + return null; + } + return authentication.getName(); + } + + private static final class SwitchUser implements Principal { + private final String username; + + public SwitchUser(User user) { + this.username = user.getUsernames() + .stream() + .findAny() + .map(Username::getUsername) + .orElse(""); + } + + @Override + public String getName() { + return username; + } + } +} diff --git a/war/src/main/java/se/su/dsv/scipro/war/Main.java b/war/src/main/java/se/su/dsv/scipro/war/Main.java index 026130dd7d..f8bc71517a 100644 --- a/war/src/main/java/se/su/dsv/scipro/war/Main.java +++ b/war/src/main/java/se/su/dsv/scipro/war/Main.java @@ -11,14 +11,16 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryBuilderCustomizer; import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; +import org.springframework.core.Ordered; import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.orm.jpa.SharedEntityManagerCreator; import org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter; +import org.springframework.web.filter.ForwardedHeaderFilter; import se.su.dsv.scipro.CoreConfig; -import se.su.dsv.scipro.CurrentUserFromWicketSession; import se.su.dsv.scipro.FileSystemStore; import se.su.dsv.scipro.RepositoryConfiguration; import se.su.dsv.scipro.file.FileStore; @@ -83,9 +85,15 @@ public class Main extends SpringBootServletInitializer implements ServletContain return currentProfile; } + /** + * Spring runs on HTTP and is protected by a HTTPS proxy. + * This filter takes the `X-Forwarded-*` headers and updates the request to reflect the original HTTP request. + */ @Bean - public CurrentUserFromWicketSession currentUserFromWicketSession() { - return new CurrentUserFromWicketSession(); + public FilterRegistrationBean forwardedHeaderFilter() { + var filterRegistrationBean = new FilterRegistrationBean<>(new ForwardedHeaderFilter()); + filterRegistrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE); + return filterRegistrationBean; } @Bean diff --git a/war/src/main/java/se/su/dsv/scipro/war/WicketConfiguration.java b/war/src/main/java/se/su/dsv/scipro/war/WicketConfiguration.java index bb255d4915..6e08db02a8 100644 --- a/war/src/main/java/se/su/dsv/scipro/war/WicketConfiguration.java +++ b/war/src/main/java/se/su/dsv/scipro/war/WicketConfiguration.java @@ -1,6 +1,9 @@ package se.su.dsv.scipro.war; import com.google.common.eventbus.EventBus; +import jakarta.inject.Provider; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.protocol.http.WicketFilter; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; @@ -8,6 +11,10 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.annotation.Order; +import org.springframework.security.config.Customizer; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.web.SecurityFilterChain; import se.su.dsv.scipro.SciProApplication; import se.su.dsv.scipro.crosscutting.ForwardPhase2Feedback; import se.su.dsv.scipro.crosscutting.NotifyFailedReflection; @@ -21,6 +28,7 @@ import se.su.dsv.scipro.notifications.NotificationController; import se.su.dsv.scipro.profiles.CurrentProfile; import se.su.dsv.scipro.reviewing.FinalSeminarApprovalService; import se.su.dsv.scipro.reviewing.RoughDraftApprovalService; +import se.su.dsv.scipro.system.UserService; @Configuration public class WicketConfiguration { @@ -47,6 +55,27 @@ public class WicketConfiguration { return new SciProApplication(currentProfile); } + @Bean + @Order(3) // make sure it's after the API security filters + public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { + http.authorizeHttpRequests((requests) -> requests.anyRequest().authenticated()); + http.oauth2Login(Customizer.withDefaults()); + http.csrf(csrf -> csrf.disable()); // Wicket has its own CSRF protection + http.logout(logout -> logout + .logoutUrl("/logout") + .logoutSuccessUrl("/")); + return http.build(); + } + + @Bean + public CurrentUserFromSpringSecurity currentUserFromSpringSecurity( + UserService userService, + Provider httpServletRequestProvider, + Provider httpServletResponseProvider) + { + return new CurrentUserFromSpringSecurity(userService, httpServletRequestProvider, httpServletResponseProvider); + } + @Bean public ReviewingNotifications reviewingNotifications( EventBus eventBus, diff --git a/war/src/main/resources/application-branch.properties b/war/src/main/resources/application-branch.properties new file mode 100644 index 0000000000..0d6cb9b213 --- /dev/null +++ b/war/src/main/resources/application-branch.properties @@ -0,0 +1,19 @@ +spring.datasource.url=${JDBC_DATABASE_URL} +spring.datasource.username=${JDBC_DATABASE_USERNAME} +spring.datasource.password=${JDBC_DATABASE_PASSWORD} + +profile=DEV + +# No secrets available for branch deployment to branch.dsv.su.se +# Will have to set up some mock API for this later +service.grading.url= +oauth.uri= +oauth.clientId= +oauth.clientSecret= +oauth.redirectUri= + +# No secrets available for branch deployment to branch.dsv.su.se +# Will have to set up some mock API for this later +daisy.api.url= +daisy.api.username= +daisy.api.password= diff --git a/war/src/main/resources/application-tomcat.properties b/war/src/main/resources/application-tomcat.properties new file mode 100644 index 0000000000..4e2b4fedce --- /dev/null +++ b/war/src/main/resources/application-tomcat.properties @@ -0,0 +1 @@ +spring.datasource.jndi-name=java:/comp/env/jdbc/sciproDS diff --git a/war/src/main/resources/application.properties b/war/src/main/resources/application.properties index 753d0e323c..bb89287006 100644 --- a/war/src/main/resources/application.properties +++ b/war/src/main/resources/application.properties @@ -1,5 +1,6 @@ -spring.datasource.jndi-name=java:/comp/env/jdbc/sciproDS -spring.flyway.table=schema_version +spring.profiles.active=@spring.profile.active@ +spring.flyway.baseline-version=2 +spring.flyway.baseline-on-migrate=true # Spring Boot changes Hibernates default naming strategy to convert camelCase to snake_case # We currently rely on the names to be treated as they are in Java, so we need to set it back to the default @@ -15,6 +16,17 @@ springdoc.swagger-ui.path=/swagger springdoc.swagger-ui.persist-authorization=true # These will be overwritten by configuration in the environment of servers it is deployed to -spring.security.oauth2.resourceserver.opaquetoken.client-id=scipro-api-client -spring.security.oauth2.resourceserver.opaquetoken.client-secret=scipro-api-secret -spring.security.oauth2.resourceserver.opaquetoken.introspection-uri=http://localhost:59733/introspect +spring.security.oauth2.resourceserver.opaquetoken.client-id=${OAUTH2_RESOURCE_SERVER_ID:scipro-api-client} +spring.security.oauth2.resourceserver.opaquetoken.client-secret=${OAUTH2_RESOURCE_SERVER_SECRET:scipro-api-secret} +spring.security.oauth2.resourceserver.opaquetoken.introspection-uri=${OAUTH2_RESOURCE_SERVER_INTROSPECTION_URI:http://localhost:59733/introspect} + +# Log in via local OAuth 2 authorization server +spring.security.oauth2.client.provider.docker.user-info-uri=${OAUTH2_USER_INFO_URI:http://localhost:59734/verify} +spring.security.oauth2.client.provider.docker.user-name-attribute=sub +spring.security.oauth2.client.provider.docker.token-uri=${OAUTH2_TOKEN_URI:http://localhost:59734/exchange} +spring.security.oauth2.client.provider.docker.authorization-uri=${OAUTH2_AUTHORIZATION_URI:http://localhost:59734/authorize} +spring.security.oauth2.client.registration.scipro.redirect-uri={baseUrl}/login/oauth2/code/{registrationId} +spring.security.oauth2.client.registration.scipro.provider=docker +spring.security.oauth2.client.registration.scipro.client-id=${OAUTH2_CLIENT_ID:scipro} +spring.security.oauth2.client.registration.scipro.client-secret=${OAUTH2_CLIENT_SECRET:s3cr3t} +spring.security.oauth2.client.registration.scipro.authorization-grant-type=authorization_code