netodevel / cli-spring-boot-scaffold

command line for generate crud and configs for spring boot projects
131 stars 49 forks source link

Scaffolding for existing tables #33

Closed 8904591612 closed 7 years ago

8904591612 commented 7 years ago

Hii . When I give scaffold command for an existing mysql table it is emptying the table and creating a new table with same column names, which I donot want .What modification should I make?

this is the command I gave

spring scaffold -n "User" -p "name:String email:String"

But my user table already has data, which is getting emptied when I give the scaffold command.

Or is the api scaffolding command in the (TODO) list spring scaffold -n "User" -p "name:String email:String" --api

which needs to be built and used? Please Help

Thanks

netodevel commented 7 years ago

hi, this dont is a comportament of scaffold.. is a configuration of hibernate at the application.properties please, verify your configuration remove create-drop.. spring.jpa.hibernate.ddl-auto=create-drop

8904591612 commented 7 years ago

thanks a lot . Issue solved