Every time i relog to mysqlworkbench the tables that i have created within my schema have been automatically dropped. This happens after about 2 hours every time. I can't quite figure out if this is some mysql setting or if I have incorrectly configured the database.
I'm accessing the database via java spring-data persistence jpa requests.
sql table entry code:
use storage_app_schema;
CREATE TABLE `StorageItem` (
`DateStored` tinyblob,
`Image` tinyblob,
`Name` varchar(255) DEFAULT NULL,
`ReferenceCode` varchar(255) DEFAULT NULL,
`Size` varchar(255) DEFAULT NULL)
hibernate.hbm2ddl.auto was set to "create". I wasn't aware this dropped existing table. This should be set to "update" - in order to update the existing schema as opposed to overriding it when the session closes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.