-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrop_tables.sql
44 lines (32 loc) · 1.06 KB
/
drop_tables.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ALTER TABLE test
DROP FOREIGN KEY test_course_professor;
ALTER TABLE major
DROP FOREIGN KEY major_department;
ALTER TABLE course
DROP FOREIGN KEY course_department;
ALTER TABLE person_major
DROP FOREIGN KEY person_major_person_id;
ALTER TABLE person_major
DROP FOREIGN KEY person_major_major_id;
ALTER TABLE course_professor
DROP FOREIGN KEY course_professor_course_id;
ALTER TABLE course_professor
DROP FOREIGN KEY course_professor_professor_id;
ALTER TABLE course_professor_person
DROP FOREIGN KEY course_professor_course_professor_id;
ALTER TABLE course_professor_person
DROP FOREIGN KEY course_professor_person_id;
ALTER TABLE test_person
DROP FOREIGN KEY test_person_test_id;
ALTER TABLE test_person
DROP FOREIGN KEY test_person_person_id;
DROP TABLE IF EXISTS course_professor_person;
DROP TABLE IF EXISTS course_professor;
DROP TABLE IF EXISTS person_major;
DROP TABLE IF EXISTS professor;
DROP TABLE IF EXISTS major;
DROP TABLE IF EXISTS department;
DROP TABLE IF EXISTS test;
DROP TABLE IF EXISTS person;
DROP TABLE IF EXISTS course;
DROP TABLE IF EXISTS test_person;