Skip to content

Fix/72 remove duration minutes#76

Merged
martin0024 merged 2 commits into
developfrom
fix/72-remove-duration_minutes
May 29, 2026
Merged

Fix/72 remove duration minutes#76
martin0024 merged 2 commits into
developfrom
fix/72-remove-duration_minutes

Conversation

@maxiDeee

@maxiDeee maxiDeee commented May 27, 2026

Copy link
Copy Markdown
Contributor

Closes #72

Overview

Removed duration_minutes column from the coaching_sessions table to establish a single source of truth. Session duration now comes directly from the related service record instead of being duplicated in the coaching_sessions table.

Changes made:

  • Removed durationMinutes field from the coachingSessions schema definition
  • Updated submitAvailabilities action to no longer handle duration (implicitly retrieved from service)

Testing

  • Verified submitAvailabilities creates coaching sessions without duration_minutes field
  • Confirmed schema reflects the column removal

Screenshots / Screencasts

N/A - Database schema change only

Checklist

  • Code is neat, readable, and works
  • Code is commented where appropriate and well-documented
  • Commit messages follow our guidelines
  • Issue number is linked
  • Branch is linked
  • Reviewers are assigned (one of your tech leads)

Notes

This is a breaking change. Any code accessing coachingSessions.durationMinutes will need to fetch the duration from the related services record instead.

@RenaudBernier RenaudBernier changed the base branch from main to develop May 27, 2026 00:55

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure, but I don't think the migration file is needed since the schema is the same for everyone on Supabase after the migration.

@@ -0,0 +1 @@
ALTER TABLE "coaching_sessions" DROP COLUMN "duration_minutes";--> statement-breakpoint

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration is not needed, we use schema.ts as our single source of truth and push changes with db:push

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made and pushed

@maxiDeee maxiDeee requested a review from RenaudBernier May 28, 2026 00:43
@martin0024 martin0024 merged commit e9b6b5b into develop May 29, 2026
1 check passed
@RenaudBernier RenaudBernier deleted the fix/72-remove-duration_minutes branch May 29, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: Remove duration_minutes field from coaching_sessions and update docs

4 participants