Aws Rds with drizzle
My Schema on Aws Rds is not updating , once i update my schema and generate the schema , i am not getting any errors but still the migrations seems to fail , when i try to insert into that table
BadRequestException: ERROR: relation "fuc" does not exist
Position: 13; SQLState: 42P01
I get this17 Replies
Only the first migration seems to work on AWS RDS Postgres , further changes are not recorded
I'm facing a similar issue, using an older version of drizzle-kit seems to work
previous versions (working)
"drizzle-orm": "^0.23.13",
"drizzle-kit": "^0.17.6",
newest versions(not working)
"drizzle-orm": "^0.28.2",
"drizzle-kit": "^0.19.12",
https://github.com/drizzle-team/drizzle-orm/pull/1071
This pull request seems to fix this issue.
GitHub
[AWS] fix: raw sql query not being mapped properly on RDS (#578) by...
This PR fixes the issue for raw sql queries via the aws-data-api client to not be properly mapped to the correct column names. (#578)
Test cases have been added, but the typing is still a bit off. ...
@fustilio. unfortunately my PR fixes the mapping for raw sql queries. It basically guaranties your return types to be as per the select and not as the aws-sdk would return them
I found that this fixes the problem with peforming migrations using RDS. It's because of the operations performed on the "drizzle"."__drizzle_migrations" table when migrating
Well that's great I suppose, but I cannot get anyone else to review it so we can move it forward 😢
I'll get to it soon!
just for ref I reported a duplicate of this here https://discord.com/channels/1043890932593987624/1142503448160501901/1142503448160501901
I monkeypatched this in my local env touching a line of code (shared how in the linked github issue), very nasty but happy to share if that helps troubleshooting
ps: I see from the above that you’re way ahead ❤️
is there any example of using RDS with drizzle ?
FYI, you should be able to use a regular MySQL/Postgres connector if that’s viable for your setup
(I use mysql2 with a non-aurora RDS instance, though I’m not using drizzle-kit currently)
The issue is if you need to use Aurora Serverless on RDS, then the only option is via the data-api client and via drizzle it has its limitations
U can spin up a fargate instance that's connected to Ur VPC to run the migrate command before deploying your app
https://docs.aws.amazon.com/cli/latest/reference/ecs/run-task.html
This is assuming that your app runs in container though and yes we are using aws RDS postgres serverless v2
Assuming you're not on v1 due to the need for the data-api
Data API has a lot of rough edges with most of the open source projects, I would avoid that if you need to deliver things fast
Tell that to my manager 🤣
fixed on last version, thank you!!
(it unearthed a little bug with AWS RDS data api and deserializing array values, that I sent a little PR for https://github.com/drizzle-team/drizzle-orm/pull/1200 )
GitHub
[Pg] aws data api additional array values by benjamine · Pull Reque...
extending support from just string[] to all type of arrays, including array of arrays.
using AWS RDS data api before this with a query that returns rows with for example an array of long, results i...