feat: add connector list api and config form
Description
What type of PR is this? (check all applicable)
- [ ] 💡 Feature
- [ ] 🐛 Bug Fix
- [ ] 📝 Documentation Update
- [ ] 🎨 Style
- [ ] 🧑💻 Code Refactor
- [ ] 🔥 Performance Improvements
- [ ] ✅ Test
- [ ] 🤖 Build
- [ ] 🔁 CI
- [ ] 📦 Chore (Release)
- [ ] ⏩ Revert
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Steps to QA
Added to documentation?
- [ ] 📜 README.md
- [ ] 🙅 no documentation needed
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
@matteobad is attempting to deploy a commit to the Salgsmaskin Team on Vercel.
A member of the Team first needs to authorize it.
Errors Encountered with drizzle-kit Operations and Runtime Database Table Access
Issue 1: drizzle-kit Database Push Error
When attempting to push database changes using drizzle-kit, the operation fails with a TypeError related to accessing the type property of an undefined object. This error occurs during the schema update process, specifically when handling column operations in the projectx_transaction table.
Error Output:
TypeError: Cannot read properties of undefined (reading 'type')
at /Users/christer/money/money/node_modules/drizzle-kit/bin.cjs:62369:119
Context:
The error appears after attempting to create or rename several columns to additional_data in the projectx_transaction table. The operations include creating a new column and renaming existing columns such as plaid_account_id, check_number, etc., to additional_data.
Attempted Operations:
- Creating
additional_datacolumn - Renaming multiple columns to
additional_data - pnpm run db:push
Issue 2: Runtime Error Accessing projectx_connectors Table
A runtime error occurs when navigating to the Connectors settings in the application UI, indicating an issue with accessing the projectx_connectors table, which is reportedly missing.
Error Output:
Error: target: propwrite.-.primary: vttablet: rpc error: code = NotFound desc = Table 'propwrite.projectx_connectors' doesn't exist (errno 1146) (sqlstate 42S02)
Additional Console Error on Accessing Connectors Page
When attempting to access the Connectors page within the application, the following console output is observed, indicating an error in the tRPC handler related to the missing projectx_connectors table in the database.
Console Output:
www:dev: >> query #1 connectors.listConnectors { input: undefined }
www:dev: Error in tRPC handler (lambda) on path connectors.listConnectors
www:dev: DatabaseError: target: propwrite.-.primary: vttablet: rpc error: code = NotFound desc = Table 'propwrite.projectx_connectors' doesn't exist (errno 1146) (sqlstate 42S02) (CallerID: t2hlc4pokphxefi4cot1): Sql: "select projectx_connectors.id, projectx_connectors.name, projectx_connectors.logo_url, projectx_connectors.status, projectx_connectorConfigs.env, projectx_connectorConfigs.secret from projectx_connectors left join projectx_connectorConfigs on projectx_connectors.id = projectx_connectorConfigs.connector_id", BindVars: {REDACTED}
This error appears to directly relate to the runtime error previously described, reinforcing the issue with the projectx_connectors table's absence in the database.
Discussion:
This additional detail suggests that the problem is not isolated to a specific operation but affects general application functionality, further emphasizing the need for a resolution to ensure the projectx_connectors table exists as expected in the database schema.
Steps to Reproduce:
- Navigate to Settings -> Connectors in the application UI.
- The runtime error is triggered, indicating the absence of the
projectx_connectorstable.
Potential Causes:
- The
drizzle-kiterror may be related to handling schema changes, especially around column operations in the presence ofserialdata types. - The runtime error could be due to a discrepancy between the expected schema in the application and the actual schema present in the database, specifically the absence of the
projectx_connectorstable.
Requested Assistance:
- For Issue 1, guidance on resolving the
TypeErrorduringdrizzle-kitoperations, possibly related to schema change processing. - For Issue 2, steps to ensure the
projectx_connectorstable exists as expected or how to handle its absence without triggering runtime errors.
Thank you for looking into these issues. Any insights or suggestions on resolving these errors would be greatly appreciated.
It is still a draft PR, and the tRPC error will go away once the migrations are completed successfully ;)
Sounds good, maybe just me that is eager to push the product ✨
Sounds good, maybe just me that is eager to push the product ✨
I'm eager too 🦾