github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/dashboard/api/pkg/store/migrations/0001_dashboard.up.sql (about)

     1  create table useraccount (
     2    id SERIAL PRIMARY KEY,
     3    created timestamp default current_timestamp,
     4    username varchar(255),
     5    hashed_password varchar(255)
     6  );
     7  
     8  create table job_moderation (
     9    id SERIAL PRIMARY KEY,
    10    job_id varchar(255),
    11    useraccount_id bigint,
    12    created timestamp default current_timestamp,
    13    status varchar(255),
    14    notes text default '',
    15    FOREIGN KEY(job_id) REFERENCES job(id),
    16    FOREIGN KEY(useraccount_id) REFERENCES useraccount(id)
    17  );
    18  
    19  create table cid_moderation (
    20    id SERIAL PRIMARY KEY,
    21    job_id varchar(255),
    22    useraccount_id bigint,
    23    created timestamp default current_timestamp,
    24    status varchar(255),
    25    cid varchar(255),
    26    FOREIGN KEY(job_id) REFERENCES job(id),
    27    FOREIGN KEY(useraccount_id) REFERENCES useraccount(id)
    28  );