So it looks like something was not done when running the v2 migration. I don’t remember at which version I ran it, but I kept the logs and it seems everything was fine
Hej , same here. The upgrade from version 2.6.1 to 2.7 broke all projects with components. When I create a new team, I can import them, when no components are used. At the original team I get the same alert like @dani. When I import the projects to a new created team, I get the following alert: “Es scheint eine Nichtübereinstimmung zwischen den aktivierten Funktionen und den Funktionen der Datei zu geben. Die Migrationen für ‘components/v2’ müssen durchgeführt werden, bevor die Datei geöffnet werden kann.”.
Same here. Downgrading and run the migrate.v2 has no effect. It seems, that the component-handling has an issue. The migration.v2 script was for the upgrade from penpot version 1.x to version 2 as far as I know. The release-infos for penpot version 2.7 announces an update of the assets management, is there the components effected also? The version I has running before upgrading to version 2.7 was 2.5. An update to version 2.6.2 was no problem. The issues showing by upgrading from 2.6.2 to 2.7.0/2.7.1, by no more editing any project of an existing team. When I create a new team and migrate some projects, the projects that are using no components are running. But every project, that uses components are broken and penpot will not working.
I hope the description of the issue helps to find a solution.
Also run into the same problem, as I’ve described here: bug: problem update 2.6.2 to 2.7.1 · Issue #6650 · penpot/penpot · GitHub
Tried running the migration after downgrading to 2.2.0, then to 2.0.0 with the same results as @dani : when going back to 2.7.1, I’m still not able to open files in my projects
Anything else to try?
I ran into the same problem recently, and I have a few findings.
In my case, I found out that Penpot version 2.0.0 had a bug in the components v2 migration code that caused the migration to not run properly. This was fixed with version 2.0.1 in this commit, but it seems like the bugged components v2 migration in 2.0.0 will mark the installation as migrated, so running the migration again in 2.0.1 will not work.
I’m not familiar with Penpot’s codebase to know how to properly reset the migrated flag, so I ended up forcing the migration to run again by removing the migrated checks entirely. After rerunning the migration again with the migrated checks disabled, I was able to open my old projects in 2.7 once more.
I finally took some time to look a bit deeper and was able to run the migration. The problem is in the server_prop table. If the v2 migration runs, but fail for any reason, it’ll still add a line v2-migrated true in this table :
So running the migration again is now a no-op. To fix it, I removed the v2-migrated line from the server_prop table, downgraded to v2.0.1, let the migration run (which worked this time), and upgrade to 2.7.2, which is now able to open my projects
Hm, I have tried some migrations, down- and upgrades and nothing will work. I remove the “v2-migrated” entry from the server_prop table, downgraded, run migration:
upgrade to v2.7.1 … no effect, I can not open previous projects. So I checked the postgres-table again, found the “v2-migrated” entry again, removed it again, downgraded to version 2.0.1 again, run migration again:
upgrade to penpot v2.7.1 … again no effect. I can not open any project older than penpot 2.7. … so I am stuck on version 2.6.2. or I cut all previous projects. Not a valid option at all I think. Does anybody have a solution?
Are there any ideas to run the migration from v2.6.2 to 2.7 or 2.8? I can’t export any organisation projects… this will cost much time and works quite not fluently at all. Also I can not leave some projects in an old environment, because there are still under development. It will be quite nice, if there will be a way to find a way for upgrading from version 2.6.2. When I can do something for identify the problem, tell me! Thanks for this project at all.
BACKUP EVERYTHING BEFORE UPGRADING AND UPDATE POSTGRES TABLES!!
I running asset-fs no s3 data storage!
downgrade backend-container to version 2.1
run bash on postgres-container: docker exec -ti penpot-penpot-postgres-1 bash
– “penpot-penpot-postgres-1” has to fit your postgres container-naming
remove “v2-migrated” flag from postgres-container (if set): psql -U penpot -d penpot -c “DELETE FROM server_prop WHERE id=‘v2-migrated’;”
remove file_migration entries: psql -U penpot -d penpot <<‘SQL’ BEGIN; DELETE FROM file_migration fm USING file f WHERE fm.file_id = f.id AND (coalesce(f.data_backend,‘’) = ‘’ OR coalesce(array_to_string(f.features, ‘,’), ‘’) NOT ILIKE ‘%components/v2%’); COMMIT; SQL
set “data_backend” to “assets-fs”: psql -U penpot -d penpot -c “UPDATE file SET data_backend=‘assets-fs’ WHERE coalesce(data_backend,‘’)=‘’;”
exit postgres container, login to backend-container (v2.1): docker exec -ti penpot-penpot-backend-1 bash
– “penpot-penpot-backend-1” has to fit your backend container-naming
run migration PENPOT_LOG_LEVEL=debug ./run.sh app.migrations.v2
when running the migration-v2 script, there should an entry like something: I app.migrations.v2 - hint=“v2 migration finished”, files=XX, teams=1, errors=nil, elapsed=“13.649349489s”
please check if all quotation marks are set correctly, when you copy the lines above.