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

Supabase realtime in own database - error relation "tenants" does not exist #809

Open
VitorBrangioni opened this issue Mar 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@VitorBrangioni
Copy link

Bug report

  • [ X ] I confirm this is a bug with Supabase, not with my own application.
  • [ X ] I confirm I have searched the Docs, GitHub [Discussions]

Describe the bug

Hello guys,

I was using Supabase realtime in my own database in 2 years ago. So now, I'd like to upgrade my supabase realtime version. I'm trying to update it, but i'm receiving "relation 'tenants' does not exist ". I have my own database, I don't like to change anything there or migrate to a supabase database. How can I fix it? I would like just listen postgres changes...

I'm spending long time trying to figure out it.

Thank you for helping me.

Screen Shot 2024-03-16 at 15 24 02
@VitorBrangioni VitorBrangioni added the bug Something isn't working label Mar 16, 2024
@filipecabaco
Copy link
Contributor

I think it might be related with the move to a multi tenant approach meaning that now you will need to run a migration ( mix ecto.migrate ) and then you will need to run a PUT request:

curl -v -X PUT \
  'http://localhost:4000/api/tenants/<tenant_id>' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer < API_JWT_SECRET > \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {
    "db_host": "localhost",
    "db_port": 6432,
    "db_database": "postgres",
    "ip_version": "v4",
    "require_user": true,
    "upstream_ssl": false,
    "enforce_ssl": false,
    "default_max_clients": 200,
    "default_pool_size": 1,
    "extensions": [],
    "jwt_secret": "secret",
    "users": [
      {
        "db_user": "postgres",
        "db_password": "postgres",
        "mode_type": "transaction",
        "pool_checkout_timeout": 100,
        "pool_size": 1
      }
    ]
  }
}'

Please do change the data according to your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants