YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
44 stars 15 forks source link

Upgrade to 0.9.4 failed #68

Closed raphgilles closed 5 years ago

raphgilles commented 5 years ago

Hello,

I have an error at the end of the upgrade to the version 0.9.4 Just after the php artisan lines.

Have any idea what that could be ?

Thank you !


2019-06-06 21:41:21,405: DEBUG - Migrating: 2019_04_25_200411_add_snowflake_ids_to_collections_table
2019-06-06 21:41:21,506: DEBUG - 
2019-06-06 21:41:21,506: WARNING - !!
2019-06-06 21:41:21,506: DEBUG -    Illuminate\Database\QueryException  : SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "migrations_pkey"
2019-06-06 21:41:21,507: WARNING -   pixelfed's script has encountered an error. Its execution was cancelled.
2019-06-06 21:41:21,507: DEBUG - DETAIL:  Key (id)=(76) already exists. (SQL: insert into "migrations" ("migration", "batch") values (2019_04_25_200411_add_snowflake_ids_to_collections_table, 4))
2019-06-06 21:41:21,507: WARNING - !!
2019-06-06 21:41:21,507: DEBUG - 
2019-06-06 21:41:21,507: WARNING - Upgrade failed.
2019-06-06 21:41:21,508: DEBUG -   at /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
2019-06-06 21:41:21,508: DEBUG -     660|         // If an exception occurs when attempting to run a query, we'll format the error
2019-06-06 21:41:21,508: DEBUG -     661|         // message to include the bindings with SQL, which will make this exception a
2019-06-06 21:41:21,508: DEBUG -     662|         // lot more helpful to the developer instead of just the database's errors.
2019-06-06 21:41:21,508: DEBUG -     663|         catch (Exception $e) {
2019-06-06 21:41:21,508: DEBUG -   > 664|             throw new QueryException(
2019-06-06 21:41:21,508: DEBUG -     665|                 $query, $this->prepareBindings($bindings), $e
2019-06-06 21:41:21,509: DEBUG -     666|             );
2019-06-06 21:41:21,509: DEBUG -     667|         }
2019-06-06 21:41:21,509: DEBUG -     668|
2019-06-06 21:41:21,509: DEBUG - 
2019-06-06 21:41:21,509: DEBUG -   Exception trace:
2019-06-06 21:41:21,510: DEBUG - 
2019-06-06 21:41:21,510: DEBUG -   1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "migrations_pkey"
2019-06-06 21:41:21,510: DEBUG - DETAIL:  Key (id)=(76) already exists.")
2019-06-06 21:41:21,510: DEBUG -       /var/www/pixelfed/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119
2019-06-06 21:41:21,510: DEBUG - 
2019-06-06 21:41:21,510: DEBUG -   2   PDOException::("SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "migrations_pkey"
2019-06-06 21:41:21,510: DEBUG - DETAIL:  Key (id)=(76) already exists.")
2019-06-06 21:41:21,511: DEBUG -       /var/www/pixelfed/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
2019-06-06 21:41:21,511: DEBUG - 
2019-06-06 21:41:21,511: DEBUG -   Please use the argument -v to see more details.
2019-06-06 21:41:21,511: DEBUG - + ynh_exit_properly
2019-06-06 21:41:21,511: DEBUG - + local exit_code=1
2019-06-06 21:41:21,511: DEBUG - + '[' 1 -eq 0 ']'
2019-06-06 21:41:21,511: DEBUG - + trap '' EXIT
2019-06-06 21:41:21,512: DEBUG - + set +eu
2019-06-06 21:41:21,512: DEBUG - + echo -e '!!\n  pixelfed'\''s script has encountered an error. Its execution was cancelled.\n!!'
yalh76 commented 5 years ago

No idea, it's like some database steps upgrades have already been done. Maybe better to ask at pixelfed repository ?

raphgilles commented 5 years ago

Ok. That was not the case. I will try that.

[EDIT] Just opened the issue here : https://github.com/pixelfed/pixelfed/issues/1365

raphgilles commented 5 years ago

And of course I'm redirected here 😅

I tried to upgrade an old 0.9 clean install (on an other server) and all worked fine.

yalh76 commented 5 years ago

As it seems specific to you instance, and as discussed on mastodon, I close this issue,

Feel free to reopen it if needed.