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

Blog post: Running a migration in Zipper using Zipper #696

Open
miguel-nascimento opened this issue Jan 8, 2024 · 0 comments
Open

Blog post: Running a migration in Zipper using Zipper #696

miguel-nascimento opened this issue Jan 8, 2024 · 0 comments

Comments

@miguel-nascimento
Copy link
Contributor

miguel-nascimento commented Jan 8, 2024

Internal: we don't need to explicitly say that the migration code itself was in zipper.dev codebase. It's way more cool hiding this fact :P

The below is just an outline.

How we used Zipper to migrate Zipper

Problem: all Typescript files were .ts but being treated as .tsx, we the user to control if they want .ts or .tsx
Solution: move all filenames to .tsx, update imports using a codemod tool

Of course, the solution looks a lot like a script. And Zipper provide an excellent set of tooling to play around with scripts.

We did a pair programming session on Zipper to create the script to run the migration, ran it, and saw in real time our own migration script being updated to .tsx with all the imports fixed

  • dopamine kick F**k yea moment

We're happy to say that you can do this if you want too. Zipper has support for database connectors: bring your data, write the script, lets us handle the rest.

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

No branches or pull requests

1 participant