-- Delete previous user if needed
DROP USER "MM";
-- If the user cannot be dropped due to any ownership issues, you need to reassign those objects to another user
REASSIGN OWNED BY "MM" TO <OTHER-USER-NAME>;
-- Or drop those objects
DROP OWNED BY "MM";
-- Create a user MM with LOGIN privilege
CREATE ROLE MM WITH LOGIN PASSWORD 'MM123!';
-- Grant privileges on MM database to MM user
GRANT ALL PRIVILEGES ON DATABASE MM TO MM;
-- Create a database MM with UTF8 encoding
CREATE DATABASE "MM" WITH OWNER "MM" ENCODING 'UTF8';