aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add short-hand methods for text and blob types in MySQLRyuta Kamizono2016-01-051-0/+24
| | | | | | | | | | | | | | | | | In Pg and Sqlite3, `:text` and `:binary` have variable unlimited length. But in MySQL, these have limited length for each types (ref #21591, #21619). This change adds short-hand methods for each text and blob types. Example: create_table :foos do |t| t.tinyblob :tiny_blob t.mediumblob :medium_blob t.longblob :long_blob t.tinytext :tiny_text t.mediumtext :medium_text t.longtext :long_text end
* Allow bigint with default nil for avoiding auto increment primary keyRyuta Kamizono2015-11-021-1/+1
| | | | Such as #10404, #18206.
* Fix to correctly schema dump the `tinyblob`Ryuta Kamizono2015-10-151-0/+4
| | | | | | Currently `tinyblob` is dumped to `t.binary "tiny_blob", limit: 255`. But `t.binary ... limit: 255` is generating SQL to `varchar(255)`. It is incorrect. This commit fixes this problem.
* Move schema definition classes into `mysql/schema_definitions.rb`Ryuta Kamizono2015-10-111-0/+65
Current master branch includes many schema definition improvements in MySQL. It extract these features to the appropriate file.