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

How i run a migrate without using sam? #437

Open
vtrsz opened this issue Jun 18, 2023 · 3 comments
Open

How i run a migrate without using sam? #437

vtrsz opened this issue Jun 18, 2023 · 3 comments
Labels

Comments

@vtrsz
Copy link

vtrsz commented Jun 18, 2023

Anyone can help me with that? i need to do without using sam (i have reasons for that)

@imdrasil
Copy link
Owner

In such a case I'd suggest to reimplement corresponding sam task logic. You can take a look here. if shortly - likely it should be enough to execute Jennifer::Migration::Runner.migrate

@charles-liang
Copy link

Would it be possible to remove Sam from the generator? I'm considering a structure similar to the following. When executing generate:migration and generate:model, the following two would be called:

Jennifer::Generators::Migration.new(args).render
Jennifer::Generators::Model.new(args).render

This would require including Jennifer::Generators::Migration and Model, both of which inherit from Base. Base contains the fields:

getter name: String, args: Sam::Args

I have drafted the code, but it's not yet complete.

@imdrasil
Copy link
Owner

@charles-liang looks good to me. I think it is possible to reduce unnecessary in this case dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants