Open
Description
Server software and version
Paper 1.21.4
Expected behavior
-
The plugin should load the backup data fully and restore player skills/stats without SQL exceptions.
-
All necessary fields (like
user_id
) should be populated automatically from either:- The backup data,
- A default value set in the table schema,
- Or handled gracefully by the plugin to prevent failure.
Actual behavior
- The plugin attempts to insert/update a database record without supplying a value for
user_id
. - The SQL query fails because the table enforces that
user_id
must not be null and has no default value. - The backup fails to load entirely as a result.
How to reproduce
- Use AuraSkills v2.3.2 on a Bukkit-based Minecraft server.
- Set up SQL storage for the plugin (MySQL).
- Run the command:
/skills backup load <backup_file>
- Watch the console/logs for the error.
Additional information
[04:51:43 INFO]: [Skills] Error loading backup: Field 'user_id' doesn't have a default value
[04:51:43 WARN]: java.sql.SQLException: Field 'user_id' doesn't have a default value
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:988)
...
at AuraSkills-2.3.2.jar//dev.aurelium.auraskills.common.storage.sql.SqlStorageProvider.applyState(SqlStorageProvider.java:226)
at AuraSkills-2.3.2.jar//dev.aurelium.auraskills.common.storage.backup.BackupProvider.loadV2(BackupProvider.java:167)
at AuraSkills-2.3.2.jar//dev.aurelium.auraskills.common.storage.backup.BackupProvider.loadBackup(BackupProvider.java:114)
Link to Full Log:
https://mclo.gs/iWHMgiX
Agreements
- I am running the latest version of AuraSkills
- I am not using an unsupported server software (https://wiki.aurelium.dev/auraskills/incompatibilities)
- My version of Minecraft is supported by AuraSkills