-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase_setup.sql
144 lines (113 loc) · 5.27 KB
/
database_setup.sql
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
-- Courses
CREATE TABLE `courses` (
`id` int(11) NOT NULL,
`title_gr` VARCHAR(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` VARCHAR(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`semester` VARCHAR(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`teachers_gr` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`teachers_en` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=UTF8_UNICODE_CI;
ALTER TABLE `courses`
ADD PRIMARY KEY (`id`);
ALTER TABLE `courses`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Teachers
CREATE TABLE `teachers` (
`id` int(11) NOT NULL,
`name_gr` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`name_en` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`personal_site` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
`category_gr` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`category_en` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `teachers`
ADD PRIMARY KEY (`id`);
ALTER TABLE `teachers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Communities
CREATE TABLE `communities` (
`id` int(11) NOT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`category` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `communities`
ADD PRIMARY KEY (`id`);
ALTER TABLE `communities`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Offers
CREATE TABLE `offers` (
`id` int(11) NOT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_gr` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_en` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`category` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `offers`
ADD PRIMARY KEY (`id`);
ALTER TABLE `offers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Maps
CREATE TABLE `maps` (
`id` int(11) NOT NULL,
`latitude` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`longitude` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_gr` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_en` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `maps`
ADD PRIMARY KEY (`id`);
ALTER TABLE `maps`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Official Services
CREATE TABLE `official_services` (
`id` int(11) NOT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_gr` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_en` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`category` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `official_services`
ADD PRIMARY KEY (`id`);
ALTER TABLE `official_services`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Unofficial Services
CREATE TABLE `unofficial_services` (
`id` int(11) NOT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_gr` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_en` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`creator_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`creator_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`category` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `unofficial_services`
ADD PRIMARY KEY (`id`);
ALTER TABLE `unofficial_services`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-- Useful Website
CREATE TABLE `useful_websites` (
`id` int(11) NOT NULL,
`title_gr` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_en` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_gr` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`description_en` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
`category` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`link` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `useful_websites`
ADD PRIMARY KEY (`id`);
ALTER TABLE `useful_websites`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;