Update database connection details and enhance course management functionality. Changed DATABASE_URL in deployment workflow to a direct connection string. Added course pruning logic in seed script to maintain database integrity. Updated faculty and registration forms to include additional fields for better data capture. Refined layout components for improved user experience and responsiveness.

This commit is contained in:
smhk1376 committed 2026-09-29 04:25:30 +03:30
1 parent 0874b968ba
commit 6909a935fd
74 files changed
+1506 -420

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
-- Contact / profile links for faculty directory
ALTER TABLE faculty_members
ADD COLUMN IF NOT EXISTS email TEXT,
ADD COLUMN IF NOT EXISTS office TEXT,
ADD COLUMN IF NOT EXISTS phone TEXT,
ADD COLUMN IF NOT EXISTS department TEXT,
ADD COLUMN IF NOT EXISTS linkedin_url TEXT,
ADD COLUMN IF NOT EXISTS scholar_url TEXT;
@@ -0,0 +1,10 @@
-- Duration unknown until confirmed; hide in UI when NULL.
ALTER TABLE courses
DROP CONSTRAINT IF EXISTS courses_duration_hours_check;
ALTER TABLE courses
ALTER COLUMN duration_hours DROP NOT NULL;
ALTER TABLE courses
ADD CONSTRAINT courses_duration_hours_check
CHECK (duration_hours IS NULL OR duration_hours > 0);
@@ -0,0 +1,4 @@
-- Position and organization on public contact / interest leads.
ALTER TABLE registration_leads
ADD COLUMN IF NOT EXISTS position TEXT,
ADD COLUMN IF NOT EXISTS organization TEXT;
+10 -1
View File
@@ -85,6 +85,12 @@ async function main() {
"id", "slug", "title", "summary", "category", "duration_hours", "format", "price",
"registration_url", "image_url", "seo_description", "published",
]);
const courseIds = courses.map((c) => c.id);
await client.query(
`DELETE FROM courses WHERE id <> ALL($1::text[])`,
[courseIds],
);
results.push(["courses_pruned", courseIds.length]);
await upsert("programs", programs.map(programToRow), [
"id", "slug", "title", "blurb", "group_key", "href", "tagline", "audience",
"duration_label", "format_label", "highlights", "body", "published",
@@ -96,11 +102,14 @@ async function main() {
"id", "title", "category", "excerpt", "image_url", "href", "featured",
"body", "published_at", "author", "published",
]);
await client.query(`DELETE FROM intersection_topics`);
await upsert("intersection_topics", intersections.map(intersectionTopicToRow), [
"id", "slug", "title", "description", "href", "image_url", "body", "highlights", "published",
]);
await upsert("faculty_members", faculty.map(facultyMemberToRow), [
"id", "name", "title", "focus", "bio", "image_url", "published",
"id", "name", "title", "focus", "bio", "image_url",
"email", "office", "phone", "department", "linkedin_url", "scholar_url",
"published",
]);
await upsert("alumni_stories", alumniStories.map(alumniStoryToRow), [
"id", "title", "excerpt", "name", "program", "image_url", "href", "published",