Forum: Ruby on Rails specifying table type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2006-03-14 22:37
(Received via mailing list)
I've been creating my tables using the command line approach Dave
advocates in AWD.  I just noticed that they're being created as
MyISAM-type tables.  I remember reading (but not where) that I should be
creating these as InnoDB-type tables.  So, two questions...

1)  Is the table type important? (a "why" component to the answer would
be nice too ;-) )

2)  If so, is there a way to specify the table type using the command
line approach?

Thanks in advance,
Bill
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-03-15 04:20
(Received via mailing list)
InnoDB supports transactions... MyISAM does not.

CREATE TABLE tblname (
columndefs...
) ENGINE=InnoDB

http://dev.mysql.com/doc/refman/4.1/en/create-table.html

b
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2006-03-15 04:39
(Received via mailing list)
Thank you, Ben.  Very much.

Best regards,
Bill

----- Original Message -----
From: "Ben Munat" <bent@munat.com>
To: <rails@lists.rubyonrails.org>
Sent: 2006-03-14 9:18 PM
Subject: Re: [Rails] specifying table type
9f0f89bbd9e1ecfbaab6584e429b7a2f?d=identicon&s=25 Josh Susser (jsusser)
on 2006-03-15 06:54
Ben Munat wrote:
> InnoDB supports transactions... MyISAM does not.
>
> CREATE TABLE tblname (
> columndefs...
> ) ENGINE=InnoDB
>
> http://dev.mysql.com/doc/refman/4.1/en/create-table.html
>
> b

Or, with migrations...

  create_table "tblname", :force => true, :options => "ENGINE=InnoDB" do
|t|
    t.column "colname", :integer
    #...
  end

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