Database name
All connection settings inconexion.php point to a single database:
Create the database
- phpMyAdmin
- CLI
- Open
http://localhost/phpmyadmin. - Click New in the left sidebar.
- Enter
bienes_nacionales_uptagas the database name. - Set the collation to
utf8mb4_general_ci. - Click Create.
Import the schema
The filebd_bienes_nacionales.sql in the project root contains the complete schema and default seed data.
- phpMyAdmin
- CLI
Table overview
The schema creates thirteen tables. The diagram below shows the dependency order used inbd_bienes_nacionales.sql.
usuarios
System users. Primary key is
cedula (Venezuelan national ID). Stores password_hash (bcrypt), rol (Administrador or Usuario), and activo flag.categorias
Asset categories. Supports a self-referencing
categoria_padre_id for hierarchical classification (e.g., SIGECOF categories).estatus
Asset statuses. The
permite_movimiento flag controls whether a bien in that status can be transferred.dependencias
Organizational units (Rectoría, Vicerrectorado, OGA, etc.). Typed as
Administrativa, Academica, PNF, Laboratorio, or Otra.ubicaciones
Physical locations within a dependencia (e.g., Oficina del Rector). Each ubicación belongs to exactly one dependencia.
bienes
Core asset table. References
categorias, ubicaciones, estatus, adquisiciones, and optionally donaciones.movimientos
Asset movement history. Records origin/destination locations, responsible parties, and the registering user’s cédula.
auditoria
System audit log. Every login attempt, password change, and data modification writes a row with
tabla_afectada, accion, usuario_cedula, and ip_address.Additional tables in the schema:
proveedores, donaciones, adquisiciones, responsables, and control_perceptivo.Default seed data
The SQL file inserts the following records automatically: Default admin userBackup and restore
Create a backupExporting from within the system
An administrator can export the database directly from the web interface at Configuración (configuracion.php). This option is only visible to users with the Administrador role, as enforced by header.php: