Table not set for removed columns passed to include_object #200
Comments
Michael Bayer (@zzzeek) wrote: can you confirm what I'm seeing is that in this case the "reflected" object is None, right? that's not right, "reflected" should be the Column we got from the database and it should have the table. Can you try this patch please:
|
Changes by Michael Bayer (@zzzeek):
|
Janne Vanhala (@jpvanhal) wrote: In my case "reflected" is True and "compare_to" is None. After your patch, "reflected" is still True and "compare_to" is the column from the database and it has the table. |
Michael Bayer (@zzzeek) wrote:
→ bc6971a |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: OK so fix is different, the original way you're trying to use it is correct. the "reflected" flag is True, meaning the object you're getting is supposed to be the actual reflected object. I think at some point that "rem_col" was there to recreate a Column object that might not have been present but now it's not needed. |
Migrated issue, originally created by Janne Vanhala (@jpvanhal)
I would like some columns, which are not in the model, not to be removed from the database when I run autogenerate. I tried using
include_object
function like this:However, this fails because
object.table
isNone
for removed columns. Thus there is no way to know what table removed columns belong to.The text was updated successfully, but these errors were encountered: