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

You are creating a new instance of SQLAlchemy on every concern. #9

Open
alesanchezr opened this issue Sep 9, 2019 · 1 comment
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@alesanchezr
Copy link
Collaborator

I know we are doing microservices, but still I think all the configurations for the Flask database should be in just one place, that way we can import it and declare our models on every model.py.

The current way could lead to bugs because maybe I forget to copy and paste the configuration to every modal.py

@alesanchezr alesanchezr added the enhancement New feature or request label Sep 9, 2019
@jferragut
Copy link
Owner

@alesanchezr I feel like we should lean on cloud DB. I am adding a firebase example. In that example I am creating a class to define the data model but then I use the firestore to save the data. I don't actually instantiate this way anymore. Also, I am removing SQLAlchemy due to this approach.

Please let me know if you see another reason to do it this way instead of how I mentioned.

I am trying for this not to be too opinionated on how things should be done, rather it should be a starting point for your project and allow flexibility.

@jferragut jferragut added the question Further information is requested label Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants