Alpha One Labs
+Certificate of Completion
+This certifies that
+—
+has successfully completed the activity
+—
+Issued on
+—
+Certificate ID: —
+Scan to verify
+diff --git a/migrations/0005_add_certificates.sql b/migrations/0005_add_certificates.sql new file mode 100644 index 0000000..657f572 --- /dev/null +++ b/migrations/0005_add_certificates.sql @@ -0,0 +1,11 @@ +-- Migration 0005: Add certificates table + +CREATE TABLE IF NOT EXISTS certificates ( + id TEXT PRIMARY KEY, + enrollment_id TEXT NOT NULL UNIQUE, + issued_at TEXT NOT NULL DEFAULT (datetime('now')), + created_at TEXT NOT NULL DEFAULT (datetime('now')), + FOREIGN KEY (enrollment_id) REFERENCES enrollments(id) ON DELETE CASCADE +); + +CREATE INDEX IF NOT EXISTS idx_certificates_enrollment ON certificates(enrollment_id); diff --git a/public/activity.html b/public/activity.html index 5dde4c0..60f1b27 100644 --- a/public/activity.html +++ b/public/activity.html @@ -206,6 +206,16 @@
Alpha One Labs
+This certifies that
+has successfully completed the activity
+Issued on
+—
+Certificate ID: —
+Scan to verify
+