Specifying table type


#1

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


#2

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


#3

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


#4

Thank you, Ben. Very much.

Best regards,
Bill

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