Namespace
Methods
Constants
NATIVE_DATABASE_TYPES | = | { primary_key: "bigint auto_increment PRIMARY KEY", string: { name: "varchar", limit: 255 }, text: { name: "text", limit: 65535 }, integer: { name: "int", limit: 4 }, float: { name: "float" }, decimal: { name: "decimal" }, datetime: { name: "datetime" }, timestamp: { name: "timestamp" }, time: { name: "time" }, date: { name: "date" }, binary: { name: "blob", limit: 65535 }, 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