-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdump.sql
More file actions
61 lines (50 loc) · 1.28 KB
/
dump.sql
File metadata and controls
61 lines (50 loc) · 1.28 KB
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
--
-- Table structure for table `project`
--
CREATE TABLE IF NOT EXISTS `project` (
`id_project` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`languages` varchar(30) NOT NULL,
`path` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `translation`
--
CREATE TABLE IF NOT EXISTS `translation` (
`id_project` int(11) NOT NULL,
`code` varchar(50) NOT NULL,
`language` varchar(2) DEFAULT NULL,
`translation` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `project`
--
ALTER TABLE `project`
ADD PRIMARY KEY (`id_project`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indexes for table `translation`
--
ALTER TABLE `translation`
ADD UNIQUE KEY `unique_index` (`id_project`,`code`,`language`),
ADD KEY `id_project` (`id_project`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `project`
--
ALTER TABLE `project`
MODIFY `id_project` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `translation`
--
ALTER TABLE `translation`
ADD CONSTRAINT `translation_ibfk_1` FOREIGN KEY (`id_project`) REFERENCES `project` (`id_project`) ON DELETE CASCADE;