Adds the user name as a separate field

This commit is contained in:
2026-03-19 11:57:27 +01:00
parent a046c017fa
commit 124c707634
9 changed files with 233 additions and 21 deletions

View File

@@ -1,22 +1,32 @@
# Database Schema Documentation
> Generated: 2026-02-03 05:38:33
> Generated: 2026-03-19 10:55:06
> Database: go-no-go
> Total Tables: 13
> Total Tables: 23
## Table of Contents
- [action_events](#action_events)
- [answers](#answers)
- [cache](#cache)
- [cache_locks](#cache_locks)
- [categories](#categories)
- [configs](#configs)
- [failed_jobs](#failed_jobs)
- [job_batches](#job_batches)
- [jobs](#jobs)
- [logs](#logs)
- [migrations](#migrations)
- [nova_field_attachments](#nova_field_attachments)
- [nova_notifications](#nova_notifications)
- [nova_pending_field_attachments](#nova_pending_field_attachments)
- [password_reset_tokens](#password_reset_tokens)
- [question_groups](#question_groups)
- [questionnaire_sessions](#questionnaire_sessions)
- [questions](#questions)
- [roles](#roles)
- [screening_answers](#screening_answers)
- [screenings](#screenings)
- [sessions](#sessions)
- [users](#users)
@@ -46,6 +56,25 @@ ## action_events
---
## answers
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| session_id | bigint unsigned | NO | MUL | NULL | | → questionnaire_sessions.id |
| question_id | bigint unsigned | NO | MUL | NULL | | → questions.id |
| value | varchar(255) | YES | | NULL | | |
| text_value | text | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **answers_question_id_foreign**: `question_id``questions.id`
- **answers_session_id_foreign**: `session_id``questionnaire_sessions.id`
---
## cache
| Field | Type | Null | Key | Default | Extra | Foreign Key |
@@ -66,6 +95,29 @@ ## cache_locks
---
## categories
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| name | varchar(255) | NO | UNI | NULL | | |
| sort_order | int unsigned | NO | | 0 | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
---
## configs
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| key | varchar(255) | NO | PRI | NULL | | |
| json_value | json | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
---
## failed_jobs
| Field | Type | Null | Key | Default | Extra | Foreign Key |
@@ -111,6 +163,26 @@ ## jobs
---
## logs
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| user_id | bigint unsigned | YES | MUL | NULL | | → users.id |
| session_id | bigint unsigned | YES | MUL | NULL | | → questionnaire_sessions.id |
| category_id | bigint unsigned | YES | MUL | NULL | | → categories.id |
| action | varchar(100) | NO | | NULL | | |
| metadata | json | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **logs_category_id_foreign**: `category_id``categories.id`
- **logs_session_id_foreign**: `session_id``questionnaire_sessions.id`
- **logs_user_id_foreign**: `user_id``users.id`
---
## migrations
| Field | Type | Null | Key | Default | Extra | Foreign Key |
@@ -175,6 +247,116 @@ ## password_reset_tokens
---
## question_groups
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| category_id | bigint unsigned | NO | MUL | NULL | | → categories.id |
| name | varchar(255) | NO | | NULL | | |
| sort_order | int unsigned | NO | | 0 | | |
| description | text | YES | | NULL | | |
| scoring_instructions | text | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **question_groups_category_id_foreign**: `category_id``categories.id`
---
## questionnaire_sessions
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| user_id | bigint unsigned | NO | MUL | NULL | | → users.id |
| category_id | bigint unsigned | NO | MUL | NULL | | → categories.id |
| screening_id | bigint unsigned | YES | MUL | NULL | | → screenings.id |
| status | varchar(50) | NO | | in_progress | | |
| score | int | YES | | NULL | | |
| result | varchar(50) | YES | | NULL | | |
| additional_comments | text | YES | | NULL | | |
| completed_at | timestamp | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **questionnaire_sessions_category_id_foreign**: `category_id``categories.id`
- **questionnaire_sessions_screening_id_foreign**: `screening_id``screenings.id`
- **questionnaire_sessions_user_id_foreign**: `user_id``users.id`
---
## questions
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| question_group_id | bigint unsigned | NO | MUL | NULL | | → question_groups.id |
| text | text | NO | | NULL | | |
| has_yes | tinyint(1) | NO | | 0 | | |
| has_no | tinyint(1) | NO | | 0 | | |
| has_na | tinyint(1) | NO | | 0 | | |
| details | varchar(50) | YES | | NULL | | |
| sort_order | int unsigned | NO | | 0 | | |
| is_scored | tinyint(1) | NO | | 0 | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **questions_question_group_id_foreign**: `question_group_id``question_groups.id`
---
## roles
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| name | varchar(255) | NO | UNI | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
---
## screening_answers
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| screening_id | bigint unsigned | NO | MUL | NULL | | → screenings.id |
| question_number | int unsigned | NO | | NULL | | |
| value | varchar(10) | NO | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **screening_answers_screening_id_foreign**: `screening_id``screenings.id`
---
## screenings
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| user_id | bigint unsigned | NO | MUL | NULL | | → users.id |
| score | decimal(4,1) | YES | | NULL | | |
| passed | tinyint(1) | YES | | NULL | | |
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **screenings_user_id_foreign**: `user_id``users.id`
---
## sessions
| Field | Type | Null | Key | Default | Extra | Foreign Key |
@@ -193,10 +375,18 @@ ## users
| Field | Type | Null | Key | Default | Extra | Foreign Key |
|-------|------|------|-----|---------|-------|-------------|
| id | bigint unsigned | NO | PRI | NULL | auto_increment | |
| role_id | bigint unsigned | NO | MUL | 1 | | → roles.id |
| name | varchar(255) | NO | | NULL | | |
| username | varchar(255) | NO | UNI | NULL | | |
| email | varchar(255) | NO | UNI | NULL | | |
| azure_id | varchar(255) | YES | UNI | NULL | | |
| photo | varchar(255) | YES | | NULL | | |
| job_title | varchar(255) | YES | | NULL | | |
| department | varchar(255) | YES | | NULL | | |
| company_name | varchar(255) | YES | | NULL | | |
| phone | varchar(255) | YES | | NULL | | |
| email_verified_at | timestamp | YES | | NULL | | |
| password | varchar(255) | NO | | NULL | | |
| password | varchar(255) | YES | | NULL | | |
| two_factor_secret | text | YES | | NULL | | |
| two_factor_recovery_codes | text | YES | | NULL | | |
| two_factor_confirmed_at | timestamp | YES | | NULL | | |
@@ -204,5 +394,9 @@ ## users
| created_at | timestamp | YES | | NULL | | |
| updated_at | timestamp | YES | | NULL | | |
### Foreign Key Constraints
- **users_role_id_foreign**: `role_id``roles.id`
---