<?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>Tommy&#039;s Blog &#187; Database</title>
	<atom:link href="http://twwilliams.com/blog/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://twwilliams.com/blog</link>
	<description>Discovering and learning</description>
	<lastBuildDate>Wed, 31 Dec 2008 17:06:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing problems with keywords in imported Lightroom 2 catalog</title>
		<link>http://twwilliams.com/blog/2008/08/29/fixing-problems-with-keywords-in-imported-lightroom-2-catalog/</link>
		<comments>http://twwilliams.com/blog/2008/08/29/fixing-problems-with-keywords-in-imported-lightroom-2-catalog/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 02:15:56 +0000</pubDate>
		<dc:creator>Tommy Williams</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Digital Darkroom]]></category>

		<guid isPermaLink="false">http://twwilliams.com/blog/2008/08/29/fixing-problems-with-keywords-in-imported-lightroom-2-catalog/</guid>
		<description><![CDATA[After I imported my Lightroom 1 catalog into Lightroom 2, none of the Keyword Tag Options were set.

I started going through the keywords one-by-one and checking the settings (I only had a handful of keywords related to workflow that I didn&#8217;t export) but I quickly realized that I would never get through this with over [...]]]></description>
			<content:encoded><![CDATA[<p>After I imported my Lightroom 1 catalog into <a title="Adobe - Photoshop Lightroom 2" href="http://www.adobe.com/ap/products/photoshoplightroom/">Lightroom 2</a>, none of the Keyword Tag Options were set.</p>
<p><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Section of Edit Keyword dialog showing the three checkmarks are not checked" border="0" alt="Section of Edit Keyword dialog showing the three checkmarks are not checked" src="http://twwilliams.com/blog/images/2008/08/keywordtagoptionsoff.png" width="348" height="100" /></p>
<p>I started going through the keywords one-by-one and checking the settings (I only had a handful of keywords related to workflow that I didn&#8217;t export) but I quickly realized that I would never get through this with over 600 keywords in this one catalog alone.</p>
<p>But I remembered that Lightroom&#8217;s database is not in an Adobe proprietary format but it is a <a href="http://www.hwaci.com/sw/sqlite/">Sqlite</a> database. So I downloaded the command-line utility, made a copy of my database, and fixed it up.</p>
<p>If you just want the one-line command I used, here it is:</p>
<blockquote><pre class="code">update AgLibraryKeyword set
includeOnExport=1,includeParents=1,includeSynonyms=1;</pre>
</blockquote>
<p>I then fixed the handful of workflow keywords that I didn&#8217;t want to include on export (and I am abandoning the workflow keywords for Collections and Smart Collections anyway).</p>
<p>If you want a bit more detailed account, here you go. I made a copy of the Lightroom 2 catalog file and then, from the command-line, ran <strong>sqlite3 lightroom.lrcat</strong> (I named the copy lightroom.lrcat).</p>
<p>Once inside the sqlite3 interface, I ran a series of commands to figure out what tables existed and what columns to change. I started with the <strong>.tables</strong> command. This listed two columns of tables and I saw one that looked like what I wanted: AgLibraryKeyword. Next, I looked at the schema of this table with <strong>.schema AgLibraryKeyword</strong>. There I saw what looked like the three checkboxes:</p>
<blockquote>
<pre class="code">includeOnExport INTEGER NOT NULL DEFAULT 1,
includeParents INTEGER NOT NULL DEFAULT 1,
includeSynonyms INTEGER NOT NULL DEFAULT 1</pre>
</blockquote>
<p>Just to be sure, I tried a couple of queries to see if I got back the keywords I had fixed and those that I hadn&#8217;t:</p>
<blockquote>
<pre class="code">select name from AgLibraryKeyword where includeOnExport=1;</pre>
</blockquote>
<p>and</p>
<blockquote>
<pre class="code">select name from AgLibraryKeyword where includeOnExport=0;</pre>
</blockquote>
<p>The results looked right to me. So I issued my update command:</p>
<blockquote>
<pre class="code">update AgLibraryKeyword set
includeOnExport=1,includeParents=1,includeSynonyms=1;</pre>
</blockquote>
<p>then exited the sqlite3 tool with <strong>.quit</strong> and then checked this copy out in Lightroom. Everything looked good so I copied it back in place and have been using it since.</p>
]]></content:encoded>
			<wfw:commentRss>http://twwilliams.com/blog/2008/08/29/fixing-problems-with-keywords-in-imported-lightroom-2-catalog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
