Closed tobiasu closed 3 months ago
I have the same error
Sorry for this. @EpicJosch "same error": same db (postgres, same NC version same everything?)
So, seemingly the migration is broken. The cause of the problem is probably the following line:
Are you able to hack your installed version of files_archive and simply remove that line and try again?
Otherwise: to fix the issue manually for just you: modify that database table and remove the "notnull" attribute from any existing "mount_point_file_id" column, or add an integer column "mount_point_file_id" without "not null" constraint.
mount_point_file_id doesn't exist yet.
I've had a single entry in oc_files_archive_mounts with a non-existent archive_file_path and mount_point_path (/foo/blah.zip is now /bar/foo/blah.zip, /foo was moved into /bar some time ago)
Once deleted, occ app:enable files_archive updated directly to 1.2.0. Just to be sure I did the app:remove app:install dance, no issue. mount_point_file_id exists now.
Actually, the migration I wrote was broken in several aspects :(
However, what we also experienced is that the behaviour of DBAL of the underlying DB engine are quite different when one require "not null" and do not give the column a default value. DBAL/mysql/mariadb implicitly seem to assume "default 0", while DBAL/postgresql errors out.
Still there are also other issues with this migration stuff, unfortunately.
I think that the migration issues show be fixed by 9337eac
The commit sets a default for the non-null column which should avoid the Postgres error and also fixes the update statement to really only work on the current row.
Updating to files_archive: 1.2.0 (installed 1.1.3), I ran into this:
Postgres 15 NC 28.0.3
Sounds like I have to look into the database and clean up some things manually.