- Added endpoints for license management including creation, retrieval, update, validation, and usage tracking. - Developed service layer for business logic related to licenses. - Introduced tenant management APIs for creating, updating, listing, and deleting tenants. - Implemented user-tenant relationship management with endpoints for adding, removing, and updating user roles in tenants. - Created DTOs for data transfer between layers and models for ORM mapping. - Enhanced logging and error handling across services.
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=========================================="
|
|
echo "PostgreSQL App - Inicialización"
|
|
echo "=========================================="
|
|
|
|
# Este script es ejecutado por docker-entrypoint-initdb.d
|
|
# PostgreSQL ya está iniciado por el contenedor padre
|
|
|
|
echo "✓ PostgreSQL está listo (iniciado por contenedor)"
|
|
|
|
# La base de datos anexo76_core ya está creada por POSTGRES_DB
|
|
echo "✓ Base de datos 'anexo76_core' ya configurada"
|
|
|
|
# Crear extensiones y esquemas
|
|
echo "Creando extensiones y esquemas..."
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
CREATE EXTENSION IF NOT EXISTS "pg_trgm";
|
|
CREATE SCHEMA IF NOT EXISTS core;
|
|
CREATE SCHEMA IF NOT EXISTS a76;
|
|
CREATE SCHEMA IF NOT EXISTS a22;
|
|
CREATE SCHEMA IF NOT EXISTS a24;
|
|
CREATE SCHEMA IF NOT EXISTS a30;
|
|
EOSQL
|
|
|
|
echo "✓ Extensiones y esquemas creados correctamente"
|
|
echo "=========================================="
|
|
echo "PostgreSQL App - Inicialización completada"
|
|
echo "=========================================="
|