Sqlite Foreign Key Not Working, i made pid a PRIMARY KEY.