go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
1.03k stars 71 forks source link

Inexistent Webhook Table #215

Closed Typhonragewind closed 9 months ago

Typhonragewind commented 9 months ago

Description

I started trying to automate stuff in my vikunja instance using the API and i keep getting this error: handler/ReadAllWeb 396b Error 1146 (42S02): Table 'vikunja.webhooks' doesn't exist

This is not a fresh install, so I don't think it relates to https://github.com/go-vikunja/vikunja/issues/98 May have been a migration that happened wrong, but I'm unsure how to fix this.

I tried running vikunja migrate, but that just bricked everything and i had to restore from backup.

Vikunja Version

API Version: v0.22.1

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

kolaente commented 9 months ago

This is already fixed: https://github.com/go-vikunja/vikunja/issues/104#issuecomment-1872504875

Typhonragewind commented 9 months ago

This is already fixed: #104 (comment)

I can't give you hard proof, but i did roll back to the backup of a previous version and did the update again and the issue remained.

I did end fixing it, by doing a DB dumb, delete DB, fresh install and restore the dump.

FunnyPocketBook commented 9 months ago

We had the same issue on our instance.

The initial version was v.0.22.0, then we upgraded to v.0.22.1, webhooks table was still missing. Then we upgraded to v.0.23.0, webhooks table was still missing

Then I created a fresh v.0.23.0 instance, the table was present there. I exported it with

BEGIN;

CREATE TABLE IF NOT EXISTS public.webhooks
(
    id bigserial NOT NULL,
    target_url character varying(255) COLLATE pg_catalog."default" NOT NULL,
    events json NOT NULL,
    project_id bigint NOT NULL,
    secret character varying(255) COLLATE pg_catalog."default",
    created_by_id bigint NOT NULL,
    created timestamp without time zone NOT NULL,
    updated timestamp without time zone NOT NULL,
    CONSTRAINT webhooks_pkey PRIMARY KEY (id)
);
END;

And then imported it to the existing db and assigned the correct permissions

I hope this is useful for anyone else who is facing this issue