MySql: DEFAULT does NOT prevent NULL
I just came across a serious bug/gotcha when using mysql. Integer, default 0 -> set to NULL –> NULL and not 0 Remember always set NOT_NULL and DEFAULT! Example change_column rder_items,...
View ArticleAlter Column the Missing Migration Method for ActiveRecord
Changing many columns is not so easy, because change_column forces you to enter all attributes you want (default,limit,null…) again. So to make less errors we just alter the attributes we want to...
View ArticleMySql: 4 ways to lower the impact of TEXT columns
Starting point Normally there is a table with some small stuff like id/type/xxx_id(~50B) and a text column(default 768B + x) that is not needed all the time, because most users enter less than 255...
View ArticleInstalling MySql Handlersocket in Ubuntu Natty for Ruby
Install sudo apt-get install mysql-server -y; sudo apt-get install handlersocket-doc -y; sudo apt-get install handlersocket-mysql-5.1 -y; sudo apt-get install libhsclient-dev -y; Configure...
View Article
More Pages to Explore .....