Compare commits
3 Commits
81b866a2f8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3127a07612 | |||
| 545a8d7273 | |||
| cac033588e |
12
drizzle.config.ts
Normal file
12
drizzle.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'dotenv/config';
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
|
||||
export default defineConfig({
|
||||
out: './drizzle',
|
||||
schema: './server/db/',
|
||||
schemaFilter: ['dnd'],
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL!,
|
||||
},
|
||||
});
|
||||
@@ -16,13 +16,17 @@
|
||||
"@nuxtjs/supabase": "2.0.9",
|
||||
"@nuxtjs/tailwindcss": "6.14.0",
|
||||
"@tailwindcss/vite": "^4.3.1",
|
||||
"dotenv": "^17.4.2",
|
||||
"drizzle-orm": "1.0.0-beta.22",
|
||||
"nuxt": "^4.4.8",
|
||||
"pg": "^8.21.0",
|
||||
"tailwindcss": "^4.3.1",
|
||||
"vue": "^3.5.35",
|
||||
"vue-router": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/hugeicons": "^1.2.29",
|
||||
"drizzle-kit": "1.0.0-beta.22",
|
||||
"eslint": "^10.5.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"prettier": "^3.8.4",
|
||||
|
||||
599
pnpm-lock.yaml
generated
599
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
7
server/db/hero.ts
Normal file
7
server/db/hero.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { player } from "./player";
|
||||
import { dndSchema } from "./schema";
|
||||
|
||||
export const hero = dndSchema.table("heros", (t) => ({
|
||||
id: t.uuid().primaryKey(),
|
||||
player_id: t.uuid().notNull().references(() => player.id),
|
||||
}))
|
||||
7
server/db/player.ts
Normal file
7
server/db/player.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { dndSchema } from "./schema";
|
||||
|
||||
export const player = dndSchema.table("players", (t) => ({
|
||||
id: t.uuid().primaryKey(),
|
||||
name: t.varchar().notNull(),
|
||||
created_at: t.timestamp().defaultNow()
|
||||
}))
|
||||
3
server/db/schema.ts
Normal file
3
server/db/schema.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { pgSchema } from "drizzle-orm/pg-core"
|
||||
|
||||
export const dndSchema = pgSchema("dnd")
|
||||
Reference in New Issue
Block a user