Skip to content

Instantly share code, notes, and snippets.

@codephi
Created March 18, 2016 13:26
Show Gist options
  • Save codephi/b4df81562699c034cbcf to your computer and use it in GitHub Desktop.
Save codephi/b4df81562699c034cbcf to your computer and use it in GitHub Desktop.
DROP TABLE IF EXISTS `files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`path` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
`users_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `users_id` (`users_id`),
CONSTRAINT `files_ibfk_1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment