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

Base table or view not found: 1051 Unknown table 'monica.entities' #4304

Open
itoldlexi opened this issue Aug 8, 2020 · 0 comments
Open
Labels

Comments

@itoldlexi
Copy link

I can't get Monica to start at all, it fails to migrate and then the app just says SQLSTATE[42S02]: Base table or view not found: 1146 Table 'monica.instances' doesn't exist (SQL: select * from instances limit 1)

here's the migration failure

$ docker exec -it monica_app_1 sh
/var/www/monica # '/usr/bin/php7' 'artisan' migrate --force
Migrating: 2017_02_10_215405_remove_entities_table

In Connection.php line 671:
                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'monica.e  
  ntities' (SQL: drop table `entities`)                                        
                                                                               

In PDOStatement.php line 119:
                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'monica.e  
  ntities'                                                                     
                                                                               

In PDOStatement.php line 117:
                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'monica.e  
  ntities'                                                                     
                                              

and my docker file

version: "3.4"

services:
  app:
    image: monicahq/monicahq:fpm
    depends_on:
      - db
    environment:
      # generate with `pwgen -s 32 1` for instance:
      - APP_KEY=<omitted>
      - DB_HOST=db
    volumes:
      - html:/var/www/monica
      - data:/var/www/monica/storage
    restart: always
  
  web:
    image: nginx
    ports:
      - 8080:80
    depends_on:
      - app
    volumes:
      # see [`nginx.conf`](/scripts/docker/.examples/supervisor/fpm/web/nginx.conf)
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - html:/var/www/monica:ro
      - data:/var/www/monica/storage:ro
    restart: always

  db:
    image: mysql:5.7
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=monica
      - MYSQL_USER=homestead
      - MYSQL_PASSWORD=secret
    volumes:
      - mysql:/var/lib/mysql
    restart: always

volumes:
  data:
    name: data
  html:
    name: html
  mysql:
    name: mysql

do you have any suggestions on how to fix this?

@asbiin asbiin added the support label Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants