mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
Cambio nome
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-- Estensioni PostgreSQL richieste da PecFlow
|
||||
-- Estensioni PostgreSQL richieste da PEChub
|
||||
-- Questo script viene eseguito automaticamente da Docker al primo avvio
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
|
||||
|
||||
-- Permette SET LOCAL per RLS (app.current_tenant_id)
|
||||
ALTER DATABASE pecflow SET "app.current_tenant_id" TO '';
|
||||
ALTER DATABASE pechub SET "app.current_tenant_id" TO '';
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
-- SEED: Tenant demo + utenti per sviluppo locale
|
||||
--
|
||||
-- Credenziali:
|
||||
-- Admin: admin@demo.pecflow.it / Demo@PecFlow2026!
|
||||
-- Operator: operator@demo.pecflow.it / Oper@PecFlow2026!
|
||||
-- Admin: admin@demo.pechub.it / Demo@PEChub2026!
|
||||
-- Operator: operator@demo.pechub.it / Oper@PEChub2026!
|
||||
--
|
||||
-- Esegui con: make seed
|
||||
-- ============================================================
|
||||
@@ -25,27 +25,27 @@ VALUES (
|
||||
ON CONFLICT (slug) DO NOTHING;
|
||||
|
||||
-- Utente super_admin (global, senza tenant specifico usa il tenant demo)
|
||||
-- Password: SuperAdmin@PecFlow2026! (bcrypt hash)
|
||||
-- Password: SuperAdmin@PEChub2026! (bcrypt hash)
|
||||
INSERT INTO users (id, tenant_id, email, password_hash, full_name, role, is_active)
|
||||
VALUES (
|
||||
'00000000-0000-0000-0000-000000000001',
|
||||
'11111111-1111-1111-1111-111111111111',
|
||||
'superadmin@pecflow.it',
|
||||
'$2b$12$y2yq6X2f3dZi22wqWZd1aumP03IU6OWrrevRMFj9054aGnUms116W', -- SuperAdmin@PecFlow2026!
|
||||
'Super Admin PecFlow',
|
||||
'superadmin@pechub.it',
|
||||
'$2b$12$y2yq6X2f3dZi22wqWZd1aumP03IU6OWrrevRMFj9054aGnUms116W', -- SuperAdmin@PEChub2026!
|
||||
'Super Admin PEChub',
|
||||
'super_admin',
|
||||
TRUE
|
||||
)
|
||||
ON CONFLICT (tenant_id, email) DO NOTHING;
|
||||
|
||||
-- Utente admin del tenant demo
|
||||
-- Password: Demo@PecFlow2026! (bcrypt hash)
|
||||
-- Password: Demo@PEChub2026! (bcrypt hash)
|
||||
INSERT INTO users (id, tenant_id, email, password_hash, full_name, role, is_active)
|
||||
VALUES (
|
||||
'11111111-0000-0000-0000-000000000001',
|
||||
'11111111-1111-1111-1111-111111111111',
|
||||
'admin@demo.pecflow.it',
|
||||
'$2b$12$PmyaJvF0i7ACFR39k6hfMO2.6U.FVPYma.7OyXyrGuGuokiJOfX8y', -- Demo@PecFlow2026!
|
||||
'admin@demo.pechub.it',
|
||||
'$2b$12$PmyaJvF0i7ACFR39k6hfMO2.6U.FVPYma.7OyXyrGuGuokiJOfX8y', -- Demo@PEChub2026!
|
||||
'Admin Demo',
|
||||
'admin',
|
||||
TRUE
|
||||
@@ -53,13 +53,13 @@ VALUES (
|
||||
ON CONFLICT (tenant_id, email) DO NOTHING;
|
||||
|
||||
-- Utente operator del tenant demo
|
||||
-- Password: Oper@PecFlow2026! (bcrypt hash)
|
||||
-- Password: Oper@PEChub2026! (bcrypt hash)
|
||||
INSERT INTO users (id, tenant_id, email, password_hash, full_name, role, is_active)
|
||||
VALUES (
|
||||
'11111111-0000-0000-0000-000000000002',
|
||||
'11111111-1111-1111-1111-111111111111',
|
||||
'operator@demo.pecflow.it',
|
||||
'$2b$12$Z0REc7flPCD3Sb8fZHsuW.Uk2X4JiJO7HhTajNSuPiQgzppkCDmLu', -- Oper@PecFlow2026!
|
||||
'operator@demo.pechub.it',
|
||||
'$2b$12$Z0REc7flPCD3Sb8fZHsuW.Uk2X4JiJO7HhTajNSuPiQgzppkCDmLu', -- Oper@PEChub2026!
|
||||
'Operatore Demo',
|
||||
'operator',
|
||||
TRUE
|
||||
@@ -74,7 +74,7 @@ DO $$
|
||||
BEGIN
|
||||
RAISE NOTICE '✅ Seed completato!';
|
||||
RAISE NOTICE ' Tenant demo: 11111111-1111-1111-1111-111111111111';
|
||||
RAISE NOTICE ' Admin: admin@demo.pecflow.it / Demo@PecFlow2026!';
|
||||
RAISE NOTICE ' Operator: operator@demo.pecflow.it / Oper@PecFlow2026!';
|
||||
RAISE NOTICE ' Admin: admin@demo.pechub.it / Demo@PEChub2026!';
|
||||
RAISE NOTICE ' Operator: operator@demo.pechub.it / Oper@PEChub2026!';
|
||||
END
|
||||
$$;
|
||||
|
||||
Reference in New Issue
Block a user