Describe the bug
If column has check like 'CHECK(COL IN (1,2))' sql in: sqlalchemy_firebird/base.py line: 1207 cut first letter from column name and in result expresion looks like 'OL IN (1,2)' instead of 'COL IN (1,2)'
I change mentioned line for my own to:
TRIM(SUBSTRING(tr.rdb$trigger_source
FROM position('(' in tr.rdb$trigger_source) + 1
FOR (CHAR_LENGTH(tr.rdb$trigger_source) - position(')' in reverse(tr.rdb$trigger_source)) + 1)
- (position('(' in tr.rdb$trigger_source) + 1))) AS sqltext
To Reproduce
Steps to reproduce the behavior:
- Create new table with chek on one column
- Look on create statement of table after sqalchemy.metadata.reflect
Expected behavior
Proper expression parse.
Additional context
Add any other context about the problem here.
Describe the bug
If column has check like 'CHECK(COL IN (1,2))' sql in: sqlalchemy_firebird/base.py line: 1207 cut first letter from column name and in result expresion looks like 'OL IN (1,2)' instead of 'COL IN (1,2)'
I change mentioned line for my own to:
TRIM(SUBSTRING(tr.rdb$trigger_source
FROM position('(' in tr.rdb$trigger_source) + 1
FOR (CHAR_LENGTH(tr.rdb$trigger_source) - position(')' in reverse(tr.rdb$trigger_source)) + 1)
- (position('(' in tr.rdb$trigger_source) + 1))) AS sqltext
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Proper expression parse.
Additional context
Add any other context about the problem here.