Quantcast
Channel: My Pragmatic life -- a blog by Michael Grosser » MySql
Browsing latest articles
Browse All 4 View Live

Image may be NSFW.
Clik here to view.

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 Article



Image may be NSFW.
Clik here to view.

Alter 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 Article

Image may be NSFW.
Clik here to view.

MySql: 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 Article

Image may be NSFW.
Clik here to view.

Installing 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
Browsing latest articles
Browse All 4 View Live




Latest Images