DevotedMC / BanStick

Player / IP / CIDR / VPN / Shared connection banning with a vengeance. Built for Spigot 1.16.4
http://www.devotedmc.com
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

java.sql.SQLException: Can't create table `central`.`bs_player` (errno: 150 "Foreign key constraint is incorrectly formed") #16

Closed RainOfPain125 closed 2 years ago

RainOfPain125 commented 2 years ago

https://www.toptal.com/developers/hastebin/fipikiroca.sql

The "Bastion" plugin was misbehaving. According to other issues, the developer did not care to make it compatible with MySQL or something. They suggested the player change to MariaDB. I went through the pain of changing everything over to MariaDB, and now this plugin is throwing a fit.

The database is clean, brand new. just installed this crap.

ProgrammerDan commented 2 years ago

iirc I have the table create order backwards or something. I stopped maintaining this, but the CivClassic fork might have fixes.

ProgrammerDan commented 2 years ago

if you are recompiling from source, do the following:

1) remove this line: https://github.com/DevotedMC/BanStick/blob/master/src/main/java/com/programmerdan/minecraft/banstick/handler/BanStickDatabaseHandler.java#L232

2) Then, either add as a new migration, or run in your DBMS after installation: ALTER TABLE bs_player ADD FOREIGN KEY (bid) REFERENCES bs_ban(bid);

RainOfPain125 commented 2 years ago

ah, I see. I am using the CivClassic version from here ( https://github.com/CivClassic/AnsibleSetup/tree/master/jarfiles/public/plugins )

I'm sorry for bothering you. I don't know how to "recompile" anything, so I'll just move my issue to there.

ProgrammerDan commented 2 years ago

Not a bother -- good luck in your quest!