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

"No database selected" fix #500

Closed
wants to merge 1 commit into from
Closed

Conversation

Molicheu
Copy link
Member

@Molicheu Molicheu commented Jun 27, 2024

Description

This pull request adds a conditional statement to create the qboxproject database only if it does not already exist. This ensures that existing data is not overwritten unintentionally, enhancing data safety during setup and updates.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

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

Doesn't txAdmin create the database by default for you? Will it be named qboxproject? Is there a way to only use 'qboxproject' if it doesn't exist?

@BigSmoKe07
Copy link

BigSmoKe07 commented Jul 3, 2024

When performing a manual installation, it is necessary to select a database. However, if you are using txAdmin's deployer, it will manage the database connection for you. For reference, please see the txAdmin documentation here. Additionally, if the SQL query encounters existing tables, they will be skipped without affecting the current setup.

@Manason
Copy link
Member

Manason commented Jul 7, 2024

So this PR is only for those who aren't using txAdmin and will create a database for them and then select it? What if they already have a database created, then this will populate the wrong one?

@Molicheu
Copy link
Member Author

Molicheu commented Jul 7, 2024

So this PR is only for those who aren't using txAdmin and will create a database for them and then select it? What if they already have a database created, then this will populate the wrong one?

Yes to the first question and they can just change the name of the database in the SQL to the one they're using

@Manason
Copy link
Member

Manason commented Jul 8, 2024

So this PR is only for those who aren't using txAdmin and will create a database for them and then select it? What if they already have a database created, then this will populate the wrong one?

Yes to the first question and they can just change the name of the database in the SQL to the one they're using

My issue is that this would fail silently. i.e. the SQL script would run, but the user would not have their database populated as they expect.

@Molicheu Molicheu closed this Jul 18, 2024
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.

None yet

3 participants