<div dir="ltr">Thank you! I managed to do it following your tip and the guide you sent.<div class="gmail_extra"><br><div class="gmail_quote">2015-01-22 10:54 GMT-02:00 Jakub Libosvar <span dir="ltr"><<a href="mailto:libosvar@redhat.com" target="_blank">libosvar@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 01/22/2015 01:00 PM, Ettore zugliani wrote:<br>
> I am implementing the precommit part of a mechanism driver (ml2) right<br>
> now i'm having problems with sqlalchemy.<br>
> I made the class that uses the tables, but when the precommit is called<br>
> an error pops up telling that the tables don't exists.<br>
> To create the tables should i use a create all on initialize? or is<br>
> there a proper way of doing it?<br>
</div></div>Hi Ettore,<br>
<br>
you need to make a migration script for your class. More info can be<br>
found here: <a href="https://wiki.openstack.org/wiki/Neutron/DatabaseMigration" target="_blank">https://wiki.openstack.org/wiki/Neutron/DatabaseMigration</a><br>
<br>
After autogenerating you can fine-tune it. It's gonna be placed at<br>
neutron/db/migration/alembic_migrations/versions/<br>
<br>
Kuba<br>
<br>
><br>
><br>
> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div></div>