Failure when using on PG with citext extension enabled
claudyus opened this issue · comments
Claudio Mignanti commented
I try to make a DB diagram of a postgresql database using eralchemy version 1.2.7 and I get the following error:
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'email'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'first_name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'last_name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'account_number'
(attype, name))
Traceback (most recent call last):
File "/home/cmignanti/.envs/labjack/bin/eralchemy", line 11, in <module>
sys.exit(cli())
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 38, in cli
schema=args.s
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 231, in render_er
tables, relationships = all_to_intermediary(input, schema=schema)
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 152, in all_to_intermediary
raise ValueError(msg)
ValueError: Cannot process filename_or_input str
I believe this is related to the usage of citext extension in on db table. You can find more info about citext here [1] but I believe that for this project those can be consider text fields.
Alexis Benoist commented
Which command do you type?
2018-03-01 22:25 GMT+01:00 Claudio Mignanti <notifications@github.com>:
… I try to make a DB diagram of a postgresql database using eralchemy
version 1.2.7 and I get the following error:
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'email'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'first_name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'last_name'
(attype, name))
/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py:2650: SAWarning: Did not recognize type 'citext' of column 'account_number'
(attype, name))
Traceback (most recent call last):
File "/home/cmignanti/.envs/labjack/bin/eralchemy", line 11, in <module>
sys.exit(cli())
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 38, in cli
schema=args.s
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 231, in render_er
tables, relationships = all_to_intermediary(input, schema=schema)
File "/home/cmignanti/.envs/labjack/local/lib/python2.7/site-packages/eralchemy/main.py", line 152, in all_to_intermediary
raise ValueError(msg)
ValueError: Cannot process filename_or_input str
I believe this is related to the usage of citext extension in on db table.
You can find more info about citext here [1] but I believe that for this
project those can be consider text fields.
1. https://www.postgresql.org/docs/current/static/citext.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AEO0p_RbRT2UJZAaPXmP4NIwQpGC1u2pks5taGdNgaJpZM4SZBDe>
.
Claudio Mignanti commented
The command was simple:
eralchemy -i postgres://db:dbpassword@172.17.0.1/portal?sslmode=disable -o schema.png
Matt Ulmer commented
I too see a similar issue using citext
.
/lib/python3.9/site-packages/eralchemy/sqla.py:84: SAWarning: Did not recognize type 'citext' of column 'name'
Base.prepare(engine, reflect=True, name_for_scalar_relationship=name_for_scalar_relationship)
Is there a way around this?
ERAlchemy: 1.2.10
Python: 3.9.2