-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See http://mathiasbynens.be/notes/mysql-utf8mb4 for more information.
- Loading branch information
1 parent
dd8536a
commit af52b73
Showing
4 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* crlf=input | ||
# Automatically normalize line endings for all text-based files | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# Why you should use `utf8mb4` instead of `utf8`: http://mathiasbynens.be/notes/mysql-utf8mb4 | ||
CREATE TABLE `redirect` ( | ||
`slug` varchar(14) collate utf8_unicode_ci NOT NULL, | ||
`url` varchar(620) collate utf8_unicode_ci NOT NULL, | ||
`slug` varchar(14) collate utf8mb4_unicode_ci NOT NULL, | ||
`url` varchar(620) collate utf8mb4_unicode_ci NOT NULL, | ||
`date` datetime NOT NULL, | ||
`hits` bigint(20) NOT NULL default '0', | ||
PRIMARY KEY (`slug`) | ||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Used for the URL shortener'; | ||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Used for the URL shortener'; | ||
|
||
INSERT INTO `redirect` VALUES ('a', 'https://github.com/mathiasbynens/php-url-shortener', NOW(), 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters