Skip to content

Conversation

@GalvinPython
Copy link
Owner

To make managing the database easier, we're going to implement Drizzle ORM.

reason for changes and list etc. will be soon

@GalvinPython GalvinPython added this to the 2.0.0 milestone Jul 13, 2025
@GalvinPython GalvinPython requested a review from Copilot July 13, 2025 18:33
@GalvinPython GalvinPython self-assigned this Jul 13, 2025
@GalvinPython GalvinPython added the enhancement New feature or request label Jul 13, 2025
@GalvinPython GalvinPython linked an issue Jul 13, 2025 that may be closed by this pull request

This comment was marked as outdated.

@GalvinPython GalvinPython moved this to In progress in Feedr Jul 13, 2025
@GalvinPython GalvinPython requested a review from Copilot July 20, 2025 11:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements Drizzle ORM to replace the existing database implementation, transitioning from raw PostgreSQL queries to a type-safe ORM solution. The changes include restructuring database schema definitions, updating all database operations to use Drizzle, and migrating configuration management for database connections.

  • Complete database layer rewrite from raw PostgreSQL to Drizzle ORM
  • Restructured database schema with proper TypeScript type inference
  • Updated all database operations and queries throughout the application

Reviewed Changes

Copilot reviewed 32 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/db/schema.ts New Drizzle schema definitions replacing raw SQL table creation
src/db/youtube.ts Rewritten YouTube database operations using Drizzle ORM
src/db/twitch.ts Rewritten Twitch database operations using Drizzle ORM
src/db/discord.ts Rewritten Discord database operations using Drizzle ORM
src/utils/youtube/fetchLatestUploads.ts Updated to use new Drizzle-based database functions
src/utils/twitch/checkIfStreamerIsLive.ts Updated to use new Drizzle-based database functions
src/config.ts Simplified database configuration to use connection URLs
package.json Added Drizzle ORM dependencies and migration scripts
Comments suppressed due to low confidence (1)

src/utils/youtube/fetchLatestUploads.ts:147

  • [nitpick] The variable name updateSuccess is not descriptive enough. Consider renaming it to updateResult or videoUpdateResult to better reflect that it contains both success status and potentially other data.
                const updateSuccess = await youtubeUpdateVideoId(

@GalvinPython GalvinPython marked this pull request as ready for review July 20, 2025 12:40
@GalvinPython GalvinPython merged commit 610d915 into dev Jul 20, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Feedr Jul 20, 2025
@GalvinPython GalvinPython deleted the refactor/database branch July 20, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Migrate database to Postgres

2 participants