Skip to content
Snippets Groups Projects
Commit 35527994 authored by Jan Tymel's avatar Jan Tymel
Browse files

Rename entities' primary keys in DB

parent 66b0f5e3
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ public abstract class AbstractPhase implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "phaseGenerator")
@SequenceGenerator(name = "phaseGenerator", sequenceName = "phase_seq")
@Column(name = "id_phase", nullable = false, unique = true)
private Long id;
private String title;
......
......@@ -16,6 +16,7 @@ public class DecisionMatrixRow implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "decisionMatrixRowGenerator")
@SequenceGenerator(name = "decisionMatrixRowGenerator", sequenceName = "decision_matrix_row_seq")
@Column(name = "id_decision_matrix_row", nullable = false, unique = true)
private Long id;
@Column(name = "order_in_training_phase", nullable = false)
......
......@@ -29,6 +29,7 @@ public class Question implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "questionGenerator")
@SequenceGenerator(name = "questionGenerator", sequenceName = "question_seq")
@Column(name = "id_question", nullable = false, unique = true)
private Long id;
@Enumerated(EnumType.STRING)
......
......@@ -16,6 +16,7 @@ public class QuestionChoice implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "questionChoiceGenerator")
@SequenceGenerator(name = "questionChoiceGenerator", sequenceName = "question_choice_seq")
@Column(name = "id_question_choice", nullable = false, unique = true)
private Long id;
private String text;
......
......@@ -21,6 +21,7 @@ public class QuestionPhaseRelation implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "questionPhaseGenerator")
@SequenceGenerator(name = "questionPhaseGenerator", sequenceName = "question_phase_seq")
@Column(name = "id_question_phase_relation", nullable = false, unique = true)
private Long id;
@Column(name = "order_in_questionnaire", nullable = false)
......
......@@ -17,6 +17,7 @@ public class Task implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "taskGenerator")
@SequenceGenerator(name = "taskGenerator", sequenceName = "task_seq")
@Column(name = "id_task", nullable = false, unique = true)
private Long id;
private String title;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment