<div dir="ltr"><div>Hello Balazs:</div><div><br></div><div>Sorry for the late reply, I was on PTO.</div><div><br></div><div>If I'm not wrong, now port['binding:profile']['allocation'] is a UUID and you need it to be a list of UUIDs. Am I correct?</div><div><br></div><div>To make this change in the DB you should use the Alembic migrations, as you said. That should ensure all registers are translated. We should also include a sanity check to ensure the DB migration was done correctly.</div><div><br></div><div>Is that what you needed? Don't hesitate to ping me in IRC if needed.<br></div><div><br></div><div>Regards.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 10, 2021 at 6:06 PM Balazs Gibizer <balazs.gibizer@est.tech> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Neutrinos!<br>
<br>
We found a technical challenge during implementing the <br>
port-resource-request-groups API extension[1]. That extension changes <br>
the format of the port.resoruce_request as well as the format of theĀ  <br>
port.binding:profile.allocation. The former is a calculated field on <br>
the port so that is easy. However the bindig:profile is persisted in <br>
the database so data migration is needed. What is the canonical way to <br>
do such DB data translation in Neutron? Can we translate the data in <br>
place during alembic migration? Or should we do some kind of online <br>
data migration when the data is translated by neutron when it is read <br>
from the db?<br>
<br>
cheers,<br>
gibi<br>
<br>
[1] <a href="https://review.opendev.org/c/openstack/neutron/+/805637/5" rel="noreferrer" target="_blank">https://review.opendev.org/c/openstack/neutron/+/805637/5</a><br>
<br>
<br>
<br>
</blockquote></div>