README added PRIMARY KEY

This commit is contained in:
mischa 2022-08-24 17:25:23 +00:00
parent a7e8264c49
commit 73c1957129
1 changed files with 2 additions and 2 deletions

View File

@ -6,13 +6,13 @@ Database and table needed, build on MariaDB / MySQL:
CREATE DATABASE IF NOT EXISTS `shortr` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `shortr`;
CREATE TABLE `urls` (
`id` varchar(255) NOT NULL,
`url` text DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
`ip` varchar(255) DEFAULT NULL,
`count` int(11) NOT NULL
`count` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;