First pass implementation of an SQLite backing store for fetched opportunities
This commit is contained in:
1 parent
9b0e6dccfe
commit
045492a148
29 files changed
+3132
-9
No files matched your search
@@ -0,0 +1,22 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS "opportunity_marks" (
|
||||
"uuid" TEXT NOT NULL UNIQUE,
|
||||
"hidden" BOOLEAN NOT NULL DEFAULT 0,
|
||||
"skipped" BOOLEAN NOT NULL DEFAULT 0,
|
||||
"interested" BOOLEAN NOT NULL DEFAULT 0,
|
||||
"bid_submitted" BOOLEAN NOT NULL DEFAULT 0,
|
||||
"lost" BOOLEAN NOT NULL DEFAULT 0,
|
||||
"won" BOOLEAN NOT NULL DEFAULT 0,
|
||||
CHECK (NOT ("won" AND "lost")),
|
||||
PRIMARY KEY ("uuid"),
|
||||
FOREIGN KEY ("uuid")
|
||||
REFERENCES "opportunities" ("uuid")
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE IF EXISTS "opportunity_marks";
|
||||
-- +goose StatementEnd
|
||||
Reference in new issue
Block a user