diff options
author | 2006-05-05 14:43:51 +0000 | |
---|---|---|
committer | 2006-05-05 14:43:51 +0000 | |
commit | 6cd717be2cb49aa85425ef47a9d6d188a70afbb0 (patch) | |
tree | 053cc4fc3e1c396ec5ecb369ba6de8023e9b36c3 /docs/moria.sql | |
parent | adding a few documents to moria since that seems like a good (diff) | |
download | scire-6cd717be2cb49aa85425ef47a9d6d188a70afbb0.tar.gz scire-6cd717be2cb49aa85425ef47a9d6d188a70afbb0.tar.bz2 scire-6cd717be2cb49aa85425ef47a9d6d188a70afbb0.zip |
rename moria/ to docs/
svn path=/; revision=52
Diffstat (limited to 'docs/moria.sql')
-rw-r--r-- | docs/moria.sql | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/docs/moria.sql b/docs/moria.sql new file mode 100644 index 0000000..271d2b6 --- /dev/null +++ b/docs/moria.sql @@ -0,0 +1,85 @@ +--create database moria; +use moria; +drop table if exists modules; +create table modules ( id INT NOT NULL default '0', +name VARCHAR(50), +long_name VARCHAR(150), +description VARCHAR(250), +main_content VARCHAR(90), +author VARCHAR(50), +distribution VARCHAR(50), +category VARCHAR(30), +homepage VARCHAR(90), +PRIMARY KEY (id) +) TYPE=MyISAM; + +drop table if exists clients; +create table clients ( +client_id INT NOT NULL AUTO_INCREMENT, +hostname VARCHAR(30) NOT NULL default 'hostname', +mac VARCHAR(17) NOT NULL default '00:01:02:03:04:05', +ip VARCHAR(15) NOT NULL default 'dhcp', +profile VARCHAR(30), +distribution VARCHAR(50), +administrator VARCHAR(50), +status VARCHAR(100), +PRIMARY KEY (client_id) +) TYPE=MyISAM; + +drop table if exists profiles; +create table profiles ( +profile_name VARCHAR(30), +filename VARCHAR(90) NOT NULL, +description VARCHAR(250), +distribution VARCHAR(50), +PRIMARY KEY (profile_name) +) TYPE=MyISAM; + +drop table if exists groups; +create table groups ( +profile_name VARCHAR(30) NOT NULL, +machine_id INT NOT NULL +) TYPE=MyISAM; + +drop table if exists users; +create table users ( +username VARCHAR(30) NOT NULL, +password VARCHAR(50) NOT NULL default 'invalid', +real_name VARCHAR(60), +comment VARCHAR(90), +PRIMARY KEY (username) +) TYPE=MyISAM; + +drop table if exists permissions; +create table permissions ( +perm_name VARCHAR(30) NOT NULL, +description VARCHAR(90), +creator VARCHAR(30), +PRIMARY KEY (perm_name) +) TYPE=MyISAM; + + + +--INSERT INTO jobs (client, cliengroup, jobtype, priority, jobparam) VALUES ("boxa", "webserver", "pkgupdate", 2, "apache") +--INSERT INTO jobs (client, cliengroup, jobtype, priority, jobparam) VALUES ("boxa", "webserver", "cfgupdate", 3, "scp://server/etc/apache2/httpd2.conf") +--INSERT INTO jobs (client, cliengroup, jobtype, priority, jobparam) VALUES ("boxa", "webserver", "runscript", 4, "scp://server/etc/apache2/updatesomething.sh") + +drop table if exists jobs; +create table jobs ( +job_id INT NOT NULL, +client_id INT NOT NULL, +jobtype VARCHAR(30) NOT NULL, +priority INT NOT NULL default 5, +jobparam VARCHAR(300), +timecreated TIMESTAMP NOT NULL, +timetosend TIMESTAMP NOT NULL, +timesent TIMESTAMP, +timedone TIMESTAMP, +status VARCHAR(50) NOT NULL, +created_by VARCHAR(30) NOT NULL, +description VARCHAR(250), +PRIMARY KEY (job_id) +) TYPE=MyISAM; + +grant all on moria.* to hobbit identified by 'hobbitpassword'; +grant all on moria.* to hobbit@localhost identified by 'hobbitpassword'; |