navinreddy20 / quiz-app-spring

34 stars 61 forks source link

Tables not creating automatically when using Mysql #5

Open mourya0007 opened 9 months ago

mourya0007 commented 9 months ago

Hi Naveen , I was using Mysql in place of Postgres. With the POST API in Quiz controller I got a error that "quiz" table doesn't exist. Will the tables gets created automatically in Postgres ? or did we missed something here ?

Himansh29 commented 7 months ago

It will get created if you have JPA dependency in your pom.xml and have properly configured application.properties, make sure you have used all the necessary annotations as well, as they are equally as important.

shivanshdeep commented 2 months ago

does anyone have DB queries for questions?

chhotaa commented 1 week ago

INSERT INTO public.question( id, category, difficultylevel, option1, option2, option3, option4, question_title, right_answer) VALUES (3,'Java','Easy','indicates specific to object','Independent of object','assigns at runtime','none','what the meaning of static?','Independent of object' ), (4,'Java','Easy','try','catch','finally','extends','which block is used to run at anytime?','finally'), (5,'Java','Easy','-','+','*','@','which java keyword used to conacatenate strings','+'), (6,'Java','Easy','hashmap','ArrayList','Array','Linkedlist','which class implementation of dynamic array','ArrayList'), (7,'Java','Easy','try','catch','throw','throws','Which java keyword used to explicily throw an exception','throw'), (8,'Java','Easy','terminate loop','throw exception','not a keyword','create thread','what is the use of break','terminate loop'), (9,'Java','Easy','for loop','while loop','do while','switch loop','Which loop in java executed atleast once?','do while'), (10,'Python','Easy','set','tuple','list','array','In python which datatype is mutable','list'), (11,'Python','Easy','numpy','date and time','sys','array','In python which module is working for data and time','date and time'), (12,'Python','Easy','length()','len()','range()','add()','In python which functio is used to calculate length of list?','len()'); ;