github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/db/migrations/ql/000004_create_batches_table.up.sql (about)

     1  CREATE TABLE batches (
     2    id          string   NOT NULL,
     3    btype       string   NOT NULL,
     4    namespace   string   NOT NULL,
     5    author      string   NOT NULL,
     6    group_hash  string,
     7    hash        string   NOT NULL,
     8    created     int64    NOT NULL,
     9    payload     blob     NOT NULL,
    10    payload_ref string,
    11    confirmed   int64,
    12    tx_type     string   NOT NULL,
    13    tx_id       string,
    14  );
    15  
    16  CREATE UNIQUE INDEX batches_primary ON batches(id);
    17  CREATE INDEX batches_created ON batches(namespace,created);
    18  CREATE INDEX batches_fortx ON batches(namespace,tx_id);