Files
WinStudentGoalTracker/docs/db.html
T
ivan-pelly fb1eea6d08 db updates
2026-02-21 10:57:31 -08:00

1518 lines
74 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Database — Database Documentation</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Display:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<style>
:root {
--bg: #f7f6f2;
--surface: #ffffff;
--surface-2: #f0ede6;
--border: #e2ddd5;
--border-mid: #cdc8bf;
--text: #1c1a17;
--text-muted: #6b6560;
--accent: #2b5f4e;
--accent-light: #d8ede8;
--accent-mid: #4a9b80;
--pk: #7c3d12;
--pk-bg: #fef3e2;
--fk: #1e3a5f;
--fk-bg: #e8f0fa;
--idx: #4a1d6b;
--idx-bg: #f3e8fc;
--null-color: #94928e;
--font-body: 'Google Sans', 'Segoe UI', Roboto, sans-serif;
--font-head: 'Google Sans Display', 'Google Sans', 'Segoe UI', sans-serif;
--font-mono: 'JetBrains Mono', 'Courier New', monospace;
--radius: 8px;
--shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
background: var(--bg);
color: var(--text);
font-family: var(--font-body);
font-size: 15px;
line-height: 1.7;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* ── SITE HEADER ── */
.site-header {
background: #111827;
color: #fff;
padding: 2rem 1.5rem;
text-align: center;
}
.site-header h1 {
margin: 0;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: clamp(1.6rem, 3vw, 2.2rem);
font-weight: 700;
letter-spacing: -0.02em;
}
.site-header p {
margin: 0.5rem 0 0;
opacity: 0.85;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 0.95rem;
}
/* ── MAIN ── */
main {
flex: 1;
max-width: 960px;
margin: 0 auto;
padding: 48px 56px 80px;
width: 100%;
}
/* ── PAGE HEADER ── */
.page-header {
margin-bottom: 52px;
padding-bottom: 32px;
border-bottom: 1px solid var(--border);
}
.page-header .tag {
font-family: var(--font-mono);
font-size: 11px;
letter-spacing: .1em;
text-transform: uppercase;
color: var(--accent);
background: var(--accent-light);
padding: 3px 10px;
border-radius: 20px;
display: inline-block;
margin-bottom: 14px;
}
.page-header h1 {
font-family: var(--font-head);
font-size: 38px;
font-weight: 700;
color: var(--text);
line-height: 1.15;
letter-spacing: -.02em;
}
.page-header .meta {
margin-top: 14px;
display: flex;
gap: 24px;
flex-wrap: wrap;
}
.meta-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--text-muted);
font-family: var(--font-mono);
}
.meta-item strong {
color: var(--text);
font-weight: 500;
}
/* ── SECTION TITLES ── */
.section-title {
font-family: var(--font-head);
font-size: 26px;
font-weight: 700;
color: var(--text);
margin-bottom: 24px;
padding-top: 8px;
}
/* ── SUMMARY CARDS ── */
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 14px;
margin-bottom: 48px;
}
.summary-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 18px 18px 14px;
box-shadow: var(--shadow);
}
.summary-card .num {
font-family: var(--font-head);
font-size: 32px;
font-weight: 700;
color: var(--accent);
line-height: 1;
}
.summary-card .lbl {
font-size: 12px;
color: var(--text-muted);
margin-top: 5px;
font-family: var(--font-mono);
}
/* ── TABLE OF CONTENTS ── */
.toc {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px 24px;
margin-bottom: 36px;
box-shadow: var(--shadow);
}
.toc-title {
font-family: var(--font-mono);
font-size: 10.5px;
text-transform: uppercase;
letter-spacing: .12em;
color: var(--text-muted);
margin-bottom: 14px;
}
.toc-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.toc-link {
font-family: var(--font-mono);
font-size: 12.5px;
color: var(--accent);
text-decoration: none;
background: var(--accent-light);
padding: 4px 12px;
border-radius: 20px;
transition: all .15s;
}
.toc-link:hover {
background: var(--accent);
color: #fff;
}
/* ── LEGEND ── */
.legend {
display: flex;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 28px;
padding: 14px 18px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 12.5px;
}
.legend-item {
display: flex;
align-items: center;
gap: 7px;
color: var(--text-muted);
font-family: var(--font-mono);
font-size: 11.5px;
}
/* ── TABLE CARD ── */
.table-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
margin-bottom: 24px;
box-shadow: var(--shadow);
overflow: hidden;
scroll-margin-top: 32px;
transition: box-shadow .2s;
}
.table-card:hover {
box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
}
.table-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 18px 20px 14px;
border-bottom: 1px solid var(--border);
background: var(--surface-2);
gap: 12px;
}
.table-header-left { flex: 1; }
.table-name {
font-family: var(--font-mono);
font-size: 16px;
font-weight: 500;
color: var(--accent);
letter-spacing: -.01em;
}
.table-desc {
font-size: 13px;
color: var(--text-muted);
margin-top: 4px;
line-height: 1.5;
}
.col-count {
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-muted);
background: var(--border);
padding: 3px 9px;
border-radius: 20px;
white-space: nowrap;
margin-top: 2px;
}
/* ── COLUMN TABLE ── */
.col-table {
width: 100%;
border-collapse: collapse;
font-size: 13.5px;
}
.col-table thead tr {
background: var(--bg);
border-bottom: 1px solid var(--border);
}
.col-table thead th {
padding: 9px 14px;
text-align: left;
font-family: var(--font-mono);
font-size: 10px;
text-transform: uppercase;
letter-spacing: .1em;
color: var(--text-muted);
font-weight: 500;
}
.col-table tbody tr {
border-bottom: 1px solid var(--border);
transition: background .1s;
}
.col-table tbody tr:last-child { border-bottom: none; }
.col-table tbody tr:hover { background: #fafaf8; }
.col-table td {
padding: 10px 14px;
vertical-align: middle;
}
.col-name {
font-family: var(--font-mono);
font-size: 13px;
font-weight: 500;
color: var(--text);
}
/* ── BADGES ── */
.badge {
display: inline-block;
font-family: var(--font-mono);
font-size: 10px;
font-weight: 500;
padding: 2px 7px;
border-radius: 4px;
margin-right: 4px;
white-space: nowrap;
}
.badge-pk { color: var(--pk); background: var(--pk-bg); }
.badge-fk { color: var(--fk); background: var(--fk-bg); }
.badge-uq { color: var(--idx); background: var(--idx-bg); }
.badge-idx { color: #555; background: #f0f0ee; }
.badge-ai { color: #2d6a4f; background: #d8f3dc; }
.type-chip {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-muted);
background: var(--surface-2);
padding: 2px 8px;
border-radius: 4px;
border: 1px solid var(--border);
}
.null-yes {
color: var(--null-color);
font-size: 12px;
font-family: var(--font-mono);
}
.null-no {
color: var(--pk);
font-size: 12px;
font-family: var(--font-mono);
font-weight: 500;
}
.default-val {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-muted);
background: var(--surface-2);
padding: 1px 6px;
border-radius: 3px;
}
.fk-ref {
font-family: var(--font-mono);
font-size: 12px;
color: var(--fk);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 4px;
}
.fk-ref:hover { text-decoration: underline; }
.fk-ref::before { content: '→'; opacity: .6; }
/* ── CONSTRAINTS BAR ── */
.constraints-bar {
padding: 10px 16px;
background: var(--bg);
border-top: 1px solid var(--border);
display: flex;
gap: 16px;
flex-wrap: wrap;
font-size: 12px;
color: var(--text-muted);
font-family: var(--font-mono);
align-items: center;
}
.constraint-item { display: flex; align-items: center; gap: 6px; }
.constraint-item .label { color: var(--text-muted); }
.constraint-item .val { color: var(--text); }
@media (max-width: 760px) {
main { padding: 32px 20px 60px; }
.site-header { padding: 1.5rem 1rem; }
}
</style>
</head>
<body>
<header class="site-header">
<h1>Database</h1>
<p>Database Schema Documentation</p>
<p style="margin-top:0.25rem;font-size:0.85rem;opacity:0.6;">Generated 2026-02-19</p>
</header>
<main>
<div class="page-header">
<div class="tag">Schema Reference</div>
<h1>Database</h1>
<div class="meta">
<div class="meta-item"><strong>15</strong>&nbsp;tables</div>
<div class="meta-item"><strong>91</strong>&nbsp;columns</div>
<div class="meta-item"><strong>22</strong>&nbsp;foreign keys</div>
<div class="meta-item">Generated&nbsp;<strong>2026-02-19</strong></div>
</div>
</div>
<div class="summary-grid">
<div class="summary-card"><div class="num">15</div><div class="lbl">Tables</div></div>
<div class="summary-card"><div class="num">91</div><div class="lbl">Columns</div></div>
<div class="summary-card"><div class="num">22</div><div class="lbl">Foreign Keys</div></div>
<div class="summary-card"><div class="num">5</div><div class="lbl">Unique Keys</div></div>
<div class="summary-card"><div class="num">21</div><div class="lbl">Indexes</div></div>
</div>
<section id="tables">
<h2 class="section-title">Table Definitions</h2>
<div class="legend">
<div class="legend-item"><span class="badge badge-pk">PK</span> Primary Key</div>
<div class="legend-item"><span class="badge badge-fk">FK</span> Foreign Key</div>
<div class="legend-item"><span class="badge badge-uq">UQ</span> Unique</div>
<div class="legend-item"><span class="badge badge-idx">IDX</span> Indexed</div>
<div class="legend-item"><span class="null-no">NN</span> = Not Null</div>
<div class="legend-item"><span class="null-yes">NULL</span> = Nullable</div>
</div>
<div class="toc">
<div class="toc-title">Tables</div>
<div class="toc-grid">
<a href="#tbl-goal" class="toc-link">goal</a>
<a href="#tbl-health_note" class="toc-link">health_note</a>
<a href="#tbl-password_history" class="toc-link">password_history</a>
<a href="#tbl-password_reset_token" class="toc-link">password_reset_token</a>
<a href="#tbl-permission" class="toc-link">permission</a>
<a href="#tbl-program" class="toc-link">program</a>
<a href="#tbl-progress_event" class="toc-link">progress_event</a>
<a href="#tbl-progress_report" class="toc-link">progress_report</a>
<a href="#tbl-role" class="toc-link">role</a>
<a href="#tbl-role_permission" class="toc-link">role_permission</a>
<a href="#tbl-school_district" class="toc-link">school_district</a>
<a href="#tbl-student" class="toc-link">student</a>
<a href="#tbl-user" class="toc-link">user</a>
<a href="#tbl-user_program" class="toc-link">user_program</a>
<a href="#tbl-user_student" class="toc-link">user_student</a>
</div>
</div>
<div class="table-card" id="tbl-goal">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">goal</div>
</div>
<div class="col-count">9 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_goal</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_goal_parent</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-goal" class="fk-ref">goal.id_goal</a></td>
</tr>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-student" class="fk-ref">student.id_student</a></td>
</tr>
<tr>
<td><span class="col-name">id_user_created</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">title</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">description</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">category</span></td>
<td><span class="type-chip">varchar(100)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">updated_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-health_note">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">health_note</div>
</div>
<div class="col-count">5 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_health_note</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-student" class="fk-ref">student.id_student</a></td>
</tr>
<tr>
<td><span class="col-name">id_user_created</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">content</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-password_history">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">password_history</div>
</div>
<div class="col-count">4 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_password_history</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_user</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">password_hash</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-idx">IDX</span></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-password_reset_token">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">password_reset_token</div>
</div>
<div class="col-count">8 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_password_reset_token</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_user</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">token_hash</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-uq">UQ</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">expires_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-idx">IDX</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">used_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">invalidated_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">request_ip</span></td>
<td><span class="type-chip">varchar(45)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-permission">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">permission</div>
</div>
<div class="col-count">6 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_permission</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">name</span></td>
<td><span class="type-chip">varchar(100)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">description</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">resource</span></td>
<td><span class="type-chip">varchar(100)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">action</span></td>
<td><span class="type-chip">varchar(50)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">scope</span></td>
<td><span class="type-chip">varchar(50)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-program">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">program</div>
</div>
<div class="col-count">5 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_program</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_school_district</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-school_district" class="fk-ref">school_district.id_school_district</a></td>
</tr>
<tr>
<td><span class="col-name">name</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">description</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-progress_event">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">progress_event</div>
</div>
<div class="col-count">8 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_progress_event</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-student" class="fk-ref">student.id_student</a></td>
</tr>
<tr>
<td><span class="col-name">id_goal</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-goal" class="fk-ref">goal.id_goal</a></td>
</tr>
<tr>
<td><span class="col-name">id_user_created</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">content</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">is_sensitive</span></td>
<td><span class="type-chip">tinyint(1)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">updated_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-progress_report">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">progress_report</div>
</div>
<div class="col-count">8 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_progress_report</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-student" class="fk-ref">student.id_student</a></td>
</tr>
<tr>
<td><span class="col-name">id_goal</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-goal" class="fk-ref">goal.id_goal</a></td>
</tr>
<tr>
<td><span class="col-name">id_user_created</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">period</span></td>
<td><span class="type-chip">varchar(10)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">year</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">summary</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">generated_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-role">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">role</div>
</div>
<div class="col-count">4 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_role</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">name</span></td>
<td><span class="type-chip">varchar(100)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">description</span></td>
<td><span class="type-chip">text</span></td>
<td><span class="null-yes">NULL</span></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-role_permission">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">role_permission</div>
</div>
<div class="col-count">3 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_role_permission</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_role</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-role" class="fk-ref">role.id_role</a></td>
</tr>
<tr>
<td><span class="col-name">id_permission</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-permission" class="fk-ref">permission.id_permission</a></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-school_district">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">school_district</div>
</div>
<div class="col-count">4 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_school_district</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">name</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">contact_email</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-student">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">student</div>
</div>
<div class="col-count">7 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_program</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-program" class="fk-ref">program.id_program</a></td>
</tr>
<tr>
<td><span class="col-name">identifier</span></td>
<td><span class="type-chip">varchar(50)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">program_year</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">enrollment_date</span></td>
<td><span class="type-chip">date</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">expected_grad</span></td>
<td><span class="type-chip">date</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-user">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">user</div>
</div>
<div class="col-count">9 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_user</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_role</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-role" class="fk-ref">role.id_role</a></td>
</tr>
<tr>
<td><span class="col-name">email</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">name</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">password_hash</span></td>
<td><span class="type-chip">varchar(255)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">password_updated_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">failed_login_attempts</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">&#39;0&#39;</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">locked_until</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">created_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-user_program">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">user_program</div>
</div>
<div class="col-count">6 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_user_program</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_user</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-uq">UQ</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">id_program</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-uq">UQ</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-program" class="fk-ref">program.id_program</a></td>
</tr>
<tr>
<td><span class="col-name">is_primary</span></td>
<td><span class="type-chip">tinyint(1)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">&#39;0&#39;</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">status</span></td>
<td><span class="type-chip">varchar(20)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">&#39;active&#39;</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">joined_at</span></td>
<td><span class="type-chip">timestamp</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="table-card" id="tbl-user_student">
<div class="table-header">
<div class="table-header-left">
<div class="table-name">user_student</div>
</div>
<div class="col-count">5 columns</div>
</div>
<table class="col-table">
<thead>
<tr>
<th>Column</th>
<th>Type</th>
<th>Null</th>
<th>Default</th>
<th>Key</th>
<th>References</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="col-name">id_user_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-no">NN</span></td>
<td></td>
<td><span class="badge badge-pk">PK</span></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">id_user</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-user" class="fk-ref">user.id_user</a></td>
</tr>
<tr>
<td><span class="col-name">id_student</span></td>
<td><span class="type-chip">int</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td><span class="badge badge-fk">FK</span> <span class="badge badge-idx">IDX</span></td>
<td><a href="#tbl-student" class="fk-ref">student.id_student</a></td>
</tr>
<tr>
<td><span class="col-name">access_level</span></td>
<td><span class="type-chip">varchar(50)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="col-name">is_primary</span></td>
<td><span class="type-chip">tinyint(1)</span></td>
<td><span class="null-yes">NULL</span></td>
<td><span class="default-val">NULL</span></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</section>
</main>
</body>
</html>