Tag Archives: MySQL

MySQL default values should be better

I was creating a table a little while ago that stores a timestamp that is essentially an expiry date. I had wanted this to be a date 2 weeks in advance of the current date and time. With a timestamp … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

MySQL case insensitivity on varchar fields

I created a MySQL table like the following: CREATE TABLE `links` ( `id` int(11) NOT NULL auto_increment, `short_id` varchar(255) NOT NULL, `url` text NOT NULL, `user_id` int(11) default NULL, `created_at` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `user_id` … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment