-
Notifications
You must be signed in to change notification settings - Fork 1
/
tabelas.txt
64 lines (51 loc) · 1.73 KB
/
tabelas.txt
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
TABELA LIVROS
id - mediumint unsigned - primary key
titulo - varchar(255)
autor_id - mediumint unsigned
preco - float
quantidade - smallint unsigned
isbn - varchar(255)
editora - varchar(255)
edicao - varchar(255)
dataPublicacao - date
numeroPaginas - smallint unsigned
tradutor - varchar(255)
idiomaOriginal - varchar(255)
TABELAS ITENSMENU
id - smallint unsigned - primary key
texto - varchar(255)
url - varchar(255)
dataCadastro - datetime
dataAtualizacao - datetime
CREATE TABLE IF NOT EXISTS `itensMenu` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`texto` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
`ordem` tinyint(4) NOT NULL DEFAULT '0',
`dataCadastro` datetime NOT NULL,
`dataAtualizacao` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
TABELAS USUARIOS
id - int unsigned - not null - primary key
nome - varchar(100) - not null
sobrenome - varchar(150) - null
email - varchar(100) - not null - unique
login - varchar(100) - not null - unique
senha - varchar(255) - not null
nivelAcesso - tinyint - not null - default 0
codigoConfirmacao - varchar(100) - null
dataCadastro - datetime - null
CREATE TABLE IF NOT EXISTS `usuarios` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`nome` varchar(100) NOT NULL,
`sobrenome` varchar(150) DEFAULT NULL,
`email` varchar(100) NOT NULL,
`login` varchar(100) NOT NULL,
`senha` varchar(255) NOT NULL,
`nivelAcesso` tinyint(4) NOT NULL DEFAULT '0',
`codigoConfirmacao` varchar(100) DEFAULT NULL,
`dataCadastro` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`,`login`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;