Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/astrxnomo/eventify-app/llms.txt

Use this file to discover all available pages before exploring further.

Eventify’s MySQL database is built around seven tables that together model every aspect of event management: who can log in and what they’re allowed to do, where events take place, how they’re categorised and tracked, and which attendees hold tickets. The schema is managed entirely through Laravel migrations, so every structural change is version-controlled and reproducible. Run all migrations — and optionally seed sample data at the same time — with a single Artisan command:
php artisan migrate:fresh --seed
The tables below are listed in dependency order. Each table that holds a foreign key is introduced after the table it references, matching the order in which Laravel applies the migrations.

roles

The roles table defines the two access levels in Eventify — Administrator and User — and is the first table created because users depends on it.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
namevarchar(255)NoHuman-readable role name (e.g. Administrator).
labelvarchar(255)NoShort machine-friendly label (e.g. admin, user).
descriptionvarchar(255)YesNULLOptional description of what the role permits.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the record is active.
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.

users

The users table stores every registered account. Each user is assigned a role via role_id, which defaults to 2 (the regular User role). Soft deletes allow accounts to be deactivated without losing historical records such as tickets.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
namevarchar(255)NoDisplay name of the user.
emailvarchar(255)NoUnique email address used for login.
email_verified_attimestampYesNULLWhen the email address was verified; NULL if unverified.
passwordvarchar(255)NoBcrypt-hashed password.
role_idbigint (FK)No2References roles.id; defaults to the regular user role.
remember_tokenvarchar(100)YesNULLLaravel “remember me” token for persistent sessions.
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the account is active.
Foreign keys
ColumnReferencesOn delete
role_idroles.idNo action

statuses

The statuses table is a simple lookup table whose values drive the availability label shown on every event listing. Soft deletes let an administrator retire a status value without breaking historical event records.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
namevarchar(255)NoStatus label (e.g. Disponible, Agotado, Finalizado).
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the status is active.

locations

The locations table records the physical venue of an event. Latitude and longitude are optional: they are populated by the factory during seeding but may be left blank when an event is created manually without geocoding.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
addressvarchar(255)NoStreet address of the venue.
cityvarchar(255)NoCity where the venue is located.
regionvarchar(255)NoState, province, or region.
countryvarchar(255)NoCountry name.
latitudedecimal(10, 7)YesNULLGeographic latitude in decimal degrees.
longitudedecimal(10, 7)YesNULLGeographic longitude in decimal degrees.
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the record is active.

categories

The categories table organises events by type. Each event belongs to exactly one category, making it straightforward to filter listings by genre or theme.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
namevarchar(255)NoCategory name (e.g. Musical, Deportivo, Familiar).
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the category is active.

events

The events table is the central table of Eventify. Every event is owned by a user, assigned a status, placed at a location, and organised under a category. Foreign keys are set to ON DELETE SET NULL so that removing a related record does not cascade-delete the event itself — the event simply loses its association.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
user_idbigint (FK)YesNULLThe organiser; references users.id. Set null on user deletion.
status_idbigint (FK)Yes1Current availability; references statuses.id. Set null on delete.
location_idbigint (FK)YesNULLVenue; references locations.id. Set null on location deletion.
category_idbigint (FK)YesNULLGenre/type; references categories.id. Set null on deletion.
namevarchar(255)NoEvent title.
descriptiontextNoFull event description.
img_urlvarchar(255)NoPath to the event’s cover image in public storage.
capacityintNoMaximum number of attendees allowed.
attendeesintNo0Running count of registered attendees; starts at zero.
priceintNoTicket price in the application’s base currency unit.
start_datedatetimeNoDate and time when the event begins.
end_datedatetimeNoDate and time when the event concludes.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the event is active.
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
Foreign keys
ColumnReferencesOn delete
user_idusers.idSET NULL
status_idstatuses.idSET NULL
location_idlocations.idSET NULL
category_idcategories.idSET NULL

tickets

The tickets table records every purchase or reservation made by a user for a specific event. The quantity column allows a single transaction to cover multiple seats. Both user_id and event_id are required — tickets cannot be orphaned — and soft deletes support cancellation workflows without permanent data loss.
ColumnTypeNullableDefaultDescription
idbigint (PK)NoAuto-incrementing primary key.
user_idbigint (FK)NoThe purchasing user; references users.id.
event_idbigint (FK)NoThe event being attended; references events.id.
quantityintNoNumber of seats/tickets included in this record.
deleted_attimestampYesNULLSoft-delete timestamp; NULL means the ticket is active.
created_attimestampYesNULLSet automatically by Laravel on insert.
updated_attimestampYesNULLSet automatically by Laravel on update.
Foreign keys
ColumnReferencesOn delete
user_idusers.idNo action
event_idevents.idNo action

Relationships

The table below summarises every Eloquent relationship implied by the foreign keys above.
ModelRelationship typeRelated model(s)
UserbelongsToRole
UserhasManyEvent, Ticket
RolehasManyUser
EventbelongsToUser, Location, Category, Status
EventhasManyTicket
TicketbelongsToUser, Event
CategoryhasManyEvent
LocationhasManyEvent
StatushasManyEvent
Every table in the Eventify schema carries a deleted_at column and uses Laravel’s SoftDeletes trait. Soft-deleted rows are excluded from standard queries but remain in the database and can be restored at any time.

Build docs developers (and LLMs) love