mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 21:51:17 -05:00
Implement plan to remove public toggle
This commit is contained in:
@@ -899,7 +899,7 @@ async function createTimelineEvent(
|
||||
to_entity_id: data.to_entity_id,
|
||||
from_location_id: data.from_location_id,
|
||||
to_location_id: data.to_location_id,
|
||||
is_public: data.is_public ?? true,
|
||||
is_public: true, // All timeline events are public
|
||||
created_by: submitterId,
|
||||
approved_by: approvingUserId,
|
||||
submission_id: submissionId,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
-- Ensure all existing timeline events are public
|
||||
UPDATE entity_timeline_events
|
||||
SET is_public = true
|
||||
WHERE is_public = false;
|
||||
|
||||
-- Add check constraint to enforce all events are public
|
||||
ALTER TABLE entity_timeline_events
|
||||
ADD CONSTRAINT timeline_events_must_be_public
|
||||
CHECK (is_public = true);
|
||||
|
||||
-- Add comment to document this requirement
|
||||
COMMENT ON COLUMN entity_timeline_events.is_public IS
|
||||
'All timeline events are public. This column is kept for potential future use but must always be true.';
|
||||
Reference in New Issue
Block a user