diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-09-22 18:04:33 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-09-22 18:04:33 +0000 |
commit | 94bde997f51b363b5fe7bb60ac16d7e61c46687a (patch) | |
tree | 43728d6665192c722ef487a8fd8bbad6685abf0d /db | |
parent | Convert existing tables to InnoDB. (diff) | |
download | glsamaker-94bde997f51b363b5fe7bb60ac16d7e61c46687a.tar.gz glsamaker-94bde997f51b363b5fe7bb60ac16d7e61c46687a.tar.bz2 glsamaker-94bde997f51b363b5fe7bb60ac16d7e61c46687a.zip |
Quote table names as "references" is a keyword.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20100922175351_convert_to_innodb.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20100922175351_convert_to_innodb.rb b/db/migrate/20100922175351_convert_to_innodb.rb index 50c0152..ec9dba8 100644 --- a/db/migrate/20100922175351_convert_to_innodb.rb +++ b/db/migrate/20100922175351_convert_to_innodb.rb @@ -3,14 +3,14 @@ class ConvertToInnodb < ActiveRecord::Migration def self.up TABLES.each { |table| ActiveRecord::Migration::say "Converting table #{table} to InnoDB engine" - execute("ALTER TABLE #{table.to_s} TYPE = InnoDB") + execute("ALTER TABLE `#{table.to_s}` TYPE = InnoDB") } end def self.down TABLES.each { |table| ActiveRecord::Migration::say "Converting table #{table} to MyISAM engine" - execute("ALTER TABLE #{table.to_s} TYPE = MyISAM") + execute("ALTER TABLE `#{table.to_s}` TYPE = MyISAM") } end end |