diff --git a/acceptance/compose.yaml b/acceptance/compose.yaml index 9c0a549..a86a8ac 100644 --- a/acceptance/compose.yaml +++ b/acceptance/compose.yaml @@ -10,7 +10,6 @@ services: ports: - 5432:5432 volumes: - - ./db/pg:/docker-entrypoint-initdb.d - postgres_data:/var/lib/postgresql/data app: build: diff --git a/acceptance/db/pg/01-tables.sql b/acceptance/db/pg/01-tables.sql deleted file mode 100644 index f8ae1fc..0000000 --- a/acceptance/db/pg/01-tables.sql +++ /dev/null @@ -1,34 +0,0 @@ -CREATE TABLE - sources ( - name TEXT, - score FLOAT DEFAULT 0 CHECK ( - score >= 0 - AND score <= 1 - ), - uri_digest TEXT PRIMARY KEY, - summary TEXT, - tags TEXT, - uri TEXT - ); - -CREATE TABLE - claims ( - source_uri_digest TEXT NOT NULL, - summary TEXT, - title TEXT, - uri TEXT, - uri_digest TEXT PRIMARY KEY, - checked BOOLEAN DEFAULT FALSE, - validity BOOLEAN DEFAULT FALSE, - CONSTRAINT fk_source FOREIGN KEY (source_uri_digest) REFERENCES sources (uri_digest) ON DELETE CASCADE - ); - -CREATE TABLE - proofs ( - claim_uri_digest TEXT NOT NULL, - supports_claim BOOLEAN, - reviewed_by TEXT, - uri TEXT, - uri_digest TEXT PRIMARY KEY, - CONSTRAINT fk_claim FOREIGN KEY (claim_uri_digest) REFERENCES claims (uri_digest) ON DELETE CASCADE - ); \ No newline at end of file diff --git a/acceptance/db/pg/02-permissions.sql b/acceptance/db/pg/02-permissions.sql deleted file mode 100644 index 2ed134c..0000000 --- a/acceptance/db/pg/02-permissions.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE sources OWNER TO sourcescore; -ALTER TABLE claims OWNER TO sourcescore; -ALTER TABLE proofs OWNER TO sourcescore; \ No newline at end of file diff --git a/cmd/app/main.go b/cmd/app/main.go index bb6b7d2..236a2ab 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -63,6 +63,7 @@ func main() { context.Background(), api.Source{}, api.Claim{}, + api.Proof{}, ) proofRepo := proof.NewProofRepository(context.Background(), dbClient)