-
Notifications
You must be signed in to change notification settings - Fork 0
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
rgarant
committed
Nov 17, 2023
1 parent
fa204a1
commit b239406
Showing
24 changed files
with
10,533 additions
and
10,118 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
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
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 @@ | ||
import type { Config } from 'drizzle-kit' | ||
|
||
export default { | ||
schema: './src/server/db/schema/index.ts', | ||
out: './drizzle', | ||
driver: 'pg', | ||
dbCredentials: { | ||
connectionString: process.env.POSTGRES_URL + '?sslmode=require', | ||
}, | ||
} satisfies Config |
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,15 @@ | ||
DO $$ BEGIN | ||
CREATE TYPE "status" AS ENUM('success', 'failed', 'running', 'not ran', 'error'); | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "tests" ( | ||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, | ||
"description" text, | ||
"agent_id" uuid DEFAULT gen_random_uuid() NOT NULL, | ||
"dest_ip" varchar(15) NOT NULL, | ||
"should_fail" boolean NOT NULL, | ||
"status" "status" NOT NULL, | ||
"created_at" timestamp DEFAULT now() NOT NULL | ||
); |
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,81 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "pg", | ||
"id": "ef28e0c3-509a-4464-8593-4c19ca4ce475", | ||
"prevId": "00000000-0000-0000-0000-000000000000", | ||
"tables": { | ||
"tests": { | ||
"name": "tests", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "uuid", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"default": "gen_random_uuid()" | ||
}, | ||
"description": { | ||
"name": "description", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"agent_id": { | ||
"name": "agent_id", | ||
"type": "uuid", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "gen_random_uuid()" | ||
}, | ||
"dest_ip": { | ||
"name": "dest_ip", | ||
"type": "varchar(15)", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"should_fail": { | ||
"name": "should_fail", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"status": { | ||
"name": "status", | ||
"type": "status", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "now()" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"enums": { | ||
"status": { | ||
"name": "status", | ||
"values": { | ||
"success": "success", | ||
"failed": "failed", | ||
"running": "running", | ||
"not ran": "not ran", | ||
"error": "error" | ||
} | ||
} | ||
}, | ||
"schemas": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "pg", | ||
"entries": [ | ||
{ | ||
"idx": 0, | ||
"version": "5", | ||
"when": 1700069038118, | ||
"tag": "0000_open_captain_midlands", | ||
"breakpoints": true | ||
} | ||
] | ||
} |
Oops, something went wrong.