Created MariaDB schema and adjusted PostgreSQL one to match it
Fixed various SQL errors