Documentation Index
Fetch the complete documentation index at: https://mintlify.com/keving5726/megacreative/llms.txt
Use this file to discover all available pages before exploring further.
Mega Creative stores all application data in MySQL across seven tables. Six of these are application-specific tables that manage students, academic programs, lookup values, and geographic data. The seventh is a Laravel-internal table used by the queue system. Every table is created through Artisan migrations, which means the schema is fully version-controlled and reproducible across environments.
Tables Overview
The six application tables form a hub-and-spoke structure where estudiantes sits at the centre and holds foreign keys to every other application table.
| Table | Purpose | Timestamps |
|---|
estudiantes | Core student records — personal details, enrollment, and location | ✅ Yes |
carreras | Academic programs a student can be enrolled in | ❌ No |
statuses | Lookup: enabled / disabled status for students and programs | ❌ No |
sexos | Lookup: sex options for a student | ❌ No |
paises | Lookup: countries for a student’s address | ❌ No |
estados | Lookup: states / provinces for a student’s address | ❌ No |
ciudades | Lookup: cities for a student’s address | ❌ No |
The failed_jobs table is scaffolded automatically by Laravel and records queue jobs that throw an unhandled exception. It is not used by any application model and requires no manual management.
estudiantes
The primary application table. Each row represents one registered student.
| Column | Type | Constraints | Notes |
|---|
id | BIGINT UNSIGNED | PK, auto-increment | Surrogate primary key |
nombres | VARCHAR(100) | NOT NULL | Student’s given name(s) |
apellidos | VARCHAR(100) | NOT NULL | Student’s surname(s) |
sexo_id | TINYINT UNSIGNED | NOT NULL, FK → sexos.id | References the sex lookup |
fecha_de_nacimiento | DATE | NOT NULL | Date of birth |
email | VARCHAR(100) | NOT NULL, UNIQUE | Contact email address |
carrera_id | TINYINT UNSIGNED | NOT NULL, FK → carreras.id | Academic program enrolled in |
status_id | TINYINT UNSIGNED | NOT NULL, FK → statuses.id | Active/inactive status |
pais_id | TINYINT UNSIGNED | NOT NULL, FK → paises.id | Country of residence |
estado_id | TINYINT UNSIGNED | NOT NULL, FK → estados.id | State / province of residence |
ciudad_id | TINYINT UNSIGNED | NOT NULL, FK → ciudades.id | City of residence |
created_at | TIMESTAMP | Nullable | Set by Laravel automatically |
updated_at | TIMESTAMP | Nullable | Set by Laravel automatically |
carreras
Stores the academic programs available for student enrollment. Each program has a display name, a short description, and its own enabled/disabled status.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
nombre | VARCHAR(100) | NOT NULL, UNIQUE | Program name |
descripcion | VARCHAR(180) | NOT NULL | Short description of the program |
status_id | TINYINT UNSIGNED | NOT NULL, FK → statuses.id | Whether the program is accepting students |
carreras does not use Laravel’s $table->timestamps(). The created_at and updated_at columns are absent from this table.
statuses
A simple two-row lookup table. Rows are inserted by the seeder and are not expected to change.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
status | VARCHAR(30) | NOT NULL, UNIQUE | Status label (e.g. Habilitado) |
No timestamps are stored on this table.
sexos
A two-row lookup table for the sex field on a student record.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
tipo | VARCHAR(30) | NOT NULL, UNIQUE | Sex label (e.g. Masculino) |
No timestamps are stored on this table.
paises
Holds country records used to describe where a student lives.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
nombre | VARCHAR(100) | NOT NULL, UNIQUE | Country name |
No timestamps are stored on this table.
estados
Holds state or province records, structured identically to paises.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
nombre | VARCHAR(100) | NOT NULL, UNIQUE | State / province name |
No timestamps are stored on this table.
ciudades
Holds city records, structured identically to paises and estados.
| Column | Type | Constraints | Notes |
|---|
id | TINYINT UNSIGNED | PK, auto-increment | Surrogate primary key |
nombre | VARCHAR(100) | NOT NULL, UNIQUE | City name |
No timestamps are stored on this table.
Foreign Key Relationships
The diagram below summarises every foreign key constraint in the schema. All constraints are defined at the database level inside the migration for each table.
| Foreign Key | References | ON DELETE |
|---|
estudiantes.sexo_id | sexos.id | RESTRICT (default) |
estudiantes.carrera_id | carreras.id | CASCADE |
estudiantes.status_id | statuses.id | RESTRICT (default) |
estudiantes.pais_id | paises.id | RESTRICT (default) |
estudiantes.estado_id | estados.id | RESTRICT (default) |
estudiantes.ciudad_id | ciudades.id | RESTRICT (default) |
carreras.status_id | statuses.id | RESTRICT (default) |
The foreign key estudiantes.carrera_id is declared with onDelete('cascade'). Deleting a row from carreras will permanently delete every estudiantes row that references that program. Always disable or soft-delete a carrera rather than removing it from the database when students are enrolled in it.