Tag: sql

How Golang DB migration tool work?

migrate Database migrations written in Go. Use as CLI or import as library. Migrate reads migrations from sources and applies them in correct order to a database. The migration tool uses a schema_migrations table. One table exists for one DB. mysql> select * from schema_migrations; +———+——-+ | version | dirty | +———+——-+ | 33 | 0 | +———+——-+ 1 row…

MySQL: Convert Character Set and Collation

The character set and collation changes for a DB have important changes on the storage requirements and query result behavior. The character set for a table can be changed in two ways: a. Using CONVERT TO query b. Using MODIFY <column name> Methods The CONVERT TO method makes sure that each column fits the new character set range after conversion.…