Skip to content

Conversation

@wcf000
Copy link
Contributor

@wcf000 wcf000 commented Oct 8, 2025

This pull request introduces improvements to Supabase database access and administration. The main changes add an is_admin parameter to database service methods, allowing flexible operations to use the service role key when needed. Additionally, a helper method for table access is added to the client, and environment variable handling for Supabase keys is clarified.

Database service enhancements:

  • Added an is_admin parameter to the fetch_data, insert_data, update_data, upsert_data, and delete_data methods in SupabaseDatabaseService (by default set to be false) to enable use of the service role key if needed from the server code for admin-level operations. [1] [2] [3] [4] [5]

  • Updated the logic in init.py to ensure admin operations use the correct credentials.

Client compatibility:

  • Added a table method to the SupabaseClient class in client.py to delegate table access to the raw client, improving compatibility with existing code that expects this method.

Code organization:

  • Minor cleanup: removed duplicate import of SupabaseService in database.py.

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.

1 participant