Skip to content

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Jan 21, 2026

What does this PR do?

Follow-up to #27085 - removes the remaining code references to the deprecated user.startTime and user.endTime columns that were missed in the initial PR.

Changes:

  • Remove startTime/endTime from availabilityUserSelect in prisma selects
  • Remove startTime/endTime from GetUserAvailabilityInitialData type
  • Remove startTime/endTime from defaultEvents user mock object

Once this is merged, a migration can be created to drop the columns from the database schema.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - this is cleanup of deprecated fields, existing tests should continue to pass.

How should this be tested?

  1. Run type checks: yarn type-check:ci --force - should pass without errors related to startTime/endTime
  2. Run the build: cd packages/trpc && yarn build - should complete successfully
  3. Verify no remaining references to user.startTime or user.endTime in the codebase

Checklist

  • My code follows the style guidelines of this project
  • I have checked if my changes generate no new warnings

Human Review Checklist:

Requested by: @emrysal
Link to Devin run: https://app.devin.ai/sessions/89d7baa77c694e9cb8162246e579fb0a

Follow-up to #27085 - removes the remaining code references to the
deprecated user.startTime and user.endTime columns that were missed
in the initial PR.

Changes:
- Remove startTime/endTime from availabilityUserSelect in prisma selects
- Remove startTime/endTime from GetUserAvailabilityInitialData type
- Remove startTime/endTime from defaultEvents user mock object
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@emrysal emrysal marked this pull request as ready for review January 22, 2026 14:28
@emrysal emrysal requested a review from a team as a code owner January 22, 2026 14:28
@graphite-app graphite-app bot added core area: core, team members only foundation labels Jan 22, 2026
@keithwillcode keithwillcode merged commit a823bd8 into main Jan 22, 2026
89 of 90 checks passed
@keithwillcode keithwillcode deleted the devin/1769010958-remove-remaining-user-starttime-endtime branch January 22, 2026 14:29
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

emrysal added a commit that referenced this pull request Jan 22, 2026
…7092)

Follow-up to #27085 - removes the remaining code references to the
deprecated user.startTime and user.endTime columns that were missed
in the initial PR.

Changes:
- Remove startTime/endTime from availabilityUserSelect in prisma selects
- Remove startTime/endTime from GetUserAvailabilityInitialData type
- Remove startTime/endTime from defaultEvents user mock object

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
emrysal added a commit that referenced this pull request Jan 22, 2026
## What does this PR do?

Follow-up to #27085 and #27092 - creates the database migration to drop the deprecated `startTime` and `endTime` columns from the `users` table.

These columns were marked as `// DEPRECATED - TO BE REMOVED` in the Prisma schema. The prerequisite PRs removed all code references to these columns, making it safe to now drop them from the database.

**Changes:**
- Remove `startTime` and `endTime` fields from the `User` model in `schema.prisma`
- Add migration to drop both columns from the `users` table
- Remove `startTime` and `endTime` from test builder (`packages/lib/test/builder.ts`)

## Mandatory Tasks (DO NOT REMOVE)

- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [x] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). N/A - internal schema cleanup
- [x] I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - schema migration only, existing tests should continue to pass

## How should this be tested?

1. Verify PRs #27085 and #27092 have been merged (prerequisite)
2. Run `yarn prisma generate` - should complete without errors
3. Run `yarn type-check:ci --force` - should pass (no code references these columns anymore)
4. Apply migration to a test database and verify columns are dropped

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have checked if my changes generate no new warnings

## Human Review Checklist

- [ ] Confirm PRs #27085 and #27092 are merged before merging this PR
- [ ] Verify no remaining code references to `user.startTime` or `user.endTime` in the codebase
- [ ] ⚠️ **Breaking change**: This permanently drops data from the `users` table. Ensure no external systems depend on these columns.

---

Link to Devin run: https://app.devin.ai/sessions/c5a10684d905496fbce66a0b464a73a5
Requested by: @emrysal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants