Create graphback db command #47
Comments
@wtrocki your views? |
in my opinion we should first ask if someone wants to have just DDL files or major changes directly on the database. secondly we should not support dropping or removing the data only additions should be added for obvious reasons. the major problem is how to maintain this data base connection. we can say that for production we recommend DDL statements and direct db generation for local development |
having hard dependency to postgress is not desired. I think we first need to implement cli config and then do this task |
Since production might always be at later stages than development, we can do both and store the DDL statements in a file? |
How this is going to work? |
We could create a database with the name of the project, that way it won't affect existing database in case of building new app. |
You mean on localhost or some remote server?
Hm.. this will render the entire feature not functional. If user edits model we need to update the database simply because it will no be possible to query data. Let's talk about how this could work in general. Like I totally do not see it now. If we have diffs locally for the development database then those diffs will work only for this particular database, which can be in a different state than any other database. We cannot avoid diffing the current dataset and applying changes. Because probably pointing tool to any other database than local one is not that realistic scenario we can assume that people will have tags for their work so then they can use local db state (actually the previous state to calculate diff changes) This part is critical for the success of the project so we need to really make sure that we are on the same page. Maybe we can quickly build a sequence diagram showing how this could work from trying this out to the finish. What happens when user adds new type, adds new field/directive etc. We could end up in very complex workflow quickly so let's think on something that will work and this will set the boundaries on what problems we going to resolve and how users can really interact with the CLI for the success of the project. |
Closing this |
About
graphback db
will create Postgres database with tables and relations from the modelThe text was updated successfully, but these errors were encountered: