<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQLAlchemy-Migrate upgrade scripts in a transaction</title>
	<atom:link href="http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/</link>
	<description>Never knowingly knowing narwhals</description>
	<lastBuildDate>Thu, 22 Jul 2010 18:16:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: dazza</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2536</link>
		<dc:creator>dazza</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2536</guid>
		<description>I should have updated this post, sorry I forgot, this doesn&#039;t work with new versions of SQLAlchemy. I&#039;m not sure why, I&#039;m not currently using SQLAlchemy.</description>
		<content:encoded><![CDATA[<p>I should have updated this post, sorry I forgot, this doesn&#8217;t work with new versions of SQLAlchemy. I&#8217;m not sure why, I&#8217;m not currently using SQLAlchemy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: px</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2535</link>
		<dc:creator>px</dc:creator>
		<pubDate>Tue, 16 Feb 2010 12:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2535</guid>
		<description>Is it working? I see that SQLalchemy-migrate works with autocommit after each operation. But if upgrade fails dwongrade is called. Maybe there have to be some extra configuration of sqlalchemy-migrate that I don&#039;t know.</description>
		<content:encoded><![CDATA[<p>Is it working? I see that SQLalchemy-migrate works with autocommit after each operation. But if upgrade fails dwongrade is called. Maybe there have to be some extra configuration of sqlalchemy-migrate that I don&#8217;t know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dazza</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2319</link>
		<dc:creator>dazza</dc:creator>
		<pubDate>Mon, 28 Jul 2008 12:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2319</guid>
		<description>@sacha: you are correct, by using env to launch python it will pick it up from the environment that the script is running in. It is just to stop a hard coded paths in the script. It&#039;s not actually needed for this particular script since it is being invoked by an already running python interpreter but it&#039;s part of my &#039;new python template&#039; in TextMate.

The encoding is to follow PEP 263 http://www.python.org/dev/peps/pep-0263/ It just makes sure all unicode literals embedded in the code are in UTF8. Everything I do is in UTF8 so it stops non UTF8 string slipping in to the code base and causing interesting and sometimes difficult to track down bugs.</description>
		<content:encoded><![CDATA[<p>@sacha: you are correct, by using env to launch python it will pick it up from the environment that the script is running in. It is just to stop a hard coded paths in the script. It&#8217;s not actually needed for this particular script since it is being invoked by an already running python interpreter but it&#8217;s part of my &#8216;new python template&#8217; in TextMate.</p>
<p>The encoding is to follow PEP 263 <a href="http://www.python.org/dev/peps/pep-0263/" rel="nofollow">http://www.python.org/dev/peps/pep-0263/</a> It just makes sure all unicode literals embedded in the code are in UTF8. Everything I do is in UTF8 so it stops non UTF8 string slipping in to the code base and causing interesting and sometimes difficult to track down bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sacha Varma</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2318</link>
		<dc:creator>Sacha Varma</dc:creator>
		<pubDate>Mon, 28 Jul 2008 11:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2318</guid>
		<description>Python nub questions:

  #!/usr/bin/env python
  # encoding: utf-8

/usr/bin/env? Why not just /usr/bin/python? Is this just a way of not having to explicitly specify the location of python, and have it pick it up from your $PATH?

The encoding line presumably relates to the source code that follows?</description>
		<content:encoded><![CDATA[<p>Python nub questions:</p>
<p>  #!/usr/bin/env python<br />
  # encoding: utf-8</p>
<p>/usr/bin/env? Why not just /usr/bin/python? Is this just a way of not having to explicitly specify the location of python, and have it pick it up from your $PATH?</p>
<p>The encoding line presumably relates to the source code that follows?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dazza</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2317</link>
		<dc:creator>dazza</dc:creator>
		<pubDate>Mon, 28 Jul 2008 10:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2317</guid>
		<description>@Sacha Varma: there is a new command added in the latest version which creates a script from a diff between the database and your &#039;model&#039; make_update_script_for_model.

See the change list here http://code.google.com/p/sqlalchemy-migrate/wiki/ChangesSince0_4_4. I haven&#039;t used this myself but I think it does what you want.</description>
		<content:encoded><![CDATA[<p>@Sacha Varma: there is a new command added in the latest version which creates a script from a diff between the database and your &#8216;model&#8217; make_update_script_for_model.</p>
<p>See the change list here <a href="http://code.google.com/p/sqlalchemy-migrate/wiki/ChangesSince0_4_4" rel="nofollow">http://code.google.com/p/sqlalchemy-migrate/wiki/ChangesSince0_4_4</a>. I haven&#8217;t used this myself but I think it does what you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sacha Varma</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2316</link>
		<dc:creator>Sacha Varma</dc:creator>
		<pubDate>Mon, 28 Jul 2008 10:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2316</guid>
		<description>If you have an old model.py (A) and a new model.py (B), do you have to write the code to upgrade from A to B, or is there a tool that &quot;diffs&quot; the two and spits out the code to do the upgrade/downgrade?</description>
		<content:encoded><![CDATA[<p>If you have an old model.py (A) and a new model.py (B), do you have to write the code to upgrade from A to B, or is there a tool that &#8220;diffs&#8221; the two and spits out the code to do the upgrade/downgrade?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dazza</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2315</link>
		<dc:creator>dazza</dc:creator>
		<pubDate>Mon, 28 Jul 2008 10:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2315</guid>
		<description>@Sacha Varma: your correct, there is no overall upgrade wrapper. Indeed it would be nice if all this was covered by the sqlalchemy-migrate. There has been some chatter on the sqlalchemy-migrate group about this. This is just a small step toward a bigger goal.

To manage code and database changes I version control the migrate repository in svn. So I can be sure that the code I update checkout syncs with upgrade scripts I am about to run.</description>
		<content:encoded><![CDATA[<p>@Sacha Varma: your correct, there is no overall upgrade wrapper. Indeed it would be nice if all this was covered by the sqlalchemy-migrate. There has been some chatter on the sqlalchemy-migrate group about this. This is just a small step toward a bigger goal.</p>
<p>To manage code and database changes I version control the migrate repository in svn. So I can be sure that the code I update checkout syncs with upgrade scripts I am about to run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sacha Varma</title>
		<link>http://www.luckydonkey.com/2008/07/27/sqlalchemy-migrate-upgrade-scripts-in-a-transaction/comment-page-1/#comment-2314</link>
		<dc:creator>Sacha Varma</dc:creator>
		<pubDate>Mon, 28 Jul 2008 09:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.luckydonkey.com/?p=210#comment-2314</guid>
		<description>A couple of questions:

1. I can see that this would work when upgrading the database one revision at a time, but if sqlalchemy-migrate applies multiple updates in sequence, you&#039;d probably want a transaction around the whole sequence? (i.e. I reckon sqlalchemy-migrate should do the rollback management)

2. How do you manage updates that involve not just database changes, but also template &amp; code changes? Is there a &#039;turbogears-migrate&#039; that incorporates sqlalchemy-migrate?</description>
		<content:encoded><![CDATA[<p>A couple of questions:</p>
<p>1. I can see that this would work when upgrading the database one revision at a time, but if sqlalchemy-migrate applies multiple updates in sequence, you&#8217;d probably want a transaction around the whole sequence? (i.e. I reckon sqlalchemy-migrate should do the rollback management)</p>
<p>2. How do you manage updates that involve not just database changes, but also template &amp; code changes? Is there a &#8216;turbogears-migrate&#8217; that incorporates sqlalchemy-migrate?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
