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
I'm trying to self host the server using the latest image from ghcr.io (latest, 1464cb6 - on x64), and it fails with a migration error on starting with a clean db.
atuin-1 | 2024-03-11T14:54:15.000208Z DEBUG sqlx::query: summary="SELECT current_database()" db.statement="" rows_affected=0 rows_returned=1 elapsed=311.904µs
atuin-1 | 2024-03-11T14:54:15.000465Z DEBUG sqlx::query: summary="SELECT pg_advisory_lock($1)" db.statement="" rows_affected=1 rows_returned=1 elapsed=219.354µs
atuin-1 | 2024-03-11T14:54:15.000639Z INFO sqlx::postgres::notice: relation "_sqlx_migrations" already exists, skipping
atuin-1 | 2024-03-11T14:54:15.001080Z DEBUG sqlx::query: summary="CREATE TABLE IF NOT …" db.statement="\n\nCREATE TABLE IF NOT EXISTS _sqlx_migrations (\n version BIGINT PRIMARY KEY,\n description TEXT NOT NULL,\n installed_on TIMESTAMPTZ NOT NULL DEFAULT now(),\n success BOOLEAN NOT NULL,\n checksum BYTEA NOT NULL,\n execution_time BIGINT NOT NULL\n);\n" rows_affected=0 rows_returned=0 elapsed=270.539µs
atuin-1 | 2024-03-11T14:54:15.002206Z DEBUG sqlx::query: summary="SELECT version FROM _sqlx_migrations …" db.statement="\n\nSELECT\n version\nFROM\n _sqlx_migrations\nWHERE\n success = false\nORDER BY\n version\nLIMIT\n 1\n" rows_affected=0 rows_returned=0 elapsed=979.365µs
atuin-1 | 2024-03-11T14:54:15.002643Z DEBUG sqlx::query: summary="SELECT version, checksum FROM …" db.statement="\n\nSELECT\n version,\n checksum\nFROM\n _sqlx_migrations\nORDER BY\n version\n" rows_affected=11 rows_returned=11 elapsed=309.886µs
atuin-1 | 2024-03-11T14:54:15.003438Z DEBUG sqlx::query: summary="-- We do not …" db.statement="\n\n-- We do not need to run the trigger on deletes, as the only time we are deleting history is when the user\n-- has already been deleted\n-- This actually slows down deleting all the history a good bit!\ncreate\nor replace function user_history_count() returns trigger as $func$\nbegin\nif (TG_OP = 'INSERT') then\nupdate\n total_history_count_user\nset\n total = total + 1\nwhere\n user_id = new.user_id;\nif not found then\ninsert into\n total_history_count_user(user_id, total)\nvalues\n (\n new.user_id,\n (\n select\n count(1)\n from\n history\n where\n user_id = new.user_id\n )\n );\nend if;\nend if;\nreturn NEW;\n-- this is actually ignored for an after trigger, but oh well\nend;\n$func$ language plpgsql volatile -- pldfplplpflh\ncost 100;\n-- default value\ncreate\nor replace trigger tg_user_history_count\nafter\ninsert\n on history for each row execute procedure user_history_count();\n" rows_affected=0 rows_returned=0 elapsed=157.261µs
atuin-1 | Error: failed to connect to db: PostgresSettings { db_uri: "**redacted**" }
atuin-1 |
atuin-1 | Caused by:
atuin-1 | Other(while executing migrations: error returned from database: syntax error at or near "trigger"
atuin-1 |
atuin-1 | Caused by:
atuin-1 | 0: error returned from database: syntax error at or near "trigger"
atuin-1 | 1: syntax error at or near "trigger"
atuin-1 |
atuin-1 | Location:
atuin-1 | /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/convert/mod.rs:757:9)
atuin-1 |
atuin-1 | Location:
atuin-1 | /app/atuin-server/src/lib.rs:141:10
atuin-1 exited with code 0
The text was updated successfully, but these errors were encountered:
I'm trying to self host the server using the latest image from ghcr.io (latest, 1464cb6 - on x64), and it fails with a migration error on starting with a clean db.
The text was updated successfully, but these errors were encountered: