-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 Adapter Updates #3221
Supabase Adapter Updates #3221
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
got this error:
|
I'm still debugging that... You can try for now I think this tableName is query parameters not table name. Messages is a collum not table... try updating the getMemories with this: async getMemories(params: { ... And also update next : async getMemoriesByRoomIds(params: { |
The public.messages thing is also an issue for me. It seems it's coming from the runtime ctor Anyway after making the above change I also run in to some issues with the rpc's. Specifically Error: Could not find the function public.get_goals(only_in_progress, query_roomId, row_count) in the schema cache. The schema.sql doesn't set up any rpc's, should these exist somewhere? |
You can disregard my comment above about the rpc's. I found the latest version of the schema. What's weird is even with the convert_timestamp triggers set up correctly I am still getting the error from the adapter.
|
@brianpricesmith use new PR in plugins repo. If issues let me know. |
Works great with the latest. That code isn't published in npm yet, so I copied the dist/index. I'll watch for the next publish. Thanks, cheers. LMK if you want help contributing to this repo. |
Relates to
#1389
#3160
Risks
Low – This PR primarily updates the schema and seed files with minimal code changes.
Background
This PR addresses issues with the Supabase adapter by updating the schema and seed files. The previous implementation did not correctly create rooms and memories, leading to inconsistencies in data persistence.
What does this PR do?
What kind of change is this?
Bug fixes (non-breaking change which fixes an issue)
The Supabase adapter was not correctly creating rooms and memories due to outdated or incorrect schema definitions. This update ensures the expected behavior when interacting with the database.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
-Add the following environment variables to your .env file:
-Start Eliza.
-Verify that rooms and memories are correctly created in the Supabase dashboard.
Where should a reviewer start?
packages/adapter-supabase/src/index.ts (Line 402)
packages/adapter-supabase/schema.sql
packages/adapter-supabase/seed.sql
Detailed testing steps
Before
at SupabaseDatabaseAdapter.createMemory
Screenshots