fix(database): migration
Some checks failed
Gitea Build Check / Build (pull_request) Failing after 2m54s

- primary key is now first in position
This commit is contained in:
SoXX 2024-10-15 12:28:52 +02:00
parent a6d95067fe
commit 59f404883e

View File

@ -1,8 +1,8 @@
-- +migrate Up -- +migrate Up
CREATE TABLE "ScrapeHistory" CREATE TABLE "ScrapeHistory"
( (
user_source_id CHAR(25) NOT NULL REFERENCES "UserSource" (id),
scrape_task_id CHAR(25) PRIMARY KEY, scrape_task_id CHAR(25) PRIMARY KEY,
user_source_id CHAR(25) NOT NULL REFERENCES "UserSource" (id),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
finished_at TIMESTAMP NULL, finished_at TIMESTAMP NULL,
error TEXT NULL, error TEXT NULL,