Database is now working properly, everything was a simple fucking mistake