netgescon-master/docs/03-scripts-automazione/verify-quick.sh
Pikappa2 480e7eafbd 🎯 NETGESCON - Setup iniziale repository completo
📋 Commit iniziale con:
-  Documentazione unificata in docs/
-  Codice Laravel in netgescon-laravel/
-  Script automazione in scripts/
-  Configurazione sync rsync
-  Struttura organizzata e pulita

🔄 Versione: 2025.07.19-1644
🎯 Sistema pronto per Git distribuito
2025-07-19 16:44:47 +02:00

33 lines
917 B
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "🔍 VERIFICA SISTEMA NETGESCON"
echo "============================"
echo "1⃣ Test struttura database..."
mysql -u root -p -e "DESCRIBE netgescon.amministratori;" | grep codice
echo "2⃣ Test creazione amministratore..."
php artisan tinker --execute="
\$user = \App\Models\User::first();
if (\$user) {
\$admin = new \App\Models\Amministratore([
'nome' => 'Test',
'cognome' => 'Verifica',
'user_id' => \$user->id,
'codice_amministratore' => 'VER' . rand(100,999)
]);
\$admin->save();
echo 'Codice generato: ' . \$admin->codice_univoco;
\$admin->delete();
} else {
echo 'Creo utente test...';
\$user = \App\Models\User::create([
'name' => 'Test User',
'email' => 'test@test.com',
'password' => bcrypt('password')
]);
echo 'Utente creato con ID: ' . \$user->id;
}
"
echo "✅ Verifica completata!"