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

MangoNoSql Migration - Wrong connection string, bad handling #631

Closed
Puckfist opened this issue Feb 3, 2016 · 5 comments
Closed

MangoNoSql Migration - Wrong connection string, bad handling #631

Puckfist opened this issue Feb 3, 2016 · 5 comments

Comments

@Puckfist
Copy link
Contributor

Puckfist commented Feb 3, 2016

When the connection string to the database is wrong (I was running on H2, migrating H2) I got errors about not finding the table DATAPOINTS

What's worse, now I have an empty database at the path I specified that was wrong!

@Puckfist Puckfist added the Bug label Feb 3, 2016
@terrypacker
Copy link
Contributor

H2 by default will create an empty database at the path you choose. You need to put ;IFEXISTS=TRUE on the end of your string to fail if it doesn't. I'm putting a link to the H2 database connection options page in the help file.

@Puckfist
Copy link
Contributor Author

Does it ever make sense to create a blank database and then try to move the point values table out of it? Would it be difficult to add such a parameter only to H2 connection strings for the migration?

@terrypacker
Copy link
Contributor

I guess we could check to see if its already in the string coming from the UI and if not add it, but I'm not sure its a big enough problem.

@Puckfist
Copy link
Contributor Author

Line 131 MangoNoSqlMigrationManager:

if("org.h2.Driver".equals(driverClassname) && !connectionUrl.contains(";IFEXISTS=TRUE"))
connectionUrl = connectionUrl + ";IFEXISTS=TRUE";

or we close the issue?

@Puckfist
Copy link
Contributor Author

Opted for do it

@Puckfist Puckfist moved this from To do to In progress in Mango Current Release Apr 23, 2018
Mango Current Release automation moved this from In progress to Done May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants