BigBrotherBot/big-brother-bot

[B3.sql] Typos or not typos? + Foreign constraint fails

Closed this issue · 4 comments

So, the B3.sql of the dev version has the following on every table:
CREATE TABLE IF NOT EXISTS xlr_playerbody (
id INTEGER PRIMARY KEY AUTOINCREMENT,
bodypart_id TINYINT(3) NOT NULL DEFAULT '0',
player_id SMALLINT(5) NOT NULL DEFAULT '0',
kills MEDIUMINT(8) NOT NULL DEFAULT '0',
deaths MEDIUMINT(8) NOT NULL DEFAULT '0',
teamkills SMALLINT(5) NOT NULL DEFAULT '0',
teamdeaths SMALLINT(5) NOT NULL DEFAULT '0',
suicides SMALLINT(5) NOT NULL DEFAULT '0',
FOREIGN KEY(bodypart_id) REFERENCES xlr_bodyparts(id),
FOREIGN KEY(player_id) REFERENCES clients(id)
);

  1. Autoincrement gives me an error unless I change it to auto_increment, is this a typo or there's some secret behind it?
  2. I get a foreign constraint fails -error unless I change bodypart_id from tinyit to INTEGER. Is this just cause I'm using the wrong tools, or it is a typo aswell?

AUTOINCREMENT works for SQLite, AUTO_INCREMENT for MySQL. Which protocol SQL script are you looking at? About point (2) i'll double chek the scripts

Sorry, this is all my carelessness. I'm using mysql, and I was using sqlite b3.sql tables (=the only ones that were shipped with the dev build). So ignore this issue completely.

Probably we forgot to include the other directories in the build script. We will fix it for the next one.

Inviato da iPhone

Il giorno 07/feb/2015, alle ore 00:07, Thomaxius notifications@github.com ha scritto:

Sorry, this is all my carelessness. I'm using mysql, and I was using sqlite b3.sql tables (=the only ones that were shipped with the dev build). So ignore this issue completely.


Reply to this email directly or view it on GitHub.

I was using sqlite b3.sql tables (=the only ones that were shipped with the dev build)

Thank you for reporting this, I'm on it, see 9078b17 and all the sql files are now available in B3 daily build 306