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.
Bill W. (Guest)
on 2006-03-14 23: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
Ben M. (Guest)
on 2006-03-15 05: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
Bill W. (Guest)
on 2006-03-15 05:39
(Received via mailing list)
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
Josh S. (Guest)
on 2006-03-15 07:54
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
This topic is locked and can not be replied to.