<div dir="ltr">Hi,<div><br></div><div>I have some urgent requests about migration that I'm hoping to get some info on. I'm working on a bug where I need to add two (related) fields to a table for VPNaaS. Here's the objectives related to migration...</div><div><br></div><div>1) create local_v4_ip and lcoal_v6_ip fields in the vpnservice table</div><div>2) for each entry in the vpnservice table:</div><div>    2.1) Get the router.gw_port.fixed_ips list</div><div>    2.2) Determine the version of each fixed IP and store the first of each version (if any) into the appropriate new field.</div><div><br></div><div>I have created a migration file, and I changed the down_revision to be the number of the revision that is the first in the migration chain in the VPN repo.</div><div><br></div><div>Here are the many questions I have...</div><div><br></div><div>When I look in the VPN repo, the HEAD file has the version 'kilo', which is not the current head.</div><div><br></div><div>Shouldn't it the version number of the first file in the migration chain?</div><div>For my commit, I'm assuming I change the HEAD file to use my migration file's version?</div><div><br></div><div>I set HEAD to my migration file, and my file has a down revision of the previous head's revision. If I run 'neutron-db-manage --config-file ../neutron/etc/neutron.conf --config-file ../neutron/etc/neutron/plugins/ml2/ml2_conf.ini check_migration' there is no output so I guess that is OK.</div><div><br></div><div>As I develop my new migration file, is there a way that I can test it (running neutron-db-migration, maybe)?</div><div>Is there a way to run the migration file under the debugger, as well (importing pdb, for example)?</div><div><br></div><div>In the migration, I can add the columns needed. What's the best way to fill out those fields - using raw SQL queries or create a Session object and access the VpnService object's router object?</div><div><br></div><div>I see there is some op.bind() call and then engine.execute(), but could use some help on the best way to extract the needed queries (I need to access the vpnservice's router, and then access the (Port) gw_port relationship, and from that access the (IPAllocation) fixed_ips list).</div><div><br></div><div>Appreciate any advise here on how to debug the migration stuff...</div><div><br></div><div>Paul Michali (pc_m)</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>