eralchemy
eralchemy copied to clipboard
Failure when using on PG with citext extension enabled
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.
- https://www.postgresql.org/docs/current/static/citext.html
Which command do you type?
2018-03-01 22:25 GMT+01:00 Claudio Mignanti [email protected]:
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
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.
- 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 https://github.com/Alexis-benoist/eralchemy/issues/51, or mute the thread https://github.com/notifications/unsubscribe-auth/AEO0p_RbRT2UJZAaPXmP4NIwQpGC1u2pks5taGdNgaJpZM4SZBDe .
The command was simple:
eralchemy -i postgres://db:[email protected]/portal?sslmode=disable -o schema.png
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