refactor: simplify schema migration helpers and remove unused class#1168
refactor: simplify schema migration helpers and remove unused class#1168Adammatthiesen merged 3 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 6394d27 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
studiocms
@studiocms/auth0
@studiocms/blog
@studiocms/cloudinary-image-service
@studiocms/devapps
@studiocms/discord
@studiocms/github
@studiocms/google
@studiocms/html
@studiocms/markdoc
@studiocms/md
@studiocms/mdx
@studiocms/migrator
@studiocms/s3-storage
@studiocms/wysiwyg
@withstudiocms/auth-kit
@withstudiocms/component-registry
@withstudiocms/effect
@withstudiocms/internal_helpers
@withstudiocms/kysely
@withstudiocms/sdk
commit: |
Allure Test Report for this PR:✅ Allure Report | History |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This pull request refactors and simplifies the schema migration helpers in the
@withstudiocms/kyselypackage. The main improvement is replacing theMigrationSchemaManagerclass with a functional, Effect-basedschemaManagerfactory, resulting in clearer, more composable code. The changes also include improved error handling and more idiomatic use of the Effect library.Schema migration helper refactor:
MigrationSchemaManagerclass with aschemaManagerfunction that returns composable methods for schema management, resulting in simpler and more functional code (migrator.ts).migrator.ts).syncDatabaseSchemaandrollbackMigrationto use the newschemaManagerinstead of the previous class, ensuring consistency across the codebase (migrator.ts). [1] [2]Minor cleanup:
migrator.tsfor clarity.Changelog: