cioraneanu / firefly-pico

A delightful Firefly III companion web app for effortless transaction tracking
GNU Affero General Public License v3.0
320 stars 15 forks source link

Referencing non-existant tables causing issues #97

Closed haithcockce closed 1 day ago

haithcockce commented 6 days ago

After setting the OAuth Key and syncing, accounts, categories, etc do not load. Transactions do however load.

In checking the docker logs for firefly_pico_db, the following is seen often;

2024-09-10 23:40:01.202 UTC [87] ERROR:  relation "tags" does not exist at character 15
2024-09-10 23:40:01.202 UTC [87] STATEMENT:  select * from "tags" where 0 = 1
2024-09-10 23:40:01.248 UTC [88] ERROR:  relation "transaction_templates" does not exist at character 35
2024-09-10 23:40:01.248 UTC [88] STATEMENT:  select count(*) as aggregate from "transaction_templates"
2024-09-10 23:40:01.286 UTC [89] ERROR:  relation "categories" does not exist at character 15
2024-09-10 23:40:01.286 UTC [89] STATEMENT:  select * from "categories" where "id" in ($1, $2, $3, $4, $5, $6, $7, $8)
2024-09-10 23:40:01.703 UTC [90] ERROR:  relation "accounts" does not exist at character 15
2024-09-10 23:40:01.703 UTC [90] STATEMENT:  select * from "accounts" where "id" in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50)
2024-09-10 23:40:01.955 UTC [91] ERROR:  relation "profiles" does not exist at character 15

I'm using 1.3.4, via the docker-compose yaml file for just a standalone pico setup (as I already have a firefly setup).

The docker-compose file is largely unmodified;

version: '3.3'
services:

  firefly-pico:
    image: cioraneanu/firefly-pico:latest
    container_name: firefly_pico
    ports:
      - "6976:80"
    environment:
      - FIREFLY_URL=https://firefly.haith.cloud
      - DB_CONNECTION=pgsql
      - DB_HOST=firefly-pico-postgresql
      - DB_PORT=5432
      - DB_DATABASE=firefly-pico
      - DB_USERNAME=firefly-pico
      - DB_PASSWORD=xxxx
      - TZ=Europe/London
    depends_on:
      - firefly-pico-postgresql
    networks:
      - public

  firefly-pico-postgresql:
    image: postgres:latest
    container_name: firefly_pico_db
    environment:
      - POSTGRES_DB=firefly-pico
      - POSTGRES_USER=firefly-pico
      - POSTGRES_PASSWORD=xxxx
    volumes:
      - /media/containers/firefly-iii/pico_db:/var/lib/postgresql/data
    networks:
      - public

networks:
  public:
    external: true
cioraneanu commented 6 days ago

The DB migration didn't run for some reason. Try deleting and recreating the Pico containers. Alternatively manually ssh into the Pico app container and run php artisan migrate