generated from betagouv/template-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,946 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
CREATE TABLE clause_v2 ( | ||
id text NOT NULL PRIMARY KEY | ||
,key text NOT NULL | ||
,value text NOT NULL | ||
,udap_id text | ||
,text text NOT NULL | ||
); | ||
|
||
ALTER TABLE clause_v2 ENABLE ELECTRIC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { db } from "./db/db"; | ||
import { v4 } from "uuid"; | ||
|
||
export const initClauseV2 = async () => { | ||
const nbClausesV2 = await db.clause_v2.count(); | ||
if (nbClausesV2 > 0) return; | ||
|
||
const clauses = await db.clause.findMany(); | ||
|
||
for (const clause of clauses) { | ||
await db.clause_v2.create({ | ||
data: { | ||
id: v4(), | ||
key: clause.key, | ||
text: clause.text, | ||
value: clause.value, | ||
udap_id: clause.udap_id, | ||
}, | ||
}); | ||
} | ||
|
||
return "done"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
526 changes: 423 additions & 103 deletions
526
packages/electric-client/src/generated/client/index.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.