I'm trying to introspect an existing psql database...
# orm-help
a
I'm trying to introspect an existing psql database. Prisma is currently exclaiming that
Error: The provided database doesn't contain any tables. Please either provide another database or choose "No" for "Does your database contain existing data?"
. However, when I do
psql -h localhost -p 5430 -U <my_user> -p <my_password
and then
\dt
I can see lots of tables in my schema. Does it matter that the database in question has a few triggers and also is a bitemporal database?
n
In which schema do these tables live?
a
they live in a schema called
myschema
meh I can just give you the real name.
Copy code
List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 postgres  | postgres | UTF8     | en_US.utf8  | en_US.utf8  |
 template0 | postgres | UTF8     | en_US.utf8  | en_US.utf8  | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.utf8  | en_US.utf8  | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 tff       | dba      | UTF8     | nb_NO.UTF-8 | nb_NO.UTF-8 |
n
in the
prisma init
wizard, are you passing in the
myschema
when being asked for the schema?
a
yep
or
tff
in this case
n
we are fixing this soon 🙂
fast parrot 1
a
Yay!
d
You can also try the
prisma introspect
command to try and generate an introspected datamodel. If that also does not work, then the current workaround would be to rename your scheam to
public
👌 1