<div dir="ltr">Do you have the lasted code of Neutron? Change [1] that allows this was merged on the 22d of October.<div><br></div><div>[1] - <a href="https://github.com/openstack/neutron/commit/9d069c48aed3a087c5c51366c8e70b29f339e794">https://github.com/openstack/neutron/commit/9d069c48aed3a087c5c51366c8e70b29f339e794</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 2:10 PM, Zhi Chang <span dir="ltr"><<a href="mailto:changzhi@unitedstack.com" target="_blank">changzhi@unitedstack.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Thanks for your reply.</div><div> There is an error when I run migration cmd:</div><div><br></div><div><div>stack@devstack:~/neutron/neutron/db/migration$ neutron-db-manage revision -m 'desc' --contract</div><div>usage: neutron-db-manage [-h] [--config-dir DIR] [--config-file PATH]</div><div> [--core_plugin CORE_PLUGIN] [--nosplit_branches]</div><div> [--service SERVICE] [--split_branches]</div><div> [--subproject SUBPROJECT] [--version]</div><div> [--database-connection DATABASE_CONNECTION]</div><div> [--database-engine DATABASE_ENGINE]</div><div> {current,history,branches,check_migration,upgrade,downgrade,stamp,revision}</div><div> ...</div><div>neutron-db-manage: error: unrecognized arguments: --contract</div></div><div><u></u><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000"><div style="FONT-SIZE:12px;FONT-FAMILY:Arial Narrow;padding:2px 0 2px 0">------------------ Original ------------------</div><div style="FONT-SIZE:12px;background:#efefef;padding:8px"><div><b>From: </b> "Anna Kamyshnikova"<<a href="mailto:akamyshnikova@mirantis.com" target="_blank">akamyshnikova@mirantis.com</a>>;</div><div><b>Date: </b> Tue, Nov 3, 2015 07:03 PM</div><div><b>To: </b> "OpenStack Development Mailing List (not for usage questions)"<<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>>; </div><div></div><div><b>Subject: </b> Re: [openstack-dev] [Neutron][db][migration] Neutron db migrationby python scripts</div></div><div><div class="h5"><div> </div><div dir="ltr">You can create new migration using "neutron-db-manage revision -m 'desc' --expand/--contract" depends in what changes do you want to do in migration expand - add something, contract - delete or modify.<div> More information - <a href="http://docs.openstack.org/developer/neutron/devref/alembic_migrations.html" target="_blank">http://docs.openstack.org/developer/neutron/devref/alembic_migrations.html</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 1:52 PM, Zhi Chang <span dir="ltr"><<a href="mailto:changzhi@unitedstack.com" target="_blank">changzhi@unitedstack.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, all</div><div> Now, I should make some <span style="color:rgb(62,67,73);font-family:Arial,sans-serif;font-size:14.4px;line-height:21.6px">database model definitions</span><span style="line-height:1.5"> if I want to upgrade db. And a database migration script will generated when I run "</span><span style="color:rgb(85,85,85);font-size:1.1em;line-height:1.2em;white-space:pre-wrap">neutron-db-manage revision -m "description of revision" --autogenerate</span><span style="line-height:1.5">". The database will upgraded when run "neutron-db-manage upgrade head". </span></div><div><span style="line-height:1.5"> I want to upgrade db and I plan to write db migration scripts manually instead of change database model definitions. Is there some ways to realize it?</span></div><div><span style="line-height:1.5"> Does anyone have some good ideas?</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Thanks</span></div><span><font color="#888888"><div><span style="line-height:1.5">Zhi Chang</span></div><div><u></u><u></u></div></font></span><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Regards,<div>Ann Kamyshnikova</div><div>Mirantis, Inc</div></div></div>
</div>
</div></div></div><u></u></div><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<div>Ann Kamyshnikova</div><div>Mirantis, Inc</div></div></div>
</div>