Skip to content

Commit

Permalink
add vote-now command
Browse files Browse the repository at this point in the history
  • Loading branch information
benjick committed Oct 12, 2024
1 parent 9593ead commit ac692f9
Show file tree
Hide file tree
Showing 10 changed files with 655 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { migrate } from "drizzle-orm/postgres-js/migrator";
import postgres from "postgres";

import { env } from "../env";
import * as adminSchema from "./schema/admins";
import * as mediaSchema from "./schema/media";
import * as subscriberSchema from "./schema/subscribers";
import * as votingSchema from "./schema/voting";
Expand All @@ -11,6 +12,7 @@ const client = postgres(env.DATABASE_URL);

export const db = drizzle(client, {
schema: {
...adminSchema,
...mediaSchema,
...subscriberSchema,
...votingSchema,
Expand Down
6 changes: 6 additions & 0 deletions src/db/migrations/0001_quiet_black_queen.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS "admins" (
"discord_user_id" varchar PRIMARY KEY NOT NULL,
"otp" varchar NOT NULL,
"is_admin" boolean DEFAULT false NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
Loading

0 comments on commit ac692f9

Please sign in to comment.