Skip to content

Instantly share code, notes, and snippets.

@caionorder
Created November 13, 2015 17:18
Show Gist options
  • Save caionorder/55423df76b79b889902f to your computer and use it in GitHub Desktop.
Save caionorder/55423df76b79b889902f to your computer and use it in GitHub Desktop.
CREATE TABLE `tarefas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(45) DEFAULT NULL,
`data_final` date DEFAULT NULL,
`conteudo` text,
`cliente_id` int(11) DEFAULT NULL,
`created_by_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `cliente_id` (`cliente_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `tarefas_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `tarefas_ibfk_2` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment