<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Binary Orders of Magnitude &#187; DBUpgrade</title>
	<atom:link href="http://www.sergeychernyshev.com/blog/category/dbupgrade/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sergeychernyshev.com/blog</link>
	<description>Sergey Chernyshev's blog about projects and web in general.</description>
	<lastBuildDate>Sun, 11 Dec 2011 19:43:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>DBUpgrade: now you can have multiple schemas in the same DB!</title>
		<link>http://www.sergeychernyshev.com/blog/multiple-schemas-in-the-same-database/</link>
		<comments>http://www.sergeychernyshev.com/blog/multiple-schemas-in-the-same-database/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 23:14:07 +0000</pubDate>
		<dc:creator>Sergey Chernyshev</dc:creator>
				<category><![CDATA[DBUpgrade]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sergeychernyshev.com/blog/?p=1181</guid>
		<description><![CDATA[I was struggling with DBUpgrade in projects with multiple independent components. I had to maintain the schema in main project which was quite crazy considering that projects are independent and have different timelines that had to be in sync. So I changed DBUpgrade to OO model and added namespacing so you can have multiple schema-versioning [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dbupgrade.org/"><img src="http://www.sergeychernyshev.com/blog/wp-content/uploads/2010/03/dbupgrade.png" alt="DBUpgrade" title="DBUpgrade logo" width="128" height="128" style="float: right; border: 0; margin-left: 1em" /></a>I was struggling with DBUpgrade in projects with multiple independent components. I had to maintain the schema in main project which was quite crazy considering that projects are independent and have different timelines that had to be in sync.</p>
<p>So I changed DBUpgrade to OO model and added namespacing so you can have multiple schema-versioning tables in the same database and update them independently from each other.</p>
<p>To identify subproject and have it&#8217;s version to be kept separately, you can supply 3rd parameter when you create <code>DBUpgrade</code> object.</p>
<blockquote><pre>$dbupgrade = new DBUpgrade($db, $versions, <strong>'myproject'</strong>);</pre>
</blockquote>
<p>If you omit this parameter (makes sense for main project) then it will revert to previous behavior and use <code>db_version</code> table for this schema&#8217;s versioning. This way, it&#8217;s backwards compatible and provides easy migration path.</p>
<p>I also renamed a bunch of files so you might want to update your code, but it should be very easy as I provided a boilerplate <code><a href="http://github.com/sergeychernyshev/DBUpgrade/blob/master/dbupgrade.php">dbupgrade.php</a></code> which you can just copy to your folder and move your <a href="http://www.dbupgrade.org/Main_Page#Migrations">migrations</a> and DB connection info over.</p>
<p>If you noticed, I also bundled a simple upgrade client which is already included in a boilerplate so it works for full upgrade (will run all migrations to the latest version):</p>
<blockquote><pre>[user@example myproject]$ <strong>php dbupgrade.php</strong>
Upgrading from v.0 to v.2
Upgraded to v.1
Upgraded to v.2
</pre>
</blockquote>
<p>and single version downgrade (only downgrades to previous version):</p>
<blockquote><pre>[user@example myproject]$ <strong>php dbupgrade.php down</strong>
Downgrading from v.2 to v.1
Downgraded to v.1
</pre>
</blockquote>
<p>in command line mode.</p>
<p>Full upgrade can also be executed through the web by opening very same <code>dbupgrade.php</code> in the browser:</p>
<blockquote><pre>http://www.example.com/<strong>dbupgrade.php</strong></pre>
</blockquote>
<p>I also moved the project to <a href="http://github.com/sergeychernyshev/DBUpgrade">Github hosting</a> to encourage more openness and community so you can now <a href="http://github.com/sergeychernyshev/DBUpgrade">fork it</a> easily!</p>
<p>Github also supports Subversion read-only endpoints so if you&#8217;re using SVN externals to bundle DBUpgrade with your project, you can simply update your trunk URL to:</p>
<blockquote><pre>http://svn.github.com/sergeychernyshev/DBUpgrade.git</pre>
</blockquote>
<p>Feel free to use it as <a href="http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html">Git submodule</a> or <a href="http://svnbook.red-bean.com/en/1.0/ch07s03.html">SVN External</a> within your project and hope you&#8217;ll find it much easier to maintain deployment roll-outs now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sergeychernyshev.com/blog/multiple-schemas-in-the-same-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DBUpgrade got a site, logo and twitter account</title>
		<link>http://www.sergeychernyshev.com/blog/dbupgrade-got-a-site-logo-and-twitter-account/</link>
		<comments>http://www.sergeychernyshev.com/blog/dbupgrade-got-a-site-logo-and-twitter-account/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:10:39 +0000</pubDate>
		<dc:creator>Sergey Chernyshev</dc:creator>
				<category><![CDATA[DBUpgrade]]></category>

		<guid isPermaLink="false">http://www.sergeychernyshev.com/blog/?p=417</guid>
		<description><![CDATA[DBUpgrade project got a new site, logo and @dbupgrade twitter account. DBUpgrade.org is a wiki site so please feel free to help me documenting it, providing your own solutions and describing your use cases. This is not much, but quite enough for a small open source project to survive. Go ahead, subscribe to this blog [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dbupgrade.org/"><img src="http://www.sergeychernyshev.com/blog/wp-content/uploads/2010/03/dbupgrade.png" alt="DBUpgrade" title="DBUpgrade logo" width="128" height="128" style="float: right; border: 0; margin-left: 1em" /></a><br />
DBUpgrade project got a new site, logo and <a href="http://twitter.com/dbupgrade">@dbupgrade</a> twitter account.</p>
<p><a href="http://www.dbupgrade.org/">DBUpgrade.org</a> is a wiki site so please feel free to help me documenting it, providing your own solutions and describing your use cases.</p>
<p>This is not much, but quite enough for a small open source project to survive.</p>
<p>Go ahead, subscribe to this blog and twitter if you&#8217;d like to get updates about the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sergeychernyshev.com/blog/dbupgrade-got-a-site-logo-and-twitter-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

