Re: [sqlalchemy] Problem with Alembic autogenerate after updating to 1.0.2

2018-11-10 Thread ai . research . ir
Dear Mike, Thank you very much. Your solution worked for me. I have noticed a few minor issues as well: 1. When I try to change the type of a primary key (for example from BigInteger to Integer), if I use auto generate, the corresponding function has this key "existing_nullable=True" but does

Re: [sqlalchemy] Problem with Alembic autogenerate after updating to 1.0.2

2018-11-09 Thread ai . research . ir
I forgot to mention that I'm using all lowercase names for my tables and columns. The primary keys are all "id" BTW I ran the command and got this result: mysql> show variables like 'lower_case_table_names'; ++---+ | Variable_name | Value |

Re: [sqlalchemy] Problem with Alembic autogenerate after updating to 1.0.2

2018-11-09 Thread ai . research . ir
Dear Mike, Thank you very much for the time you put to resolve this issue. Last 2 days, I tried many times to see when I get this error. This is the procedure: 1. I created a new empty database called "Test" 2. I wrote declarative base for 3 tables 3. I used alembic autogenerate to produce

[sqlalchemy] Problem with Alembic autogenerate after updating to 1.0.2

2018-11-08 Thread ai . research . ir
Hi I had a problem with alembic autogenerate after updating to version 1.0.2. I'm running MySQL 8.0.11 and Python 3.7.1 No matter how my base is defined, I always get the same error. I went through the error and found out it comes from function " _correct_for_mysql_bug_88718(self, fkeys,

[sqlalchemy] How to implement a multi-level single table polymorphism using sqlalchemy?

2018-11-07 Thread ai . research . ir
Hi all I have a phone table in MySQL which has morphology based on its two columns, "is_deleted" and "is_active" If "is_deleted" column is 1, then we don't care about "is_active" column. If "is_deleted" column is 0, it means that the phone exists and can be either active or inactive based on