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

[CoreInstaller] Upgrade doesn't work by CLI #4406

Closed
craigh opened this issue Jul 15, 2020 · 3 comments
Closed

[CoreInstaller] Upgrade doesn't work by CLI #4406

craigh opened this issue Jul 15, 2020 · 3 comments

Comments

@craigh
Copy link
Member

@craigh craigh commented Jul 15, 2020

upgrading by CLI from <3.0.0 to 3.0.0 doesn't work

As pointed out by @KratorD, when following the instructions, the upgrade via CLI doesn't work. The error is

In AbstractMySQLDriver.php line 93:
[Doctrine\DBAL\Exception\ConnectionException]
An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'o
thing'

The basic problem is when following the instructions to

From the new installation, copy the .env file to .env.local

This doesn't include the existing DB information (defaults to nothing)

Previous travis testing on the upgrade reused the existing .env.local file which included the proper DATABASE_URL value so the error was not seen.
I've adjusted the travis build to demonstrate the error

result: https://travis-ci.org/github/zikula/core/jobs/708324659

Initial attempts at http upgrade process also fail

@craigh craigh added the Bug label Jul 15, 2020
@craigh craigh added this to the 3.0.1 milestone Jul 15, 2020
@craigh craigh self-assigned this Jul 15, 2020
@KratorD
Copy link

@KratorD KratorD commented Jul 15, 2020

Hello @craigh .
I have deleted /var/cache/prod and /var/cache/dev. I have changed the .env.local with DATABASE_URL=nothing.
i have execute the command: php bin/console zikula_upgrade and I got the same error.

`In AbstractMySQLDriver.php line 93:
An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'othing'

In PDOConnection.php line 31:
SQLSTATE[HY000] [1049] Unknown database 'othing'

In PDOConnection.php line 27:
SQLSTATE[HY000] [1049] Unknown database 'othing'`

Really if nothing has changed, what did you expect from this test?

Regards

@craigh
Copy link
Member Author

@craigh craigh commented Jul 15, 2020

what did you expect from this test?

Hi there. Thank you for replicating the test. This was gaol number one. The other reason I wanted you to restart was to test the web installer. Were the results the same there? Also I was hoping for a more thorough trace of the error, but I have replicated the test with the full trace at travis so this is no longer needed.

@KratorD
Copy link

@KratorD KratorD commented Jul 16, 2020

No problem. Yes, the web installer have the same result.
env: dev
debug: true

CLI installation generate a record in var/log/prod-date.log, but web installer dont create it.
[2020-07-15T15:55:47.104109+02:00] console.ERROR: Error thrown while running command ""zikula:upgrade"". Message: "An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'othing'" {"exception":"[object] (Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'othing' at C:\\xampp\\htdocs\\portal_upgzk3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractMySQLDriver.php:93)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDOException(code: 1049): SQLSTATE[HY000] [1049] Unknown database 'othing' at C:\\xampp\\htdocs\\portal_upgzk3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:31)\n[previous exception] [object] (PDOException(code: 1049): SQLSTATE[HY000] [1049] Unknown database 'othing' at C:\\xampp\\htdocs\\portal_upgzk3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:27)","command":"\"zikula:upgrade\"","message":"An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'othing'"} []

If you need anything more, dont hesitate contact me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants