manyfold3d / manyfold

A self-hosted digital asset manager for 3d print files.
https://manyfold.app
MIT License
823 stars 49 forks source link

Database migration error #2983

Closed Floppy closed 1 month ago

Floppy commented 1 month ago

I currently migrated to 0.84 and getting an error. I can't tell you which version I started from unfortunately but probably a few months ago at least.

Don't want to hijack this issue, but just as an FYI. I might rebuild from scratch unless you want to actively look into this. I just use this to "scan" my 3D models I use for 3D printing so I can just rescan whatever I have in the folders.:

StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

undefined local variable or method `public_id' for an instance of ModelFile

---------------xxxxxx---------------

Caused by:
NameError: undefined local variable or method `public_id' for an instance of ModelFile (NameError)
Did you mean?  public_send

Originally posted by @tr1plus in https://github.com/manyfold3d/manyfold/issues/2982#issuecomment-2422266197

Floppy commented 1 month ago

@tr1plus yes, I definitely want to look into it. Can you tell, from just before this in the logs, exactly which migration it was trying at the time?

Floppy commented 1 month ago

Fixing these individual issues is pointing the way to getting the whole thing working better, so it's definitely something I want to do :)

tr1plus commented 1 month ago
/package/admin/s6-overlay/libexec/preinit: info: read-only root
/package/admin/s6-overlay/libexec/preinit: info: writable /run. Checking for executability.
/package/admin/s6-overlay/libexec/preinit: warning: unable to find /run in /proc/mounts, check that your container manager pre-mounts /proc, and that /run is a tmpfs. The container is likely to crash soon, if /run is (incorrectly) mounted noexec.
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service manyfold: starting
Preparing database...
s6-rc: info: service manyfold successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/opengl-bindings-1.6.14/lib/opengl.rb:1: warning: /usr/local/lib/ruby/3.3.0/fiddle.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add fiddle to your Gemfile or gemspec to silence this warning.
Also please contact the author of opengl-bindings-1.6.14 to request adding fiddle into its gemspec.
Illegal option -p
sh: lspci: not found
Illegal option -p
sh: lspci: not found
/usr/src/app/config/initializers/openssl.rb:5: warning: already initialized constant OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
/usr/local/lib/ruby/3.3.0/openssl/ssl.rb:24: warning: previous definition of DEFAULT_PARAMS was here
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.7.0/lib/zeitwerk/core_ext/kernel.rb:34: warning: /usr/local/lib/ruby/3.3.0/ostruct.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
Also please contact the author of devise_zxcvbn-6.0.0 to request adding ostruct into its gemspec.
2024-10-18T11:47:00.035Z pid=57 tid=5jt INFO: Sidekiq 7.3.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://redis:6379/1"}
bin/rails aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

undefined local variable or method `public_id' for an instance of ModelFile
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/attribute_methods.rb:506:in `method_missing'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/attribute_methods.rb:499:in `method_missing'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/acts_as_favoritor-6.0.2/lib/acts_as_favoritor/favoritable.rb:36:in `method_missing'
/usr/src/app/app/models/concerns/public_i_dable.rb:22:in `generate_public_id'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:403:in `block in make_lambda'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:202:in `block (2 levels) in halting'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:707:in `block (2 levels) in default_terminator'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:706:in `catch'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:706:in `block in default_terminator'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:203:in `block in halting'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `block in invoke_before'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `invoke_before'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:109:in `run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:952:in `_run_validation_callbacks'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/validations/callbacks.rb:115:in `run_validations!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/validations.rb:366:in `valid?'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:72:in `valid?'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:88:in `perform_validations'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:55:in `save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:313:in `block in save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:313:in `save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/suppressor.rb:56:in `save!'
/usr/src/app/app/models/model_file.rb:99:in `attach_existing_file!'
/usr/src/app/db/data/20240615085913_move_file_data_into_shrine.rb:5:in `block in up'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:82:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:82:in `block in find_each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:158:in `block in find_in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:396:in `block in batch_on_unloaded_relation'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:372:in `batch_on_unloaded_relation'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:269:in `in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:157:in `find_in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:81:in `find_each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/querying.rb:23:in `find_each'
/usr/src/app/db/data/20240615085913_move_file_data_into_shrine.rb:5:in `up'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:989:in `public_send'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:989:in `exec_migration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:970:in `block (2 levels) in migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:969:in `block in migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:227:in `with_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:968:in `migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1178:in `migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1529:in `block in execute_migration_in_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1580:in `ddl_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1528:in `execute_migration_in_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1493:in `run_without_lock'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1440:in `block in run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1600:in `with_advisory_lock'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1440:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/migration_context.rb:32:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/data_migrator.rb:61:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:204:in `block (3 levels) in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:227:in `with_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:27:in `block in with_temporary_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:43:in `with_temporary_pool'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:26:in `with_temporary_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:202:in `block (2 levels) in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:197:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:197:in `block in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:196:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:196:in `migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:233:in `block (2 levels) in prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:43:in `with_temporary_pool'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:219:in `block in prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:567:in `block (2 levels) in each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:564:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:564:in `block in each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:575:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:575:in `each_current_environment'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:563:in `each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:216:in `prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/tasks/databases.rake:153:in `block (3 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'

Caused by:
NameError: undefined local variable or method `public_id' for an instance of ModelFile (NameError)
Did you mean?  public_send
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/attribute_methods.rb:506:in `method_missing'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/attribute_methods.rb:499:in `method_missing'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/acts_as_favoritor-6.0.2/lib/acts_as_favoritor/favoritable.rb:36:in `method_missing'
/usr/src/app/app/models/concerns/public_i_dable.rb:22:in `generate_public_id'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:403:in `block in make_lambda'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:202:in `block (2 levels) in halting'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:707:in `block (2 levels) in default_terminator'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:706:in `catch'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:706:in `block in default_terminator'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:203:in `block in halting'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `block in invoke_before'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:598:in `invoke_before'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:109:in `run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/callbacks.rb:952:in `_run_validation_callbacks'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/validations/callbacks.rb:115:in `run_validations!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.4.1/lib/active_model/validations.rb:366:in `valid?'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:72:in `valid?'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:88:in `perform_validations'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/validations.rb:55:in `save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:313:in `block in save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:313:in `save!'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/suppressor.rb:56:in `save!'
/usr/src/app/app/models/model_file.rb:99:in `attach_existing_file!'
/usr/src/app/db/data/20240615085913_move_file_data_into_shrine.rb:5:in `block in up'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:82:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:82:in `block in find_each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:158:in `block in find_in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:396:in `block in batch_on_unloaded_relation'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:372:in `batch_on_unloaded_relation'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:269:in `in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:157:in `find_in_batches'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/relation/batches.rb:81:in `find_each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/querying.rb:23:in `find_each'
/usr/src/app/db/data/20240615085913_move_file_data_into_shrine.rb:5:in `up'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:989:in `public_send'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:989:in `exec_migration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:970:in `block (2 levels) in migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:969:in `block in migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:227:in `with_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:968:in `migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1178:in `migrate'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1529:in `block in execute_migration_in_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.4.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1580:in `ddl_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1528:in `execute_migration_in_transaction'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1493:in `run_without_lock'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1440:in `block in run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1600:in `with_advisory_lock'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/migration.rb:1440:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/migration_context.rb:32:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/data_migrator.rb:61:in `run'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:204:in `block (3 levels) in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:227:in `with_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:27:in `block in with_temporary_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:43:in `with_temporary_pool'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:26:in `with_temporary_connection'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:202:in `block (2 levels) in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:197:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:197:in `block in migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:196:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:196:in `migrate_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:233:in `block (2 levels) in prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:43:in `with_temporary_pool'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:219:in `block in prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:567:in `block (2 levels) in each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:564:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:564:in `block in each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:575:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:575:in `each_current_environment'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/tasks/database_tasks.rb:563:in `each_current_configuration'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/database_tasks.rb:216:in `prepare_all_with_data'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/tasks/databases.rake:153:in `block (3 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
Tasks: TOP => db:prepare:with_data
(See full trace by running task with --trace)
== 20240615085913 MoveFileDataIntoShrine: migrating ===========================
Preparing database...
tr1plus commented 1 month ago

Found you asking about the below command to in another issue - might be of help.

sudo docker exec -it manyfold-app-1 /usr/src/app/bin/rails db:migrate:status:with_data
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/opengl-bindings-1.6.14/lib/opengl.rb:1: warning: /usr/local/lib/ruby/3.3.0/fiddle.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add fiddle to your Gemfile or gemspec to silence this warning.
Also please contact the author of opengl-bindings-1.6.14 to request adding fiddle into its gemspec.
Illegal option -p
sh: lspci: not found
Illegal option -p
sh: lspci: not found
/usr/src/app/config/initializers/openssl.rb:5: warning: already initialized constant OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
/usr/local/lib/ruby/3.3.0/openssl/ssl.rb:24: warning: previous definition of DEFAULT_PARAMS was here
/usr/src/app/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.7.0/lib/zeitwerk/core_ext/kernel.rb:34: warning: /usr/local/lib/ruby/3.3.0/ostruct.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
Also please contact the author of devise_zxcvbn-6.0.0 to request adding ostruct into its gemspec.
2024-10-18T11:48:04.425Z pid=476 tid=5x8 INFO: Sidekiq 7.3.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://redis:6379/1"}

database: manyfold

 Status    Type    Migration ID   Migration Name
------------------------------------------------------------
   up     schema  20210130201037  Create libraries
   up     schema  20210130203243  Create models
   up     schema  20210205230918  Create parts
   up     schema  20210210153744  Add fields to parts
   up     schema  20210212143001  Acts as taggable on migration.acts as taggable on engine
   up     schema  20210212143002  Add missing unique indices.acts as taggable on engine
   up     schema  20210212143003  Add taggings counter cache to tags.acts as taggable on engine
   up     schema  20210212143004  Add missing taggable index.acts as taggable on engine
   up     schema  20210212143005  Change collation for tag names.acts as taggable on engine
   up     schema  20210212143006  Add missing indexes on taggings.acts as taggable on engine
   up     schema  20210220204055  Add preview part to model
   up     schema  20210225232756  Create creators
   up     schema  20210225232841  Add creator to models
   up     schema  20210301230017  Create links
   up     schema  20210302161202  Drop link fields from creators
   up     schema  20210314185822  Remove fk constraint from model preview part
   up     schema  20210318202638  Add y up to parts
   up     schema  20210321164508  Create images
   up     schema  20210330215825  Create delayed jobs
   up     schema  20220105233138  Rename parts to model files
   up     schema  20220106220519  Remove images table
   up     schema  20220612220115  Add service name to active storage blobs.active storage
   up     schema  20220612220116  Create active storage variant records.active storage
   up     schema  20220612220117  Remove not null on active storage blobs checksum.active storage
   up     schema  20220614210023  Devise create users
   up     schema  20220614211256  Add username to users
   up     schema  20220614213902  Add admin to users
   up     schema  20220617122809  Add pagination settings to user
   up     schema  20220619174307  Create settings
   up     schema  20220626152444  Add scale factor to models
   up     schema  20220702202932  Add digest to model files
   up     schema  20221128165903  Add renderer settings to users
   up     schema  20221210001132  Create problems
   up      data   20221214230757  Add new defaults to renderer settings
   up     schema  20221219204414  Acts as favoritor migration
   up      data   20221220223040  Move printed to favorites
   up     schema  20221220223340  Drop printed from model files
   up     schema  20230202210000  Add notes excerpt to models
   up     schema  20230202210001  Add notes excerpt to creators
   up     schema  20230203150000  Add notes excerpt to model files
   up      data   20230221174212  Move scale factor into note
   up     schema  20230221180921  Remove scale factor from models
   up     schema  20230222155910  Rename excerpt to caption
   up     schema  20230303150029  Add notes name caption to library
   up     schema  20230305180823  Add tagregex to library
   up     schema  20230307215826  Add icon to library
   up     schema  20230308004237  Create collection
   up     schema  20230308005021  Add collection to models
   up      data   20230308006000  Move collection tag into object
   up     schema  20230313000000  Rename collection excerpt to caption
   up     schema  20230313000001  Change pagination settings on user
   up     schema  20230316184012  Add tag cloud settings to user
   up     schema  20230324000000  Add collection to collections
   up      data   20230612080306  Remove destination exists problems
   up      data   20230613134254  Remove leading separators from model filenames
   up     schema  20230615135601  Add slugs
   up      data   20230617222353  Generate slugs
   up      data   20230628194944  Make names unique
   up     schema  20230628195018  Add unique constraint to names and slugs
   up     schema  20230707082403  Add size to model files
   up     schema  20230710102250  Change file size to big int
   up     schema  20230711111009  Add note to problems
   up     schema  20240122114207  Add problem settings to user
   up     schema  20240127143358  Add license to model
   up     schema  20240131134832  Add ignored to problems
   up     schema  20240208143319  Add presupported version to model files
   up     schema  20240209125409  Add file list settings to user
   up     schema  20240228130246  Add missing unique indexes
   up     schema  20240306095646  Create flipper tables
   up     schema  20240319155251  Rolify create roles
   up      data   20240319155526  Convert admin flag to role
   up     schema  20240319155903  Remove admin from users
   up     schema  20240322143621  Add reset password token to users
   up      data   20240322150022  Set admin password reset token
   up     schema  20240410221112  Add rememberable to users
   up     schema  20240410222922  Add reset password sent at to users
   up     schema  20240418112821  Drop delayed jobs
   up     schema  20240423102250  Add interface language to users
   up     schema  20240610120318  Add lockable to users
   up     schema  20240614085913  Add attachment data to model files
  down     data   20240615085913  Move file data into shrine
  down    schema  20240701142651  Add storage service to libraries
  down    schema  20240703103707  Add s3 fields to library
  down    schema  20240703160732  Change index on library path
  down    schema  20240727113215  Create federails actors.federails
  down    schema  20240727113216  Create federails followings.federails
  down    schema  20240727113217  Create federails activities.federails
  down    schema  20240731165646  Change actor entity rel to polymorphic.federails
  down     data   20240731165647  Create federails actors
  down     data   20240802094448  Create more federails actors
  down     data   20240805111500  Backfill activities
  down    schema  20240827155630  Create caber relations
  down     data   20240830121749  Add default access controls
  down     data   20240830151650  Rename default roles
  down    schema  20240904151944  Add public i ds to models
  down     data   20240904152358  Generate public i ds for models
  down     data   20240909100000  Backfill activities after permissions
  down     data   20240923114515  Deduplicate roles
  down    schema  20240924122004  Add virtual columns for sorting
  down    schema  20240926162407  Add keypair to actors.federails
  down    schema  20241004194445  Add uuids.federails
  down    schema  20241007182824  Create comments
  down    schema  20241009122540  Add system to comments
  down     data   20241013215000  Backfill activities after uuids
  down    schema  20241015090803  Add omniauth to users
  down    schema  20241017093301  Add sensitive flag to models and comments
  down    schema  20241017113112  Add sensitive content handling to users
Floppy commented 1 month ago

Thanks, that's perfect. This is exactly the problem I need to solve that #2982 is talking about. OK, I'll get you a fix soon.

Floppy commented 1 month ago

Think I've got a solution - can you change to the edge tag and try it out? You may hit another error, but it should get a bit further at least.

tr1plus commented 1 month ago

Edge tag launched without any issues so far. Thanks :)

Floppy commented 1 month ago

Did it get all the way? I'll do a release if so!

tr1plus commented 1 month ago

I am in the application & scanning new models:

image

Floppy commented 1 month ago

Amazing! ❤️