maubot/gitlab

Database error upon first run

Opened this issue · 0 comments

dmaes commented

Trying to run v0.2.0 of this bot with a postgresql database in the maubot standalone mode, and I get the following error:

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InvalidForeignKey) there is no unique constraint matching given keys for referenced table "token"

[SQL:
CREATE TABLE "default" (
	user_id VARCHAR(255) NOT NULL,
	gitlab_server TEXT,
	PRIMARY KEY (user_id),
	FOREIGN KEY(user_id) REFERENCES token (user_id),
	FOREIGN KEY(gitlab_server) REFERENCES token (gitlab_server)
)

]