Remove unused redirects from the Next.js configuration and update package dependencies to include new Tiptap extensions for enhanced text editing capabilities. Clean up the database seeding script by removing commented-out code and ensuring proper deletion of obsolete entries. Update various pages to handle not found scenarios gracefully, improving user experience across the application.

This commit is contained in:
smhk1376 committed 2026-10-28 14:04:17 +03:30
1 parent 4b84409ed7
commit 2858b9c746
106 files changed
+2516 -1004

No files matched your search

@@ -0,0 +1,8 @@
-- Public sections other than courses are retired.
-- Drop their rows so they cannot be served or listed again.
DELETE FROM articles;
DELETE FROM events;
DELETE FROM programs;
DELETE FROM intersection_topics;
DELETE FROM alumni_stories;
DELETE FROM testimonials;
+4
View File
@@ -0,0 +1,4 @@
-- Optional schedule for a course: when it starts, and when it is held.
ALTER TABLE courses
ADD COLUMN IF NOT EXISTS start_date DATE,
ADD COLUMN IF NOT EXISTS held_date DATE;
+21
View File
@@ -0,0 +1,21 @@
-- News items shown on /news. Separate from articles (long-form insights).
CREATE TABLE IF NOT EXISTS news_items (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
banner_image_url TEXT NOT NULL,
body TEXT NOT NULL,
gallery_images JSONB NOT NULL DEFAULT '[]',
published_at DATE NOT NULL,
published BOOLEAN DEFAULT true,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_news_items_published_at
ON news_items (published, published_at DESC);
DROP TRIGGER IF EXISTS trg_news_items_set_updated_at ON news_items;
CREATE TRIGGER trg_news_items_set_updated_at
BEFORE UPDATE ON news_items
FOR EACH ROW EXECUTE FUNCTION set_updated_at();
+6
View File
@@ -0,0 +1,6 @@
-- One date per course: when it starts being held.
UPDATE courses
SET start_date = held_date
WHERE start_date IS NULL AND held_date IS NOT NULL;
ALTER TABLE courses DROP COLUMN IF EXISTS held_date;