0

I am trying to call a stored procedure saved in the public schema using:

const schema = await knex.raw("call create_schema(?, 'col1', 'col2', 'col3', 'col4', 'col5', 'col6')",
        schema_name);

The procedure is to create a schema for a new tenant in the database.

However, I keep getting this error:

"call create_schema($1, 'col1', 'col2', 'col3', 'col4', 'col5', 'col6') - procedure create_schema(unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist"

Please what could be the problem and how I can solve it.

Fhuad Balogun
  • 47
  • 2
  • 8

1 Answers1

0

So apparently, I needed to use knex.schema.raw(). Also, I used the wrong database name that didn't have the procedure in it.

Fhuad Balogun
  • 47
  • 2
  • 8