Skip to content

Commit

Permalink
fix drizzle example (#1070)
Browse files Browse the repository at this point in the history
### Description

<!--
✍️ Write a short summary of your work. Screenshots and videos are
welcome!
-->

### Demo URL

<!--
Provide a URL to a live deployment where we can test your PR. If a demo
isn't possible feel free to omit this section.
-->

### Type of Change

- [ ] New Example
- [ ] Example updates (Bug fixes, new features, etc.)
- [ ] Other (changes to the codebase, but not to examples)

### New Example Checklist

- [ ] 🛫 `npm run new-example` was used to create the example
- [ ] 📚 The template wasn't used but I carefuly read the [Adding a new
example](https://github.com/vercel/examples#adding-a-new-example) steps
and implemented them in the example
- [ ] 📱 Is it responsive? Are mobile and tablets considered?
  • Loading branch information
correttojs authored Feb 10, 2025
1 parent 9c755fe commit 2a4c01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/postgres-drizzle/lib/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ const newUsers: NewUser[] = [

export async function seed() {
// Create table with raw SQL
const createTable = await sql.query(`
const createTable = await sql`
CREATE TABLE IF NOT EXISTS profiles (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
image VARCHAR(255),
"createdAt" TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
`)
`
console.log(`Created "profiles" table`)

const insertedUsers: User[] = await db
Expand Down

0 comments on commit 2a4c01a

Please sign in to comment.