Skip to content
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

Make sure existing db code works properly with supabase postgres. #56

Closed
Tracked by #43
amandesai01 opened this issue Aug 6, 2024 · 25 comments
Closed
Tracked by #43

Comments

@amandesai01
Copy link
Member

No description provided.

@harshil15999
Copy link
Contributor

harshil15999 commented Aug 6, 2024

  1. Things to be done here
  1. Please propose your approach here

@darshannere
Copy link

Can I work on this?

@ChaitanyaKharche
Copy link

i can take up the subtask too with @darshannere. if not assigned yet

@harshil15999
Copy link
Contributor

i can take up the subtask too with @darshannere. if not assigned yet

This is a triaging issue where not a lot of code change will be required. You need to verify that the drizzle orm supports supabase as a db.

@funkycadet
Copy link

i can take up the subtask too with @darshannere. if not assigned yet

This is a triaging issue where not a lot of code change will be required. You need to verify that the drizzle orm supports supabase as a db.

@harshil15999 I noticed nothing has been said so far regarding this. I looked into what you mentioned on your last comment, and yes, Drizzle ORM supports Supabase postgres. I made a connection to the sample database I set up with Supabase and it works with the current implementation. All I had to do was update certain environment variables in the env file and I ran the migration script and it worked.

@harshil15999
Copy link
Contributor

harshil15999 commented Aug 21, 2024

@funkycadet can I see the supabase data . Post which we can close this issue

Cc-
@amandesai01

@amandesai01
Copy link
Member Author

@funkycadet Yes. I was aware that it supports. Just list down what additional variables you had to pass and let @harshil15999 verify your database, maybe we can create a test free account, share credentials here and delete the account as soon as we close the issue.

@gloriasingh08
Copy link

Can I take up this issue?

@harshil15999
Copy link
Contributor

Can I take up this issue?

This issue is already in progress by someone else

@funkycadet
Copy link

@funkycadet can I see the supabase data . Post which we can close this issue

Cc- @amandesai01

Oh okay. I didn't submit any data. I was able to run the migrations though. Here's how it looks:
Screenshot from 2024-08-23 13-35-20

@funkycadet
Copy link

@funkycadet Yes. I was aware that it supports. Just list down what additional variables you had to pass and let @harshil15999 verify your database, maybe we can create a test free account, share credentials here and delete the account as soon as we close the issue.

Okay, I just added a DATABASE_URL to my env file and used it directly in the drizzle.config file. It isn't so different from what was already there cause I filled it with the same data as the DATABASE_URL and was still able to run the migrations on the db.

Screenshot from 2024-08-23 13-38-09

Screenshot from 2024-08-23 13-49-51

@amandesai01
Copy link
Member Author

Can you try to create some job postings / hooks, etc?

@funkycadet
Copy link

If you could direct me on how to do that, I'd really appreciate it. I'm more of a backend guy, so quite some stuff looks strange to me in the codebase.

@amandesai01
Copy link
Member Author

I mean using the UI, create those. This is to ensure that inserts, updates and selects work properly.

@funkycadet
Copy link

Here's what I see when I visit the default route and the login route:

Screenshot from 2024-08-24 12-04-34
Screenshot from 2024-08-24 12-05-15

@harshil15999
Copy link
Contributor

harshil15999 commented Aug 24, 2024

I think you have not been logged in correctly.

Did you do this:

Requirements: A PostgreSQL instance up-and-running.

Clone the repo and cd into the folder.

npm i -g yarn # install yarn package manager, if you don't have already.
yarn # install all the dependencies
cp .env.example .env # Create env file and fill the fields. (DO NOT CHANGE PORT)
yarn migration:apply # Create database schema.
yarn dev # Finally, start the dev server.

@amandesai01
Copy link
Member Author

@funkycadet yes that was the issue from my end, fixed it.

@funkycadet
Copy link

I think you have not been logged in correctly.

Did you do this:

Requirements: A PostgreSQL instance up-and-running.

Clone the repo and cd into the folder.

npm i -g yarn # install yarn package manager, if you don't have already. yarn # install all the dependencies cp .env.example .env # Create env file and fill the fields. (DO NOT CHANGE PORT) yarn migration:apply # Create database schema. yarn dev # Finally, start the dev server.

yep, that was the first thing I did before anything else

@funkycadet
Copy link

@funkycadet yes that was the issue from my end, fixed it.

oh okay. i'll sync changes with my fork and check it out

@funkycadet
Copy link

@amandesai01 The pages are still blank and login doesn't work

@amandesai01
Copy link
Member Author

That's weird. Are you running on port 3001? do you see error or blank page? can you post error log if any?

@funkycadet
Copy link

yeah, thats the port i'm running on. Here's the error I'm getting in my terminal:
Screenshot from 2024-08-28 11-02-36

@amandesai01
Copy link
Member Author

Delete cookies and try again.

@funkycadet
Copy link

Did that, but no difference still. Same error on my terminal and this is what the webpage shows now:
Screenshot from 2024-08-28 12-53-05

@amandesai01
Copy link
Member Author

That issue is actually coming from profilecity. Let's ignore that, and conclude that postgres from supabase works well with drizzle. Thanks @funkycadet and @harshil15999 for all the efforts.

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

No branches or pull requests

6 participants