Specifying table type

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 :wink: )

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

Thanks in advance,
Bill

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

Ben M. 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

Thank you, Ben. Very much.

Best regards,
Bill

----- Original Message -----
From: “Ben M.” [email protected]
To: [email protected]
Sent: 2006-03-14 9:18 PM
Subject: Re: [Rails] specifying table type

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs