Changes between Version 2 and Version 3 of WriterPublishesStory
- Timestamp:
- 08/24/26 15:59:38 (13 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WriterPublishesStory
v2 v3 8 8 **2.** The system displays the current story details and status. 9 9 {{{#!sql 10 SELECT s.story_id, s.short_description, st.status 11 FROM STORY s 12 JOIN STATUS st ON s.story_id = st.story_id 13 WHERE s.user_id = 2 AND st.status = 'draft'; 10 SELECT story_id, short_description, status 11 FROM STORY 12 WHERE user_id = 2 AND status = 'draft'; 14 13 }}} 15 14 … … 18 17 **4.** The system updates the story status from draft to published. 19 18 {{{#!sql 20 UPDATE ST ATUS19 UPDATE STORY 21 20 SET status = 'published' 22 21 WHERE story_id = 1 AND status = 'draft'; … … 26 25 27 26 {{{#!sql 28 INSERT INTO NOTIFICATION ( content, is_read,created_at)29 VALUES ('Elena published a new story "The Chronicles of Eldoria"', FALSE, CURRENT_TIMESTAMP);27 INSERT INTO NOTIFICATION (notification_content, content_type, is_read, user_id, story_id, notification_created_at) 28 VALUES ('Elena published a new story "The Chronicles of Eldoria"', 'new_story', FALSE, 5, 1, CURRENT_TIMESTAMP); 30 29 }}} 31 30
