Running `drizzle-kit introspect:pg` returns "client password must be a string"
I'm attempting to move from objection.js+knex.js over to Drizzle and I'm running
drizzle-kit introspect:pg
against my database but I'm getting the error:
Here's my drizzle.config.ts
:
If i change connectionString: 'DATABASE_URL',
to connectionString: process.env.DATABASE_URL
, I get the error:
I've also tried to specify all the information in my connection string in the CLI params like drizzle-kit instropect:pg --host=... --user=... --password...
but get the same error.
Any help would be appreciated. Thanks in advance.P
PGT•350d ago
Also worth noting I have a
.env
in the root of my project with:
Update:
hardcoding the user, host, password, database into drizzle.config.ts
seems to have allowed it to run successfully... seems ok because it's just a one-time run and the code won't be checked in, only the migration and schema files but maybe there's a bug in reading the configB
bloberenober•348d ago
Placing
.env
file on its own won't do anything - it's just a file
You need something like dotenv
in the Drizzle config to import values from it as environment variablesP
productdevbook•147d ago
same problem
P
productdevbook•147d ago
postgres://postgres:postgres@localhost:5432/postgres
fixed password add forgot 😄The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More Postsnoob help : transaction not acid```
return await this.drizzle.db.transaction(async (trx) => {
const u = await trx
.seExplicit inferred types```ts
async loginWithGoogle(user: NonNullable<Request['user']>) {
const existingUser = await thiMany-to-Many where in far tableI'm trying to `findMany()` Pokemon(s) by a type name
```
pokemons pokemonsToType Cannot call onConflictDoNothing() or on onConflctDoUpdate() on selectHello guys, this is probably right in front of me, but when I insert at the end of values I cannot fTop-level await is not available in the configured target environment ("chrome87", "edge88", "es2020Hey I just upgraded to the v^0.26.2 and I get the following error:
```
Top-level await is not avaican you Infer relations?im really loving how drizzle plays well with relations, but im wondering is there a way to get typesubRows.map is not a functionI am getting a subRows.map is not a function error when adding the "with" parameter to my relationalPostgres's Serial column type doesn't automatically have a defaultHello, when using postgres's `serial` types, and setting them as primary keys, there is an issue curHow to insert into a table without providing valuesI've got the following schema for users in sqlite, it only contains an id, which is an auto incremenDoent infer type in Callback syntax for queryIm querying the users table like this
`db.query.user.findFirst({
where: (user, { eq }) => {
Bug When Trying To Increment A Fieldthis set the field to 0 instead of increasing by one it used to work in other routes
```
await Maximum call stack exceeded with relation to selfI have the following table
```
export const category = pgTable('categories', {
id: serial('id').