Sometimes, we want to use unsigned integer or float data type in mysql, like
auto increment id or
price .. etc, but rails migration does not support yet.
There are 2 ways to use unsigned integer/float in your migration file.
1. define data type directly
you can define date type directly, but it will break the migration design (use interface to define schema), and it looks awful in a way.
2. [gem] activerecord-mysql-unsigned
Recently I found a gem called activrecord-mysql-unsigned, which supports unsigned integer in migration for mysql.
The lastest version of this gem only supports integer date type, therefore if you want to use decimal with unsigned, you are welcome to use my temporary fork.