Repository navigation
3_Schema Database
You can choose on the Initialisation the Path and Name for the Schema and the Database.
The Defaults are data.db and schema_default.json
If you use Minecraft and use the pluginPath() the Schema and Database are under:
server/plugins/YOUR_PLUGIN/...
-data.db
-schema_default.json
You don't need to install any drivers or programms for the SQLite Database to work.
On the first Initialisation the Database is created.
The schema has following Structure.
You define all Tables in this JSON.
On the first Initialisation the Schema is created.
The schema can be modified after creation. New columns or primary Keys are automatically added to existing tables without manual intervention. Before making any changes, it's recommended to back up the SQLite database by copying it manually. This ensures that you have a backup in case anything goes wrong during the migration.
{
"test_table": {
"table": "test_table",
"primary_keys": [
"uuid",
"name"
],
"columns": [
{
"name": "uuid",
"type": "INTEGER"
},
{
"name": "name",
"type": "TEXT"
},
{
"name": "progress",
"type": "REAL"
}
]
}
}