Namespace
Methods
Included Modules
Constants
| NATIVE_DATABASE_TYPES | = | { primary_key: "int auto_increment PRIMARY KEY", string: { name: "varchar", limit: 255 }, text: { name: "text" }, integer: { name: "int", limit: 4 }, float: { name: "float" }, decimal: { name: "decimal" }, datetime: { name: "datetime" }, time: { name: "time" }, date: { name: "date" }, binary: { name: "blob" }, boolean: { name: "tinyint", limit: 1 }, json: { name: "json" }, } |
| INDEX_TYPES | = | [:fulltext, :spatial] |
| INDEX_USINGS | = | [:btree, :hash] |
Class Public methods
emulate_booleans
Link
By default, the Mysql2Adapter will
consider all columns of type tinyint(1) as boolean. If you
wish to disable this emulation you can add the following line to your
application.rb file:
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false