github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/db/migrations/postgres/000012_create_pins_table.up.sql (about)

     1  BEGIN;
     2  CREATE TABLE pins (
     3    seq            SERIAL          PRIMARY KEY,
     4    masked         BOOLEAN         NOT NULL,
     5    hash           CHAR(64)        NOT NULL,
     6    batch_id       UUID            NOT NULL,
     7    idx            BIGINT          NOT NULL,
     8    dispatched     BOOLEAN         NOT NULL,
     9    created        BIGINT          NOT NULL
    10  );
    11  
    12  CREATE UNIQUE INDEX pins_pin ON pins(hash, batch_id, idx);
    13  CREATE INDEX pins_dispatched ON pins(dispatched);
    14  
    15  COMMIT;