-
Notifications
You must be signed in to change notification settings - Fork 0
/
ols.sql
25 lines (21 loc) · 1.05 KB
/
ols.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
CREATE DATABASE IF NOT EXISTS `ols` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `ols`;
DROP TABLE IF EXISTS `link`;
CREATE TABLE IF NOT EXISTS `link` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`long_url` varchar(2000) COLLATE utf8_general_ci NOT NULL,
`short_url` varchar(255) COLLATE utf8_general_ci NOT NULL,
`visit` int(255) NOT NULL DEFAULT 0,
`create_date` varchar(30) COLLATE utf8_general_ci NOT NULL,
`last_visit_date` varchar(30) COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;