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

Clean install is broken #154

Open
iamweird opened this issue Dec 5, 2024 · 1 comment
Open

Clean install is broken #154

iamweird opened this issue Dec 5, 2024 · 1 comment

Comments

@iamweird
Copy link

iamweird commented Dec 5, 2024

I try to use latest archyve image from ghcr.io/nickthecook/archyve:v1.20.3 to install from scratch, I get archyve containers constantly restarting because migrations cannot be executed.

I guess this is related to this change: 5fc5012 that results in migration 20240506125220 trying to use available column before it is created in migration 20240509190359.

The container logs are as follows:

archyve-1  | Waiting for 'postgres:5432' to be open...
archyve-1  | /usr/local/bundle/ruby/3.2.0/gems/io-event-1.6.5/lib/io/event/support.rb:27: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future!
archyve-1  | I, [2024-12-05T19:25:52.901645 #9]  INFO -- : Migrating to AddDefaultToModelConfig (20240506125220)
archyve-1  | == 20240506125220 AddDefaultToModelConfig: migrating ==========================
archyve-1  | -- add_column(:model_configs, :default, :boolean, {:default=>false})
archyve-1  |    -> 0.0011s
archyve-1  | bin/rails aborted!
archyve-1  | StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
archyve-1  | 
archyve-1  | PG::UndefinedColumn: ERROR:  column model_configs.available does not exist
archyve-1  | LINE 1: ...LECT "model_configs".* FROM "model_configs" WHERE "model_con...
archyve-1  |                                                              ^
archyve-1  | /rails/db/migrate/20240506125220_add_default_to_model_config.rb:6:in `change'
archyve-1  | 
archyve-1  | Caused by:
archyve-1  | ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column model_configs.available does not exist (ActiveRecord::StatementInvalid)
archyve-1  | LINE 1: ...LECT "model_configs".* FROM "model_configs" WHERE "model_con...
archyve-1  |                                                              ^
archyve-1  | /rails/db/migrate/20240506125220_add_default_to_model_config.rb:6:in `change'
archyve-1  | 
archyve-1  | Caused by:
archyve-1  | PG::UndefinedColumn: ERROR:  column model_configs.available does not exist (PG::UndefinedColumn)
archyve-1  | LINE 1: ...LECT "model_configs".* FROM "model_configs" WHERE "model_con...
archyve-1  |                                                              ^
archyve-1  | /rails/db/migrate/20240506125220_add_default_to_model_config.rb:6:in `change'
archyve-1  | Tasks: TOP => db:prepare
archyve-1  | (See full trace by running task with --trace)
archyve-1 exited with code 1

Doing clean install from 1.19.1 and instantly upgrading to 1.20.3 helped me to workaround this issue.

I'm using compose.yml from main branch, with locally built image replaced with ghcr.io one: compose.yml.txt

@nickthecook
Copy link
Owner

Hey @iamweird, thanks for the bug report. I'll take a look.

Glad you found a workaround.

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