Permalink
Browse files

As it turns out, 255 characters aren't going to cut it for most long …

…URLs. Time for a text field.
  • Loading branch information...
lozzd committed May 18, 2011
1 parent d7d9e0c commit 45f67d9be9c671f741bba1508196ffbf304a4312
Showing with 2 additions and 3 deletions.
  1. +2 −3 shortenedurls.sql
View
@@ -4,13 +4,12 @@
CREATE TABLE `shortenedurls` (
`id` int(10) unsigned NOT NULL auto_increment,
- `long_url` varchar(255) NOT NULL,
- `short_url` varchar(255) NOT NULL,
+ `long_url` TEXT NOT NULL,
+ `short_url` varchar(10) NOT NULL,
`created` int(10) unsigned NOT NULL,
`creator` char(15) NOT NULL,
`referrals` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
- UNIQUE KEY `long` (`long_url`),
UNIQUE KEY `short` (`short_url`),
KEY `referrals` (`referrals`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

0 comments on commit 45f67d9

Please sign in to comment.