From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/sql/, ebuild/dev-python/gobs/, ebuild/dev-python/gobs/files/, gobs/pym/, ...
Date: Sun, 5 Jan 2014 10:29:12 +0000 (UTC) [thread overview]
Message-ID: <1388917658.9329979150c291f77fa2082f2235baf8426842e5.zorry@gentoo> (raw)
commit: 9329979150c291f77fa2082f2235baf8426842e5
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 5 10:27:38 2014 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 10:27:38 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=93299791
update ebuild, errors, dump of db and setup text
---
.../gobs/files/zobcs_portage_Scheduler.patch | 6 +
.../gobs/files/zobcs_portage_actions.patch | 41 +-
.../dev-python/gobs/files/zobcs_portage_main.patch | 27 +-
ebuild/dev-python/gobs/gobs-9999.ebuild | 15 +-
gobs/doc/Setup.txt | 2 +-
gobs/pym/build_log.py | 2 +-
gobs/pym/mysql_querys.py | 4 +-
gobs/pym/package.py | 24 +-
gobs/sql/zobcs.sql | 1444 ++++++++++----------
9 files changed, 798 insertions(+), 767 deletions(-)
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch b/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch
index df76a7b..fafc818 100644
--- a/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_Scheduler.patch
@@ -1,3 +1,9 @@
+2014-01-05 Magnus Granberg <zorry@gentoo.org>
+
+ We copy Scheduler.py from portage and patch it.
+ Fix so we can use add_buildlog_main()
+ We use add_buildlog_main() for loging.
+
--- a/gobs/pym/Scheduler.py 2013-03-22 17:57:23.000000000 +0100
+++ b/gobs/pym/Scheduler.py 2012-12-21 02:09:28.082301168 +0100
@@ -62,6 +62,8 @@ from _emerge.PackageMerge import Package
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch b/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch
index 2244ae7..546073d 100644
--- a/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_actions.patch
@@ -1,3 +1,10 @@
+2014-01-05 Magnus Granberg <zorry@gentoo.org>
+
+ We copy action.py from portage and patch it.
+ Use the patched Scheduler and add build_dict so it can be uset.
+ We use or own mydepgraph (build_mydepgraph) that call backtrack_depgraph.
+ And pass unresolvable in action_depclean so we can use it later.
+
--- a/gobs/pym/actions.py 2013-03-22 17:57:23.000000000 +0100
+++ b/gobs/pym/actions.py 2013-03-22 19:00:43.265582143 +0100
@@ -72,7 +72,7 @@ from _emerge.MetadataRegen import Metada
@@ -13,7 +20,7 @@
from _emerge.UseFlagDisplay import pkg_use_display
from _emerge.userquery import userquery
-+from gobs.build_depgraph import build_mydepgraph
++from gobs.build_depgraph import build_mydepgraph
+
if sys.hexversion >= 0x3000000:
long = int
@@ -107,7 +114,7 @@
- if unresolved_deps():
- return 1, [], False, 0
+ return 1, [], False, 0, []
-+ unresolvable = unresolved_deps():
++ unresolvable = unresolved_deps()
+ if not unresolvable is None:
+ return 1, [], False, 0, unresolvable
@@ -133,21 +140,21 @@
def action_deselect(settings, trees, opts, atoms):
enter_invalid = '--ask-enter-invalid' in opts
-@@ -3508,7 +3504,7 @@ def repo_name_duplicate_check(trees):
+@@ -3607,7 +3607,7 @@ def repo_name_duplicate_check(trees):
return bool(ignored_repos)
--def run_action(settings, trees, mtimedb, myaction, myopts, myfiles,
-+def run_action(settings, trees, mtimedb, myaction, myopts, myfiles, build_dict,
- gc_locals=None):
-
- # The caller may have its local variables garbage collected, so
-@@ -3925,7 +3921,7 @@ def run_action(settings, trees, mtimedb,
- if "--pretend" not in myopts:
- display_news_notification(root_config, myopts)
- retval = action_build(settings, trees, mtimedb,
-- myopts, myaction, myfiles, spinner)
-+ myopts, myaction, myfiles, spinner, build_dict)
- post_emerge(myaction, myopts, myfiles, settings['EROOT'],
- trees, mtimedb, retval)
-
+-def run_action(emerge_config):
++def run_action(emerge_config, build_dict):
+
+ # skip global updates prior to sync, since it's called after sync
+ if emerge_config.action not in ('help', 'info', 'sync', 'version') and \
+@@ -4059,7 +4059,7 @@ def run_action(emerge_config):
+ retval = action_build(emerge_config.target_config.settings,
+ emerge_config.trees, emerge_config.target_config.mtimedb,
+ emerge_config.opts, emerge_config.action,
+- emerge_config.args, spinner)
++ emerge_config.args, spinner, build_dict)
+ post_emerge(emerge_config.action, emerge_config.opts,
+ emerge_config.args, emerge_config.target_config.root,
+ emerge_config.trees, emerge_config.target_config.mtimedb, retval)
diff --git a/ebuild/dev-python/gobs/files/zobcs_portage_main.patch b/ebuild/dev-python/gobs/files/zobcs_portage_main.patch
index dc54b95..4031dbd 100644
--- a/ebuild/dev-python/gobs/files/zobcs_portage_main.patch
+++ b/ebuild/dev-python/gobs/files/zobcs_portage_main.patch
@@ -1,3 +1,9 @@
+2014-01-05 Magnus Granberg <zorry@gentoo.org>
+
+ We copy main.py from portage and patch it.
+ Use or own patched actions.
+ We pass build_dict to some functions.
+
--- a/gobs/pym/main.py 2013-03-22 17:57:23.000000000 +0100
+++ b/gobs/pym/main.py 2012-12-06 03:32:56.104889716 +0100
@@ -11,7 +11,7 @@ portage.proxy.lazyimport.lazyimport(glob
@@ -9,7 +15,7 @@
'validate_ebuild_environment',
'_emerge.help:help@emerge_help',
)
-@@ -991,14 +966,19 @@ def profile_check(trees, myaction):
+@@ -968,15 +968,20 @@ def profile_check(trees, myaction):
return 1
return os.EX_OK
@@ -24,16 +30,19 @@
if args is None:
args = sys.argv[1:]
+ args = portage._decode_argv(args)
++
+ if build_dict is None:
+ build_dict = {}
-+
+
# Disable color until we're sure that it should be enabled (after
# EMERGE_DEFAULT_OPTS has been parsed).
- portage.output.havecolor = 0
-@@ -1040,5 +1022,5 @@ def emerge_main(args=None):
- tmpcmdline.extend(args)
- myaction, myopts, myfiles = parse_opts(tmpcmdline)
+@@ -1028,7 +1028,7 @@ def emerge_main(args=None):
+ parse_opts(tmpcmdline)
-- return run_action(settings, trees, mtimedb, myaction, myopts, myfiles,
-+ return run_action(settings, trees, mtimedb, myaction, myopts, myfiles, build_dict,
- gc_locals=locals().clear)
+ try:
+- return run_action(emerge_config)
++ return run_action(emerge_config, build_dict)
+ finally:
+ # Call destructors for our portdbapi instances.
+ for x in emerge_config.trees.values():
diff --git a/ebuild/dev-python/gobs/gobs-9999.ebuild b/ebuild/dev-python/gobs/gobs-9999.ebuild
index c1cb510..878f222 100644
--- a/ebuild/dev-python/gobs/gobs-9999.ebuild
+++ b/ebuild/dev-python/gobs/gobs-9999.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI="2"
-PYTHON_DEPEND="*:2.7"
+EAPI="5"
+PYTHON_COMPAT=( python{2_7, 3_2, 3_3} )
SUPPORT_PYTHON_ABIS="1"
-inherit distutils git-2 eutils
+inherit distutils-r1 git-2
DESCRIPTION="Gobs"
HOMEPAGE="http://git.overlays.gentoo.org/gitroot/dev/zorry.git"
@@ -17,14 +17,11 @@ SLOT="0"
IUSE="+mysql"
RDEPEND="sys-apps/portage
- >=dev-python/git-python-0.3.2_rc1
mysql? ( dev-python/mysql-connector-python )"
DEPEND="${RDEPEND}
dev-python/setuptools"
-# RESTRICT_PYTHON_ABIS="3.*"
-
EGIT_REPO_URI="http://git.overlays.gentoo.org/gitroot/dev/zorry.git"
PYTHON_MODNAME="gobs"
@@ -47,8 +44,8 @@ src_install() {
doins ${FILESDIR}/gobs.conf || die
dosbin ${S}/gobs/bin/gobs_host_jobs || die
dosbin ${S}/gobs/bin/gobs_guest_jobs || die
- dodoc ${S}/gobs/sql/pgdump.sql.gz || die
+ dodoc ${S}/gobs/sql/zobcs.sql || die
dodoc ${S}/gobs/doc/Setup.txt || die
- distutils_src_install
+ distutils-r1_src_install
}
diff --git a/gobs/doc/Setup.txt b/gobs/doc/Setup.txt
index 3c01382..e88da72 100644
--- a/gobs/doc/Setup.txt
+++ b/gobs/doc/Setup.txt
@@ -1,6 +1,6 @@
1. Setup the Backend
Setup the gobs.conf for the db.
Change GOBSGITREPONAME to point to the git repo with your configs for the profiles/setups.
-Import the *dump.sql.gz to your sql.
+Import the *zobcs.sql to your mysql.
The portage/base/make.conf should be in the base profile/setup
The porfiles dir need a dir call config with a parent file that point to base profile
diff --git a/gobs/pym/build_log.py b/gobs/pym/build_log.py
index 38e2e25..10b0d2e 100644
--- a/gobs/pym/build_log.py
+++ b/gobs/pym/build_log.py
@@ -189,7 +189,7 @@ def search_buildlog(conn, logfile_text):
i = i + 1
adict = {}
adict['hilight'] = hilight_tmp['hilight']
- new_hilight_dict[hilight_tmp[i] = adict
+ new_hilight_dict[hilight_tmp[i]] = adict
elif index in new_hilight_dict:
if new_hilight_dict[hilight_tmp[index]][['hilight'] == None:
new_hilight_dict[hilight_tmp[index]][['hilight'] = hilight_tmp['hilight']
diff --git a/gobs/pym/mysql_querys.py b/gobs/pym/mysql_querys.py
index b5c2953..e8f2073 100644
--- a/gobs/pym/mysql_querys.py
+++ b/gobs/pym/mysql_querys.py
@@ -166,7 +166,7 @@ def get_package_metadata_sql(connection, package_id):
return entries[0]
return None
-def update_package_metadata((connection, package_metadataDict):
+def update_package_metadata(connection, package_metadataDict):
cursor = connection.cursor()
sqlQ1 ='SELECT package_id FROM packages_metadata WHERE package_id = %s'
sqlQ2 = 'UPDATE packages_metadata SET checksum = %s, email = %s, active = %s WHERE package_id = %s'
@@ -406,7 +406,7 @@ def add_old_ebuild(connection, package_id, old_ebuild_list):
sqlQ1 = "UPDATE ebuilds SET active = 'False' WHERE ebuild_id = %s"
sqlQ3 = "SELECT build_job_id FROM build_jobs WHERE ebuild_id = %s"
for ebuild_id in old_ebuild_list:
- cursor.execute(sqlQ3, (ebuild_id))
+ cursor.execute(sqlQ3, (ebuild_id),)
build_job_id_list = cursor.fetchall()
if build_job_id_list is not None:
for build_job_id in build_job_id_list:
diff --git a/gobs/pym/package.py b/gobs/pym/package.py
index 12f1afa..a287826 100644
--- a/gobs/pym/package.py
+++ b/gobs/pym/package.py
@@ -9,7 +9,7 @@ from gobs.mysql_querys import get_config, get_config_id, add_gobs_logs, get_defa
add_new_build_job, get_config_id_list, update_manifest_sql, add_new_manifest_sql, \
add_new_ebuild_sql, get_ebuild_id_db, add_old_ebuild, get_ebuild_id_list, \
get_ebuild_checksum, get_manifest_db, get_cp_repo_from_package_id, \
- get_cp_from_package_id
+ get_cp_from_package_id, get_package_metadata_sql, update_package_metadata
from gobs.readconf import get_conf_settings
reader=get_conf_settings()
gobs_settings_dict=reader.read_gobs_settings_all()
@@ -160,15 +160,25 @@ class gobs_package(object):
package_metadataDict = {}
# changelog_checksum_tree = portage.checksum.sha256hash(pkgdir + "/ChangeLog")
# changelog_text_tree = get_file_text(pkgdir + "/ChangeLog")
- pkg_md = MetaDataXMLpkgdir + "/metadata.xml")
+ herd = None
+ pkg_md = MetaDataXML(pkgdir + "/metadata.xml", herd)
#metadata_xml_text_tree = get_file_text(pkgdir + "/metadata.xml")
# attDict['changelog_checksum'] = changelog_checksum_tree[0]
# attDict['changelog_text'] = changelog_text_tree
- # attDict['metadata_xml_herds'] = pkg_md.herds()
+ tmp_herds = pkg_md.herds()
+ if tmp_herds == ():
+ attDict['metadata_xml_herds'] = 'none'
+ else:
+ attDict['metadata_xml_herds'] = tmp_herds[0]
md_email_list = []
for maint in pkg_md.maintainers():
md_email_list.append(maint.email)
- attDict['metadata_xml_email'] = md_email_list
+ if md_email_list == []:
+ if tmp_herds == ():
+ log_msg = "Metadata file %s missing Email" % (pkgdir + "/metadata.xml")
+ add_gobs_logs(self._conn, log_msg, "qa", self._config_id)
+ md_email_list.append(attDict['metadata_xml_herds'] + '@gentoo.org')
+ attDict['metadata_xml_email'] = md_email_list
attDict['metadata_xml_checksum'] = portage.checksum.sha256hash(pkgdir + "/metadata.xml")[0]
#attDict['metadata_xml_text'] = metadata_xml_text_tree
package_metadataDict[package_id] = attDict
@@ -189,7 +199,7 @@ class gobs_package(object):
add_old_ebuild(self._conn, package_id, old_ebuild_id_list)
package_metadata_checksum_sql = get_package_metadata_sql(self._conn, package_id)
- if package_metadata_checksum_sql is None or package_metadata_checksum_sql != package_metadataDict['package_id']['metadata_xml_checksum']:
+ if package_metadata_checksum_sql is None or package_metadata_checksum_sql != package_metadataDict[package_id]['metadata_xml_checksum']:
update_package_metadata(self._conn, package_metadataDict)
# update the cp manifest checksum
@@ -226,7 +236,7 @@ class gobs_package(object):
return
package_id = add_new_manifest_sql(self._conn, cp, repo)
- package_metadataDict = get_package_metadataDict(self, pkgdir, package_id)
+ package_metadataDict = self.get_package_metadataDict(pkgdir, package_id)
# Get the ebuild list for cp
mytree = []
mytree.append(repodir)
@@ -329,7 +339,7 @@ class gobs_package(object):
# Remove cpv from packageDict and add ebuild to new ebuils list
del packageDict[cpv]
new_ebuild_id_list.append(get_ebuild_id_db(self._conn, ebuild_version_checksum_tree, package_id)[0])
- package_metadataDict = get_package_metadataDict(self, pkgdir, package_id)
+ package_metadataDict = self.get_package_metadataDict(pkgdir, package_id)
self.add_package(packageDict, package_metadataDict, package_id, new_ebuild_id_list, old_ebuild_id_list, manifest_checksum_tree)
log_msg = "C %s:%s ... Done." % (cp, repo)
diff --git a/gobs/sql/zobcs.sql b/gobs/sql/zobcs.sql
index a87136c..2d1090e 100644
--- a/gobs/sql/zobcs.sql
+++ b/gobs/sql/zobcs.sql
@@ -1,32 +1,31 @@
--- phpMyAdmin SQL Dump
--- version 3.5.2.2
--- http://www.phpmyadmin.net
---
--- Host: localhost
--- Generation Time: Apr 25, 2013 at 12:32 AM
--- Server version: 5.5.28-MariaDB-log
--- PHP Version: 5.4.6--pl0-gentoo
-
-SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-SET time_zone = "+00:00";
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-
---
--- Database: `zobcs`
---
-
-DELIMITER $$
---
--- Procedures
---
-DROP PROCEDURE IF EXISTS `add_jobs`$$
-CREATE DEFINER=`zobcs`@`localhost` PROCEDURE `add_jobs`(IN `in_type` VARCHAR(20) CHARSET utf8)
- MODIFIES SQL DATA
+-- phpMyAdmin SQL Dump
+-- version 3.5.2.2
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost
+-- Generation Time: Jan 05, 2014 at 10:19 AM
+-- Server version: 5.5.32-MariaDB-log
+-- PHP Version: 5.4.23-pl0-gentoo
+
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+--
+-- Database: `zobcs`
+--
+
+DELIMITER $$
+--
+-- Procedures
+--
+CREATE DEFINER=`zobcs`@`localhost` PROCEDURE `add_jobs`(IN `in_type` VARCHAR(20) CHARSET utf8)
+ MODIFIES SQL DATA
BEGIN
DECLARE in_config_id INT;
DECLARE in_job_type_id INT;
@@ -45,698 +44,701 @@ BEGIN
ELSE
INSERT INTO jobs (job_type_id, user, config_id, run_config_id) VALUES ( in_job_type_id, 'cron', in_config_id, in_config_id);
END IF;
-END$$
-
-DELIMITER ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_jobs`
---
-
-DROP TABLE IF EXISTS `build_jobs`;
-CREATE TABLE IF NOT EXISTS `build_jobs` (
- `build_job_id` int(11) NOT NULL AUTO_INCREMENT,
- `ebuild_id` int(11) NOT NULL,
- `config_id` int(11) NOT NULL,
- `status` enum('Waiting','Now') NOT NULL DEFAULT 'Waiting',
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`build_job_id`),
- KEY `ebuild_id` (`ebuild_id`),
- KEY `config_id` (`config_id`),
- KEY `time_stamp` (`time_stamp`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The build work list' AUTO_INCREMENT=23547 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_jobs_emerge_options`
---
-
-DROP TABLE IF EXISTS `build_jobs_emerge_options`;
-CREATE TABLE IF NOT EXISTS `build_jobs_emerge_options` (
- `build_job_id` int(11) NOT NULL,
- `eoption_id` int(11) NOT NULL,
- KEY `build_job_id` (`build_job_id`),
- KEY `eoption_id` (`eoption_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_jobs_redo`
---
-
-DROP TABLE IF EXISTS `build_jobs_redo`;
-CREATE TABLE IF NOT EXISTS `build_jobs_redo` (
- `build_job_id` int(11) NOT NULL COMMENT 'build job id',
- `fail_times` int(1) NOT NULL COMMENT 'Fail times max 5',
- `fail_type` varchar(30) NOT NULL COMMENT 'Type of fail',
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Time',
- KEY `build_job_id` (`build_job_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Build jobs that need to be redone';
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_jobs_use`
---
-
-DROP TABLE IF EXISTS `build_jobs_use`;
-CREATE TABLE IF NOT EXISTS `build_jobs_use` (
- `build_job_id` int(11) NOT NULL,
- `use_id` int(11) NOT NULL,
- `status` enum('True','False') NOT NULL,
- KEY `build_job_id` (`build_job_id`),
- KEY `use_id` (`use_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs`
---
-
-DROP TABLE IF EXISTS `build_logs`;
-CREATE TABLE IF NOT EXISTS `build_logs` (
- `build_log_id` int(11) NOT NULL AUTO_INCREMENT,
- `ebuild_id` int(11) NOT NULL,
- `fail` enum('True','False') NOT NULL DEFAULT 'False',
- `summery_text` text NOT NULL,
- `log_hash` varchar(100) NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`build_log_id`),
- KEY `ebuild_id` (`ebuild_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main log info for the builds' AUTO_INCREMENT=19591 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_config`
---
-
-DROP TABLE IF EXISTS `build_logs_config`;
-CREATE TABLE IF NOT EXISTS `build_logs_config` (
- `log_id` int(11) NOT NULL AUTO_INCREMENT,
- `build_log_id` int(11) NOT NULL,
- `config_id` int(11) NOT NULL,
- `logname` varchar(150) NOT NULL COMMENT 'filename of the log',
- PRIMARY KEY (`log_id`),
- KEY `config_id` (`config_id`),
- KEY `build_log_id` (`build_log_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=19636 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_emerge_options`
---
-
-DROP TABLE IF EXISTS `build_logs_emerge_options`;
-CREATE TABLE IF NOT EXISTS `build_logs_emerge_options` (
- `build_logs_id` int(11) NOT NULL,
- `eoption_id` int(11) NOT NULL,
- KEY `eoption_id` (`eoption_id`),
- KEY `build_logs_id` (`build_logs_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_errors`
---
-
-DROP TABLE IF EXISTS `build_logs_errors`;
-CREATE TABLE IF NOT EXISTS `build_logs_errors` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `build_log_id` int(11) NOT NULL,
- `error_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `build_log_id` (`build_log_id`),
- KEY `error_id` (`error_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_hilight`
---
-
-DROP TABLE IF EXISTS `build_logs_hilight`;
-CREATE TABLE IF NOT EXISTS `build_logs_hilight` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `log_id` int(11) NOT NULL,
- `start_line` int(11) NOT NULL,
- `end_line` int(11) NOT NULL,
- `hilight_css_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `log_id` (`log_id`),
- KEY `hilight_id` (`hilight_css_id`),
- KEY `hilight_css_id` (`hilight_css_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=110809 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_qa`
---
-
-DROP TABLE IF EXISTS `build_logs_qa`;
-CREATE TABLE IF NOT EXISTS `build_logs_qa` (
- `build_log_id` int(11) NOT NULL,
- `summery_text` text NOT NULL,
- KEY `build_log_id` (`build_log_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_repoman`
---
-
-DROP TABLE IF EXISTS `build_logs_repoman`;
-CREATE TABLE IF NOT EXISTS `build_logs_repoman` (
- `build_logs_id` int(11) NOT NULL,
- `summery_text` text NOT NULL,
- KEY `build_logs_id` (`build_logs_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `build_logs_use`
---
-
-DROP TABLE IF EXISTS `build_logs_use`;
-CREATE TABLE IF NOT EXISTS `build_logs_use` (
- `build_log_id` int(11) NOT NULL,
- `use_id` int(11) NOT NULL,
- `status` enum('True','False') NOT NULL,
- KEY `build_log_id` (`build_log_id`),
- KEY `use_id` (`use_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `categories`
---
-
-DROP TABLE IF EXISTS `categories`;
-CREATE TABLE IF NOT EXISTS `categories` (
- `category_id` int(11) NOT NULL AUTO_INCREMENT,
- `category` varchar(50) NOT NULL,
- `active` enum('True','False') NOT NULL DEFAULT 'True',
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`category_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categories main table (C)' AUTO_INCREMENT=160 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `configs`
---
-
-DROP TABLE IF EXISTS `configs`;
-CREATE TABLE IF NOT EXISTS `configs` (
- `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Config index',
- `hostname` varchar(50) NOT NULL,
- `config` varchar(100) NOT NULL COMMENT 'Box/setup',
- `default_config` enum('True','False') NOT NULL COMMENT 'Host setup',
- PRIMARY KEY (`config_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main config table' AUTO_INCREMENT=3 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `configs_emerge_options`
---
-
-DROP TABLE IF EXISTS `configs_emerge_options`;
-CREATE TABLE IF NOT EXISTS `configs_emerge_options` (
- `config_id` int(11) NOT NULL COMMENT 'config id',
- `eoption_id` int(11) NOT NULL COMMENT 'emerge option id',
- KEY `config_id` (`config_id`),
- KEY `eoption_id` (`eoption_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Emerge command options for the configs';
-
--- --------------------------------------------------------
-
---
--- Table structure for table `configs_metadata`
---
-
-DROP TABLE IF EXISTS `configs_metadata`;
-CREATE TABLE IF NOT EXISTS `configs_metadata` (
- `config_id` int(11) NOT NULL,
- `profile` varchar(50) NOT NULL,
- `keyword_id` int(11) NOT NULL,
- `make_conf_text` text NOT NULL,
- `checksum` varchar(100) NOT NULL,
- `active` enum('True','False') NOT NULL,
- `config_error_text` text NOT NULL,
- `updating` enum('True','False') NOT NULL,
- `status` enum('Waiting','Runing','Stoped') NOT NULL,
- `auto` enum('True','False') NOT NULL,
- `git_www` varchar(100) NOT NULL COMMENT 'git repo www wiev address',
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`config_id`),
- KEY `keyword_id` (`keyword_id`),
- KEY `config_id` (`config_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Config Status';
-
--- --------------------------------------------------------
-
---
--- Table structure for table `ebuilds`
---
-
-DROP TABLE IF EXISTS `ebuilds`;
-CREATE TABLE IF NOT EXISTS `ebuilds` (
- `ebuild_id` int(11) NOT NULL AUTO_INCREMENT,
- `package_id` int(11) NOT NULL,
- `version` varchar(50) NOT NULL,
- `checksum` varchar(100) NOT NULL,
- `active` enum('True','False') NOT NULL DEFAULT 'True',
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`ebuild_id`),
- KEY `package_id` (`package_id`),
- KEY `checksum` (`checksum`),
- KEY `version` (`version`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version main table (V)' AUTO_INCREMENT=69287 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `ebuilds_iuse`
---
-
-DROP TABLE IF EXISTS `ebuilds_iuse`;
-CREATE TABLE IF NOT EXISTS `ebuilds_iuse` (
- `ebuild_id` int(11) NOT NULL,
- `use_id` int(11) NOT NULL,
- `status` enum('True','False') NOT NULL,
- KEY `ebuild_id` (`ebuild_id`),
- KEY `use_id` (`use_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `ebuilds_keywords`
---
-
-DROP TABLE IF EXISTS `ebuilds_keywords`;
-CREATE TABLE IF NOT EXISTS `ebuilds_keywords` (
- `ebuild_id` int(11) NOT NULL,
- `keyword_id` int(11) NOT NULL,
- `status` enum('Stable','Unstable','Negative') NOT NULL,
- KEY `ebuild_id` (`ebuild_id`),
- KEY `keyword_id` (`keyword_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `ebuilds_metadata`
---
-
-DROP TABLE IF EXISTS `ebuilds_metadata`;
-CREATE TABLE IF NOT EXISTS `ebuilds_metadata` (
- `ebuild_id` int(11) NOT NULL,
- `revision` varchar(10) NOT NULL COMMENT 'CVS revision',
- KEY `ebuild_id` (`ebuild_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `ebuilds_restrictions`
---
-
-DROP TABLE IF EXISTS `ebuilds_restrictions`;
-CREATE TABLE IF NOT EXISTS `ebuilds_restrictions` (
- `ebuild_id` int(11) NOT NULL,
- `restriction_id` int(11) NOT NULL,
- KEY `ebuild_id` (`ebuild_id`),
- KEY `restriction_id` (`restriction_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `emerge_options`
---
-
-DROP TABLE IF EXISTS `emerge_options`;
-CREATE TABLE IF NOT EXISTS `emerge_options` (
- `eoption_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'emerge command options id',
- `eoption` varchar(15) NOT NULL COMMENT 'emerge command options',
- PRIMARY KEY (`eoption_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `errors`
---
-
-DROP TABLE IF EXISTS `errors`;
-CREATE TABLE IF NOT EXISTS `errors` (
- `error_id` int(11) NOT NULL AUTO_INCREMENT,
- `error_name` varchar(10) NOT NULL,
- `error_search` varchar(20) NOT NULL,
- PRIMARY KEY (`error_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `hilight`
---
-
-DROP TABLE IF EXISTS `hilight`;
-CREATE TABLE IF NOT EXISTS `hilight` (
- `hilight_id` int(11) NOT NULL AUTO_INCREMENT,
- `hilight_search` varchar(30) NOT NULL,
- `hilight_search_end` varchar(30) NOT NULL,
- `hilight_css_id` int(11) NOT NULL,
- `hilight_start` int(11) NOT NULL,
- `hilight_end` int(11) NOT NULL,
- PRIMARY KEY (`hilight_id`),
- KEY `hilight_css_id` (`hilight_css_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `hilight_css`
---
-
-DROP TABLE IF EXISTS `hilight_css`;
-CREATE TABLE IF NOT EXISTS `hilight_css` (
- `hilight_css_id` int(11) NOT NULL AUTO_INCREMENT,
- `hilight_css_name` varchar(11) NOT NULL,
- `hilight_css_collor` varchar(10) NOT NULL,
- PRIMARY KEY (`hilight_css_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `jobs`
---
-
-DROP TABLE IF EXISTS `jobs`;
-CREATE TABLE IF NOT EXISTS `jobs` (
- `job_id` int(11) NOT NULL AUTO_INCREMENT,
- `job_type_id` int(11) NOT NULL,
- `status` enum('Runing','Done','Waiting') NOT NULL DEFAULT 'Waiting',
- `user` varchar(20) NOT NULL,
- `config_id` int(11) NOT NULL,
- `run_config_id` int(11) NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`job_id`),
- KEY `config_id` (`config_id`),
- KEY `run_config_id` (`run_config_id`),
- KEY `job_type_id` (`job_type_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `job_types`
---
-
-DROP TABLE IF EXISTS `job_types`;
-CREATE TABLE IF NOT EXISTS `job_types` (
- `job_type_id` int(11) NOT NULL AUTO_INCREMENT,
- `type` varchar(20) NOT NULL,
- PRIMARY KEY (`job_type_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table for what type of work' AUTO_INCREMENT=3 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `keywords`
---
-
-DROP TABLE IF EXISTS `keywords`;
-CREATE TABLE IF NOT EXISTS `keywords` (
- `keyword_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'keyword index',
- `keyword` varchar(15) NOT NULL COMMENT 'keyword',
- PRIMARY KEY (`keyword_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='KEYWORD' AUTO_INCREMENT=41 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `logs`
---
-
-DROP TABLE IF EXISTS `logs`;
-CREATE TABLE IF NOT EXISTS `logs` (
- `log_id` int(11) NOT NULL AUTO_INCREMENT,
- `config_id` int(11) NOT NULL,
- `log_type` enum('info','error','debug') NOT NULL,
- `msg` text NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`log_id`),
- KEY `config_id` (`config_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=892335 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `packages`
---
-
-DROP TABLE IF EXISTS `packages`;
-CREATE TABLE IF NOT EXISTS `packages` (
- `package_id` int(11) NOT NULL AUTO_INCREMENT,
- `category_id` int(11) NOT NULL,
- `package` varchar(50) NOT NULL,
- `repo_id` int(11) NOT NULL,
- `checksum` varchar(100) NOT NULL,
- `active` enum('True','False') NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`package_id`),
- KEY `category_id` (`category_id`),
- KEY `repo_id` (`repo_id`),
- KEY `checksum` (`checksum`),
- KEY `package` (`package`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Packages main table (P)' AUTO_INCREMENT=16842 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `repos`
---
-
-DROP TABLE IF EXISTS `repos`;
-CREATE TABLE IF NOT EXISTS `repos` (
- `repo_id` int(11) NOT NULL AUTO_INCREMENT,
- `repo` varchar(100) NOT NULL,
- PRIMARY KEY (`repo_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Repo main table (repo)' AUTO_INCREMENT=3 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `restrictions`
---
-
-DROP TABLE IF EXISTS `restrictions`;
-CREATE TABLE IF NOT EXISTS `restrictions` (
- `restriction_id` int(11) NOT NULL AUTO_INCREMENT,
- `restriction` varchar(50) NOT NULL,
- PRIMARY KEY (`restriction_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ;
-
--- --------------------------------------------------------
-
---
--- Table structure for table `uses`
---
-
-DROP TABLE IF EXISTS `uses`;
-CREATE TABLE IF NOT EXISTS `uses` (
- `use_id` int(11) NOT NULL AUTO_INCREMENT,
- `flag` varchar(50) NOT NULL,
- PRIMARY KEY (`use_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Use flags main table' AUTO_INCREMENT=4875 ;
-
---
--- Constraints for dumped tables
---
-
---
--- Constraints for table `build_jobs`
---
-ALTER TABLE `build_jobs`
- ADD CONSTRAINT `build_jobs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
- ADD CONSTRAINT `build_jobs_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
-
---
--- Constraints for table `build_jobs_emerge_options`
---
-ALTER TABLE `build_jobs_emerge_options`
- ADD CONSTRAINT `build_jobs_emerge_options_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`),
- ADD CONSTRAINT `build_jobs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
-
---
--- Constraints for table `build_jobs_redo`
---
-ALTER TABLE `build_jobs_redo`
- ADD CONSTRAINT `build_jobs_redo_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`);
-
---
--- Constraints for table `build_jobs_use`
---
-ALTER TABLE `build_jobs_use`
- ADD CONSTRAINT `build_jobs_use_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`),
- ADD CONSTRAINT `build_jobs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
-
---
--- Constraints for table `build_logs`
---
-ALTER TABLE `build_logs`
- ADD CONSTRAINT `build_logs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`);
-
---
--- Constraints for table `build_logs_config`
---
-ALTER TABLE `build_logs_config`
- ADD CONSTRAINT `build_logs_config_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`),
- ADD CONSTRAINT `build_logs_config_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
-
---
--- Constraints for table `build_logs_emerge_options`
---
-ALTER TABLE `build_logs_emerge_options`
- ADD CONSTRAINT `build_logs_emerge_options_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`),
- ADD CONSTRAINT `build_logs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
-
---
--- Constraints for table `build_logs_errors`
---
-ALTER TABLE `build_logs_errors`
- ADD CONSTRAINT `build_logs_errors_ibfk_2` FOREIGN KEY (`error_id`) REFERENCES `errors` (`error_id`),
- ADD CONSTRAINT `build_logs_errors_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`);
-
---
--- Constraints for table `build_logs_hilight`
---
-ALTER TABLE `build_logs_hilight`
- ADD CONSTRAINT `build_logs_hilight_ibfk_5` FOREIGN KEY (`log_id`) REFERENCES `build_logs_config` (`log_id`),
- ADD CONSTRAINT `build_logs_hilight_ibfk_4` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`);
-
---
--- Constraints for table `build_logs_qa`
---
-ALTER TABLE `build_logs_qa`
- ADD CONSTRAINT `build_logs_qa_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`);
-
---
--- Constraints for table `build_logs_repoman`
---
-ALTER TABLE `build_logs_repoman`
- ADD CONSTRAINT `build_logs_repoman_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`);
-
---
--- Constraints for table `build_logs_use`
---
-ALTER TABLE `build_logs_use`
- ADD CONSTRAINT `build_logs_use_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`),
- ADD CONSTRAINT `build_logs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
-
---
--- Constraints for table `configs_emerge_options`
---
-ALTER TABLE `configs_emerge_options`
- ADD CONSTRAINT `configs_emerge_options_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`),
- ADD CONSTRAINT `configs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
-
---
--- Constraints for table `configs_metadata`
---
-ALTER TABLE `configs_metadata`
- ADD CONSTRAINT `configs_metadata_ibfk_1` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`),
- ADD CONSTRAINT `configs_metadata_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
-
---
--- Constraints for table `ebuilds`
---
-ALTER TABLE `ebuilds`
- ADD CONSTRAINT `ebuilds_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`);
-
---
--- Constraints for table `ebuilds_iuse`
---
-ALTER TABLE `ebuilds_iuse`
- ADD CONSTRAINT `ebuilds_iuse_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
- ADD CONSTRAINT `ebuilds_iuse_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
-
---
--- Constraints for table `ebuilds_keywords`
---
-ALTER TABLE `ebuilds_keywords`
- ADD CONSTRAINT `ebuilds_keywords_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
- ADD CONSTRAINT `ebuilds_keywords_ibfk_2` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`);
-
---
--- Constraints for table `ebuilds_metadata`
---
-ALTER TABLE `ebuilds_metadata`
- ADD CONSTRAINT `ebuilds_metadata_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`);
-
---
--- Constraints for table `ebuilds_restrictions`
---
-ALTER TABLE `ebuilds_restrictions`
- ADD CONSTRAINT `ebuilds_restrictions_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
- ADD CONSTRAINT `ebuilds_restrictions_ibfk_2` FOREIGN KEY (`restriction_id`) REFERENCES `restrictions` (`restriction_id`);
-
---
--- Constraints for table `hilight`
---
-ALTER TABLE `hilight`
- ADD CONSTRAINT `hilight_ibfk_1` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`);
-
---
--- Constraints for table `jobs`
---
-ALTER TABLE `jobs`
- ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`),
- ADD CONSTRAINT `jobs_ibfk_2` FOREIGN KEY (`run_config_id`) REFERENCES `configs` (`config_id`),
- ADD CONSTRAINT `jobs_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `job_types` (`job_type_id`);
-
---
--- Constraints for table `logs`
---
-ALTER TABLE `logs`
- ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
-
---
--- Constraints for table `packages`
---
-ALTER TABLE `packages`
- ADD CONSTRAINT `packages_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`),
- ADD CONSTRAINT `packages_ibfk_2` FOREIGN KEY (`repo_id`) REFERENCES `repos` (`repo_id`);
-
-DELIMITER $$
---
--- Events
---
-DROP EVENT `add_esync_updatedb_jobs`$$
+END$$
+
+DELIMITER ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_jobs`
+--
+
+CREATE TABLE IF NOT EXISTS `build_jobs` (
+ `build_job_id` int(11) NOT NULL AUTO_INCREMENT,
+ `ebuild_id` int(11) NOT NULL,
+ `config_id` int(11) NOT NULL,
+ `status` enum('Waiting','Now') NOT NULL DEFAULT 'Waiting',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`build_job_id`),
+ KEY `ebuild_id` (`ebuild_id`),
+ KEY `config_id` (`config_id`),
+ KEY `time_stamp` (`time_stamp`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The build work list';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_jobs_emerge_options`
+--
+
+CREATE TABLE IF NOT EXISTS `build_jobs_emerge_options` (
+ `build_job_id` int(11) NOT NULL,
+ `eoption_id` int(11) NOT NULL,
+ KEY `build_job_id` (`build_job_id`),
+ KEY `eoption_id` (`eoption_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_jobs_redo`
+--
+
+CREATE TABLE IF NOT EXISTS `build_jobs_redo` (
+ `build_job_id` int(11) NOT NULL COMMENT 'build job id',
+ `fail_times` int(1) NOT NULL COMMENT 'Fail times max 5',
+ `fail_type` varchar(30) NOT NULL COMMENT 'Type of fail',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Time',
+ KEY `build_job_id` (`build_job_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Build jobs that need to be redone';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_jobs_use`
+--
+
+CREATE TABLE IF NOT EXISTS `build_jobs_use` (
+ `build_job_id` int(11) NOT NULL,
+ `use_id` int(11) NOT NULL,
+ `status` enum('True','False') NOT NULL,
+ KEY `build_job_id` (`build_job_id`),
+ KEY `use_id` (`use_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs` (
+ `build_log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `ebuild_id` int(11) NOT NULL,
+ `fail` enum('True','False') NOT NULL DEFAULT 'False',
+ `summery_text` text NOT NULL,
+ `log_hash` varchar(100) NOT NULL,
+ `bug_id` int(10) NOT NULL DEFAULT '0',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`build_log_id`),
+ KEY `ebuild_id` (`ebuild_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main log info for the builds';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_config`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_config` (
+ `log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `build_log_id` int(11) NOT NULL,
+ `config_id` int(11) NOT NULL,
+ `einfo_id` int(11) NOT NULL DEFAULT '1',
+ `logname` varchar(150) NOT NULL COMMENT 'filename of the log',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`log_id`),
+ KEY `config_id` (`config_id`),
+ KEY `build_log_id` (`build_log_id`),
+ KEY `einfo_id` (`einfo_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_emerge_options`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_emerge_options` (
+ `build_logs_id` int(11) NOT NULL,
+ `eoption_id` int(11) NOT NULL,
+ KEY `eoption_id` (`eoption_id`),
+ KEY `build_logs_id` (`build_logs_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_errors`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_errors` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `build_log_id` int(11) NOT NULL,
+ `error_id` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `build_log_id` (`build_log_id`),
+ KEY `error_id` (`error_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_hilight`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_hilight` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `log_id` int(11) NOT NULL,
+ `start_line` int(11) NOT NULL,
+ `end_line` int(11) NOT NULL,
+ `hilight_css_id` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `log_id` (`log_id`),
+ KEY `hilight_id` (`hilight_css_id`),
+ KEY `hilight_css_id` (`hilight_css_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_qa`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_qa` (
+ `build_log_id` int(11) NOT NULL,
+ `summery_text` text NOT NULL,
+ KEY `build_log_id` (`build_log_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_repoman`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_repoman` (
+ `build_logs_id` int(11) NOT NULL,
+ `summery_text` text NOT NULL,
+ KEY `build_logs_id` (`build_logs_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `build_logs_use`
+--
+
+CREATE TABLE IF NOT EXISTS `build_logs_use` (
+ `build_log_id` int(11) NOT NULL,
+ `use_id` int(11) NOT NULL,
+ `status` enum('True','False') NOT NULL,
+ KEY `build_log_id` (`build_log_id`),
+ KEY `use_id` (`use_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `categories`
+--
+
+CREATE TABLE IF NOT EXISTS `categories` (
+ `category_id` int(11) NOT NULL AUTO_INCREMENT,
+ `category` varchar(50) NOT NULL,
+ `active` enum('True','False') NOT NULL DEFAULT 'True',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`category_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categories main table (C)';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `configs`
+--
+
+CREATE TABLE IF NOT EXISTS `configs` (
+ `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Config index',
+ `hostname` varchar(50) NOT NULL,
+ `config` varchar(100) NOT NULL COMMENT 'Box/setup',
+ `default_config` enum('True','False') NOT NULL COMMENT 'Host setup',
+ PRIMARY KEY (`config_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Main config table';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `configs_emerge_options`
+--
+
+CREATE TABLE IF NOT EXISTS `configs_emerge_options` (
+ `config_id` int(11) NOT NULL COMMENT 'config id',
+ `eoption_id` int(11) NOT NULL COMMENT 'emerge option id',
+ KEY `config_id` (`config_id`),
+ KEY `eoption_id` (`eoption_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Emerge command options for the configs';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `configs_metadata`
+--
+
+CREATE TABLE IF NOT EXISTS `configs_metadata` (
+ `config_id` int(11) NOT NULL,
+ `profile` varchar(50) NOT NULL,
+ `keyword_id` int(11) NOT NULL,
+ `make_conf_text` text NOT NULL,
+ `checksum` varchar(100) NOT NULL,
+ `active` enum('True','False') NOT NULL,
+ `config_error_text` text NOT NULL,
+ `updating` enum('True','False') NOT NULL,
+ `status` enum('Waiting','Runing','Stoped') NOT NULL,
+ `auto` enum('True','False') NOT NULL,
+ `git_www` varchar(100) NOT NULL COMMENT 'git repo www wiev address',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`config_id`),
+ KEY `keyword_id` (`keyword_id`),
+ KEY `config_id` (`config_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Config Status';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ebuilds`
+--
+
+CREATE TABLE IF NOT EXISTS `ebuilds` (
+ `ebuild_id` int(11) NOT NULL AUTO_INCREMENT,
+ `package_id` int(11) NOT NULL,
+ `version` varchar(50) NOT NULL,
+ `checksum` varchar(100) NOT NULL,
+ `active` enum('True','False') NOT NULL DEFAULT 'True',
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ebuild_id`),
+ KEY `package_id` (`package_id`),
+ KEY `checksum` (`checksum`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Version main table (V)';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ebuilds_iuse`
+--
+
+CREATE TABLE IF NOT EXISTS `ebuilds_iuse` (
+ `ebuild_id` int(11) NOT NULL,
+ `use_id` int(11) NOT NULL,
+ `status` enum('True','False') NOT NULL,
+ KEY `ebuild_id` (`ebuild_id`),
+ KEY `use_id` (`use_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ebuilds_keywords`
+--
+
+CREATE TABLE IF NOT EXISTS `ebuilds_keywords` (
+ `ebuild_id` int(11) NOT NULL,
+ `keyword_id` int(11) NOT NULL,
+ `status` enum('Stable','Unstable','Negative') NOT NULL,
+ KEY `ebuild_id` (`ebuild_id`),
+ KEY `keyword_id` (`keyword_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ebuilds_metadata`
+--
+
+CREATE TABLE IF NOT EXISTS `ebuilds_metadata` (
+ `ebuild_id` int(11) NOT NULL,
+ `revision` varchar(10) NOT NULL COMMENT 'CVS revision',
+ KEY `ebuild_id` (`ebuild_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ebuilds_restrictions`
+--
+
+CREATE TABLE IF NOT EXISTS `ebuilds_restrictions` (
+ `ebuild_id` int(11) NOT NULL,
+ `restriction_id` int(11) NOT NULL,
+ KEY `ebuild_id` (`ebuild_id`),
+ KEY `restriction_id` (`restriction_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `emerge_info`
+--
+
+CREATE TABLE IF NOT EXISTS `emerge_info` (
+ `einfo_id` int(11) NOT NULL AUTO_INCREMENT,
+ `checksum` varchar(30) NOT NULL,
+ `emerge_info_text` text NOT NULL,
+ UNIQUE KEY `einfo_id` (`einfo_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `emerge_options`
+--
+
+CREATE TABLE IF NOT EXISTS `emerge_options` (
+ `eoption_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'emerge command options id',
+ `eoption` varchar(15) NOT NULL COMMENT 'emerge command options',
+ PRIMARY KEY (`eoption_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `errors_info`
+--
+
+CREATE TABLE IF NOT EXISTS `errors_info` (
+ `error_id` int(11) NOT NULL AUTO_INCREMENT,
+ `error_name` varchar(10) NOT NULL,
+ `error_search` varchar(20) NOT NULL,
+ PRIMARY KEY (`error_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `hilight`
+--
+
+CREATE TABLE IF NOT EXISTS `hilight` (
+ `hilight_id` int(11) NOT NULL AUTO_INCREMENT,
+ `hilight_search` varchar(30) NOT NULL,
+ `hilight_search_end` varchar(30) NOT NULL,
+ `hilight_css_id` int(11) NOT NULL,
+ `hilight_start` int(11) NOT NULL,
+ `hilight_end` int(11) NOT NULL,
+ PRIMARY KEY (`hilight_id`),
+ KEY `hilight_css_id` (`hilight_css_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `hilight_css`
+--
+
+CREATE TABLE IF NOT EXISTS `hilight_css` (
+ `hilight_css_id` int(11) NOT NULL AUTO_INCREMENT,
+ `hilight_css_name` varchar(11) NOT NULL,
+ `hilight_css_collor` varchar(10) NOT NULL,
+ PRIMARY KEY (`hilight_css_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `jobs`
+--
+
+CREATE TABLE IF NOT EXISTS `jobs` (
+ `job_id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_type_id` int(11) NOT NULL,
+ `status` enum('Runing','Done','Waiting') NOT NULL DEFAULT 'Waiting',
+ `user` varchar(20) NOT NULL,
+ `config_id` int(11) NOT NULL,
+ `run_config_id` int(11) NOT NULL,
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`job_id`),
+ KEY `config_id` (`config_id`),
+ KEY `run_config_id` (`run_config_id`),
+ KEY `job_type_id` (`job_type_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `job_types`
+--
+
+CREATE TABLE IF NOT EXISTS `job_types` (
+ `job_type_id` int(11) NOT NULL AUTO_INCREMENT,
+ `type` varchar(20) NOT NULL,
+ PRIMARY KEY (`job_type_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table for what type of work';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `keywords`
+--
+
+CREATE TABLE IF NOT EXISTS `keywords` (
+ `keyword_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'keyword index',
+ `keyword` varchar(15) NOT NULL COMMENT 'keyword',
+ PRIMARY KEY (`keyword_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='KEYWORD';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `logs`
+--
+
+CREATE TABLE IF NOT EXISTS `logs` (
+ `log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `config_id` int(11) NOT NULL,
+ `log_type` enum('info','error','debug','qa') NOT NULL,
+ `msg` text NOT NULL,
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`log_id`),
+ KEY `config_id` (`config_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `packages`
+--
+
+CREATE TABLE IF NOT EXISTS `packages` (
+ `package_id` int(11) NOT NULL AUTO_INCREMENT,
+ `category_id` int(11) NOT NULL,
+ `package` varchar(50) NOT NULL,
+ `repo_id` int(11) NOT NULL,
+ `checksum` varchar(100) NOT NULL,
+ `active` enum('True','False') NOT NULL,
+ `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`package_id`),
+ KEY `category_id` (`category_id`),
+ KEY `repo_id` (`repo_id`),
+ KEY `checksum` (`checksum`),
+ KEY `package` (`package`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Packages main table (P)';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `packages_metadata`
+--
+
+CREATE TABLE IF NOT EXISTS `packages_metadata` (
+ `package_id` int(11) NOT NULL,
+ `email` varchar(50) NOT NULL,
+ `checksum` varchar(100) NOT NULL,
+ KEY `package_id` (`package_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `repos`
+--
+
+CREATE TABLE IF NOT EXISTS `repos` (
+ `repo_id` int(11) NOT NULL AUTO_INCREMENT,
+ `repo` varchar(100) NOT NULL,
+ PRIMARY KEY (`repo_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Repo main table (repo)';
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `restrictions`
+--
+
+CREATE TABLE IF NOT EXISTS `restrictions` (
+ `restriction_id` int(11) NOT NULL AUTO_INCREMENT,
+ `restriction` varchar(50) NOT NULL,
+ PRIMARY KEY (`restriction_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `uses`
+--
+
+CREATE TABLE IF NOT EXISTS `uses` (
+ `use_id` int(11) NOT NULL AUTO_INCREMENT,
+ `flag` varchar(50) NOT NULL,
+ PRIMARY KEY (`use_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Use flags main table';
+
+--
+-- Constraints for dumped tables
+--
+
+--
+-- Constraints for table `build_jobs`
+--
+ALTER TABLE `build_jobs`
+ ADD CONSTRAINT `build_jobs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
+ ADD CONSTRAINT `build_jobs_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
+
+--
+-- Constraints for table `build_jobs_emerge_options`
+--
+ALTER TABLE `build_jobs_emerge_options`
+ ADD CONSTRAINT `build_jobs_emerge_options_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`),
+ ADD CONSTRAINT `build_jobs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
+
+--
+-- Constraints for table `build_jobs_redo`
+--
+ALTER TABLE `build_jobs_redo`
+ ADD CONSTRAINT `build_jobs_redo_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`);
+
+--
+-- Constraints for table `build_jobs_use`
+--
+ALTER TABLE `build_jobs_use`
+ ADD CONSTRAINT `build_jobs_use_ibfk_1` FOREIGN KEY (`build_job_id`) REFERENCES `build_jobs` (`build_job_id`),
+ ADD CONSTRAINT `build_jobs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
+
+--
+-- Constraints for table `build_logs`
+--
+ALTER TABLE `build_logs`
+ ADD CONSTRAINT `build_logs_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`);
+
+--
+-- Constraints for table `build_logs_config`
+--
+ALTER TABLE `build_logs_config`
+ ADD CONSTRAINT `build_logs_config_ibfk_3` FOREIGN KEY (`einfo_id`) REFERENCES `emerge_info` (`einfo_id`),
+ ADD CONSTRAINT `build_logs_config_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`),
+ ADD CONSTRAINT `build_logs_config_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
+
+--
+-- Constraints for table `build_logs_emerge_options`
+--
+ALTER TABLE `build_logs_emerge_options`
+ ADD CONSTRAINT `build_logs_emerge_options_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`),
+ ADD CONSTRAINT `build_logs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
+
+--
+-- Constraints for table `build_logs_errors`
+--
+ALTER TABLE `build_logs_errors`
+ ADD CONSTRAINT `build_logs_errors_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`),
+ ADD CONSTRAINT `build_logs_errors_ibfk_2` FOREIGN KEY (`error_id`) REFERENCES `errors_info` (`error_id`);
+
+--
+-- Constraints for table `build_logs_hilight`
+--
+ALTER TABLE `build_logs_hilight`
+ ADD CONSTRAINT `build_logs_hilight_ibfk_4` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`),
+ ADD CONSTRAINT `build_logs_hilight_ibfk_5` FOREIGN KEY (`log_id`) REFERENCES `build_logs_config` (`log_id`);
+
+--
+-- Constraints for table `build_logs_qa`
+--
+ALTER TABLE `build_logs_qa`
+ ADD CONSTRAINT `build_logs_qa_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`);
+
+--
+-- Constraints for table `build_logs_repoman`
+--
+ALTER TABLE `build_logs_repoman`
+ ADD CONSTRAINT `build_logs_repoman_ibfk_1` FOREIGN KEY (`build_logs_id`) REFERENCES `build_logs` (`build_log_id`);
+
+--
+-- Constraints for table `build_logs_use`
+--
+ALTER TABLE `build_logs_use`
+ ADD CONSTRAINT `build_logs_use_ibfk_1` FOREIGN KEY (`build_log_id`) REFERENCES `build_logs` (`build_log_id`),
+ ADD CONSTRAINT `build_logs_use_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
+
+--
+-- Constraints for table `configs_emerge_options`
+--
+ALTER TABLE `configs_emerge_options`
+ ADD CONSTRAINT `configs_emerge_options_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`),
+ ADD CONSTRAINT `configs_emerge_options_ibfk_2` FOREIGN KEY (`eoption_id`) REFERENCES `emerge_options` (`eoption_id`);
+
+--
+-- Constraints for table `configs_metadata`
+--
+ALTER TABLE `configs_metadata`
+ ADD CONSTRAINT `configs_metadata_ibfk_1` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`),
+ ADD CONSTRAINT `configs_metadata_ibfk_2` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
+
+--
+-- Constraints for table `ebuilds`
+--
+ALTER TABLE `ebuilds`
+ ADD CONSTRAINT `ebuilds_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`);
+
+--
+-- Constraints for table `ebuilds_iuse`
+--
+ALTER TABLE `ebuilds_iuse`
+ ADD CONSTRAINT `ebuilds_iuse_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
+ ADD CONSTRAINT `ebuilds_iuse_ibfk_2` FOREIGN KEY (`use_id`) REFERENCES `uses` (`use_id`);
+
+--
+-- Constraints for table `ebuilds_keywords`
+--
+ALTER TABLE `ebuilds_keywords`
+ ADD CONSTRAINT `ebuilds_keywords_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
+ ADD CONSTRAINT `ebuilds_keywords_ibfk_2` FOREIGN KEY (`keyword_id`) REFERENCES `keywords` (`keyword_id`);
+
+--
+-- Constraints for table `ebuilds_metadata`
+--
+ALTER TABLE `ebuilds_metadata`
+ ADD CONSTRAINT `ebuilds_metadata_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`);
+
+--
+-- Constraints for table `ebuilds_restrictions`
+--
+ALTER TABLE `ebuilds_restrictions`
+ ADD CONSTRAINT `ebuilds_restrictions_ibfk_1` FOREIGN KEY (`ebuild_id`) REFERENCES `ebuilds` (`ebuild_id`),
+ ADD CONSTRAINT `ebuilds_restrictions_ibfk_2` FOREIGN KEY (`restriction_id`) REFERENCES `restrictions` (`restriction_id`);
+
+--
+-- Constraints for table `hilight`
+--
+ALTER TABLE `hilight`
+ ADD CONSTRAINT `hilight_ibfk_1` FOREIGN KEY (`hilight_css_id`) REFERENCES `hilight_css` (`hilight_css_id`);
+
+--
+-- Constraints for table `jobs`
+--
+ALTER TABLE `jobs`
+ ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`),
+ ADD CONSTRAINT `jobs_ibfk_2` FOREIGN KEY (`run_config_id`) REFERENCES `configs` (`config_id`),
+ ADD CONSTRAINT `jobs_ibfk_3` FOREIGN KEY (`job_type_id`) REFERENCES `job_types` (`job_type_id`);
+
+--
+-- Constraints for table `logs`
+--
+ALTER TABLE `logs`
+ ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`config_id`) REFERENCES `configs` (`config_id`);
+
+--
+-- Constraints for table `packages`
+--
+ALTER TABLE `packages`
+ ADD CONSTRAINT `packages_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`),
+ ADD CONSTRAINT `packages_ibfk_2` FOREIGN KEY (`repo_id`) REFERENCES `repos` (`repo_id`);
+
+--
+-- Constraints for table `packages_metadata`
+--
+ALTER TABLE `packages_metadata`
+ ADD CONSTRAINT `packages_metadata_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`package_id`);
+
+DELIMITER $$
+--
+-- Events
+--
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
CALL add_jobs('esync');
CALL add_jobs('updatedb');
-END$$
-
-DELIMITER ;
-
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+END$$
+
+DELIMITER ;
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
reply other threads:[~2014-01-05 10:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388917658.9329979150c291f77fa2082f2235baf8426842e5.zorry@gentoo \
--to=zorry@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox