mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Drop ptero_id column from admin table
Fixes a SQLException thrown when adding admins to an older table schema version.
This commit is contained in:
parent
1251276451
commit
0559e99fb1
@ -90,6 +90,15 @@ public class SQLite extends FreedomService
|
||||
{
|
||||
FLog.severe("Failed to create the admins table: " + e.getMessage());
|
||||
}
|
||||
} else
|
||||
{
|
||||
try
|
||||
{
|
||||
connection.createStatement().execute("ALTER TABLE `admins` DROP COLUMN `ptero_id`");
|
||||
} catch (SQLException e)
|
||||
{
|
||||
// Ignore the error. If someone else wants to add WORKING AND TESTED CODE to check if the `ptero_id` column exists, they can, but I couldn't find a good way.
|
||||
}
|
||||
}
|
||||
if (tableExists(meta, "players"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user