<div dir="ltr"><h1 style="margin:0px 0px 0.5em;padding:0px;border:0px;vertical-align:baseline"><span style="color:rgb(31,78,121);font-family:Calibri,sans-serif;font-size:14.6666669845581px;font-weight:normal;letter-spacing:normal;line-height:normal">Thanks Josh. I run that and it works. Tables were created successfully. Also if I create table, foreign keys and index that also work. Except for table </span><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal">alembic_version. Seems taskflow works well without this table.</span></font><br></h1><div><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal"><br></span></font></div><div><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal">It's wired that my gmail didn't receive ur response and I have to go to the mailing list archive page to find my post and reply.</span></font></div><div><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal"><br></span></font></div><div><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal">Thanks again for your kindly help.</span></font></div><div><font color="#1f4e79" face="Calibri, sans-serif"><span style="font-size:14.6666669845581px;font-weight:normal"><br></span></font></div><h1 style="margin:0px 0px 0.5em;padding:0px;border:0px;font-weight:normal;font-size:24px;font-family:'PT Sans',serif;vertical-align:baseline;color:rgb(38,77,105);line-height:1em;letter-spacing:-0.076em">[openstack-dev] [TaskFlow]Create Tables for SQLAlchemy backend issue</h1><b style="color:rgb(83,83,83);font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px">Joshua Harlow</b><span style="color:rgb(83,83,83);font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px"> </span><a href="mailto:openstack-dev%40lists.openstack.org?Subject=Re%3A%20%5Bopenstack-dev%5D%20%5BTaskFlow%5DCreate%20Tables%20for%20SQLAlchemy%20backend%0A%20issue&In-Reply-To=%3CBLU436-SMTP277D1317D7BA26D2DD960DD8D00%40phx.gbl%3E" title="[openstack-dev] [TaskFlow]Create Tables for SQLAlchemy backend issue" style="margin:0px;padding:0px;border:0px;font-size:12.0012006759644px;font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none;line-height:12.0012006759644px">harlowja at outlook.com </a><br style="color:rgb(83,83,83);font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px"><i style="color:rgb(83,83,83);font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px">Wed May 6 05:37:06 UTC 2015</i><span style="color:rgb(83,83,83);font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px"></span><p style="margin:0px 0px 1.5em;padding:0px;border:0px;font-size:12.0012006759644px;font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(83,83,83);line-height:12.0012006759644px"></p><ul style="margin:0px 1.5em 1.5em 0px;padding:0px 0px 0px 3.333em;border:0px;font-size:12.0012006759644px;font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(83,83,83);line-height:12.0012006759644px"><li style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline">Previous message: <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/063375.html" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[openstack-dev] [TaskFlow]Create Tables for SQLAlchemy backend issue</a></li><li style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline">Next message: <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/063378.html" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[openstack-dev] [Fuel] Swagger documentation</a></li><li style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline"><b>Messages sorted by:</b> <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/date.html#63377" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[ date ]</a> <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/thread.html#63377" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[ thread ]</a> <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/subject.html#63377" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[ subject ]</a> <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-May/author.html#63377" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">[ author ]</a></li></ul><hr style="color:rgb(221,221,221);clear:both;float:none;width:950px;margin:0px 0px 1.45em;border:none;font-family:'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:12.0012006759644px;line-height:12.0012006759644px;height:1px!important;background:rgb(221,221,221)"><pre style="margin-top:1.5em;margin-bottom:1.5em;padding:0px;border:0px;font-size:12.0012006759644px;font-family:'andale mono','lucida console',monospace;vertical-align:baseline;white-space:pre-wrap;font-stretch:normal;line-height:12.0012006759644px;color:rgb(83,83,83)">Good question!

U have to call into the following:

<a href="http://docs.openstack.org/developer/taskflow/persistence.html#taskflow.persistence.base.Connection.upgrade" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">http://docs.openstack.org/developer/taskflow/persistence.html#taskflow.persistence.base.Connection.upgrade</a>

This is getting renamed (hopefully to a more obvious name) in the 
following review: <a href="https://review.openstack.org/#/c/180351/" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">https://review.openstack.org/#/c/180351/</a> (others got 
confused by this one also).

<a href="https://blueprints.launchpad.net/taskflow/+spec/storage-initialize-instead-of-upgrade" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">https://blueprints.launchpad.net/taskflow/+spec/storage-initialize-instead-of-upgrade</a>

Hope that helps,

-Josh

jeffty wrote:
><i> Hi there,
</i>><i>
</i>><i> I’m trying to use mysql to store lobbooks and atom etc.
</i>><i>
</i>><i> Here is the code:
</i>><i>
</i>><i> backend = backends.fetch({
</i>><i>
</i>><i> 'connection': '<a href="mysql://test:test@192.168.1.10/test" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">mysql://test:test@192.168.1.10/test</a>',
</i>><i>
</i>><i> 'user': test,
</i>><i>
</i>><i> 'password': test,
</i>><i>
</i>><i> })
</i>><i>
</i>><i> book, flow_detail = pu.temporary_flow_detail(backend=backend)
</i>><i>
</i>><i> And I got below errors:
</i>><i>
</i>><i> taskflow.exceptions.StorageFailure: Failed saving logbook
</i>><i> 'e34f21c0-72cf-48be-ad96-766befa55ab3'
</i>><i>
</i>><i> ProgrammingError: (ProgrammingError) (1146, "Table 'flow.logbooks'
</i>><i> doesn't exist") 'SELECT logbooks.created_at, logbooks.updated_at,
</i>><i> logbooks.meta, <a href="http://logbooks.name">logbooks.name</a>, logbooks.uuid \nFROM logbooks \nWHERE
</i>><i> logbooks.uuid = %s' ('e34f21c0-72cf-48be-ad96-766befa55ab3',)
</i>><i>
</i>><i> After checked
</i>><i> <a href="http://docs.openstack.org/developer/taskflow/persistence.html" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">http://docs.openstack.org/developer/taskflow/persistence.html</a> , there
</i>><i> are 3 tables to be created.
</i>><i>
</i>><i> So we need to create these tables manually right? Or is there any API
</i>><i> for the tables initiation?
</i>><i>
</i>><i> Thanks.
</i>><i>
</i>><i> __________________________________________________________________________
</i>><i> OpenStack Development Mailing List (not for usage questions)
</i>><i> Unsubscribe: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">OpenStack-dev-request at lists.openstack.org</a>?subject:unsubscribe
</i>><i> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" style="margin:0px;padding:0px;border:0px;font-weight:inherit;font-style:inherit;font-size:12.0012006759644px;font-family:inherit;vertical-align:baseline;color:rgb(188,21,24);text-decoration:none">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></i></pre></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-06 13:14 GMT+08:00 jeffty <span dir="ltr"><<a href="mailto:wantwatering@gmail.com" target="_blank">wantwatering@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="color:#1f4e79">Hi there,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">I’m trying to use mysql to store lobbooks and atom etc.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">Here is the code:<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">backend = backends.fetch({<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">    'connection': 'mysql://<a href="http://test:test@192.168.1.10/test" target="_blank">test:test@192.168.1.10/test</a>',<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">    'user': test,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">    'password': test,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">})<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">book, flow_detail = pu.temporary_flow_detail(backend=backend)<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">And I got below errors:<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">taskflow.exceptions.StorageFailure: Failed saving logbook 'e34f21c0-72cf-48be-ad96-766befa55ab3'<u></u><u></u></p><p class="MsoNormal">  ProgrammingError: (ProgrammingError) (1146, "Table 'flow.logbooks' doesn't exist") 'SELECT logbooks.created_at, logbooks.updated_at, logbooks.meta, <a href="http://logbooks.name" target="_blank">logbooks.name</a>, logbooks.uuid \nFROM logbooks \nWHERE logbooks.uuid = %s' ('e34f21c0-72cf-48be-ad96-766befa55ab3',)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="color:#1f4e79">After checked <a href="http://docs.openstack.org/developer/taskflow/persistence.html" target="_blank">http://docs.openstack.org/developer/taskflow/persistence.html</a> , there are 3 tables to be created.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">So we need to create these tables manually right? Or is there any API for the tables initiation?<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f4e79">Thanks.</span><u></u><u></u></p></div></div></blockquote></div><br></div>