chore: ruim overbodige bestanden op (.htaccess, .env untracked), verplaats schema.sql en voeg .gitattributes toe
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
# MariaDB Verbinding
|
||||
DB_HOST="192.168.2.33"
|
||||
DB_PORT="3306"
|
||||
DB_NAME="focizdev"
|
||||
DB_USER="focizdev_user"
|
||||
DB_PASS="F0c1z_Dev_Secure_2026!"
|
||||
|
||||
# Omgeving: 'development' (knippert rood) of 'live' (knippert groen)
|
||||
APP_ENV="development"
|
||||
|
||||
# Applicatie URL (voor uitnodigingslinks)
|
||||
APP_URL="https://dev.fociz.nl"
|
||||
|
||||
# Applicatie Geheime Sleutel (willekeurige tekenreeks)
|
||||
APP_SECRET="fociz-maria-db-super-secret-key-998877"
|
||||
@@ -0,0 +1,3 @@
|
||||
# Zorg dat omgevingsspecifieke bestanden nooit worden overschreven bij merges tussen dev en main
|
||||
config/config.php merge=ours
|
||||
includes/env_badge.php merge=ours
|
||||
@@ -1,16 +0,0 @@
|
||||
# Fociz Apache Configuratie
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# UTF-8 standaard
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
# Blokkeer directe toegang tot SQL schema en configuratiebestanden
|
||||
<FilesMatch "^(schema\.sql|\.env|\.git.*)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# PHP foutmeldingen in productie (kan uitgeschakeld worden indien gewenst)
|
||||
php_flag display_errors Off
|
||||
php_value error_reporting E_ALL
|
||||
|
||||
@@ -85,9 +85,9 @@ APP_URL="https://uw-domein.nl"
|
||||
```
|
||||
|
||||
### 3. Automatische Tabellen Aanmaak
|
||||
U hoeft **niet** handmatig SQL-commando's uit te voeren: zodra u de website voor het eerst opent in uw browser, detecteert Fociz automatisch MariaDB en worden alle tabellen en relaties uit `schema.sql` vanzelf aangemaakt!
|
||||
U hoeft **niet** handmatig SQL-commando's uit te voeren: zodra u de website voor het eerst opent in uw browser, detecteert Fociz automatisch MariaDB en worden alle tabellen en relaties uit `config/schema.sql` vanzelf aangemaakt!
|
||||
|
||||
*(Optioneel kunt u `schema.sql` ook zelf importeren via phpMyAdmin of de MariaDB CLI).*
|
||||
*(Optioneel kunt u `config/schema.sql` ook zelf importeren via phpMyAdmin of de MariaDB CLI).*
|
||||
|
||||
### 4. Eerste Beheerder Instellen
|
||||
1. Open uw browser en ga naar `https://uw-domein.nl`.
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ function ensure_tables_exist(PDO $pdo): void {
|
||||
}
|
||||
|
||||
// Tabellen ontbreken nog: voer schema.sql uit statement voor statement
|
||||
$schemaFile = __DIR__ . '/../schema.sql';
|
||||
$schemaFile = file_exists(__DIR__ . '/schema.sql') ? (__DIR__ . '/schema.sql') : (__DIR__ . '/../schema.sql');
|
||||
if (file_exists($schemaFile)) {
|
||||
$sql = file_get_contents($schemaFile);
|
||||
$statements = array_filter(array_map('trim', explode(';', $sql)));
|
||||
|
||||
Reference in New Issue
Block a user