diff --git a/tools/mothership/migrations/000001_init.up.sql b/tools/mothership/migrations/000001_init.up.sql index 11bd7644..735ce76f 100644 --- a/tools/mothership/migrations/000001_init.up.sql +++ b/tools/mothership/migrations/000001_init.up.sql @@ -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 );