<?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"
	>
<channel>
	<title>Comments on: Rails Migration Data Types</title>
	<atom:link href="http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/</link>
	<description>So I don't have to figure things out more than once.</description>
	<pubDate>Thu, 28 Aug 2008 09:40:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: ynw</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-16966</link>
		<dc:creator>ynw</dc:creator>
		<pubDate>Sun, 08 Jun 2008 02:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-16966</guid>
		<description>&lt;p&gt;Informations in this post is outdated&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Informations in this post is outdated</p>]]></content:encoded>
	</item>
	<item>
		<title>By: SEO G</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-11684</link>
		<dc:creator>SEO G</dc:creator>
		<pubDate>Fri, 07 Mar 2008 02:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-11684</guid>
		<description>&lt;p&gt;Using Rails 2.0 in the default migrations file it uses t.timestamps and it automatically creates the columns created_at and updated_at (both datetime in MySQL). I guess since so many people wanted to have those columns for most models they rolled it into the standard migrations file when you generate the model file.&lt;/p&gt;

&lt;p&gt;Michael&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Using Rails 2.0 in the default migrations file it uses t.timestamps and it automatically creates the columns created_at and updated_at (both datetime in MySQL). I guess since so many people wanted to have those columns for most models they rolled it into the standard migrations file when you generate the model file.</p>

<p>Michael</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Noah Magram</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-10771</link>
		<dc:creator>Noah Magram</dc:creator>
		<pubDate>Mon, 11 Feb 2008 23:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-10771</guid>
		<description>&lt;p&gt;A TIMESTAMP column in many RDBMSes gets set automagically on every row insert, some on every update.  It can also be set explicitly in an INSERT or UPDATE statement.&lt;/p&gt;

&lt;p&gt;It also appears that rails' :binary really does mean BLOB, not BINARY - so much for convention there.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A TIMESTAMP column in many RDBMSes gets set automagically on every row insert, some on every update.  It can also be set explicitly in an INSERT or UPDATE statement.</p>

<p>It also appears that rails&#8217; :binary really does mean BLOB, not BINARY - so much for convention there.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Deck</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-6804</link>
		<dc:creator>Michael Deck</dc:creator>
		<pubDate>Mon, 19 Nov 2007 18:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-6804</guid>
		<description>&lt;p&gt;Migration data types are just aliases for the column types supported by the underlying database.  So the answer to your question "what's the difference between datetime and timestamp" is that it depends on which RDBMS you're using.  In MySql there is no difference, both map to datetime.  In Sybase however they map to datetime and timestamp respectivly.  In Oracle all of the date types (date, time, datetime, timestamp) all map to the date type.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;Agile Web Development with Rails&lt;/em&gt; book has a nice chart that defines the mapping from migration type to db column type for all of the major databases.  The chart is in chapter 16, pg 267 of my version of the book.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Migration data types are just aliases for the column types supported by the underlying database.  So the answer to your question &#8220;what&#8217;s the difference between datetime and timestamp&#8221; is that it depends on which RDBMS you&#8217;re using.  In MySql there is no difference, both map to datetime.  In Sybase however they map to datetime and timestamp respectivly.  In Oracle all of the date types (date, time, datetime, timestamp) all map to the date type.</p>

<p>The <em>Agile Web Development with Rails</em> book has a nice chart that defines the mapping from migration type to db column type for all of the major databases.  The chart is in chapter 16, pg 267 of my version of the book.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chrononaut</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-1446</link>
		<dc:creator>Chrononaut</dc:creator>
		<pubDate>Mon, 05 Mar 2007 18:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-1446</guid>
		<description>&lt;p&gt;Timestamps require half the space of a datetime to store, because they are based on unixtime. Therefore they also have a smaller range (1970-2050 or something).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Timestamps require half the space of a datetime to store, because they are based on unixtime. Therefore they also have a smaller range (1970-2050 or something).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: From Journeyman to Master &#187; Archives &#187; Computer science? What?</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-1156</link>
		<dc:creator>From Journeyman to Master &#187; Archives &#187; Computer science? What?</dc:creator>
		<pubDate>Tue, 20 Feb 2007 00:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-1156</guid>
		<description>&lt;p&gt;[...] came across this blog post when I googled rails data type. Below is part of the [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] came across this blog post when I googled rails data type. Below is part of the [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-897</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Wed, 14 Feb 2007 14:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-897</guid>
		<description>&lt;p&gt;Trey:&lt;/p&gt;

&lt;p&gt;When you say binary being 0s and 1s, what you are saying is that binary is represented by 0s and 1s in machine language.  Then everything in every software is represented by 0s and 1s.  Boolean, on the other hand, is represented by 0 or 1 in programming language.  That 0 or 1 in turn is represented by a bunch of 0s and 1s.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Trey:</p>

<p>When you say binary being 0s and 1s, what you are saying is that binary is represented by 0s and 1s in machine language.  Then everything in every software is represented by 0s and 1s.  Boolean, on the other hand, is represented by 0 or 1 in programming language.  That 0 or 1 in turn is represented by a bunch of 0s and 1s.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: kofno</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-790</link>
		<dc:creator>kofno</dc:creator>
		<pubDate>Thu, 08 Feb 2007 19:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-790</guid>
		<description>&lt;p&gt;I think :decimal is also supported with :precision and  :scale options.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think :decimal is also supported with :precision and  :scale options.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago Pinto</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-673</link>
		<dc:creator>Tiago Pinto</dc:creator>
		<pubDate>Fri, 19 Jan 2007 18:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-673</guid>
		<description>&lt;p&gt;Unless I'm completely wrong and accordingly to what I can remember, I think &lt;em&gt;timestamp&lt;/em&gt; includes something related to unix timestamp (like fractions of seconds or something).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Unless I&#8217;m completely wrong and accordingly to what I can remember, I think <em>timestamp</em> includes something related to unix timestamp (like fractions of seconds or something).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Dust</title>
		<link>http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-222</link>
		<dc:creator>Jake Dust</dc:creator>
		<pubDate>Sat, 23 Dec 2006 16:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/#comment-222</guid>
		<description>&lt;p&gt;Datetime includes year; Timestamp doesn't. That's all the difference, as far as I remember.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Datetime includes year; Timestamp doesn&#8217;t. That&#8217;s all the difference, as far as I remember.</p>]]></content:encoded>
	</item>
</channel>
</rss>
