GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wip: gateway · klimkin/opencode@183e091

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • cloud
    • core
      • drizzle.config.ts
      • migrations
        • 0000_amused_mojo.sql
        • 0001_thankful_chat.sql
        • 0002_stale_jackal.sql
        • 0003_tranquil_spencer_smythe.sql
        • meta
          • 0000_snapshot.json
          • 0001_snapshot.json
          • 0002_snapshot.json
          • 0003_snapshot.json
          • _journal.json
      • package.json
      • src
        • account.ts
        • actor.ts
        • billing.ts
        • context.ts
        • drizzle
          • index.ts
          • types.ts
        • identifier.ts
        • schema
          • account.sql.ts
          • billing.sql.ts
          • key.sql.ts
          • user.sql.ts
          • workspace.sql.ts
        • util
          • fn.ts
          • log.ts
          • price.ts
        • workspace.ts
      • sst-env.d.ts
      • tsconfig.json
    • function
      • package.json
      • src
        • auth.ts
        • gateway.ts
      • sst-env.d.ts
      • tsconfig.json
    • web
      • .gitignore
      • index.html
      • npm-debug.log
      • package.json
      • public
        • favicon-dark.svg
        • favicon.ico
        • favicon.svg
        • social-share.png
      • scripts
        • render.mjs
      • src
        • app.tsx
        • assets
          • screenshot.png
        • components
          • context-account.tsx
          • context-openauth.tsx
          • context-theme.tsx
        • entry-client.tsx
        • entry-server.tsx
        • pages
          • [workspace].tsx
          • [workspace]
            • billing.module.css
            • billing.tsx
            • components
              • system.txt
              • tool.ts
            • index.module.css
            • index.tsx
            • keys.module.css
            • keys.tsx
          • components
            • context-api.tsx
            • context-workspace.tsx
            • layout.module.css
            • layout.tsx
          • index.tsx
          • lander.module.css
          • test
            • design.module.css
            • design.tsx
        • sst-env.d.ts
        • ui
          • button.tsx
          • context-dialog.tsx
          • dialog-select.module.css
          • dialog-select.tsx
          • dialog-string.tsx
          • dialog.tsx
          • style
            • component
              • button.css
              • dialog.css
              • input.css
              • label.css
              • title-bar.css
            • index.css
            • token
              • animation.css
              • color.css
              • font.css
              • reset.css
              • space.css
          • svg
            • icons.tsx
            • index.tsx
        • util
          • context.tsx
      • sst-env.d.ts
      • tsconfig.json
      • vite.config.ts
  • infra
    • app.ts
    • cloud.ts
    • stage.ts
  • opencode.json
  • package.json
  • packages
    • function
      • package.json
      • sst-env.d.ts
    • opencode
      • package.json
  • sst-env.d.ts
  • sst.config.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cloud/core/drizzle.config.ts‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig } from "drizzle-kit"
2+
import { Resource } from "sst"
3+
4+
export default defineConfig({
5+
out: "./migrations/",
6+
strict: true,
7+
schema: ["./src/**/*.sql.ts"],
8+
verbose: true,
9+
dialect: "postgresql",
10+
dbCredentials: {
11+
database: Resource.Database.database,
12+
host: Resource.Database.host,
13+
user: Resource.Database.username,
14+
password: Resource.Database.password,
15+
port: Resource.Database.port,
16+
ssl: {
17+
rejectUnauthorized: false,
18+
},
19+
},
20+
})
Collapse file

‎cloud/core/migrations/0000_amused_mojo.sql‎

Copy file name to clipboard
+66Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
CREATE TABLE "billing" (
2+
"id" varchar(30) NOT NULL,
3+
"workspace_id" varchar(30) NOT NULL,
4+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
5+
"time_deleted" timestamp with time zone,
6+
"customer_id" varchar(255),
7+
"payment_method_id" varchar(255),
8+
"payment_method_last4" varchar(4),
9+
"balance" bigint NOT NULL,
10+
"reload" boolean,
11+
CONSTRAINT "billing_workspace_id_id_pk" PRIMARY KEY("workspace_id","id")
12+
);
13+
--> statement-breakpoint
14+
CREATE TABLE "payment" (
15+
"id" varchar(30) NOT NULL,
16+
"workspace_id" varchar(30) NOT NULL,
17+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
18+
"time_deleted" timestamp with time zone,
19+
"customer_id" varchar(255),
20+
"payment_id" varchar(255),
21+
"amount" bigint NOT NULL,
22+
CONSTRAINT "payment_workspace_id_id_pk" PRIMARY KEY("workspace_id","id")
23+
);
24+
--> statement-breakpoint
25+
CREATE TABLE "usage" (
26+
"id" varchar(30) NOT NULL,
27+
"workspace_id" varchar(30) NOT NULL,
28+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
29+
"time_deleted" timestamp with time zone,
30+
"request_id" varchar(255),
31+
"model" varchar(255) NOT NULL,
32+
"input_tokens" integer NOT NULL,
33+
"output_tokens" integer NOT NULL,
34+
"reasoning_tokens" integer,
35+
"cache_read_tokens" integer,
36+
"cache_write_tokens" integer,
37+
"cost" bigint NOT NULL,
38+
CONSTRAINT "usage_workspace_id_id_pk" PRIMARY KEY("workspace_id","id")
39+
);
40+
--> statement-breakpoint
41+
CREATE TABLE "user" (
42+
"id" varchar(30) NOT NULL,
43+
"workspace_id" varchar(30) NOT NULL,
44+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
45+
"time_deleted" timestamp with time zone,
46+
"email" text NOT NULL,
47+
"name" varchar(255) NOT NULL,
48+
"time_seen" timestamp with time zone,
49+
"color" integer,
50+
CONSTRAINT "user_workspace_id_id_pk" PRIMARY KEY("workspace_id","id")
51+
);
52+
--> statement-breakpoint
53+
CREATE TABLE "workspace" (
54+
"id" varchar(30) PRIMARY KEY NOT NULL,
55+
"slug" varchar(255),
56+
"name" varchar(255),
57+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
58+
"time_deleted" timestamp with time zone
59+
);
60+
--> statement-breakpoint
61+
ALTER TABLE "billing" ADD CONSTRAINT "billing_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
62+
ALTER TABLE "payment" ADD CONSTRAINT "payment_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
63+
ALTER TABLE "usage" ADD CONSTRAINT "usage_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
64+
ALTER TABLE "user" ADD CONSTRAINT "user_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
65+
CREATE UNIQUE INDEX "user_email" ON "user" USING btree ("workspace_id","email");--> statement-breakpoint
66+
CREATE UNIQUE INDEX "slug" ON "workspace" USING btree ("slug");
Collapse file

‎cloud/core/migrations/0001_thankful_chat.sql‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE TABLE "account" (
2+
"id" varchar(30) NOT NULL,
3+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
4+
"time_deleted" timestamp with time zone,
5+
"email" varchar(255) NOT NULL
6+
);
7+
--> statement-breakpoint
8+
CREATE UNIQUE INDEX "email" ON "account" USING btree ("email");
Collapse file

‎cloud/core/migrations/0002_stale_jackal.sql‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CREATE TABLE "key" (
2+
"id" varchar(30) NOT NULL,
3+
"workspace_id" varchar(30) NOT NULL,
4+
"time_created" timestamp with time zone DEFAULT now() NOT NULL,
5+
"time_deleted" timestamp with time zone,
6+
"user_id" text NOT NULL,
7+
"name" varchar(255) NOT NULL,
8+
"key" varchar(255) NOT NULL,
9+
"time_used" timestamp with time zone,
10+
CONSTRAINT "key_workspace_id_id_pk" PRIMARY KEY("workspace_id","id")
11+
);
12+
--> statement-breakpoint
13+
ALTER TABLE "key" ADD CONSTRAINT "key_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
14+
CREATE UNIQUE INDEX "global_key" ON "key" USING btree ("key");
Collapse file

‎cloud/core/migrations/0003_tranquil_spencer_smythe.sql‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "usage" DROP COLUMN "request_id";

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.