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

Docs: Is there a recommend way to use wrench with https://github.com/cloudspannerecosystem/yo? #115

Closed
jferrl opened this issue Aug 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jferrl
Copy link

jferrl commented Aug 19, 2024

WHAT

I would like to know if there is recommended way of working with wrench when you are generating DB models using yo

WHY

I have a proyect where the db models are generated using yo. My idea is start using wrench for managing schema migrations. In this case, yo, is using schema.sql to generate models. If i start using migrations, what is the good way to generate models?

@jferrl jferrl added the enhancement New feature or request label Aug 19, 2024
@shuheiktgw
Copy link
Collaborator

shuheiktgw commented Sep 2, 2024

If you're using schema.sql to generate models with yo, start by running wrench migrate up --directory ./[Migration Directory] locally to execute the migration. Next, run wrench load --directory ./[Migration Directory] to update the schema.sql file in the [Migration Directory]. After these steps, you can use the updated [Migration Directory]/schema.sql to generate the models with yo 🙂

@jferrl
Copy link
Author

jferrl commented Sep 2, 2024

Thanks! 😄

@jferrl jferrl closed this as completed Sep 2, 2024
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
None yet
Development

No branches or pull requests

2 participants