Add Batch to migration

This commit is contained in:
Mustafa Gezen 2023-08-27 06:04:05 +02:00
parent 280931f4ea
commit 97730ab267
Signed by: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -23,12 +23,31 @@ CREATE TABLE workers
CREATE TABLE entries
(
name VARCHAR(255) PRIMARY KEY,
entry_id VARCHAR(255) UNIQUE NOT NULL,
create_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
os_release TEXT NOT NULL,
sha256_sum VARCHAR(255) NOT NULL,
worker_id VARCHAR(255) REFERENCES workers (worker_id),
batch_name VARCHAR(255),
user_email TEXT
name VARCHAR(255) PRIMARY KEY,
entry_id VARCHAR(255) UNIQUE NOT NULL,
create_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
os_release TEXT NOT NULL,
sha256_sum VARCHAR(255) NOT NULL,
repository_name VARCHAR(255) NOT NULL,
worker_id VARCHAR(255) REFERENCES workers (worker_id),
batch_name VARCHAR(255),
user_email TEXT
);
CREATE TABLE batches
(
name VARCHAR(255) PRIMARY KEY,
batch_id VARCHAR(255) UNIQUE,
create_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
update_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
seal_time TIMESTAMPTZ,
bugtracker_url TEXT
);
CREATE TABLE bugtracker_configs
(
name VARCHAR(255) PRIMARY KEY,
create_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
update_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
config JSONB NOT NULL
);