Projekt

Obecné

Profil

Stáhnout (1.29 KB) Statistiky
| Větev: | Tag: | Revize:
1

    
2

    
3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
4
SET time_zone = "+00:00";
5

    
6
--
7
-- Databáze: `visualization_tool`
8
--
9

    
10
-- --------------------------------------------------------
11

    
12
--
13
-- Struktura tabulky `user`
14
--
15

    
16
CREATE TABLE IF NOT EXISTS `user` (
17
  `id` int(11) NOT NULL AUTO_INCREMENT,
18
  `nick` varchar(50) COLLATE utf8_czech_ci NOT NULL,
19
  `name` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
20
  `psw` varchar(60) COLLATE utf8_czech_ci NOT NULL,
21
  `session` varchar(50) COLLATE utf8_czech_ci NOT NULL,
22
  `active` tinyint(1) NOT NULL,
23
  `created` datetime NOT NULL,
24
  `email` varchar(50) COLLATE utf8_czech_ci NOT NULL,
25
   CONSTRAINT PK_user PRIMARY KEY (`id`)
26
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
27

    
28
--
29
-- Struktura tabulky `diagram`
30
--
31

    
32
CREATE TABLE IF NOT EXISTS `diagram` (
33
  `id` int(11) NOT NULL AUTO_INCREMENT,
34
  `name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
35
  `created` datetime NOT NULL,
36
  `last_update` datetime NOT NULL,
37
  `user_id` int(11) NOT NULL,
38
  `public` tinyint(1) NOT NULL DEFAULT '0',
39
  `graph_json` text COLLATE utf8_czech_ci NOT NULL DEFAULT '',
40
  CONSTRAINT PK_diagram PRIMARY KEY (`id`),
41
  CONSTRAINT  FK_user_diagram FOREIGN KEY (`user_id`) REFERENCES user(`id`)
42
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
43

    
(1-1/2)