Retire Audio Conversation from the makeup question catalog
This commit is contained in:
parent
be6ba7c676
commit
c02ac93760
3
db/migrations/000007_retire_audio_conversation.down.sql
Normal file
3
db/migrations/000007_retire_audio_conversation.down.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
UPDATE question_type_definitions
|
||||
SET status='ACTIVE',updated_at=CURRENT_TIMESTAMP
|
||||
WHERE key='audio_conversation_type';
|
||||
5
db/migrations/000007_retire_audio_conversation.up.sql
Normal file
5
db/migrations/000007_retire_audio_conversation.up.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-- Preserve existing questions, attempts, and definition IDs for historical reads.
|
||||
-- Retire this language-learning type from the makeup academy authoring catalog.
|
||||
UPDATE question_type_definitions
|
||||
SET status='INACTIVE',updated_at=CURRENT_TIMESTAMP
|
||||
WHERE key='audio_conversation_type';
|
||||
|
|
@ -77,8 +77,8 @@ passwords, payments, or subscriptions. It archives original empty CEFR/default p
|
|||
and unchanged, seed-owned general-learning courses. Existing authored changes are retained;
|
||||
course IDs, descendants, enrollments, and progress are not deleted.
|
||||
|
||||
The admin's Academy courses view excludes archived fixtures; Legacy archive retains access to
|
||||
those historical records. Archived courses are unpublished and cannot be republished while
|
||||
The admin course list excludes archived fixtures. Archived records are retained in storage
|
||||
without a separate archive view in the admin. Archived courses are unpublished and cannot be republished while
|
||||
archived. Public catalog queries also exclude them explicitly.
|
||||
|
||||
Three makeup starter courses contain six chapters, eighteen lesson outlines, and six quizzes
|
||||
|
|
@ -91,3 +91,11 @@ seeder reuse these same IDs and preserves their publication status.
|
|||
Rollback restores only unchanged archived publication states. It retains starter drafts and their
|
||||
identity metadata to preserve later instructor edits and learner records. Reapplying the migration
|
||||
does not duplicate these courses.
|
||||
|
||||
## Retired Audio Conversation definition
|
||||
|
||||
Migration `000007_retire_audio_conversation` marks `audio_conversation_type` inactive.
|
||||
Definition catalog lists exclude this retired language-learning type, including status/group
|
||||
filters and total counts. Existing question references and responses are retained; direct
|
||||
historical definition reads remain supported. Other custom audio-based definitions are unchanged.
|
||||
The admin also excludes the retired key when connected to an older backend during rollout.
|
||||
|
|
|
|||
|
|
@ -395,7 +395,8 @@ func (s *Store) GetQuestionTypeDefinitionByID(ctx context.Context, id int64) (do
|
|||
func (s *Store) ListQuestionTypeDefinitions(ctx context.Context, status *string, includeSystem bool, groupID *int64, limit, offset int32) ([]domain.QuestionTypeDefinition, int64, error) {
|
||||
const baseWhere = `
|
||||
FROM question_type_definitions d
|
||||
WHERE ($1::VARCHAR IS NULL OR d.status = $1)
|
||||
WHERE d.key <> 'audio_conversation_type'
|
||||
AND ($1::VARCHAR IS NULL OR d.status = $1)
|
||||
AND ($2::BOOLEAN = TRUE OR d.is_system = FALSE)
|
||||
AND (
|
||||
$3::BIGINT IS NULL
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user