feat: migrate database - #51
Merged
Merged
Conversation
- Changed the import statement for NextRequest from a default import to a type import for better clarity and to align with TypeScript best practices.
- Removed explicit Step type definition and replaced it with a const assertion for STEPS, improving type inference. - Added a new property 'tx' to TinteBlockSchema for primary text color, enhancing color management capabilities.
- Added Drizzle ORM configuration for PostgreSQL with environment variable validation for DATABASE_URL. - Implemented database schema with user and theme tables, enhancing data management capabilities. - Updated package dependencies to include @neondatabase/serverless, drizzle-orm, and dotenv for improved database interaction and environment configuration. - Introduced new schema definitions for user and theme, allowing for structured data storage and retrieval.
- Created a new script to migrate users from a legacy database to the current PostgreSQL setup. - Utilized Drizzle ORM for database interactions and included error handling for robust execution. - Implemented batch processing for efficient data transfer, generating unique IDs for new user entries.
- Created a new script to migrate themes from a legacy database to the current PostgreSQL setup using Drizzle ORM. - Implemented batch processing for efficient data transfer, generating unique IDs and handling potential duplicates during insertion. - Enhanced error handling and logging for better visibility during the migration process.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Railly
approved these changes
Sep 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
migrated data from xata.io to neon.tech
left scripts to replicate :)