To have migration autogenerated we need to pass --autogenerate and --expand/contract: not allowed with argument --autogenerate.
.tox/py27/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf revision -m 'test' --autogenerate
Running revision for neutron ...
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.ddl.postgresql] Detected sequence named 'nsxv_edge_vnic_bindings_vnic_index_seq' as owned by integer column 'nsxv_edge_vnic_bindings(vnic_index)', assuming $ERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'ml2_ucsm_port_profiles_vlan_id_seq' as owned by integer column 'ml2_ucsm_port_profiles(vlan_id)', assuming SERIAL a$d omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'routerrules_id_seq' as owned by integer column 'routerrules(id)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'cisco_ml2_nexus_nve_vni_seq' as owned by integer column 'cisco_ml2_nexus_nve(vni)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'cisco_ml2_nexusport_bindings_binding_id_seq' as owned by integer column 'cisco_ml2_nexusport_bindings(binding_id)', assuming SERIAL and omitting
INFO [alembic.ddl.postgresql] Detected sequence named 'ha_router_vrid_allocations_vr_id_seq' as owned by integer column 'ha_router_vrid_allocations(vr_id)', assuming SERI$L and omitting
INFO [alembic.autogenerate.compare] Detected added column 'ha_router_agent_port_bindings.test'
Generating /opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/newton/expand/ce2aa5e76b04_test.py ... done
OK
So, I think this bug is not valid as if we use autogenerate, it will generate migration in expand or contract branch itself, and --expand/contract are used for creation just empty migrations.
To have migration autogenerated we need to pass --autogenerate and --expand/contract: not allowed with argument --autogenerate.
.tox/py27/ bin/neutron- db-manage --config-file /etc/neutron/ neutron. conf revision -m 'test' --autogenerate runtime. migration] Context impl PostgresqlImpl. runtime. migration] Will assume transactional DDL. ddl.postgresql] Detected sequence named 'nsxv_edge_ vnic_bindings_ vnic_index_ seq' as owned by integer column 'nsxv_edge_ vnic_bindings( vnic_index) ', assuming $ERIAL and omitting ddl.postgresql] Detected sequence named 'ml2_ucsm_ port_profiles_ vlan_id_ seq' as owned by integer column 'ml2_ucsm_ port_profiles( vlan_id) ', assuming SERIAL a$d omitting ddl.postgresql] Detected sequence named 'routerrules_ id_seq' as owned by integer column 'routerrules(id)', assuming SERIAL and omitting ddl.postgresql] Detected sequence named 'cisco_ ml2_nexus_ nve_vni_ seq' as owned by integer column 'cisco_ ml2_nexus_ nve(vni) ', assuming SERIAL and omitting ddl.postgresql] Detected sequence named 'cisco_ ml2_nexusport_ bindings_ binding_ id_seq' as owned by integer column 'cisco_ ml2_nexusport_ bindings( binding_ id)', assuming SERIAL and omitting ddl.postgresql] Detected sequence named 'ha_router_ vrid_allocation s_vr_id_ seq' as owned by integer column 'ha_router_ vrid_allocation s(vr_id) ', assuming SERI$L and omitting autogenerate. compare] Detected added column 'ha_router_ agent_port_ bindings. test' neutron/ neutron/ db/migration/ alembic_ migrations/ versions/ newton/ expand/ ce2aa5e76b04_ test.py ... done
Running revision for neutron ...
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
INFO [alembic.
Generating /opt/stack/
OK
So, I think this bug is not valid as if we use autogenerate, it will generate migration in expand or contract branch itself, and --expand/contract are used for creation just empty migrations.