📋 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
33 lines
917 B
Bash
33 lines
917 B
Bash
#!/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!"
|