Skip to content

Add Drizzle ORM integration with Supabase #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

devin-ai-integration[bot]
Copy link

Add Drizzle ORM integration with Supabase

This PR integrates Drizzle ORM with the existing Supabase setup, providing type-safe database operations.

Changes:

  • Added Drizzle ORM and related packages
  • Created a database schema for projects
  • Set up Drizzle client to work with Supabase
  • Added utility functions for common database operations
  • Updated project page to use Drizzle for data fetching
  • Added API routes for project management
  • Updated projects page to check for authentication

Usage:

To use Drizzle in your code:

  1. Import the functions from the db package:

    import { getProjects, createProject } from '@onlook/db';
  2. Use the functions to interact with the database:

    // Get all projects for a user
    const projects = await getProjects(userId);
    
    // Create a new project
    const project = await createProject({
      name: 'New Project',
      description: 'Project description',
      userId: user.id,
      data: { /* project data */ }
    });

Link to Devin run: https://app.devin.ai/sessions/2030515d6324466db69c6e69b64f6103
User: [email protected]

Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Author

Closing due to inactivity for more than 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants