Skip to content

Commit

Permalink
feat: replace old chips
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed May 22, 2024
1 parent 0524ef4 commit d3a95d8
Show file tree
Hide file tree
Showing 18 changed files with 1,394 additions and 5,051 deletions.
17 changes: 0 additions & 17 deletions db/migrations/02-create_items_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ CREATE TABLE IF NOT EXISTS "report" (
"udap_id" TEXT
);

CREATE TABLE IF NOT EXISTS "clause" (
id TEXT PRIMARY KEY NOT NULL,
label TEXT NOT NULL,
value TEXT NOT NULL
);

CREATE TABLE IF NOT EXISTS "report_to_clause" (
id TEXT PRIMARY KEY NOT NULL,
"reportId" TEXT NOT NULL REFERENCES report(id) ON DELETE CASCADE,
"clauseId" TEXT NOT NULL REFERENCES clause(id) ON DELETE CASCADE
);

ALTER TABLE
"report" ENABLE ELECTRIC;

ALTER TABLE
"report_to_clause" ENABLE ELECTRIC;

ALTER TABLE
"clause" ENABLE ELECTRIC;
121 changes: 46 additions & 75 deletions db/migrations/04-add_chips_table.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/backend/src/db/db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PrismaClient } from "@cr-vif/electric-client/backend";
import { ENV } from "../envVars";
console.log(ENV);

export const db = new PrismaClient({ datasources: { db: { url: ENV.DATABASE_URL } } });

export const cleanUpDb = async () => {
Expand Down
1,082 changes: 49 additions & 1,033 deletions packages/electric-client/src/generated/client/index.ts

Large diffs are not rendered by default.

50 changes: 11 additions & 39 deletions packages/electric-client/src/generated/client/migrations.ts

Large diffs are not rendered by default.

Loading

0 comments on commit d3a95d8

Please sign in to comment.