ChenSiTong 6 лет назад
Родитель
Сommit
38ba1be794
1 измененных файлов с 2 добавлено и 65 удалено
  1. 2 65
      src/main/resources/update.sql

+ 2 - 65
src/main/resources/update.sql

@@ -1,65 +1,2 @@
-alter table user
-    modify id bigint auto_increment;
-
-alter table course
-    modify id bigint auto_increment;
-alter table course
-    modify teacher_id bigint not null;
-alter table course
-    drop column teacher_name;
-
-alter table choose
-    modify id bigint auto_increment;
-alter table choose
-    modify course_id bigint not null;
-alter table choose
-    modify student_id bigint not null;
-drop index UKafeybda7scb19wl3qlyjxey4p on choose;
-
-alter table slide
-    modify id bigint auto_increment;
-alter table slide
-    modify course_id bigint not null;
-alter table slide
-    modify teacher_id bigint not null;
-alter table slide
-    drop teacher_name;
-alter table slide
-    drop course_name;
-
-alter table message
-    modify id bigint auto_increment;
-alter table message
-    modify slide_id bigint;
-alter table message
-    modify to_user_id bigint not null;
-
-alter table reply
-    modify id bigint auto_increment;
-alter table reply
-    modify teacher_id bigint not null;
-alter table reply
-    drop foreign key FK6w0ns67lrq1jdiwi5xvtj1vxx;
-drop index FK6w0ns67lrq1jdiwi5xvtj1vxx on reply;
-alter table reply
-    modify comment_id bigint not null;
-
-update comment
-set top_number=0
-where top_number is null;
-alter table comment
-    modify id bigint auto_increment;
-alter table comment
-    modify top_number int not null;
-alter table comment
-    modify user_id bigint not null;
-alter table comment
-    modify slide_id bigint not null;
-alter table comment
-    modify content text not null;
-alter table comment
-    drop user_name;
-alter table comment
-    drop user_type;
-alter table comment
-    modify content text;
+insert into helper.admin (username, password)
+VALUES ('admin', 'YWRtaW4=')