Last active
March 7, 2022 13:27
-
-
Save devrsantos/e9a2f0b955ffec5ea0e1848bccf3063b to your computer and use it in GitHub Desktop.
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
CREATE TABLE IF NOT EXISTS 'DHTube', 'video' ( | |
idVideo INT(11), | |
Usuario_idUsuario INT(11), | |
titulo VARCHAR(100), | |
descricao TEXT, | |
tamanho DOUBLE, | |
nomeArquivo VARCHAR(100), | |
duracao DOUBLE, | |
imagem VARCHAR(100), | |
qtdReproducoes INT(11), | |
qtdLikes INT(11), | |
qtdDislikes INT(11), | |
privado SMALLINT(6), | |
dataPublicacao DATETIME | |
); | |
CREATE TABLE IF NOT EXISTS `DHTube`.`playlist`( | |
`idPlaylist` INT(11) NOT NULL AUTO_INCREMENT, | |
`nome` VARCHAR(45) NULL, | |
`dataCriacao` DATETIME, | |
`privado` SMALLINT(6), | |
PRIMARY KEY (`idPlaylist`), | |
CONSTRAINT `FKId_idUsuario` FOREIGN KEY (`idUsuario`) REFERENCES `DHTube`.`usuario`(`idUsuario`) | |
); | |
CREATE TABLE avatar( | |
avatar_id INT (11) NOT NULL PRIMARY KEY AUTO_INCREMENT, | |
nome VARCHAR(45) NULL, | |
urlImagem VARCHAR(100) | |
); | |
CREATE TABLE pais( | |
pais_id INT (11) NOT NULL PRIMARY KEY AUTO_INCREMENT, | |
nome VARCHAR(100) | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment