mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
f3789a39c4
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES/NO ## What kind of change does this PR introduce? Bug fix, feature, docs update, ... ## What is the current behavior? Please link any relevant issues here. ## What is the new behavior? Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the Drizzle ORM guide to a Deno-native configuration, replacing the prior import-map example with embedded Deno examples and references to Edge Function samples. * **New Features** * Added an Edge Function example demonstrating Drizzle + PostgreSQL on Deno. * Added a shared database schema example including user and countries table definitions. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45935?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
17 lines
431 B
TypeScript
17 lines
431 B
TypeScript
import { pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core'
|
|
|
|
export const user = pgTable('user', {
|
|
id: serial('id'),
|
|
name: text('name'),
|
|
email: text('email'),
|
|
password: text('password'),
|
|
role: text('role').$type<'admin' | 'customer'>(),
|
|
createdAt: timestamp('created_at'),
|
|
updatedAt: timestamp('updated_at'),
|
|
})
|
|
|
|
export const countries = pgTable('countries', {
|
|
id: serial('id'),
|
|
name: text('name'),
|
|
})
|