Can't connect to schema with sqlacodegen

872 views Asked by At

I'm trying to generate models using sqlacodegen and as an output I get only tables from public schema. How can I retrive models from all tables and schemas?

sqlacodegen --outfile models.py postgres://user:passw@Host:Port/dbname

1

There are 1 answers

1
Typeset On BEST ANSWER

I know I'm a bit late to the party, but if any else is looking for the answer:

You can append the argument

--schema [your_schema_name] 

on to the end of thsqlacodegen command.