romaninsh / dokku-alt-manager

dokku-alt Web Manager App (LOOKING FOR CO-MAINTAINER)
100 stars 19 forks source link

Base table or view not found: 1146 Table 'dam._db_update' doesn't exist #21

Closed NicolasRitouet closed 9 years ago

NicolasRitouet commented 9 years ago

After installing Dokku-alt, I install DAM on Digital Ocean (fresh droplet with Ubuntu 14.04 x64) and I get the following error:

Bootstrapping Dokku-alt-manager
Connecting do database: OK
Updating Database: ==[ Exception_DB: Database Query Failed ]===========

Additional information:
 * pdo_error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dam._db_update' doesn't exist
 * mode: select
 * params:   * :a: dokku-alt-000.sql

 * query: select  `status` from `_db_update`  where `name` = :a
 * template: select [options] [field] [from] [table] [join] [where] [group] [having] [order] [limit]

Going on dam.hostname.com displays:

Exception_DB: Database Query Failed
Additional information:

pdo_error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dam.user' doesn't exist
mode: select
params:
query: select count(*) from `user`
template: select [options] [field] [from] [table] [join] [where] [group] [having] [order] [limit]

I installed dokku-alt with this command bash -c "$(curl -fsSL https://raw.githubusercontent.com/dokku-alt/dokku-alt/master/bootstrap.sh)" and DAM with a simple dokku manager:install, nothing else in between.

Have I missed something?

Thanks. Here're more infos: DB is empty:

MariaDB [dam]> show tables;
Empty set (0.00 sec)

Rerunning only the migration script doesn't seem to solve the issue:

root@hotname:~# dokku run dam "php bootstrap.php"
Bootstrapping Dokku-alt-manager
Connecting do database: OK
Updating Database: ==[ Exception_DB: Database Query Failed ]===========

Additional information:
 * pdo_error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dam._db_update' doesn't exist
 * mode: select
 * params:   * :a: dokku-alt-000.sql

Anything else I could try?

johnnye commented 9 years ago

Looks like a similar issue to: https://github.com/romaninsh/dokku-alt-manager/issues/12

EleanorRagone commented 9 years ago

Any updates on resolving this? Encountering the same problem here.

HokieTT commented 9 years ago

Quick and dirty, so no promises since I have never run dokku-alt or even dokku until just now:

$ dokku mariadb:console dam dam MariaDB [dam]> CREATE TABLE _db_update (status varchar(255), name varchar(255)); MariaDB [dam]> exit $ dokku manager:upgrade

Works for me now.

xypaul commented 9 years ago

@HokieTT that fixed it for me. Thanks :+1:

buzzlightyear182 commented 9 years ago

@HokieTT Used your solution, thanks! :)

bkenny commented 9 years ago

@HokieTT ❤️

micku commented 9 years ago

Same bug for me, thank you so much @HokieTT!!

NicolasRitouet commented 9 years ago

It seems I'm not the only one having the issue. Can we try to solve this definitively? I'll try to take a deeper look at the code this evening, but I found the line that should create the table _db_update:
https://github.com/romaninsh/dokku-alt-manager/blob/2e89b5ca55eb803c3d74b63a95734f7b2804a936/shared/lib/Controller/Migrator/MySQL.php#L16 ?

plitex commented 9 years ago

I've had the same problem and thanks to @HokieTT is fixed! Thanks!

NicolasRitouet commented 9 years ago

I've sent a PR to fix this: https://github.com/romaninsh/dokku-alt-manager/pull/22 The solution I implemented may not be the best one, but at least, we have the root cause of the problem, @romaninsh can choose the best solution to fix this.

brunowego commented 9 years ago

@HokieTT :+1: Thanks!

Saren-Arterius commented 9 years ago

@HokieTT <3

romaninsh commented 9 years ago

This have been merged. Please see if it resolves the issue.

NicolasRitouet commented 9 years ago

@romaninsh Actually, @ayufan needs to pull from upstream (your branch) to get the recent commits and make dokku manager:installwork out of the box.

patrick-mota commented 9 years ago

Still having the problem.. I just did the "dirty trick": $ dokku mariadb:console dam dam MariaDB [dam]> CREATE TABLE _db_update (status varchar(255), name varchar(255)); MariaDB [dam]> exit

And it works, (well the error was explicit _db_update missing...) thank you

tlongren commented 8 years ago

Having this problem as well on each Ubuntu 14.04 VM I've tried it on.

Solution from @HokieTT works. :+1:

Chris2048 commented 8 years ago

Please integrate solution into a bugfix, Thanks :-)

tlongren commented 8 years ago

I'll take care of it. Scratch that, not sure why it's not being done in bootstrap.php like it should (I believe). Had something come up. If nobody else gets to it I'll look more tomorrow.

NicolasRitouet commented 8 years ago

Please integrate solution into a bugfix, Thanks :-)

There is one, it just needs to be merged to the fork from dokku-alt that's used when you do dokku manager:install https://github.com/dokku-alt/dokku-alt-manager/pull/1

tlongren commented 8 years ago

So just waiting for someone to merge it??

NicolasRitouet commented 8 years ago

Well, dokku-alt is not using this repo for dokku-alt-manager, but this fork: https://github.com/dokku-alt/dokku-alt-manager I created the PR to pull the changes from upstream (this repo). I just sent a mail to @ayufan to ask him to merge the PR. Let's see what happens.

watzon commented 8 years ago

Still getting this issue, but @HokieTT 's solution worked

mcneela86 commented 8 years ago

@HokieTT solution worked for my, had to run 'dokku manager:upgrade' after it to get the dashboard working.