1 |
commit: 9329979150c291f77fa2082f2235baf8426842e5 |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 5 10:27:38 2014 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 5 10:27:38 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=93299791 |
7 |
|
8 |
update ebuild, errors, dump of db and setup text |
9 |
|
10 |
--- |
11 |
.../gobs/files/zobcs_portage_Scheduler.patch | 6 + |
12 |
.../gobs/files/zobcs_portage_actions.patch | 41 +- |
13 |
.../dev-python/gobs/files/zobcs_portage_main.patch | 27 +- |
14 |
ebuild/dev-python/gobs/gobs-9999.ebuild | 15 +- |
15 |
gobs/doc/Setup.txt | 2 +- |
16 |
gobs/pym/build_log.py | 2 +- |
17 |
gobs/pym/mysql_querys.py | 4 +- |
18 |
gobs/pym/package.py | 24 +- |
19 |
gobs/sql/zobcs.sql | 1444 ++++++++++---------- |
20 |
9 files changed, 798 insertions(+), 767 deletions(-) |
21 |
|
22 |
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch b/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch |
23 |
index df76a7b..fafc818 100644 |
24 |
--- a/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch |
25 |
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch |
26 |
@@ -1,3 +1,9 @@ |
27 |
+2014-01-05 Magnus Granberg <zorry@g.o> |
28 |
+ |
29 |
+ We copy Scheduler.py from portage and patch it. |
30 |
+ Fix so we can use add_buildlog_main() |
31 |
+ We use add_buildlog_main() for loging. |
32 |
+ |
33 |
--- a/gobs/pym/Scheduler.py 2013-03-22 17:57:23.000000000 +0100 |
34 |
+++ b/gobs/pym/Scheduler.py 2012-12-21 02:09:28.082301168 +0100 |
35 |
@@ -62,6 +62,8 @@ from _emerge.PackageMerge import Package |
36 |
|
37 |
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch b/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch |
38 |
index 2244ae7..546073d 100644 |
39 |
--- a/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch |
40 |
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch |
41 |
@@ -1,3 +1,10 @@ |
42 |
+2014-01-05 Magnus Granberg <zorry@g.o> |
43 |
+ |
44 |
+ We copy action.py from portage and patch it. |
45 |
+ Use the patched Scheduler and add build_dict so it can be uset. |
46 |
+ We use or own mydepgraph (build_mydepgraph) that call backtrack_depgraph. |
47 |
+ And pass unresolvable in action_depclean so we can use it later. |
48 |
+ |
49 |
--- a/gobs/pym/actions.py 2013-03-22 17:57:23.000000000 +0100 |
50 |
+++ b/gobs/pym/actions.py 2013-03-22 19:00:43.265582143 +0100 |
51 |
@@ -72,7 +72,7 @@ from _emerge.MetadataRegen import Metada |
52 |
@@ -13,7 +20,7 @@ |
53 |
from _emerge.UseFlagDisplay import pkg_use_display |
54 |
from _emerge.userquery import userquery |
55 |
|
56 |
-+from gobs.build_depgraph import build_mydepgraph |
57 |
++from gobs.build_depgraph import build_mydepgraph |
58 |
+ |
59 |
if sys.hexversion >= 0x3000000: |
60 |
long = int |
61 |
@@ -107,7 +114,7 @@ |
62 |
- if unresolved_deps(): |
63 |
- return 1, [], False, 0 |
64 |
+ return 1, [], False, 0, [] |
65 |
-+ unresolvable = unresolved_deps(): |
66 |
++ unresolvable = unresolved_deps() |
67 |
+ if not unresolvable is None: |
68 |
+ return 1, [], False, 0, unresolvable |
69 |
|
70 |
@@ -133,21 +140,21 @@ |
71 |
|
72 |
def action_deselect(settings, trees, opts, atoms): |
73 |
enter_invalid = '--ask-enter-invalid' in opts |
74 |
-@@ -3508,7 +3504,7 @@ def repo_name_duplicate_check(trees): |
75 |
+@@ -3607,7 +3607,7 @@ def repo_name_duplicate_check(trees): |
76 |
|
77 |
return bool(ignored_repos) |
78 |
|
79 |
--def run_action(settings, trees, mtimedb, myaction, myopts, myfiles, |
80 |
-+def run_action(settings, trees, mtimedb, myaction, myopts, myfiles, build_dict, |
81 |
- gc_locals=None): |
82 |
- |
83 |
- # The caller may have its local variables garbage collected, so |
84 |
-@@ -3925,7 +3921,7 @@ def run_action(settings, trees, mtimedb, |
85 |
- if "--pretend" not in myopts: |
86 |
- display_news_notification(root_config, myopts) |
87 |
- retval = action_build(settings, trees, mtimedb, |
88 |
-- myopts, myaction, myfiles, spinner) |
89 |
-+ myopts, myaction, myfiles, spinner, build_dict) |
90 |
- post_emerge(myaction, myopts, myfiles, settings['EROOT'], |
91 |
- trees, mtimedb, retval) |
92 |
- |
93 |
+-def run_action(emerge_config): |
94 |
++def run_action(emerge_config, build_dict): |
95 |
+ |
96 |
+ # skip global updates prior to sync, since it's called after sync |
97 |
+ if emerge_config.action not in ('help', 'info', 'sync', 'version') and \ |
98 |
+@@ -4059,7 +4059,7 @@ def run_action(emerge_config): |
99 |
+ retval = action_build(emerge_config.target_config.settings, |
100 |
+ emerge_config.trees, emerge_config.target_config.mtimedb, |
101 |
+ emerge_config.opts, emerge_config.action, |
102 |
+- emerge_config.args, spinner) |
103 |
++ emerge_config.args, spinner, build_dict) |
104 |
+ post_emerge(emerge_config.action, emerge_config.opts, |
105 |
+ emerge_config.args, emerge_config.target_config.root, |
106 |
+ emerge_config.trees, emerge_config.target_config.mtimedb, retval) |
107 |
|
108 |
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_main.patch b/ebuild/dev-python/gobs/files/zobcs_portage_main.patch |
109 |
index dc54b95..4031dbd 100644 |
110 |
--- a/ebuild/dev-python/gobs/files/zobcs_portage_main.patch |
111 |
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_main.patch |
112 |
@@ -1,3 +1,9 @@ |
113 |
+2014-01-05 Magnus Granberg <zorry@g.o> |
114 |
+ |
115 |
+ We copy main.py from portage and patch it. |
116 |
+ Use or own patched actions. |
117 |
+ We pass build_dict to some functions. |
118 |
+ |
119 |
--- a/gobs/pym/main.py 2013-03-22 17:57:23.000000000 +0100 |
120 |
+++ b/gobs/pym/main.py 2012-12-06 03:32:56.104889716 +0100 |
121 |
@@ -11,7 +11,7 @@ portage.proxy.lazyimport.lazyimport(glob |
122 |
@@ -9,7 +15,7 @@ |
123 |
'validate_ebuild_environment', |
124 |
'_emerge.help:help@emerge_help', |
125 |
) |
126 |
-@@ -991,14 +966,19 @@ def profile_check(trees, myaction): |
127 |
+@@ -968,15 +968,20 @@ def profile_check(trees, myaction): |
128 |
return 1 |
129 |
return os.EX_OK |
130 |
|
131 |
@@ -24,16 +30,19 @@ |
132 |
if args is None: |
133 |
args = sys.argv[1:] |
134 |
|
135 |
+ args = portage._decode_argv(args) |
136 |
++ |
137 |
+ if build_dict is None: |
138 |
+ build_dict = {} |
139 |
-+ |
140 |
+ |
141 |
# Disable color until we're sure that it should be enabled (after |
142 |
# EMERGE_DEFAULT_OPTS has been parsed). |
143 |
- portage.output.havecolor = 0 |
144 |
-@@ -1040,5 +1022,5 @@ def emerge_main(args=None): |
145 |
- tmpcmdline.extend(args) |
146 |
- myaction, myopts, myfiles = parse_opts(tmpcmdline) |
147 |
+@@ -1028,7 +1028,7 @@ def emerge_main(args=None): |
148 |
+ parse_opts(tmpcmdline) |
149 |
|
150 |
-- return run_action(settings, trees, mtimedb, myaction, myopts, myfiles, |
151 |
-+ return run_action(settings, trees, mtimedb, myaction, myopts, myfiles, build_dict, |
152 |
- gc_locals=locals().clear) |
153 |
+ try: |
154 |
+- return run_action(emerge_config) |
155 |
++ return run_action(emerge_config, build_dict) |
156 |
+ finally: |
157 |
+ # Call destructors for our portdbapi instances. |
158 |
+ for x in emerge_config.trees.values(): |
159 |
|
160 |
diff --git a/ebuild/dev-python/gobs/gobs-9999.ebuild b/ebuild/dev-python/gobs/gobs-9999.ebuild |
161 |
index c1cb510..878f222 100644 |
162 |
--- a/ebuild/dev-python/gobs/gobs-9999.ebuild |
163 |
+++ b/ebuild/dev-python/gobs/gobs-9999.ebuild |
164 |
@@ -1,12 +1,12 @@ |
165 |
-# Copyright 1999-2010 Gentoo Foundation |
166 |
+# Copyright 1999-2014 Gentoo Foundation |
167 |
# Distributed under the terms of the GNU General Public License v2 |
168 |
# $Header: $ |
169 |
|
170 |
-EAPI="2" |
171 |
-PYTHON_DEPEND="*:2.7" |
172 |
+EAPI="5" |
173 |
+PYTHON_COMPAT=( python{2_7, 3_2, 3_3} ) |
174 |
SUPPORT_PYTHON_ABIS="1" |
175 |
|
176 |
-inherit distutils git-2 eutils |
177 |
+inherit distutils-r1 git-2 |
178 |
|
179 |
DESCRIPTION="Gobs" |
180 |
HOMEPAGE="http://git.overlays.gentoo.org/gitroot/dev/zorry.git" |
181 |
@@ -17,14 +17,11 @@ SLOT="0" |
182 |
IUSE="+mysql" |
183 |
|
184 |
RDEPEND="sys-apps/portage |
185 |
- >=dev-python/git-python-0.3.2_rc1 |
186 |
mysql? ( dev-python/mysql-connector-python )" |
187 |
|
188 |
DEPEND="${RDEPEND} |
189 |
dev-python/setuptools" |
190 |
|
191 |
-# RESTRICT_PYTHON_ABIS="3.*" |
192 |
- |
193 |
EGIT_REPO_URI="http://git.overlays.gentoo.org/gitroot/dev/zorry.git" |
194 |
|
195 |
PYTHON_MODNAME="gobs" |
196 |
@@ -47,8 +44,8 @@ src_install() { |
197 |
doins ${FILESDIR}/gobs.conf || die |
198 |
dosbin ${S}/gobs/bin/gobs_host_jobs || die |
199 |
dosbin ${S}/gobs/bin/gobs_guest_jobs || die |
200 |
- dodoc ${S}/gobs/sql/pgdump.sql.gz || die |
201 |
+ dodoc ${S}/gobs/sql/zobcs.sql || die |
202 |
dodoc ${S}/gobs/doc/Setup.txt || die |
203 |
|
204 |
- distutils_src_install |
205 |
+ distutils-r1_src_install |
206 |
} |
207 |
|
208 |
diff --git a/gobs/doc/Setup.txt b/gobs/doc/Setup.txt |
209 |
index 3c01382..e88da72 100644 |
210 |
--- a/gobs/doc/Setup.txt |
211 |
+++ b/gobs/doc/Setup.txt |
212 |
@@ -1,6 +1,6 @@ |
213 |
1. Setup the Backend |
214 |
Setup the gobs.conf for the db. |
215 |
Change GOBSGITREPONAME to point to the git repo with your configs for the profiles/setups. |
216 |
-Import the *dump.sql.gz to your sql. |
217 |
+Import the *zobcs.sql to your mysql. |
218 |
The portage/base/make.conf should be in the base profile/setup |
219 |
The porfiles dir need a dir call config with a parent file that point to base profile |
220 |
|
221 |
diff --git a/gobs/pym/build_log.py b/gobs/pym/build_log.py |
222 |
index 38e2e25..10b0d2e 100644 |
223 |
--- a/gobs/pym/build_log.py |
224 |
+++ b/gobs/pym/build_log.py |
225 |
@@ -189,7 +189,7 @@ def search_buildlog(conn, logfile_text): |
226 |
i = i + 1 |
227 |
adict = {} |
228 |
adict['hilight'] = hilight_tmp['hilight'] |
229 |
- new_hilight_dict[hilight_tmp[i] = adict |
230 |
+ new_hilight_dict[hilight_tmp[i]] = adict |
231 |
elif index in new_hilight_dict: |
232 |
if new_hilight_dict[hilight_tmp[index]][['hilight'] == None: |
233 |
new_hilight_dict[hilight_tmp[index]][['hilight'] = hilight_tmp['hilight'] |
234 |
|
235 |
diff --git a/gobs/pym/mysql_querys.py b/gobs/pym/mysql_querys.py |
236 |
index b5c2953..e8f2073 100644 |
237 |
--- a/gobs/pym/mysql_querys.py |
238 |
+++ b/gobs/pym/mysql_querys.py |
239 |
@@ -166,7 +166,7 @@ def get_package_metadata_sql(connection, package_id): |
240 |
return entries[0] |
241 |
return None |
242 |
|
243 |
-def update_package_metadata((connection, package_metadataDict): |
244 |
+def update_package_metadata(connection, package_metadataDict): |
245 |
cursor = connection.cursor() |
246 |
sqlQ1 ='SELECT package_id FROM packages_metadata WHERE package_id = %s' |
247 |
sqlQ2 = 'UPDATE packages_metadata SET checksum = %s, email = %s, active = %s WHERE package_id = %s' |
248 |
@@ -406,7 +406,7 @@ def add_old_ebuild(connection, package_id, old_ebuild_list): |
249 |
sqlQ1 = "UPDATE ebuilds SET active = 'False' WHERE ebuild_id = %s" |
250 |
sqlQ3 = "SELECT build_job_id FROM build_jobs WHERE ebuild_id = %s" |
251 |
for ebuild_id in old_ebuild_list: |
252 |
- cursor.execute(sqlQ3, (ebuild_id)) |
253 |
+ cursor.execute(sqlQ3, (ebuild_id),) |
254 |
build_job_id_list = cursor.fetchall() |
255 |
if build_job_id_list is not None: |
256 |
for build_job_id in build_job_id_list: |
257 |
|
258 |
diff --git a/gobs/pym/package.py b/gobs/pym/package.py |
259 |
index 12f1afa..a287826 100644 |
260 |
--- a/gobs/pym/package.py |
261 |
+++ b/gobs/pym/package.py |
262 |
@@ -9,7 +9,7 @@ from gobs.mysql_querys import get_config, get_config_id, add_gobs_logs, get_defa |
263 |
add_new_build_job, get_config_id_list, update_manifest_sql, add_new_manifest_sql, \ |
264 |
add_new_ebuild_sql, get_ebuild_id_db, add_old_ebuild, get_ebuild_id_list, \ |
265 |
get_ebuild_checksum, get_manifest_db, get_cp_repo_from_package_id, \ |
266 |
- get_cp_from_package_id |
267 |
+ get_cp_from_package_id, get_package_metadata_sql, update_package_metadata |
268 |
from gobs.readconf import get_conf_settings |
269 |
reader=get_conf_settings() |
270 |
gobs_settings_dict=reader.read_gobs_settings_all() |
271 |
@@ -160,15 +160,25 @@ class gobs_package(object): |
272 |
package_metadataDict = {} |
273 |
# changelog_checksum_tree = portage.checksum.sha256hash(pkgdir + "/ChangeLog") |
274 |
# changelog_text_tree = get_file_text(pkgdir + "/ChangeLog") |
275 |
- pkg_md = MetaDataXMLpkgdir + "/metadata.xml") |
276 |
+ herd = None |
277 |
+ pkg_md = MetaDataXML(pkgdir + "/metadata.xml", herd) |
278 |
#metadata_xml_text_tree = get_file_text(pkgdir + "/metadata.xml") |
279 |
# attDict['changelog_checksum'] = changelog_checksum_tree[0] |
280 |
# attDict['changelog_text'] = changelog_text_tree |
281 |
- # attDict['metadata_xml_herds'] = pkg_md.herds() |
282 |
+ tmp_herds = pkg_md.herds() |
283 |
+ if tmp_herds == (): |
284 |
+ attDict['metadata_xml_herds'] = 'none' |
285 |
+ else: |
286 |
+ attDict['metadata_xml_herds'] = tmp_herds[0] |
287 |
md_email_list = [] |
288 |
for maint in pkg_md.maintainers(): |
289 |
md_email_list.append(maint.email) |
290 |
- attDict['metadata_xml_email'] = md_email_list |
291 |
+ if md_email_list == []: |
292 |
+ if tmp_herds == (): |
293 |
+ log_msg = "Metadata file %s missing Email" % (pkgdir + "/metadata.xml") |
294 |
+ add_gobs_logs(self._conn, log_msg, "qa", self._config_id) |
295 |
+ md_email_list.append(attDict['metadata_xml_herds'] + '@gentoo.org') |
296 |
+ attDict['metadata_xml_email'] = md_email_list |
297 |
attDict['metadata_xml_checksum'] = portage.checksum.sha256hash(pkgdir + "/metadata.xml")[0] |
298 |
#attDict['metadata_xml_text'] = metadata_xml_text_tree |
299 |
package_metadataDict[package_id] = attDict |
300 |
@@ -189,7 +199,7 @@ class gobs_package(object): |
301 |
add_old_ebuild(self._conn, package_id, old_ebuild_id_list) |
302 |
|
303 |
package_metadata_checksum_sql = get_package_metadata_sql(self._conn, package_id) |
304 |
- if package_metadata_checksum_sql is None or package_metadata_checksum_sql != package_metadataDict['package_id']['metadata_xml_checksum']: |
305 |
+ if package_metadata_checksum_sql is None or package_metadata_checksum_sql != package_metadataDict[package_id]['metadata_xml_checksum']: |
306 |
update_package_metadata(self._conn, package_metadataDict) |
307 |
|
308 |
# update the cp manifest checksum |
309 |
@@ -226,7 +236,7 @@ class gobs_package(object): |
310 |
return |
311 |
package_id = add_new_manifest_sql(self._conn, cp, repo) |
312 |
|
313 |
- package_metadataDict = get_package_metadataDict(self, pkgdir, package_id) |
314 |
+ package_metadataDict = self.get_package_metadataDict(pkgdir, package_id) |
315 |
# Get the ebuild list for cp |
316 |
mytree = [] |
317 |
mytree.append(repodir) |
318 |
@@ -329,7 +339,7 @@ class gobs_package(object): |
319 |
# Remove cpv from packageDict and add ebuild to new ebuils list |
320 |
del packageDict[cpv] |
321 |
new_ebuild_id_list.append(get_ebuild_id_db(self._conn, ebuild_version_checksum_tree, package_id)[0]) |
322 |
- package_metadataDict = get_package_metadataDict(self, pkgdir, package_id) |
323 |
+ package_metadataDict = self.get_package_metadataDict(pkgdir, package_id) |
324 |
self.add_package(packageDict, package_metadataDict, package_id, new_ebuild_id_list, old_ebuild_id_list, manifest_checksum_tree) |
325 |
|
326 |
log_msg = "C %s:%s ... Done." % (cp, repo) |
327 |
|
328 |
diff --git a/gobs/sql/zobcs.sql b/gobs/sql/zobcs.sql |
329 |
index a87136c..2d1090e 100644 |
330 |
--- a/gobs/sql/zobcs.sql |
331 |
+++ b/gobs/sql/zobcs.sql |
332 |
@@ -1,32 +1,31 @@ |
333 |
--- phpMyAdmin SQL Dump |
334 |
--- version 3.5.2.2 |
335 |
--- http://www.phpmyadmin.net |
336 |
--- |
337 |
--- Host: localhost |
338 |
--- Generation Time: Apr 25, 2013 at 12:32 AM |
339 |
--- Server version: 5.5.28-MariaDB-log |
340 |
--- PHP Version: 5.4.6--pl0-gentoo |
341 |
- |
342 |
-SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
343 |
-SET time_zone = "+00:00"; |
344 |
- |
345 |
- |
346 |
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
347 |
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
348 |
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
349 |
-/*!40101 SET NAMES utf8 */; |
350 |
- |
351 |
--- |
352 |
--- Database: `zobcs` |
353 |
--- |
354 |
- |
355 |
-DELIMITER $$ |
356 |
--- |
357 |
--- Procedures |
358 |
--- |
359 |
-DROP PROCEDURE IF EXISTS `add_jobs`$$ |
360 |
-CREATE DEFINER=`zobcs`@`localhost` PROCEDURE `add_jobs`(IN `in_type` VARCHAR(20) CHARSET utf8) |
361 |
- MODIFIES SQL DATA |
362 |
+-- phpMyAdmin SQL Dump |
363 |
+-- version 3.5.2.2 |
364 |
+-- http://www.phpmyadmin.net |
365 |
+-- |
366 |
+-- Host: localhost |
367 |
+-- Generation Time: Jan 05, 2014 at 10:19 AM |
368 |
+-- Server version: 5.5.32-MariaDB-log |
369 |
+-- PHP Version: 5.4.23-pl0-gentoo |
370 |
+ |
371 |
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
372 |
+SET time_zone = "+00:00"; |
373 |
+ |
374 |
+ |
375 |
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
376 |
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
377 |
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
378 |
+/*!40101 SET NAMES utf8 */; |
379 |
+ |
380 |
+-- |
381 |
+-- Database: `zobcs` |
382 |
+-- |
383 |
+ |
384 |
+DELIMITER $$ |
385 |
+-- |
386 |
+-- Procedures |
387 |
+-- |
388 |
+CREATE DEFINER=`zobcs`@`localhost` PROCEDURE `add_jobs`(IN `in_type` VARCHAR(20) CHARSET utf8) |
389 |
+ MODIFIES SQL DATA |
390 |
BEGIN |
391 |
DECLARE in_config_id INT; |
392 |
DECLARE in_job_type_id INT; |
393 |
@@ -45,698 +44,701 @@ BEGIN |
394 |
ELSE |
395 |
INSERT INTO jobs (job_type_id, user, config_id, run_config_id) VALUES ( in_job_type_id, 'cron', in_config_id, in_config_id); |
396 |
END IF; |
397 |
-END$$ |
398 |
- |
399 |
-DELIMITER ; |
400 |
- |
401 |
--- -------------------------------------------------------- |
402 |
- |
403 |
--- |
404 |
--- Table structure for table `build_jobs` |
405 |
--- |
406 |
- |
407 |
-DROP TABLE IF EXISTS `build_jobs`; |
408 |
-CREATE TABLE IF NOT EXISTS `build_jobs` ( |
409 |
- `build_job_id` int(11) NOT NULL AUTO_INCREMENT, |
410 |
- `ebuild_id` int(11) NOT NULL, |
411 |
- `config_id` int(11) NOT NULL, |
412 |
- `status` enum('Waiting','Now') NOT NULL DEFAULT 'Waiting', |
413 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
414 |
- PRIMARY KEY (`build_job_id`), |
415 |
- KEY `ebuild_id` (`ebuild_id`), |
416 |
- KEY `config_id` (`config_id`), |
417 |
- KEY `time_stamp` (`time_stamp`) |
418 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The build work list' AUTO_INCREMENT=23547 ; |
419 |
- |
420 |
--- -------------------------------------------------------- |
421 |
- |
422 |
--- |
423 |
--- Table structure for table `build_jobs_emerge_options` |
424 |
--- |
425 |
- |
426 |
-DROP TABLE IF EXISTS `build_jobs_emerge_options`; |
427 |
-CREATE TABLE IF NOT EXISTS `build_jobs_emerge_options` ( |
428 |
- `build_job_id` int(11) NOT NULL, |
429 |
- `eoption_id` int(11) NOT NULL, |
430 |
- KEY `build_job_id` (`build_job_id`), |
431 |
- KEY `eoption_id` (`eoption_id`) |
432 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
433 |
- |
434 |
--- -------------------------------------------------------- |
435 |
- |
436 |
--- |
437 |
--- Table structure for table `build_jobs_redo` |
438 |
--- |
439 |
- |
440 |
-DROP TABLE IF EXISTS `build_jobs_redo`; |
441 |
-CREATE TABLE IF NOT EXISTS `build_jobs_redo` ( |
442 |
- `build_job_id` int(11) NOT NULL COMMENT 'build job id', |
443 |
- `fail_times` int(1) NOT NULL COMMENT 'Fail times max 5', |
444 |
- `fail_type` varchar(30) NOT NULL COMMENT 'Type of fail', |
445 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Time', |
446 |
- KEY `build_job_id` (`build_job_id`) |
447 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Build jobs that need to be redone'; |
448 |
- |
449 |
--- -------------------------------------------------------- |
450 |
- |
451 |
--- |
452 |
--- Table structure for table `build_jobs_use` |
453 |
--- |
454 |
- |
455 |
-DROP TABLE IF EXISTS `build_jobs_use`; |
456 |
-CREATE TABLE IF NOT EXISTS `build_jobs_use` ( |
457 |
- `build_job_id` int(11) NOT NULL, |
458 |
- `use_id` int(11) NOT NULL, |
459 |
- `status` enum('True','False') NOT NULL, |
460 |
- KEY `build_job_id` (`build_job_id`), |
461 |
- KEY `use_id` (`use_id`) |
462 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
463 |
- |
464 |
--- -------------------------------------------------------- |
465 |
- |
466 |
--- |
467 |
--- Table structure for table `build_logs` |
468 |
--- |
469 |
- |
470 |
-DROP TABLE IF EXISTS `build_logs`; |
471 |
-CREATE TABLE IF NOT EXISTS `build_logs` ( |
472 |
- `build_log_id` int(11) NOT NULL AUTO_INCREMENT, |
473 |
- `ebuild_id` int(11) NOT NULL, |
474 |
- `fail` enum('True','False') NOT NULL DEFAULT 'False', |
475 |
- `summery_text` text NOT NULL, |
476 |
- `log_hash` varchar(100) NOT NULL, |
477 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
478 |
- PRIMARY KEY (`build_log_id`), |
479 |
- KEY `ebuild_id` (`ebuild_id`) |
480 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main log info for the builds' AUTO_INCREMENT=19591 ; |
481 |
- |
482 |
--- -------------------------------------------------------- |
483 |
- |
484 |
--- |
485 |
--- Table structure for table `build_logs_config` |
486 |
--- |
487 |
- |
488 |
-DROP TABLE IF EXISTS `build_logs_config`; |
489 |
-CREATE TABLE IF NOT EXISTS `build_logs_config` ( |
490 |
- `log_id` int(11) NOT NULL AUTO_INCREMENT, |
491 |
- `build_log_id` int(11) NOT NULL, |
492 |
- `config_id` int(11) NOT NULL, |
493 |
- `logname` varchar(150) NOT NULL COMMENT 'filename of the log', |
494 |
- PRIMARY KEY (`log_id`), |
495 |
- KEY `config_id` (`config_id`), |
496 |
- KEY `build_log_id` (`build_log_id`) |
497 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=19636 ; |
498 |
- |
499 |
--- -------------------------------------------------------- |
500 |
- |
501 |
--- |
502 |
--- Table structure for table `build_logs_emerge_options` |
503 |
--- |
504 |
- |
505 |
-DROP TABLE IF EXISTS `build_logs_emerge_options`; |
506 |
-CREATE TABLE IF NOT EXISTS `build_logs_emerge_options` ( |
507 |
- `build_logs_id` int(11) NOT NULL, |
508 |
- `eoption_id` int(11) NOT NULL, |
509 |
- KEY `eoption_id` (`eoption_id`), |
510 |
- KEY `build_logs_id` (`build_logs_id`) |
511 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
512 |
- |
513 |
--- -------------------------------------------------------- |
514 |
- |
515 |
--- |
516 |
--- Table structure for table `build_logs_errors` |
517 |
--- |
518 |
- |
519 |
-DROP TABLE IF EXISTS `build_logs_errors`; |
520 |
-CREATE TABLE IF NOT EXISTS `build_logs_errors` ( |
521 |
- `id` int(11) NOT NULL AUTO_INCREMENT, |
522 |
- `build_log_id` int(11) NOT NULL, |
523 |
- `error_id` int(11) NOT NULL, |
524 |
- PRIMARY KEY (`id`), |
525 |
- KEY `build_log_id` (`build_log_id`), |
526 |
- KEY `error_id` (`error_id`) |
527 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
528 |
- |
529 |
--- -------------------------------------------------------- |
530 |
- |
531 |
--- |
532 |
--- Table structure for table `build_logs_hilight` |
533 |
--- |
534 |
- |
535 |
-DROP TABLE IF EXISTS `build_logs_hilight`; |
536 |
-CREATE TABLE IF NOT EXISTS `build_logs_hilight` ( |
537 |
- `id` int(11) NOT NULL AUTO_INCREMENT, |
538 |
- `log_id` int(11) NOT NULL, |
539 |
- `start_line` int(11) NOT NULL, |
540 |
- `end_line` int(11) NOT NULL, |
541 |
- `hilight_css_id` int(11) NOT NULL, |
542 |
- PRIMARY KEY (`id`), |
543 |
- KEY `log_id` (`log_id`), |
544 |
- KEY `hilight_id` (`hilight_css_id`), |
545 |
- KEY `hilight_css_id` (`hilight_css_id`) |
546 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=110809 ; |
547 |
- |
548 |
--- -------------------------------------------------------- |
549 |
- |
550 |
--- |
551 |
--- Table structure for table `build_logs_qa` |
552 |
--- |
553 |
- |
554 |
-DROP TABLE IF EXISTS `build_logs_qa`; |
555 |
-CREATE TABLE IF NOT EXISTS `build_logs_qa` ( |
556 |
- `build_log_id` int(11) NOT NULL, |
557 |
- `summery_text` text NOT NULL, |
558 |
- KEY `build_log_id` (`build_log_id`) |
559 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
560 |
- |
561 |
--- -------------------------------------------------------- |
562 |
- |
563 |
--- |
564 |
--- Table structure for table `build_logs_repoman` |
565 |
--- |
566 |
- |
567 |
-DROP TABLE IF EXISTS `build_logs_repoman`; |
568 |
-CREATE TABLE IF NOT EXISTS `build_logs_repoman` ( |
569 |
- `build_logs_id` int(11) NOT NULL, |
570 |
- `summery_text` text NOT NULL, |
571 |
- KEY `build_logs_id` (`build_logs_id`) |
572 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
573 |
- |
574 |
--- -------------------------------------------------------- |
575 |
- |
576 |
--- |
577 |
--- Table structure for table `build_logs_use` |
578 |
--- |
579 |
- |
580 |
-DROP TABLE IF EXISTS `build_logs_use`; |
581 |
-CREATE TABLE IF NOT EXISTS `build_logs_use` ( |
582 |
- `build_log_id` int(11) NOT NULL, |
583 |
- `use_id` int(11) NOT NULL, |
584 |
- `status` enum('True','False') NOT NULL, |
585 |
- KEY `build_log_id` (`build_log_id`), |
586 |
- KEY `use_id` (`use_id`) |
587 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
588 |
- |
589 |
--- -------------------------------------------------------- |
590 |
- |
591 |
--- |
592 |
--- Table structure for table `categories` |
593 |
--- |
594 |
- |
595 |
-DROP TABLE IF EXISTS `categories`; |
596 |
-CREATE TABLE IF NOT EXISTS `categories` ( |
597 |
- `category_id` int(11) NOT NULL AUTO_INCREMENT, |
598 |
- `category` varchar(50) NOT NULL, |
599 |
- `active` enum('True','False') NOT NULL DEFAULT 'True', |
600 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
601 |
- PRIMARY KEY (`category_id`) |
602 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categories main table (C)' AUTO_INCREMENT=160 ; |
603 |
- |
604 |
--- -------------------------------------------------------- |
605 |
- |
606 |
--- |
607 |
--- Table structure for table `configs` |
608 |
--- |
609 |
- |
610 |
-DROP TABLE IF EXISTS `configs`; |
611 |
-CREATE TABLE IF NOT EXISTS `configs` ( |
612 |
- `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Config index', |
613 |
- `hostname` varchar(50) NOT NULL, |
614 |
- `config` varchar(100) NOT NULL COMMENT 'Box/setup', |
615 |
- `default_config` enum('True','False') NOT NULL COMMENT 'Host setup', |
616 |
- PRIMARY KEY (`config_id`) |
617 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main config table' AUTO_INCREMENT=3 ; |
618 |
- |
619 |
--- -------------------------------------------------------- |
620 |
- |
621 |
--- |
622 |
--- Table structure for table `configs_emerge_options` |
623 |
--- |
624 |
- |
625 |
-DROP TABLE IF EXISTS `configs_emerge_options`; |
626 |
-CREATE TABLE IF NOT EXISTS `configs_emerge_options` ( |
627 |
- `config_id` int(11) NOT NULL COMMENT 'config id', |
628 |
- `eoption_id` int(11) NOT NULL COMMENT 'emerge option id', |
629 |
- KEY `config_id` (`config_id`), |
630 |
- KEY `eoption_id` (`eoption_id`) |
631 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Emerge command options for the configs'; |
632 |
- |
633 |
--- -------------------------------------------------------- |
634 |
- |
635 |
--- |
636 |
--- Table structure for table `configs_metadata` |
637 |
--- |
638 |
- |
639 |
-DROP TABLE IF EXISTS `configs_metadata`; |
640 |
-CREATE TABLE IF NOT EXISTS `configs_metadata` ( |
641 |
- `config_id` int(11) NOT NULL, |
642 |
- `profile` varchar(50) NOT NULL, |
643 |
- `keyword_id` int(11) NOT NULL, |
644 |
- `make_conf_text` text NOT NULL, |
645 |
- `checksum` varchar(100) NOT NULL, |
646 |
- `active` enum('True','False') NOT NULL, |
647 |
- `config_error_text` text NOT NULL, |
648 |
- `updating` enum('True','False') NOT NULL, |
649 |
- `status` enum('Waiting','Runing','Stoped') NOT NULL, |
650 |
- `auto` enum('True','False') NOT NULL, |
651 |
- `git_www` varchar(100) NOT NULL COMMENT 'git repo www wiev address', |
652 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
653 |
- PRIMARY KEY (`config_id`), |
654 |
- KEY `keyword_id` (`keyword_id`), |
655 |
- KEY `config_id` (`config_id`) |
656 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Config Status'; |
657 |
- |
658 |
--- -------------------------------------------------------- |
659 |
- |
660 |
--- |
661 |
--- Table structure for table `ebuilds` |
662 |
--- |
663 |
- |
664 |
-DROP TABLE IF EXISTS `ebuilds`; |
665 |
-CREATE TABLE IF NOT EXISTS `ebuilds` ( |
666 |
- `ebuild_id` int(11) NOT NULL AUTO_INCREMENT, |
667 |
- `package_id` int(11) NOT NULL, |
668 |
- `version` varchar(50) NOT NULL, |
669 |
- `checksum` varchar(100) NOT NULL, |
670 |
- `active` enum('True','False') NOT NULL DEFAULT 'True', |
671 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
672 |
- PRIMARY KEY (`ebuild_id`), |
673 |
- KEY `package_id` (`package_id`), |
674 |
- KEY `checksum` (`checksum`), |
675 |
- KEY `version` (`version`) |
676 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version main table (V)' AUTO_INCREMENT=69287 ; |
677 |
- |
678 |
--- -------------------------------------------------------- |
679 |
- |
680 |
--- |
681 |
--- Table structure for table `ebuilds_iuse` |
682 |
--- |
683 |
- |
684 |
-DROP TABLE IF EXISTS `ebuilds_iuse`; |
685 |
-CREATE TABLE IF NOT EXISTS `ebuilds_iuse` ( |
686 |
- `ebuild_id` int(11) NOT NULL, |
687 |
- `use_id` int(11) NOT NULL, |
688 |
- `status` enum('True','False') NOT NULL, |
689 |
- KEY `ebuild_id` (`ebuild_id`), |
690 |
- KEY `use_id` (`use_id`) |
691 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
692 |
- |
693 |
--- -------------------------------------------------------- |
694 |
- |
695 |
--- |
696 |
--- Table structure for table `ebuilds_keywords` |
697 |
--- |
698 |
- |
699 |
-DROP TABLE IF EXISTS `ebuilds_keywords`; |
700 |
-CREATE TABLE IF NOT EXISTS `ebuilds_keywords` ( |
701 |
- `ebuild_id` int(11) NOT NULL, |
702 |
- `keyword_id` int(11) NOT NULL, |
703 |
- `status` enum('Stable','Unstable','Negative') NOT NULL, |
704 |
- KEY `ebuild_id` (`ebuild_id`), |
705 |
- KEY `keyword_id` (`keyword_id`) |
706 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
707 |
- |
708 |
--- -------------------------------------------------------- |
709 |
- |
710 |
--- |
711 |
--- Table structure for table `ebuilds_metadata` |
712 |
--- |
713 |
- |
714 |
-DROP TABLE IF EXISTS `ebuilds_metadata`; |
715 |
-CREATE TABLE IF NOT EXISTS `ebuilds_metadata` ( |
716 |
- `ebuild_id` int(11) NOT NULL, |
717 |
- `revision` varchar(10) NOT NULL COMMENT 'CVS revision', |
718 |
- KEY `ebuild_id` (`ebuild_id`) |
719 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
720 |
- |
721 |
--- -------------------------------------------------------- |
722 |
- |
723 |
--- |
724 |
--- Table structure for table `ebuilds_restrictions` |
725 |
--- |
726 |
- |
727 |
-DROP TABLE IF EXISTS `ebuilds_restrictions`; |
728 |
-CREATE TABLE IF NOT EXISTS `ebuilds_restrictions` ( |
729 |
- `ebuild_id` int(11) NOT NULL, |
730 |
- `restriction_id` int(11) NOT NULL, |
731 |
- KEY `ebuild_id` (`ebuild_id`), |
732 |
- KEY `restriction_id` (`restriction_id`) |
733 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
734 |
- |
735 |
--- -------------------------------------------------------- |
736 |
- |
737 |
--- |
738 |
--- Table structure for table `emerge_options` |
739 |
--- |
740 |
- |
741 |
-DROP TABLE IF EXISTS `emerge_options`; |
742 |
-CREATE TABLE IF NOT EXISTS `emerge_options` ( |
743 |
- `eoption_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'emerge command options id', |
744 |
- `eoption` varchar(15) NOT NULL COMMENT 'emerge command options', |
745 |
- PRIMARY KEY (`eoption_id`) |
746 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; |
747 |
- |
748 |
--- -------------------------------------------------------- |
749 |
- |
750 |
--- |
751 |
--- Table structure for table `errors` |
752 |
--- |
753 |
- |
754 |
-DROP TABLE IF EXISTS `errors`; |
755 |
-CREATE TABLE IF NOT EXISTS `errors` ( |
756 |
- `error_id` int(11) NOT NULL AUTO_INCREMENT, |
757 |
- `error_name` varchar(10) NOT NULL, |
758 |
- `error_search` varchar(20) NOT NULL, |
759 |
- PRIMARY KEY (`error_id`) |
760 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; |
761 |
- |
762 |
--- -------------------------------------------------------- |
763 |
- |
764 |
--- |
765 |
--- Table structure for table `hilight` |
766 |
--- |
767 |
- |
768 |
-DROP TABLE IF EXISTS `hilight`; |
769 |
-CREATE TABLE IF NOT EXISTS `hilight` ( |
770 |
- `hilight_id` int(11) NOT NULL AUTO_INCREMENT, |
771 |
- `hilight_search` varchar(30) NOT NULL, |
772 |
- `hilight_search_end` varchar(30) NOT NULL, |
773 |
- `hilight_css_id` int(11) NOT NULL, |
774 |
- `hilight_start` int(11) NOT NULL, |
775 |
- `hilight_end` int(11) NOT NULL, |
776 |
- PRIMARY KEY (`hilight_id`), |
777 |
- KEY `hilight_css_id` (`hilight_css_id`) |
778 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ; |
779 |
- |
780 |
--- -------------------------------------------------------- |
781 |
- |
782 |
--- |
783 |
--- Table structure for table `hilight_css` |
784 |
--- |
785 |
- |
786 |
-DROP TABLE IF EXISTS `hilight_css`; |
787 |
-CREATE TABLE IF NOT EXISTS `hilight_css` ( |
788 |
- `hilight_css_id` int(11) NOT NULL AUTO_INCREMENT, |
789 |
- `hilight_css_name` varchar(11) NOT NULL, |
790 |
- `hilight_css_collor` varchar(10) NOT NULL, |
791 |
- PRIMARY KEY (`hilight_css_id`) |
792 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; |
793 |
- |
794 |
--- -------------------------------------------------------- |
795 |
- |
796 |
--- |
797 |
--- Table structure for table `jobs` |
798 |
--- |
799 |
- |
800 |
-DROP TABLE IF EXISTS `jobs`; |
801 |
-CREATE TABLE IF NOT EXISTS `jobs` ( |
802 |
- `job_id` int(11) NOT NULL AUTO_INCREMENT, |
803 |
- `job_type_id` int(11) NOT NULL, |
804 |
- `status` enum('Runing','Done','Waiting') NOT NULL DEFAULT 'Waiting', |
805 |
- `user` varchar(20) NOT NULL, |
806 |
- `config_id` int(11) NOT NULL, |
807 |
- `run_config_id` int(11) NOT NULL, |
808 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
809 |
- PRIMARY KEY (`job_id`), |
810 |
- KEY `config_id` (`config_id`), |
811 |
- KEY `run_config_id` (`run_config_id`), |
812 |
- KEY `job_type_id` (`job_type_id`) |
813 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; |
814 |
- |
815 |
--- -------------------------------------------------------- |
816 |
- |
817 |
--- |
818 |
--- Table structure for table `job_types` |
819 |
--- |
820 |
- |
821 |
-DROP TABLE IF EXISTS `job_types`; |
822 |
-CREATE TABLE IF NOT EXISTS `job_types` ( |
823 |
- `job_type_id` int(11) NOT NULL AUTO_INCREMENT, |
824 |
- `type` varchar(20) NOT NULL, |
825 |
- PRIMARY KEY (`job_type_id`) |
826 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table for what type of work' AUTO_INCREMENT=3 ; |
827 |
- |
828 |
--- -------------------------------------------------------- |
829 |
- |
830 |
--- |
831 |
--- Table structure for table `keywords` |
832 |
--- |
833 |
- |
834 |
-DROP TABLE IF EXISTS `keywords`; |
835 |
-CREATE TABLE IF NOT EXISTS `keywords` ( |
836 |
- `keyword_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'keyword index', |
837 |
- `keyword` varchar(15) NOT NULL COMMENT 'keyword', |
838 |
- PRIMARY KEY (`keyword_id`) |
839 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='KEYWORD' AUTO_INCREMENT=41 ; |
840 |
- |
841 |
--- -------------------------------------------------------- |
842 |
- |
843 |
--- |
844 |
--- Table structure for table `logs` |
845 |
--- |
846 |
- |
847 |
-DROP TABLE IF EXISTS `logs`; |
848 |
-CREATE TABLE IF NOT EXISTS `logs` ( |
849 |
- `log_id` int(11) NOT NULL AUTO_INCREMENT, |
850 |
- `config_id` int(11) NOT NULL, |
851 |
- `log_type` enum('info','error','debug') NOT NULL, |
852 |
- `msg` text NOT NULL, |
853 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
854 |
- PRIMARY KEY (`log_id`), |
855 |
- KEY `config_id` (`config_id`) |
856 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=892335 ; |
857 |
- |
858 |
--- -------------------------------------------------------- |
859 |
- |
860 |
--- |
861 |
--- Table structure for table `packages` |
862 |
--- |
863 |
- |
864 |
-DROP TABLE IF EXISTS `packages`; |
865 |
-CREATE TABLE IF NOT EXISTS `packages` ( |
866 |
- `package_id` int(11) NOT NULL AUTO_INCREMENT, |
867 |
- `category_id` int(11) NOT NULL, |
868 |
- `package` varchar(50) NOT NULL, |
869 |
- `repo_id` int(11) NOT NULL, |
870 |
- `checksum` varchar(100) NOT NULL, |
871 |
- `active` enum('True','False') NOT NULL, |
872 |
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
873 |
- PRIMARY KEY (`package_id`), |
874 |
- KEY `category_id` (`category_id`), |
875 |
- KEY `repo_id` (`repo_id`), |
876 |
- KEY `checksum` (`checksum`), |
877 |
- KEY `package` (`package`) |
878 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Packages main table (P)' AUTO_INCREMENT=16842 ; |
879 |
- |
880 |
--- -------------------------------------------------------- |
881 |
- |
882 |
--- |
883 |
--- Table structure for table `repos` |
884 |
--- |
885 |
- |
886 |
-DROP TABLE IF EXISTS `repos`; |
887 |
-CREATE TABLE IF NOT EXISTS `repos` ( |
888 |
- `repo_id` int(11) NOT NULL AUTO_INCREMENT, |
889 |
- `repo` varchar(100) NOT NULL, |
890 |
- PRIMARY KEY (`repo_id`) |
891 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Repo main table (repo)' AUTO_INCREMENT=3 ; |
892 |
- |
893 |
--- -------------------------------------------------------- |
894 |
- |
895 |
--- |
896 |
--- Table structure for table `restrictions` |
897 |
--- |
898 |
- |
899 |
-DROP TABLE IF EXISTS `restrictions`; |
900 |
-CREATE TABLE IF NOT EXISTS `restrictions` ( |
901 |
- `restriction_id` int(11) NOT NULL AUTO_INCREMENT, |
902 |
- `restriction` varchar(50) NOT NULL, |
903 |
- PRIMARY KEY (`restriction_id`) |
904 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ; |
905 |
- |
906 |
--- -------------------------------------------------------- |
907 |
- |
908 |
--- |
909 |
--- Table structure for table `uses` |
910 |
--- |
911 |
- |
912 |
-DROP TABLE IF EXISTS `uses`; |
913 |
-CREATE TABLE IF NOT EXISTS `uses` ( |
914 |
- `use_id` int(11) NOT NULL AUTO_INCREMENT, |
915 |
- `flag` varchar(50) NOT NULL, |
916 |
- PRIMARY KEY (`use_id`) |
917 |
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Use flags main table' AUTO_INCREMENT=4875 ; |
918 |
- |
919 |
--- |
920 |
--- Constraints for dumped tables |
921 |
--- |
922 |
- |
923 |
--- |
924 |
--- Constraints for table `build_jobs` |
925 |
--- |
926 |
-ALTER TABLE `build_jobs` |
927 |
- ADD CONSTRAINT `build_jobs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
928 |
- ADD CONSTRAINT `build_jobs_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
929 |
- |
930 |
--- |
931 |
--- Constraints for table `build_jobs_emerge_options` |
932 |
--- |
933 |
-ALTER TABLE `build_jobs_emerge_options` |
934 |
- ADD CONSTRAINT `build_jobs_emerge_options_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`), |
935 |
- ADD CONSTRAINT `build_jobs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
936 |
- |
937 |
--- |
938 |
--- Constraints for table `build_jobs_redo` |
939 |
--- |
940 |
-ALTER TABLE `build_jobs_redo` |
941 |
- ADD CONSTRAINT `build_jobs_redo_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`); |
942 |
- |
943 |
--- |
944 |
--- Constraints for table `build_jobs_use` |
945 |
--- |
946 |
-ALTER TABLE `build_jobs_use` |
947 |
- ADD CONSTRAINT `build_jobs_use_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`), |
948 |
- ADD CONSTRAINT `build_jobs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
949 |
- |
950 |
--- |
951 |
--- Constraints for table `build_logs` |
952 |
--- |
953 |
-ALTER TABLE `build_logs` |
954 |
- ADD CONSTRAINT `build_logs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`); |
955 |
- |
956 |
--- |
957 |
--- Constraints for table `build_logs_config` |
958 |
--- |
959 |
-ALTER TABLE `build_logs_config` |
960 |
- ADD CONSTRAINT `build_logs_config_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`), |
961 |
- ADD CONSTRAINT `build_logs_config_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
962 |
- |
963 |
--- |
964 |
--- Constraints for table `build_logs_emerge_options` |
965 |
--- |
966 |
-ALTER TABLE `build_logs_emerge_options` |
967 |
- ADD CONSTRAINT `build_logs_emerge_options_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`), |
968 |
- ADD CONSTRAINT `build_logs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
969 |
- |
970 |
--- |
971 |
--- Constraints for table `build_logs_errors` |
972 |
--- |
973 |
-ALTER TABLE `build_logs_errors` |
974 |
- ADD CONSTRAINT `build_logs_errors_ibfk_2` FOREIGN KEY (`error_id`) REFERENCES `errors` (`error_id`), |
975 |
- ADD CONSTRAINT `build_logs_errors_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`); |
976 |
- |
977 |
--- |
978 |
--- Constraints for table `build_logs_hilight` |
979 |
--- |
980 |
-ALTER TABLE `build_logs_hilight` |
981 |
- ADD CONSTRAINT `build_logs_hilight_ibfk_5` FOREIGN KEY (`log_id`) REFERENCES `build_logs_config` (`log_id`), |
982 |
- ADD CONSTRAINT `build_logs_hilight_ibfk_4` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`); |
983 |
- |
984 |
--- |
985 |
--- Constraints for table `build_logs_qa` |
986 |
--- |
987 |
-ALTER TABLE `build_logs_qa` |
988 |
- ADD CONSTRAINT `build_logs_qa_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`); |
989 |
- |
990 |
--- |
991 |
--- Constraints for table `build_logs_repoman` |
992 |
--- |
993 |
-ALTER TABLE `build_logs_repoman` |
994 |
- ADD CONSTRAINT `build_logs_repoman_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`); |
995 |
- |
996 |
--- |
997 |
--- Constraints for table `build_logs_use` |
998 |
--- |
999 |
-ALTER TABLE `build_logs_use` |
1000 |
- ADD CONSTRAINT `build_logs_use_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`), |
1001 |
- ADD CONSTRAINT `build_logs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
1002 |
- |
1003 |
--- |
1004 |
--- Constraints for table `configs_emerge_options` |
1005 |
--- |
1006 |
-ALTER TABLE `configs_emerge_options` |
1007 |
- ADD CONSTRAINT `configs_emerge_options_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`), |
1008 |
- ADD CONSTRAINT `configs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
1009 |
- |
1010 |
--- |
1011 |
--- Constraints for table `configs_metadata` |
1012 |
--- |
1013 |
-ALTER TABLE `configs_metadata` |
1014 |
- ADD CONSTRAINT `configs_metadata_ibfk_1` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`), |
1015 |
- ADD CONSTRAINT `configs_metadata_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1016 |
- |
1017 |
--- |
1018 |
--- Constraints for table `ebuilds` |
1019 |
--- |
1020 |
-ALTER TABLE `ebuilds` |
1021 |
- ADD CONSTRAINT `ebuilds_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`); |
1022 |
- |
1023 |
--- |
1024 |
--- Constraints for table `ebuilds_iuse` |
1025 |
--- |
1026 |
-ALTER TABLE `ebuilds_iuse` |
1027 |
- ADD CONSTRAINT `ebuilds_iuse_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1028 |
- ADD CONSTRAINT `ebuilds_iuse_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
1029 |
- |
1030 |
--- |
1031 |
--- Constraints for table `ebuilds_keywords` |
1032 |
--- |
1033 |
-ALTER TABLE `ebuilds_keywords` |
1034 |
- ADD CONSTRAINT `ebuilds_keywords_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1035 |
- ADD CONSTRAINT `ebuilds_keywords_ibfk_2` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`); |
1036 |
- |
1037 |
--- |
1038 |
--- Constraints for table `ebuilds_metadata` |
1039 |
--- |
1040 |
-ALTER TABLE `ebuilds_metadata` |
1041 |
- ADD CONSTRAINT `ebuilds_metadata_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`); |
1042 |
- |
1043 |
--- |
1044 |
--- Constraints for table `ebuilds_restrictions` |
1045 |
--- |
1046 |
-ALTER TABLE `ebuilds_restrictions` |
1047 |
- ADD CONSTRAINT `ebuilds_restrictions_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1048 |
- ADD CONSTRAINT `ebuilds_restrictions_ibfk_2` FOREIGN KEY (`restriction_id`) REFERENCES `restrictions` (`restriction_id`); |
1049 |
- |
1050 |
--- |
1051 |
--- Constraints for table `hilight` |
1052 |
--- |
1053 |
-ALTER TABLE `hilight` |
1054 |
- ADD CONSTRAINT `hilight_ibfk_1` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`); |
1055 |
- |
1056 |
--- |
1057 |
--- Constraints for table `jobs` |
1058 |
--- |
1059 |
-ALTER TABLE `jobs` |
1060 |
- ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`), |
1061 |
- ADD CONSTRAINT `jobs_ibfk_2` FOREIGN KEY (`run_config_id`) REFERENCES `configs` (`config_id`), |
1062 |
- ADD CONSTRAINT `jobs_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `job_types` (`job_type_id`); |
1063 |
- |
1064 |
--- |
1065 |
--- Constraints for table `logs` |
1066 |
--- |
1067 |
-ALTER TABLE `logs` |
1068 |
- ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1069 |
- |
1070 |
--- |
1071 |
--- Constraints for table `packages` |
1072 |
--- |
1073 |
-ALTER TABLE `packages` |
1074 |
- ADD CONSTRAINT `packages_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`), |
1075 |
- ADD CONSTRAINT `packages_ibfk_2` FOREIGN KEY (`repo_id`) REFERENCES `repos` (`repo_id`); |
1076 |
- |
1077 |
-DELIMITER $$ |
1078 |
--- |
1079 |
--- Events |
1080 |
--- |
1081 |
-DROP EVENT `add_esync_updatedb_jobs`$$ |
1082 |
+END$$ |
1083 |
+ |
1084 |
+DELIMITER ; |
1085 |
+ |
1086 |
+-- -------------------------------------------------------- |
1087 |
+ |
1088 |
+-- |
1089 |
+-- Table structure for table `build_jobs` |
1090 |
+-- |
1091 |
+ |
1092 |
+CREATE TABLE IF NOT EXISTS `build_jobs` ( |
1093 |
+ `build_job_id` int(11) NOT NULL AUTO_INCREMENT, |
1094 |
+ `ebuild_id` int(11) NOT NULL, |
1095 |
+ `config_id` int(11) NOT NULL, |
1096 |
+ `status` enum('Waiting','Now') NOT NULL DEFAULT 'Waiting', |
1097 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1098 |
+ PRIMARY KEY (`build_job_id`), |
1099 |
+ KEY `ebuild_id` (`ebuild_id`), |
1100 |
+ KEY `config_id` (`config_id`), |
1101 |
+ KEY `time_stamp` (`time_stamp`) |
1102 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The build work list'; |
1103 |
+ |
1104 |
+-- -------------------------------------------------------- |
1105 |
+ |
1106 |
+-- |
1107 |
+-- Table structure for table `build_jobs_emerge_options` |
1108 |
+-- |
1109 |
+ |
1110 |
+CREATE TABLE IF NOT EXISTS `build_jobs_emerge_options` ( |
1111 |
+ `build_job_id` int(11) NOT NULL, |
1112 |
+ `eoption_id` int(11) NOT NULL, |
1113 |
+ KEY `build_job_id` (`build_job_id`), |
1114 |
+ KEY `eoption_id` (`eoption_id`) |
1115 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1116 |
+ |
1117 |
+-- -------------------------------------------------------- |
1118 |
+ |
1119 |
+-- |
1120 |
+-- Table structure for table `build_jobs_redo` |
1121 |
+-- |
1122 |
+ |
1123 |
+CREATE TABLE IF NOT EXISTS `build_jobs_redo` ( |
1124 |
+ `build_job_id` int(11) NOT NULL COMMENT 'build job id', |
1125 |
+ `fail_times` int(1) NOT NULL COMMENT 'Fail times max 5', |
1126 |
+ `fail_type` varchar(30) NOT NULL COMMENT 'Type of fail', |
1127 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Time', |
1128 |
+ KEY `build_job_id` (`build_job_id`) |
1129 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Build jobs that need to be redone'; |
1130 |
+ |
1131 |
+-- -------------------------------------------------------- |
1132 |
+ |
1133 |
+-- |
1134 |
+-- Table structure for table `build_jobs_use` |
1135 |
+-- |
1136 |
+ |
1137 |
+CREATE TABLE IF NOT EXISTS `build_jobs_use` ( |
1138 |
+ `build_job_id` int(11) NOT NULL, |
1139 |
+ `use_id` int(11) NOT NULL, |
1140 |
+ `status` enum('True','False') NOT NULL, |
1141 |
+ KEY `build_job_id` (`build_job_id`), |
1142 |
+ KEY `use_id` (`use_id`) |
1143 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1144 |
+ |
1145 |
+-- -------------------------------------------------------- |
1146 |
+ |
1147 |
+-- |
1148 |
+-- Table structure for table `build_logs` |
1149 |
+-- |
1150 |
+ |
1151 |
+CREATE TABLE IF NOT EXISTS `build_logs` ( |
1152 |
+ `build_log_id` int(11) NOT NULL AUTO_INCREMENT, |
1153 |
+ `ebuild_id` int(11) NOT NULL, |
1154 |
+ `fail` enum('True','False') NOT NULL DEFAULT 'False', |
1155 |
+ `summery_text` text NOT NULL, |
1156 |
+ `log_hash` varchar(100) NOT NULL, |
1157 |
+ `bug_id` int(10) NOT NULL DEFAULT '0', |
1158 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1159 |
+ PRIMARY KEY (`build_log_id`), |
1160 |
+ KEY `ebuild_id` (`ebuild_id`) |
1161 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main log info for the builds'; |
1162 |
+ |
1163 |
+-- -------------------------------------------------------- |
1164 |
+ |
1165 |
+-- |
1166 |
+-- Table structure for table `build_logs_config` |
1167 |
+-- |
1168 |
+ |
1169 |
+CREATE TABLE IF NOT EXISTS `build_logs_config` ( |
1170 |
+ `log_id` int(11) NOT NULL AUTO_INCREMENT, |
1171 |
+ `build_log_id` int(11) NOT NULL, |
1172 |
+ `config_id` int(11) NOT NULL, |
1173 |
+ `einfo_id` int(11) NOT NULL DEFAULT '1', |
1174 |
+ `logname` varchar(150) NOT NULL COMMENT 'filename of the log', |
1175 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1176 |
+ PRIMARY KEY (`log_id`), |
1177 |
+ KEY `config_id` (`config_id`), |
1178 |
+ KEY `build_log_id` (`build_log_id`), |
1179 |
+ KEY `einfo_id` (`einfo_id`) |
1180 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1181 |
+ |
1182 |
+-- -------------------------------------------------------- |
1183 |
+ |
1184 |
+-- |
1185 |
+-- Table structure for table `build_logs_emerge_options` |
1186 |
+-- |
1187 |
+ |
1188 |
+CREATE TABLE IF NOT EXISTS `build_logs_emerge_options` ( |
1189 |
+ `build_logs_id` int(11) NOT NULL, |
1190 |
+ `eoption_id` int(11) NOT NULL, |
1191 |
+ KEY `eoption_id` (`eoption_id`), |
1192 |
+ KEY `build_logs_id` (`build_logs_id`) |
1193 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1194 |
+ |
1195 |
+-- -------------------------------------------------------- |
1196 |
+ |
1197 |
+-- |
1198 |
+-- Table structure for table `build_logs_errors` |
1199 |
+-- |
1200 |
+ |
1201 |
+CREATE TABLE IF NOT EXISTS `build_logs_errors` ( |
1202 |
+ `id` int(11) NOT NULL AUTO_INCREMENT, |
1203 |
+ `build_log_id` int(11) NOT NULL, |
1204 |
+ `error_id` int(11) NOT NULL, |
1205 |
+ PRIMARY KEY (`id`), |
1206 |
+ KEY `build_log_id` (`build_log_id`), |
1207 |
+ KEY `error_id` (`error_id`) |
1208 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1209 |
+ |
1210 |
+-- -------------------------------------------------------- |
1211 |
+ |
1212 |
+-- |
1213 |
+-- Table structure for table `build_logs_hilight` |
1214 |
+-- |
1215 |
+ |
1216 |
+CREATE TABLE IF NOT EXISTS `build_logs_hilight` ( |
1217 |
+ `id` int(11) NOT NULL AUTO_INCREMENT, |
1218 |
+ `log_id` int(11) NOT NULL, |
1219 |
+ `start_line` int(11) NOT NULL, |
1220 |
+ `end_line` int(11) NOT NULL, |
1221 |
+ `hilight_css_id` int(11) NOT NULL, |
1222 |
+ PRIMARY KEY (`id`), |
1223 |
+ KEY `log_id` (`log_id`), |
1224 |
+ KEY `hilight_id` (`hilight_css_id`), |
1225 |
+ KEY `hilight_css_id` (`hilight_css_id`) |
1226 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1227 |
+ |
1228 |
+-- -------------------------------------------------------- |
1229 |
+ |
1230 |
+-- |
1231 |
+-- Table structure for table `build_logs_qa` |
1232 |
+-- |
1233 |
+ |
1234 |
+CREATE TABLE IF NOT EXISTS `build_logs_qa` ( |
1235 |
+ `build_log_id` int(11) NOT NULL, |
1236 |
+ `summery_text` text NOT NULL, |
1237 |
+ KEY `build_log_id` (`build_log_id`) |
1238 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1239 |
+ |
1240 |
+-- -------------------------------------------------------- |
1241 |
+ |
1242 |
+-- |
1243 |
+-- Table structure for table `build_logs_repoman` |
1244 |
+-- |
1245 |
+ |
1246 |
+CREATE TABLE IF NOT EXISTS `build_logs_repoman` ( |
1247 |
+ `build_logs_id` int(11) NOT NULL, |
1248 |
+ `summery_text` text NOT NULL, |
1249 |
+ KEY `build_logs_id` (`build_logs_id`) |
1250 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1251 |
+ |
1252 |
+-- -------------------------------------------------------- |
1253 |
+ |
1254 |
+-- |
1255 |
+-- Table structure for table `build_logs_use` |
1256 |
+-- |
1257 |
+ |
1258 |
+CREATE TABLE IF NOT EXISTS `build_logs_use` ( |
1259 |
+ `build_log_id` int(11) NOT NULL, |
1260 |
+ `use_id` int(11) NOT NULL, |
1261 |
+ `status` enum('True','False') NOT NULL, |
1262 |
+ KEY `build_log_id` (`build_log_id`), |
1263 |
+ KEY `use_id` (`use_id`) |
1264 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1265 |
+ |
1266 |
+-- -------------------------------------------------------- |
1267 |
+ |
1268 |
+-- |
1269 |
+-- Table structure for table `categories` |
1270 |
+-- |
1271 |
+ |
1272 |
+CREATE TABLE IF NOT EXISTS `categories` ( |
1273 |
+ `category_id` int(11) NOT NULL AUTO_INCREMENT, |
1274 |
+ `category` varchar(50) NOT NULL, |
1275 |
+ `active` enum('True','False') NOT NULL DEFAULT 'True', |
1276 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1277 |
+ PRIMARY KEY (`category_id`) |
1278 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categories main table (C)'; |
1279 |
+ |
1280 |
+-- -------------------------------------------------------- |
1281 |
+ |
1282 |
+-- |
1283 |
+-- Table structure for table `configs` |
1284 |
+-- |
1285 |
+ |
1286 |
+CREATE TABLE IF NOT EXISTS `configs` ( |
1287 |
+ `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Config index', |
1288 |
+ `hostname` varchar(50) NOT NULL, |
1289 |
+ `config` varchar(100) NOT NULL COMMENT 'Box/setup', |
1290 |
+ `default_config` enum('True','False') NOT NULL COMMENT 'Host setup', |
1291 |
+ PRIMARY KEY (`config_id`) |
1292 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main config table'; |
1293 |
+ |
1294 |
+-- -------------------------------------------------------- |
1295 |
+ |
1296 |
+-- |
1297 |
+-- Table structure for table `configs_emerge_options` |
1298 |
+-- |
1299 |
+ |
1300 |
+CREATE TABLE IF NOT EXISTS `configs_emerge_options` ( |
1301 |
+ `config_id` int(11) NOT NULL COMMENT 'config id', |
1302 |
+ `eoption_id` int(11) NOT NULL COMMENT 'emerge option id', |
1303 |
+ KEY `config_id` (`config_id`), |
1304 |
+ KEY `eoption_id` (`eoption_id`) |
1305 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Emerge command options for the configs'; |
1306 |
+ |
1307 |
+-- -------------------------------------------------------- |
1308 |
+ |
1309 |
+-- |
1310 |
+-- Table structure for table `configs_metadata` |
1311 |
+-- |
1312 |
+ |
1313 |
+CREATE TABLE IF NOT EXISTS `configs_metadata` ( |
1314 |
+ `config_id` int(11) NOT NULL, |
1315 |
+ `profile` varchar(50) NOT NULL, |
1316 |
+ `keyword_id` int(11) NOT NULL, |
1317 |
+ `make_conf_text` text NOT NULL, |
1318 |
+ `checksum` varchar(100) NOT NULL, |
1319 |
+ `active` enum('True','False') NOT NULL, |
1320 |
+ `config_error_text` text NOT NULL, |
1321 |
+ `updating` enum('True','False') NOT NULL, |
1322 |
+ `status` enum('Waiting','Runing','Stoped') NOT NULL, |
1323 |
+ `auto` enum('True','False') NOT NULL, |
1324 |
+ `git_www` varchar(100) NOT NULL COMMENT 'git repo www wiev address', |
1325 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1326 |
+ PRIMARY KEY (`config_id`), |
1327 |
+ KEY `keyword_id` (`keyword_id`), |
1328 |
+ KEY `config_id` (`config_id`) |
1329 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Config Status'; |
1330 |
+ |
1331 |
+-- -------------------------------------------------------- |
1332 |
+ |
1333 |
+-- |
1334 |
+-- Table structure for table `ebuilds` |
1335 |
+-- |
1336 |
+ |
1337 |
+CREATE TABLE IF NOT EXISTS `ebuilds` ( |
1338 |
+ `ebuild_id` int(11) NOT NULL AUTO_INCREMENT, |
1339 |
+ `package_id` int(11) NOT NULL, |
1340 |
+ `version` varchar(50) NOT NULL, |
1341 |
+ `checksum` varchar(100) NOT NULL, |
1342 |
+ `active` enum('True','False') NOT NULL DEFAULT 'True', |
1343 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1344 |
+ PRIMARY KEY (`ebuild_id`), |
1345 |
+ KEY `package_id` (`package_id`), |
1346 |
+ KEY `checksum` (`checksum`), |
1347 |
+ KEY `version` (`version`) |
1348 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version main table (V)'; |
1349 |
+ |
1350 |
+-- -------------------------------------------------------- |
1351 |
+ |
1352 |
+-- |
1353 |
+-- Table structure for table `ebuilds_iuse` |
1354 |
+-- |
1355 |
+ |
1356 |
+CREATE TABLE IF NOT EXISTS `ebuilds_iuse` ( |
1357 |
+ `ebuild_id` int(11) NOT NULL, |
1358 |
+ `use_id` int(11) NOT NULL, |
1359 |
+ `status` enum('True','False') NOT NULL, |
1360 |
+ KEY `ebuild_id` (`ebuild_id`), |
1361 |
+ KEY `use_id` (`use_id`) |
1362 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1363 |
+ |
1364 |
+-- -------------------------------------------------------- |
1365 |
+ |
1366 |
+-- |
1367 |
+-- Table structure for table `ebuilds_keywords` |
1368 |
+-- |
1369 |
+ |
1370 |
+CREATE TABLE IF NOT EXISTS `ebuilds_keywords` ( |
1371 |
+ `ebuild_id` int(11) NOT NULL, |
1372 |
+ `keyword_id` int(11) NOT NULL, |
1373 |
+ `status` enum('Stable','Unstable','Negative') NOT NULL, |
1374 |
+ KEY `ebuild_id` (`ebuild_id`), |
1375 |
+ KEY `keyword_id` (`keyword_id`) |
1376 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1377 |
+ |
1378 |
+-- -------------------------------------------------------- |
1379 |
+ |
1380 |
+-- |
1381 |
+-- Table structure for table `ebuilds_metadata` |
1382 |
+-- |
1383 |
+ |
1384 |
+CREATE TABLE IF NOT EXISTS `ebuilds_metadata` ( |
1385 |
+ `ebuild_id` int(11) NOT NULL, |
1386 |
+ `revision` varchar(10) NOT NULL COMMENT 'CVS revision', |
1387 |
+ KEY `ebuild_id` (`ebuild_id`) |
1388 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1389 |
+ |
1390 |
+-- -------------------------------------------------------- |
1391 |
+ |
1392 |
+-- |
1393 |
+-- Table structure for table `ebuilds_restrictions` |
1394 |
+-- |
1395 |
+ |
1396 |
+CREATE TABLE IF NOT EXISTS `ebuilds_restrictions` ( |
1397 |
+ `ebuild_id` int(11) NOT NULL, |
1398 |
+ `restriction_id` int(11) NOT NULL, |
1399 |
+ KEY `ebuild_id` (`ebuild_id`), |
1400 |
+ KEY `restriction_id` (`restriction_id`) |
1401 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1402 |
+ |
1403 |
+-- -------------------------------------------------------- |
1404 |
+ |
1405 |
+-- |
1406 |
+-- Table structure for table `emerge_info` |
1407 |
+-- |
1408 |
+ |
1409 |
+CREATE TABLE IF NOT EXISTS `emerge_info` ( |
1410 |
+ `einfo_id` int(11) NOT NULL AUTO_INCREMENT, |
1411 |
+ `checksum` varchar(30) NOT NULL, |
1412 |
+ `emerge_info_text` text NOT NULL, |
1413 |
+ UNIQUE KEY `einfo_id` (`einfo_id`) |
1414 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1415 |
+ |
1416 |
+-- -------------------------------------------------------- |
1417 |
+ |
1418 |
+-- |
1419 |
+-- Table structure for table `emerge_options` |
1420 |
+-- |
1421 |
+ |
1422 |
+CREATE TABLE IF NOT EXISTS `emerge_options` ( |
1423 |
+ `eoption_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'emerge command options id', |
1424 |
+ `eoption` varchar(15) NOT NULL COMMENT 'emerge command options', |
1425 |
+ PRIMARY KEY (`eoption_id`) |
1426 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1427 |
+ |
1428 |
+-- -------------------------------------------------------- |
1429 |
+ |
1430 |
+-- |
1431 |
+-- Table structure for table `errors_info` |
1432 |
+-- |
1433 |
+ |
1434 |
+CREATE TABLE IF NOT EXISTS `errors_info` ( |
1435 |
+ `error_id` int(11) NOT NULL AUTO_INCREMENT, |
1436 |
+ `error_name` varchar(10) NOT NULL, |
1437 |
+ `error_search` varchar(20) NOT NULL, |
1438 |
+ PRIMARY KEY (`error_id`) |
1439 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1440 |
+ |
1441 |
+-- -------------------------------------------------------- |
1442 |
+ |
1443 |
+-- |
1444 |
+-- Table structure for table `hilight` |
1445 |
+-- |
1446 |
+ |
1447 |
+CREATE TABLE IF NOT EXISTS `hilight` ( |
1448 |
+ `hilight_id` int(11) NOT NULL AUTO_INCREMENT, |
1449 |
+ `hilight_search` varchar(30) NOT NULL, |
1450 |
+ `hilight_search_end` varchar(30) NOT NULL, |
1451 |
+ `hilight_css_id` int(11) NOT NULL, |
1452 |
+ `hilight_start` int(11) NOT NULL, |
1453 |
+ `hilight_end` int(11) NOT NULL, |
1454 |
+ PRIMARY KEY (`hilight_id`), |
1455 |
+ KEY `hilight_css_id` (`hilight_css_id`) |
1456 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1457 |
+ |
1458 |
+-- -------------------------------------------------------- |
1459 |
+ |
1460 |
+-- |
1461 |
+-- Table structure for table `hilight_css` |
1462 |
+-- |
1463 |
+ |
1464 |
+CREATE TABLE IF NOT EXISTS `hilight_css` ( |
1465 |
+ `hilight_css_id` int(11) NOT NULL AUTO_INCREMENT, |
1466 |
+ `hilight_css_name` varchar(11) NOT NULL, |
1467 |
+ `hilight_css_collor` varchar(10) NOT NULL, |
1468 |
+ PRIMARY KEY (`hilight_css_id`) |
1469 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1470 |
+ |
1471 |
+-- -------------------------------------------------------- |
1472 |
+ |
1473 |
+-- |
1474 |
+-- Table structure for table `jobs` |
1475 |
+-- |
1476 |
+ |
1477 |
+CREATE TABLE IF NOT EXISTS `jobs` ( |
1478 |
+ `job_id` int(11) NOT NULL AUTO_INCREMENT, |
1479 |
+ `job_type_id` int(11) NOT NULL, |
1480 |
+ `status` enum('Runing','Done','Waiting') NOT NULL DEFAULT 'Waiting', |
1481 |
+ `user` varchar(20) NOT NULL, |
1482 |
+ `config_id` int(11) NOT NULL, |
1483 |
+ `run_config_id` int(11) NOT NULL, |
1484 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1485 |
+ PRIMARY KEY (`job_id`), |
1486 |
+ KEY `config_id` (`config_id`), |
1487 |
+ KEY `run_config_id` (`run_config_id`), |
1488 |
+ KEY `job_type_id` (`job_type_id`) |
1489 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1490 |
+ |
1491 |
+-- -------------------------------------------------------- |
1492 |
+ |
1493 |
+-- |
1494 |
+-- Table structure for table `job_types` |
1495 |
+-- |
1496 |
+ |
1497 |
+CREATE TABLE IF NOT EXISTS `job_types` ( |
1498 |
+ `job_type_id` int(11) NOT NULL AUTO_INCREMENT, |
1499 |
+ `type` varchar(20) NOT NULL, |
1500 |
+ PRIMARY KEY (`job_type_id`) |
1501 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table for what type of work'; |
1502 |
+ |
1503 |
+-- -------------------------------------------------------- |
1504 |
+ |
1505 |
+-- |
1506 |
+-- Table structure for table `keywords` |
1507 |
+-- |
1508 |
+ |
1509 |
+CREATE TABLE IF NOT EXISTS `keywords` ( |
1510 |
+ `keyword_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'keyword index', |
1511 |
+ `keyword` varchar(15) NOT NULL COMMENT 'keyword', |
1512 |
+ PRIMARY KEY (`keyword_id`) |
1513 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='KEYWORD'; |
1514 |
+ |
1515 |
+-- -------------------------------------------------------- |
1516 |
+ |
1517 |
+-- |
1518 |
+-- Table structure for table `logs` |
1519 |
+-- |
1520 |
+ |
1521 |
+CREATE TABLE IF NOT EXISTS `logs` ( |
1522 |
+ `log_id` int(11) NOT NULL AUTO_INCREMENT, |
1523 |
+ `config_id` int(11) NOT NULL, |
1524 |
+ `log_type` enum('info','error','debug','qa') NOT NULL, |
1525 |
+ `msg` text NOT NULL, |
1526 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1527 |
+ PRIMARY KEY (`log_id`), |
1528 |
+ KEY `config_id` (`config_id`) |
1529 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1530 |
+ |
1531 |
+-- -------------------------------------------------------- |
1532 |
+ |
1533 |
+-- |
1534 |
+-- Table structure for table `packages` |
1535 |
+-- |
1536 |
+ |
1537 |
+CREATE TABLE IF NOT EXISTS `packages` ( |
1538 |
+ `package_id` int(11) NOT NULL AUTO_INCREMENT, |
1539 |
+ `category_id` int(11) NOT NULL, |
1540 |
+ `package` varchar(50) NOT NULL, |
1541 |
+ `repo_id` int(11) NOT NULL, |
1542 |
+ `checksum` varchar(100) NOT NULL, |
1543 |
+ `active` enum('True','False') NOT NULL, |
1544 |
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
1545 |
+ PRIMARY KEY (`package_id`), |
1546 |
+ KEY `category_id` (`category_id`), |
1547 |
+ KEY `repo_id` (`repo_id`), |
1548 |
+ KEY `checksum` (`checksum`), |
1549 |
+ KEY `package` (`package`) |
1550 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Packages main table (P)'; |
1551 |
+ |
1552 |
+-- -------------------------------------------------------- |
1553 |
+ |
1554 |
+-- |
1555 |
+-- Table structure for table `packages_metadata` |
1556 |
+-- |
1557 |
+ |
1558 |
+CREATE TABLE IF NOT EXISTS `packages_metadata` ( |
1559 |
+ `package_id` int(11) NOT NULL, |
1560 |
+ `email` varchar(50) NOT NULL, |
1561 |
+ `checksum` varchar(100) NOT NULL, |
1562 |
+ KEY `package_id` (`package_id`) |
1563 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1564 |
+ |
1565 |
+-- -------------------------------------------------------- |
1566 |
+ |
1567 |
+-- |
1568 |
+-- Table structure for table `repos` |
1569 |
+-- |
1570 |
+ |
1571 |
+CREATE TABLE IF NOT EXISTS `repos` ( |
1572 |
+ `repo_id` int(11) NOT NULL AUTO_INCREMENT, |
1573 |
+ `repo` varchar(100) NOT NULL, |
1574 |
+ PRIMARY KEY (`repo_id`) |
1575 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Repo main table (repo)'; |
1576 |
+ |
1577 |
+-- -------------------------------------------------------- |
1578 |
+ |
1579 |
+-- |
1580 |
+-- Table structure for table `restrictions` |
1581 |
+-- |
1582 |
+ |
1583 |
+CREATE TABLE IF NOT EXISTS `restrictions` ( |
1584 |
+ `restriction_id` int(11) NOT NULL AUTO_INCREMENT, |
1585 |
+ `restriction` varchar(50) NOT NULL, |
1586 |
+ PRIMARY KEY (`restriction_id`) |
1587 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1588 |
+ |
1589 |
+-- -------------------------------------------------------- |
1590 |
+ |
1591 |
+-- |
1592 |
+-- Table structure for table `uses` |
1593 |
+-- |
1594 |
+ |
1595 |
+CREATE TABLE IF NOT EXISTS `uses` ( |
1596 |
+ `use_id` int(11) NOT NULL AUTO_INCREMENT, |
1597 |
+ `flag` varchar(50) NOT NULL, |
1598 |
+ PRIMARY KEY (`use_id`) |
1599 |
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Use flags main table'; |
1600 |
+ |
1601 |
+-- |
1602 |
+-- Constraints for dumped tables |
1603 |
+-- |
1604 |
+ |
1605 |
+-- |
1606 |
+-- Constraints for table `build_jobs` |
1607 |
+-- |
1608 |
+ALTER TABLE `build_jobs` |
1609 |
+ ADD CONSTRAINT `build_jobs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1610 |
+ ADD CONSTRAINT `build_jobs_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1611 |
+ |
1612 |
+-- |
1613 |
+-- Constraints for table `build_jobs_emerge_options` |
1614 |
+-- |
1615 |
+ALTER TABLE `build_jobs_emerge_options` |
1616 |
+ ADD CONSTRAINT `build_jobs_emerge_options_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`), |
1617 |
+ ADD CONSTRAINT `build_jobs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
1618 |
+ |
1619 |
+-- |
1620 |
+-- Constraints for table `build_jobs_redo` |
1621 |
+-- |
1622 |
+ALTER TABLE `build_jobs_redo` |
1623 |
+ ADD CONSTRAINT `build_jobs_redo_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`); |
1624 |
+ |
1625 |
+-- |
1626 |
+-- Constraints for table `build_jobs_use` |
1627 |
+-- |
1628 |
+ALTER TABLE `build_jobs_use` |
1629 |
+ ADD CONSTRAINT `build_jobs_use_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`), |
1630 |
+ ADD CONSTRAINT `build_jobs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
1631 |
+ |
1632 |
+-- |
1633 |
+-- Constraints for table `build_logs` |
1634 |
+-- |
1635 |
+ALTER TABLE `build_logs` |
1636 |
+ ADD CONSTRAINT `build_logs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`); |
1637 |
+ |
1638 |
+-- |
1639 |
+-- Constraints for table `build_logs_config` |
1640 |
+-- |
1641 |
+ALTER TABLE `build_logs_config` |
1642 |
+ ADD CONSTRAINT `build_logs_config_ibfk_3` FOREIGN KEY (`einfo_id`) REFERENCES `emerge_info` (`einfo_id`), |
1643 |
+ ADD CONSTRAINT `build_logs_config_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`), |
1644 |
+ ADD CONSTRAINT `build_logs_config_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1645 |
+ |
1646 |
+-- |
1647 |
+-- Constraints for table `build_logs_emerge_options` |
1648 |
+-- |
1649 |
+ALTER TABLE `build_logs_emerge_options` |
1650 |
+ ADD CONSTRAINT `build_logs_emerge_options_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`), |
1651 |
+ ADD CONSTRAINT `build_logs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
1652 |
+ |
1653 |
+-- |
1654 |
+-- Constraints for table `build_logs_errors` |
1655 |
+-- |
1656 |
+ALTER TABLE `build_logs_errors` |
1657 |
+ ADD CONSTRAINT `build_logs_errors_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`), |
1658 |
+ ADD CONSTRAINT `build_logs_errors_ibfk_2` FOREIGN KEY (`error_id`) REFERENCES `errors_info` (`error_id`); |
1659 |
+ |
1660 |
+-- |
1661 |
+-- Constraints for table `build_logs_hilight` |
1662 |
+-- |
1663 |
+ALTER TABLE `build_logs_hilight` |
1664 |
+ ADD CONSTRAINT `build_logs_hilight_ibfk_4` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`), |
1665 |
+ ADD CONSTRAINT `build_logs_hilight_ibfk_5` FOREIGN KEY (`log_id`) REFERENCES `build_logs_config` (`log_id`); |
1666 |
+ |
1667 |
+-- |
1668 |
+-- Constraints for table `build_logs_qa` |
1669 |
+-- |
1670 |
+ALTER TABLE `build_logs_qa` |
1671 |
+ ADD CONSTRAINT `build_logs_qa_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`); |
1672 |
+ |
1673 |
+-- |
1674 |
+-- Constraints for table `build_logs_repoman` |
1675 |
+-- |
1676 |
+ALTER TABLE `build_logs_repoman` |
1677 |
+ ADD CONSTRAINT `build_logs_repoman_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`); |
1678 |
+ |
1679 |
+-- |
1680 |
+-- Constraints for table `build_logs_use` |
1681 |
+-- |
1682 |
+ALTER TABLE `build_logs_use` |
1683 |
+ ADD CONSTRAINT `build_logs_use_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`), |
1684 |
+ ADD CONSTRAINT `build_logs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
1685 |
+ |
1686 |
+-- |
1687 |
+-- Constraints for table `configs_emerge_options` |
1688 |
+-- |
1689 |
+ALTER TABLE `configs_emerge_options` |
1690 |
+ ADD CONSTRAINT `configs_emerge_options_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`), |
1691 |
+ ADD CONSTRAINT `configs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`); |
1692 |
+ |
1693 |
+-- |
1694 |
+-- Constraints for table `configs_metadata` |
1695 |
+-- |
1696 |
+ALTER TABLE `configs_metadata` |
1697 |
+ ADD CONSTRAINT `configs_metadata_ibfk_1` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`), |
1698 |
+ ADD CONSTRAINT `configs_metadata_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1699 |
+ |
1700 |
+-- |
1701 |
+-- Constraints for table `ebuilds` |
1702 |
+-- |
1703 |
+ALTER TABLE `ebuilds` |
1704 |
+ ADD CONSTRAINT `ebuilds_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`); |
1705 |
+ |
1706 |
+-- |
1707 |
+-- Constraints for table `ebuilds_iuse` |
1708 |
+-- |
1709 |
+ALTER TABLE `ebuilds_iuse` |
1710 |
+ ADD CONSTRAINT `ebuilds_iuse_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1711 |
+ ADD CONSTRAINT `ebuilds_iuse_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`); |
1712 |
+ |
1713 |
+-- |
1714 |
+-- Constraints for table `ebuilds_keywords` |
1715 |
+-- |
1716 |
+ALTER TABLE `ebuilds_keywords` |
1717 |
+ ADD CONSTRAINT `ebuilds_keywords_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1718 |
+ ADD CONSTRAINT `ebuilds_keywords_ibfk_2` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`); |
1719 |
+ |
1720 |
+-- |
1721 |
+-- Constraints for table `ebuilds_metadata` |
1722 |
+-- |
1723 |
+ALTER TABLE `ebuilds_metadata` |
1724 |
+ ADD CONSTRAINT `ebuilds_metadata_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`); |
1725 |
+ |
1726 |
+-- |
1727 |
+-- Constraints for table `ebuilds_restrictions` |
1728 |
+-- |
1729 |
+ALTER TABLE `ebuilds_restrictions` |
1730 |
+ ADD CONSTRAINT `ebuilds_restrictions_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`), |
1731 |
+ ADD CONSTRAINT `ebuilds_restrictions_ibfk_2` FOREIGN KEY (`restriction_id`) REFERENCES `restrictions` (`restriction_id`); |
1732 |
+ |
1733 |
+-- |
1734 |
+-- Constraints for table `hilight` |
1735 |
+-- |
1736 |
+ALTER TABLE `hilight` |
1737 |
+ ADD CONSTRAINT `hilight_ibfk_1` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`); |
1738 |
+ |
1739 |
+-- |
1740 |
+-- Constraints for table `jobs` |
1741 |
+-- |
1742 |
+ALTER TABLE `jobs` |
1743 |
+ ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`), |
1744 |
+ ADD CONSTRAINT `jobs_ibfk_2` FOREIGN KEY (`run_config_id`) REFERENCES `configs` (`config_id`), |
1745 |
+ ADD CONSTRAINT `jobs_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `job_types` (`job_type_id`); |
1746 |
+ |
1747 |
+-- |
1748 |
+-- Constraints for table `logs` |
1749 |
+-- |
1750 |
+ALTER TABLE `logs` |
1751 |
+ ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`); |
1752 |
+ |
1753 |
+-- |
1754 |
+-- Constraints for table `packages` |
1755 |
+-- |
1756 |
+ALTER TABLE `packages` |
1757 |
+ ADD CONSTRAINT `packages_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`), |
1758 |
+ ADD CONSTRAINT `packages_ibfk_2` FOREIGN KEY (`repo_id`) REFERENCES `repos` (`repo_id`); |
1759 |
+ |
1760 |
+-- |
1761 |
+-- Constraints for table `packages_metadata` |
1762 |
+-- |
1763 |
+ALTER TABLE `packages_metadata` |
1764 |
+ ADD CONSTRAINT `packages_metadata_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`); |
1765 |
+ |
1766 |
+DELIMITER $$ |
1767 |
+-- |
1768 |
+-- Events |
1769 |
+-- |
1770 |
CREATE DEFINER=`zobcs`@`localhost` EVENT `add_esync_updatedb_jobs` ON SCHEDULE EVERY 1 HOUR STARTS '2012-12-23 17:15:13' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN |
1771 |
CALL add_jobs('esync'); |
1772 |
CALL add_jobs('updatedb'); |
1773 |
-END$$ |
1774 |
- |
1775 |
-DELIMITER ; |
1776 |
- |
1777 |
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
1778 |
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
1779 |
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
1780 |
+END$$ |
1781 |
+ |
1782 |
+DELIMITER ; |
1783 |
+ |
1784 |
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
1785 |
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
1786 |
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |