quitelistener
quitelistener
Explore posts from servers
DTDrizzle Team
Created by quitelistener on 10/10/2023 in #help
Pg: Inserting new data with auto increment column
No, I did not include ID field in json data. This was another weird issue from poatgres Aurora. I have table with 25 records, manually uploaded using csv file. For some reason, database was considering 21 as latest available auto id. I tried 4 times to push the data from API and it failed. It finally reached 26 and API call was success. It is working fine now. I have no idea what caused auto increment to fail from db side.
5 replies
DTDrizzle Team
Created by quitelistener on 10/10/2023 in #help
Pg: Inserting new data with auto increment column
Full error msg:
length: 196,
severity: 'ERROR',
code: '23505',
detail: 'Key (id)=(22) already exists.',
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: 'public',
table: 'dashboards',
column: undefined,
dataType: undefined,
constraint: 'dashboards_pkey',
file: 'nbtinsert.c',
line: '668',
routine: '_bt_check_unique'
length: 196,
severity: 'ERROR',
code: '23505',
detail: 'Key (id)=(22) already exists.',
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: 'public',
table: 'dashboards',
column: undefined,
dataType: undefined,
constraint: 'dashboards_pkey',
file: 'nbtinsert.c',
line: '668',
routine: '_bt_check_unique'
5 replies
DTDrizzle Team
Created by laubonghaudoi on 7/11/2023 in #help
Error: self signed certificate in certificate chain
I was able to resolve "self sign" error by providing certificate from aws doc site. 1) downloaded "Certificate bundles for all AWS Regions" (you can download for single region as well).
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html 2) change client to force SSL
ssl: {
rejectUnauthorized: true
}
ssl: {
rejectUnauthorized: true
}
3) run
export NODE_EXTRA_CA_CERTS=/usr/local/etc/ca-certificates/global-bundle.pem
export NODE_EXTRA_CA_CERTS=/usr/local/etc/ca-certificates/global-bundle.pem
You can store pem in any folder and refer it in above statement.
24 replies
DTDrizzle Team
Created by laubonghaudoi on 7/11/2023 in #help
Error: self signed certificate in certificate chain
i think drizzle accepts ssl as tls object. I set to false for testing.
import { pgTable, serial, text, varchar } from "drizzle-orm/pg-core";
import { drizzle } from "drizzle-orm/node-postgres";
import { Client } from "pg";


const client = new Client({
host: "...",
port: 5432,
user: "postgres",
password: ".....",
database: "postgres",
ssl: {
rejectUnauthorized: false,
},
}
);
import { pgTable, serial, text, varchar } from "drizzle-orm/pg-core";
import { drizzle } from "drizzle-orm/node-postgres";
import { Client } from "pg";


const client = new Client({
host: "...",
port: 5432,
user: "postgres",
password: ".....",
database: "postgres",
ssl: {
rejectUnauthorized: false,
},
}
);
24 replies
DTDrizzle Team
Created by aakrit512 on 8/2/2023 in #help
PostgreSQL migration issue in AWS RDS with Drizzle ORM: 'no pg_hba.conf entry for host' error
i am facing same issue. Switched to prisma and my queries are running fine. Drizzle works for migration but queries are failing
4 replies
DTDrizzle Team
Created by Mohammed Anas on 8/10/2023 in #help
Aws Rds with drizzle
is there any example of using RDS with drizzle ?
22 replies