-- Inisialisasi database untuk deploy Docker / Coolify
CREATE DATABASE IF NOT EXISTS webgis_p3 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS webgis_spbu CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS WEB_GIS CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

GRANT ALL PRIVILEGES ON webgis_p3.* TO 'webgis'@'%';
GRANT ALL PRIVILEGES ON webgis_spbu.* TO 'webgis'@'%';
GRANT ALL PRIVILEGES ON WEB_GIS.* TO 'webgis'@'%';
FLUSH PRIVILEGES;
