Skip to main content

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.
TablePurposeTimestamps
estudiantesCore student records — personal details, enrollment, and location✅ Yes
carrerasAcademic programs a student can be enrolled in❌ No
statusesLookup: enabled / disabled status for students and programs❌ No
sexosLookup: sex options for a student❌ No
paisesLookup: countries for a student’s address❌ No
estadosLookup: states / provinces for a student’s address❌ No
ciudadesLookup: 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.
ColumnTypeConstraintsNotes
idBIGINT UNSIGNEDPK, auto-incrementSurrogate primary key
nombresVARCHAR(100)NOT NULLStudent’s given name(s)
apellidosVARCHAR(100)NOT NULLStudent’s surname(s)
sexo_idTINYINT UNSIGNEDNOT NULL, FK → sexos.idReferences the sex lookup
fecha_de_nacimientoDATENOT NULLDate of birth
emailVARCHAR(100)NOT NULL, UNIQUEContact email address
carrera_idTINYINT UNSIGNEDNOT NULL, FK → carreras.idAcademic program enrolled in
status_idTINYINT UNSIGNEDNOT NULL, FK → statuses.idActive/inactive status
pais_idTINYINT UNSIGNEDNOT NULL, FK → paises.idCountry of residence
estado_idTINYINT UNSIGNEDNOT NULL, FK → estados.idState / province of residence
ciudad_idTINYINT UNSIGNEDNOT NULL, FK → ciudades.idCity of residence
created_atTIMESTAMPNullableSet by Laravel automatically
updated_atTIMESTAMPNullableSet 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.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
nombreVARCHAR(100)NOT NULL, UNIQUEProgram name
descripcionVARCHAR(180)NOT NULLShort description of the program
status_idTINYINT UNSIGNEDNOT NULL, FK → statuses.idWhether 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.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
statusVARCHAR(30)NOT NULL, UNIQUEStatus 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.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
tipoVARCHAR(30)NOT NULL, UNIQUESex label (e.g. Masculino)
No timestamps are stored on this table.

paises

Holds country records used to describe where a student lives.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
nombreVARCHAR(100)NOT NULL, UNIQUECountry name
No timestamps are stored on this table.

estados

Holds state or province records, structured identically to paises.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
nombreVARCHAR(100)NOT NULL, UNIQUEState / province name
No timestamps are stored on this table.

ciudades

Holds city records, structured identically to paises and estados.
ColumnTypeConstraintsNotes
idTINYINT UNSIGNEDPK, auto-incrementSurrogate primary key
nombreVARCHAR(100)NOT NULL, UNIQUECity 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 KeyReferencesON DELETE
estudiantes.sexo_idsexos.idRESTRICT (default)
estudiantes.carrera_idcarreras.idCASCADE
estudiantes.status_idstatuses.idRESTRICT (default)
estudiantes.pais_idpaises.idRESTRICT (default)
estudiantes.estado_idestados.idRESTRICT (default)
estudiantes.ciudad_idciudades.idRESTRICT (default)
carreras.status_idstatuses.idRESTRICT (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.

Build docs developers (and LLMs) love