Skip to content
Snippets Groups Projects
Commit fb725fbc authored by Dominika Zemanovičová's avatar Dominika Zemanovičová
Browse files

Remove lecture_id to course_id

parent 0b9ed9b8
No related branches found
No related tags found
1 merge request!34M3 data initialization
......@@ -29,7 +29,7 @@ public class Exercise extends DomainObject {
private int difficulty;
@Column(name = "lecture_id")
@Column(name = "course_id")
private long courseId;
@OneToMany(mappedBy="exercise", cascade = CascadeType.ALL)
......
-- exercise
-- insert into exercise (id, lecture_id, description, difficulty, name) values (default, ?, ?, ?, ?)
INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (1, 7, 'Practice using the present continuous tense.', 3, 'Present Continuous Exercise 1');
INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (2, 7, 'Use the past simple to describe past events.', 6, 'Past Simple Exercise 1');
INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (3, 8, 'Learn vocabulary related to food.', 2, 'Food Vocabulary Exercise 1');
INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (4, 10, 'Practice answering common job interview questions.', 7, 'Job Interview Exercise 1');
INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (1, 5, 'Practice using the present continuous tense.', 3, 'Present Continuous Exercise 1');
INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (2, 5, 'Use the past simple to describe past events.', 6, 'Past Simple Exercise 1');
INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (3, 5, 'Learn vocabulary related to food.', 2, 'Food Vocabulary Exercise 1');
INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (4, 5, 'Practice answering common job interview questions.', 7, 'Job Interview Exercise 1');
INSERT INTO exercise (id, lecture_id, description, difficulty, name) VALUES (5, 2, 'Übung zum Begrüßen und Vorstellen', 2, 'Begrüßung und Vorstellung Übung');
INSERT INTO exercise (id, course_id, description, difficulty, name) VALUES (5, 1, 'Übung zum Begrüßen und Vorstellen', 2, 'Begrüßung und Vorstellung Übung');
ALTER TABLE exercise ALTER COLUMN id RESTART WITH 6;
......
......@@ -16,6 +16,7 @@
-- 6 - C1N
-- 7 - C2N
-- USER
-- admin
INSERT INTO domain_user (id, city, country, house_number, street, zip, email, first_name, last_name, password, user_type, username) VALUES (1, 'New York', 'USA', 123, 'Main Street', '10001', 'john.doe@example.com', 'John', 'Doe', 'password123', 'ADMIN', 'johndoe');
......@@ -67,6 +68,7 @@ INSERT INTO user_language_proficiency (user_id, language_proficiency_key, langua
INSERT INTO user_language_proficiency (user_id, language_proficiency_key, language_proficiency) VALUES (17, 1, 1);
INSERT INTO user_language_proficiency (user_id, language_proficiency_key, language_proficiency) VALUES (18, 1, 1);
-- COURSE
INSERT INTO course (id, capacity, finished, language, name, proficiency) VALUES (1, 25, false, 'GERMAN', 'German for Beginners', 'A1');
INSERT INTO course (id, capacity, finished, language, name, proficiency) VALUES (2, 25, false, 'ENGLISH', 'English A1', 'A1');
......@@ -97,8 +99,6 @@ INSERT INTO user_course (student_id, course_id) VALUES (7, 5);
INSERT INTO user_course (student_id, course_id) VALUES (9, 5);
-- LECTURE
insert into lecture (id, capacity, course_id, lecture_from, lecture_to, lecturer_id, topic) values (1, 25, 1, '2023-05-02 10:00:00', '2023-05-02 12:00:00', 6, 'Introduction to course')
insert into lecture (id, capacity, course_id, lecture_from, lecture_to, lecturer_id, topic) values (2, 25, 1, '2023-05-04 10:00:00', '2023-05-04 12:00:00', 6, 'Begrüßung und Vorstellung')
......
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