zeropingheroes / lancache-autofill

Automatically fill a Lancache with content
GNU General Public License v3.0
132 stars 24 forks source link

Integrity constraint violation #50

Closed billthecatt closed 3 years ago

billthecatt commented 3 years ago

I'm on a default ubuntu install as per the instructions.. getting this error at like 85% of the way through the update...

Guessing some strange unicode characters or app name that is too long is nuking the process? In any case, I can't update anymore and this causes me to only be able to download the apps that are already inserted into the DB.

Please help!

user1@autofill:~/lancache-autofill$ ./lancache-autofill steam:update-app-list Clearing apps from database Downloading app list from Steam Web API Inserting records into database ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░ 85% In Connection.php line 664:

SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: steam_apps.id (SQL: insert into "steam_apps" ("id", "name") select 768240 as "id", Warstone OST, Comics and Artbook as "name" union all select 768270 as "id", Lisssn as "name" union all select 768290 as "id", Snow White Solitaire. Charmed Kingdom as "name" union all select 768300 as "id", Zhulik.exe as "name" union all select 768310 as "id", Er-Spectro as "name" union all select 76

j3ws3r commented 3 years ago

I will add to this issue. I am having it too.

targodan commented 3 years ago

Yup, probably an overflow of the ID column. I solved it by changing the type of the id column from integer to bigInteger here: https://github.com/zeropingheroes/lancache-autofill/blob/08b4d59130ca736704f343c83ed3637c36cf0c75/src/Commands/App/InitialiseDatabase.php#L47