Skip to content

Commit

Permalink
drop legacy dissolve reason columns, remove manual migration
Browse files Browse the repository at this point in the history
  • Loading branch information
realmayus committed Jan 20, 2025
1 parent a6155b2 commit 3e5ad68
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 25 deletions.
2 changes: 0 additions & 2 deletions common/achievement/evaluate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ function createTestMatch({ lectures }: { lectures: lecture[] }): MatchWithLectur
dissolved: false,
dissolvedAt: null,
dissolvedBy: null,
dissolveReason: null,
dissolveReasons: [],
dissolveReasonEnum: null,
didHaveMeeting: true,
proposedTime: null,
createdAt: new Date(),
Expand Down
3 changes: 1 addition & 2 deletions jobs/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import syncToWebflow from './periodic/sync-to-webflow';
import { postStatisticsToSlack } from './slack-statistics';
import notificationsEndedYesterday from './periodic/notification-courses-ended-yesterday';
import { assignOriginalAchievement } from './manual/assign_original_achievement';
import migrateDissolveReasonEnum from './migrate-dissolve-reason-enum';

export const allJobs = {
cleanupSecrets,
dropOldNotificationContexts,
Expand All @@ -25,7 +25,6 @@ export const allJobs = {
flagInactiveConversationsAsReadonly,
notificationsEndedYesterday,
checkReminders,
migrateDissolveReasonEnum,

assignOriginalAchievement,

Expand Down
14 changes: 0 additions & 14 deletions jobs/migrate-dissolve-reason-enum.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Warnings:
- You are about to drop the column `dissolveReason` on the `match` table. All the data in the column will be lost.
- You are about to drop the column `dissolveReasonEnum` on the `match` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "match" DROP COLUMN "dissolveReason",
DROP COLUMN "dissolveReasonEnum";
7 changes: 0 additions & 7 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,6 @@ model match {
dissolved Boolean @default(false)
dissolvedAt DateTime? @db.Timestamp(6)
dissolvedBy dissolved_by_enum?
// At some point in time the dissolve UI of pupils and students deviated,
// and they would write different ids for the same dissolve reason into this field
// As we do not store who dissolved the match, it is quite hard to interpret this number:
// (but you can make some weird joins with the log table to find out who dissolved it)
// dissolveReason is DEPRECATED, use dissolveReasonEnum instead
dissolveReason Int?
dissolveReasonEnum dissolve_reason?
dissolveReasons dissolve_reason[] @default([])
didHaveMeeting Boolean @default(false) // whether the match partners did actually have an initial meeting
// DEPRECATED: At some point students could suggest a first meeting time to pupils when they got the match
Expand Down

0 comments on commit 3e5ad68

Please sign in to comment.