-- Create a database for ForgottenServer
CREATE DATABASE IF NOT EXISTS forgottenserver CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

-- Create a user for specific for the database
CREATE USER IF NOT EXISTS forgottenserver@localhost IDENTIFIED BY 'forgotten';

-- Set privileges to the new user
GRANT ALL PRIVILEGES ON forgottenserver.* TO 'forgottenserver'@'localhost';
FLUSH PRIVILEGES;

-- forgottenserver database schema installation
SOURCE '/home/tibia/SabrehavenServer/sabrehaven.sql';

-- ZnoteAAC database schema installation
SOURCE '/var/www/ZnoteAAC/engine/database/znote_schema.sql';

-- Install sabrehaven_znote.sql for Sabrehaven usage
SOURCE '/home/tibia/SabrehavenServer/sabrehaven_znote.sql';
