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

Failed to mark migration using postgres #337

Closed
yuangezhizao opened this issue Mar 16, 2022 · 2 comments
Closed

Failed to mark migration using postgres #337

yuangezhizao opened this issue Mar 16, 2022 · 2 comments
Assignees

Comments

@yuangezhizao
Copy link

Describe the bug
Hello muety, after installing with docker-compose for the first time,
I tried to import data from WakaTime and found that the import was not successful,
and then after docker-compose down and docker-compose up this error occurred.

System information

  • Wakapi version: 2.2.5
  • Operating system: CentOS 8.2 + Docker Compose
  • Database : PG
[root@cn-tx-bj7-c8 wakapi]# cat docker-compose.yml 
version: '3.7'

services:
  wakapi:
    image: ghcr.io/muety/wakapi:2.2.5
    #build: .
    ports:
      - 3333:3000
    restart: always
    environment:
      # See README.md and config.default.yml for all config options
      WAKAPI_DB_TYPE: "postgres"
      WAKAPI_DB_NAME: "wakapi"
      WAKAPI_DB_USER: "wakapi"
      WAKAPI_DB_PASSWORD: "wakapi"
      WAKAPI_DB_HOST: "db"
      WAKAPI_DB_PORT: "5432"
      ENVIRONMENT: "prod"

  db:
    image: postgres:12.3
    environment:
      POSTGRES_USER: "wakapi"
      POSTGRES_PASSWORD: "wakapi"
      POSTGRES_DB: "wakapi"
wakapi_1  | 2022-03-16T16:31:06.180468706Z [INFO ] potentially running migration '20220313-index_generation_hint'
db_1      | 2022-03-16 16:31:06.180 UTC [73] ERROR:  relation "key_string_values" does not exist at character 15
db_1      | 2022-03-16 16:31:06.180 UTC [73] STATEMENT:  SELECT * FROM "key_string_values" WHERE key = $1 ORDER BY "key_string_values"."key" LIMIT 1
wakapi_1  | 2022-03-16T16:31:06.180835365Z [INFO ] please note: the following migrations might take a few minutes, as column types are changed and new indexes are created, have some patience
db_1      | 2022-03-16 16:31:06.181 UTC [73] ERROR:  relation "key_string_values" does not exist at character 13
db_1      | 2022-03-16 16:31:06.181 UTC [73] STATEMENT:  INSERT INTO "key_string_values" ("key","value") VALUES ($1,$2)
wakapi_1  | 2022-03-16T16:31:06.181352991Z [ERROR] failed to mark migration 20220313-index_generation_hint as run - ERROR: relation "key_string_values" does not exist (SQLSTATE 42P01)
@muety
Copy link
Owner

muety commented Mar 16, 2022

Thanks for reporting this, I'll fix this asap!

@muety muety self-assigned this Mar 16, 2022
muety added a commit that referenced this issue Mar 16, 2022
@muety muety closed this as completed Mar 16, 2022
@yuangezhizao
Copy link
Author

Thank you for your quick fix, I used the latest image to test,
it can be imported normally, and this problem no longer occurs.

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

No branches or pull requests

2 participants