Add featuredAdventures table and related code
This commit is contained in:
8
src/lib/db/db.server.ts
Normal file
8
src/lib/db/db.server.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
const { DATABASE_URL } = process.env;
|
||||
|
||||
const client = postgres(DATABASE_URL)
|
||||
export const db = drizzle(client, {});
|
||||
9
src/lib/db/schema.ts
Normal file
9
src/lib/db/schema.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { pgTable,serial,text } from "drizzle-orm/pg-core";
|
||||
|
||||
export const featuredAdventures = pgTable("featuredAdventures",{
|
||||
id:serial("id").primaryKey(),
|
||||
name:text("name").notNull(),
|
||||
location:text("location"),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user