简体   繁体   中英

How to update the version of a Derby database

When trying to create a table with a Boolean field, I've come across a Derby error that prompts me to update the database version from 10.3 to 10.7. I've found this question which apparently contains the solution:

Tables for entities with boolean fields not created

but I can't see the syscs_get_database_property procedure in the syscs_util database. I've taken a quick look to Derby docs and I haven't found any reference to "update" or "version" in them.

I can't/don't want to rename/lose the database just to get the database updated, like the other thread proposes to fix the problem; also, I don't use JPA to create the schema. Is there any way to actually update the database (whichever that means)? I'm using the latest Java SE 8 Java DB/Derby JARs in NetBeans, defined as a library used in my desktop application, just changed from Java SE 7.

TIA

要将数据库升级到较新版本,请遵循此处的文档: http : //db.apache.org/derby/docs/10.11/devguide/cdevupgrades.html

In your DB url just add this string

private static final String DB_URL = "jdbc:derby:mydatabase;upgrade=true";

Run this at the first time..There won't be no error anymore..

Replace it back to it pevious String

private static final String DB_URL = "jdbc:derby:mydatabase;create=true";

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM