feat: tambah skrip migrasi database otomatis
This commit is contained in:
+13
-4
@@ -1,9 +1,18 @@
|
||||
<?php
|
||||
$host_sekarang = $_SERVER['SERVER_NAME'];
|
||||
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan2";
|
||||
if ($host_sekarang === 'localhost' || $host_sekarang === '127.0.0.1') {
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan2";
|
||||
} else {
|
||||
// Gunakan Kredensial Normal User dari Coolify
|
||||
$host = "mysql-webgis";
|
||||
$user = "root"; // Menggunakan root user
|
||||
$pass = "yg7eDOyhmHwJaR93A1SdPawY3533dFd8GlIVnVezQiV3IWR5DDc7ApQeIkzKneGL"; // Root User Password
|
||||
$db = "webgis_db_pertemuan2";
|
||||
}
|
||||
|
||||
|
||||
// Connect first without DB to ensure we can create it if missing
|
||||
|
||||
Reference in New Issue
Block a user