Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to kysely for real (probably) #68

Merged
merged 5 commits into from
Sep 5, 2024
Merged

Conversation

vcarl
Copy link
Member

@vcarl vcarl commented Sep 5, 2024

Unfortunately I don't know the precise cause of why the last attempt to roll this out didn't work. The bot didn't respond at all and it seemed potentially like it had created a new, empty database. In digging in to try again, I learned:

  • migration tables had not been accounted for in the transition from Knex -> Kysely
  • migrations were not being run on startup
  • past migrations were not able to be re-run

Fingers crossed this works this time 🤞

Copy link

what-the-diff bot commented Sep 5, 2024

PR Summary

  • Redefined Database Connection and Management
    The tech stack is updated with Kysely replacing Knex for database connection and queries. All respective changes have been accommodated in code like migration files, app modules, and helper scripts.

  • Optimized Application Configuration
    The DATABASE_URL secret is now included into both Kubernetes and GitHub workflows for improved environment management. An unused import was removed for improved code cleanliness.

  • Improved Code Adaptability
    The lint-staged setup is now targeting migration files for consistency in coding standards. Command for adding new type definition file to Git is also added.

  • Updated Dockerfile and Kubernetes Configuration
    The latest Dockerfile now includes two new configuration files for Kysely. Also, the newbie DATABASE_URL is now set in the cluster/deployment.yaml.

  • Adjusted Interface Colors
    Adjustment in color for certain interfaces from lighter to darker shades - bg-blue-500 replacing bg-blue-200 and bg-yellow-500 supplanting bg-yellow-200.

  • Refactored Code and File Management
    Various files are renamed, added and removed to align with the latest changes in database connection. In specific, migration files are now implementing Kysely syntax and the knexfile is removed. New Kysely configuration file is added.

  • Resolved Minor Issues
    Some small bug fixes and typo corrections in type definitions and imports. Also, the environment variable names in the app helper are updated, along with new default values.

  • Updated Dependency Management
    package.json is updated to manage new dependencies required for Kysely and to add new scripts for migration and database types generation.

  • Removed Unnecessary Content
    The seed file seeds/0.js, no longer needed, is removed to declutter the codebase.

@vcarl vcarl merged commit e0d081b into main Sep 5, 2024
5 checks passed
@vcarl vcarl deleted the vc-migrate-to-kysely-for-real branch September 5, 2024 22:48
@vcarl vcarl mentioned this pull request Sep 10, 2024
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.

1 participant