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

Create tables in the specified schema to avoid moving the tables afterwards #21

Merged
merged 4 commits into from
Sep 4, 2021
Merged

Create tables in the specified schema to avoid moving the tables afterwards #21

merged 4 commits into from
Sep 4, 2021

Conversation

rodrigo-morales-1
Copy link
Contributor

This solves #18

@rodrigo-morales-1 rodrigo-morales-1 changed the title Execute "moveTableToSchema" if table was succesfully created Execute moveTableToSchema if table was succesfully created Aug 18, 2021
Copy link
Collaborator

@musically-ut musically-ut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me. However, wouldn't a better solution be to switch to the schema and do all operations within the schema to avoid the problem of double-deletion and to avoid this separate move altogether?

rdrg109 added 3 commits August 20, 2021 19:31
This is because the parameters are now obtained through the function
getConnectionParameters
dbConnectionParam has been deleted because now all parameters are
obtained by a single function which is called in the function
handleTable.

moveTableToSchema has been deleted because tables are now created in
the specified schema. Therefore, there is no need to move the table
after their creation.
@rodrigo-morales-1
Copy link
Contributor Author

rodrigo-morales-1 commented Aug 21, 2021

@musically-ut I have made some changes so that the schema is considered when creating the tables. Thus, it is not necessary to have the moveTableToSchema function.

I've replaced the buildConnectionString function with the getConnectionParameters function since that way it is easier to specify the schema in which the scripts are to be executed.

Please, review them and let me know if that's correct.

@rodrigo-morales-1 rodrigo-morales-1 changed the title Execute moveTableToSchema if table was succesfully created Create tables in the specified schema to avoid moving the tables afterwards Aug 21, 2021
@musically-ut
Copy link
Collaborator

The changes look good to me. Just tested the default execution from the README to ensure that we don't need to bump up the psychopg2 versions.

I'll update the Acknowledgements section of the README. :)

@musically-ut musically-ut merged commit 634c057 into Networks-Learning:master Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants