Forum: Ruby on Rails Per Database Migrations

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1b275ea705cc1671f13105d29684cbec?d=identicon&s=25 Scott Walter (sfwalter)
on 2006-02-15 22:04
(Received via mailing list)
Is there away to have parts of a migration file only work with a
specific database.  For example I am inserting some data into a table

    execute "INSERT INTO demo_lists(position, name, updated_at,
created_at)  VALUES (1, 1, 'scott', CURDATE(), CURDATE());"

Of course the curdate() function may only be available on mysql.  So can
we some how determine which database type Migrations is working on?  I
would assume there's away since my Migrations class extends

thanks, scott.

What's an Intel chip doing in a Mac? A whole lor more that it's ever
done in a PC.

My Digital Life -
Pro:Blog -
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-02-15 23:02
(Received via mailing list)
On Feb 15, 2006, at 1:02 PM, Scott Walter wrote:

> extends ActiveRecord.
Embrace the object relational goodness.

DemoList.create( :position => 1, :name => 'scott' )

created_at and updated_at are magically, and are set automatically.

-- Tom Mornini
This topic is locked and can not be replied to.