docker icon indicating copy to clipboard operation
docker copied to clipboard

Tables not created in Docker Install

Open angdigi opened this issue 5 years ago • 2 comments

Tables fail to be created despite passing mysql root password variable.

2019/04/12 20:36:35 [error] 245#245: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wallabag_db.wallabag_craue_config_setting' doesn't exist in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105

angdigi avatar Apr 13 '19 00:04 angdigi

The migration isn't ran automatically, you must do so manually.

nogweii avatar Apr 19 '19 08:04 nogweii

当你看到这条消息的时候,很幸运,你遇到与我一模一样的问题 2021/01/30 06:29:40 [error] 290#290: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wallabag.wallabag_internal_setting' doesn't exist in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:129

解决办法

1.修改wallabag版本为2.4.0

`version: '3'
services:
  wallabag:
    image: wallabag/wallabag:2.4.0

2.启动docker

docker-compose up -d

3.查询启动的docker名字

docker-compose ps

4执行升级命令

docker exec -t wallabag_wallabag_1  /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction

odyf avatar Jan 30 '21 07:01 odyf