You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker docmost container Failed to execute migration #117
I'm using the default docker-compose file and have setup the 4 key variables: APP_URL, APP_SECRET, DATABASE_URL,REDIS_URL. Very early on in the boot as the docmost container boots for the first time it completes the first 11 migration rows but then fails near the end with...
docmost-docmost-1 | [Nest] 41 - 07/24/2024, 1:10:29 PM ERROR [DatabaseMigrationService] Failed to execute migration "20240324T086800-pages-tsvector-trigger"
docmost-docmost-1 | [Nest] 41 - 07/24/2024, 1:10:29 PM ERROR [DatabaseMigrationService] Failed to run database migration. Exiting program.
docmost-docmost-1 | [Nest] 41 - 07/24/2024, 1:10:29 PM ERROR [DatabaseMigrationService] error: syntax error at or near "TRIGGER"
docmost-docmost-1 | /app/apps/server:
docmost-docmost-1 | ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL [email protected] start:prod: `cross-env NODE_ENV=production node dist/main`
docmost-docmost-1 | Exit status 1
docmost-docmost-1 | ELIFECYCLE Command failed with exit code 1.
docmost-docmost-1 exited with code 0
The main difference to the docker-compose script is I'm using an external PostgresSQL (v13.14) database but this runs fine for all other containers that use it.
Here is a screenshot of the errors.
I've tried deleting the database and running again. The user specified has full permissions.
If anyone has any ideas, all gratefully received :)
Maybe the documentation should indicate support for >=14, but if you tweak the migration to remove the "OR REPLACE" and it's the only issue, maybe the migration could be modified manually in the repo?
Hi @olivierIllogika and thank you for this detailed and prompt response. Potentially I'll look to upgrade my version or as you say, tweak the migration.
Hopefully this might help someone else with a similar compatibility issue.
Activity
olivierIllogika commentedon Jul 24, 2024
The "CREATE OR REPLACE TRIGGER" syntax is only valid in postgresql 14+ (vs. 13)
Maybe the documentation should indicate support for >=14, but if you tweak the migration to remove the "OR REPLACE" and it's the only issue, maybe the migration could be modified manually in the repo?
flinthamm commentedon Jul 24, 2024
Hi @olivierIllogika and thank you for this detailed and prompt response. Potentially I'll look to upgrade my version or as you say, tweak the migration.
Hopefully this might help someone else with a similar compatibility issue.
Merge pull request 'chore: finish the 3 remaining open issues (docmos…