Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid comment in backend/migrations for file 20240403155357_drop_dup_idx.sql #1859

Closed
aldoborrero opened this issue Dec 20, 2024 · 0 comments · Fixed by #1860
Closed

Invalid comment in backend/migrations for file 20240403155357_drop_dup_idx.sql #1859

aldoborrero opened this issue Dec 20, 2024 · 0 comments · Fixed by #1860

Comments

@aldoborrero
Copy link
Contributor

Hi,

I've detected the following issue when applying the migrations with Atlas on a postgres database:

ec 20 12:17:18 homebot systemd[1]: digger-backend.service: Consumed 141ms CPU time, 16.3M memory peak, 29.1K incoming IP traffic, 21.1K outgoing IP traffic.
Dec 20 12:17:18 homebot systemd[1]: digger-backend.service: Scheduled restart job, restart counter is at 4.
Dec 20 12:17:18 homebot systemd[1]: Starting Digger...
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]: Migrating to version 20241114202249 from 20240402110915 (25 migrations in total):
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:   -- migrating version 20240403155357
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:     -> # drop the duplicate index to fix the next migration of renaming
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:        DROP INDEX "public"."idx_digger_job_id";
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:     pq: syntax error at or near "#"
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:   -------------------------
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:   -- 10.844936ms
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:   -- 1 migration with errors
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]:   -- 1 sql statement with errors
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]: Error: sql/migrate: executing statement "# drop the duplicate index to fix the next migration of renaming\nDROP INDEX \"public\".\"idx_digger_job_id\";" from version "20240403155357": pq: syntax error at or near "#"
Dec 20 12:17:18 homebot digger-backend-pre-start[2198280]: sql/migrate: write revision: pq: current transaction is aborted, commands ignored until end of transaction block

The culprit is the following comment that should be -- rather than #:

# drop the duplicate index to fix the next migration of renaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant