#
#        ----
#        oDns  -  A php4/perl/mysql frontend for the BIND name server 
#        ----
#
#        * Copyright (C) 2000  Olivier Mueller <om@omnis.ch>
#
#        $Id: mysqldump.txt,v 1.3 2000/08/17 22:14:25 swix Exp $
#        $Source: /cvsroot/oDns/odns/mysqldump.txt,v $
#
#        This program is free software; you can redistribute it and/or modify
#        it under the terms of the GNU General Public License as published by
#        the Free Software Foundation; either version 2 of the License, or
#        (at your option) any later version.
#
#        This program is distributed in the hope that it will be useful,
#        but WITHOUT ANY WARRANTY; without even the implied warranty of
#        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#        GNU General Public License for more details.
#  
#        You should have received a copy of the GNU General Public License
#        along with this program; if not, write to the Free Software
#

# phpMyAdmin MySQL-Dump
# http://phpwizard.net/phpMyAdmin/
#
# Serveur: localhost Base de donnes: odns

# --------------------------------------------------------
#
# Structure de la table 'dns_contacts'
#

CREATE TABLE dns_contacts (
   id int(11) NOT NULL auto_increment,
   owner_id int(11),
   contact_name varchar(30) NOT NULL,
   org varchar(50),
   name varchar(50),
   address1 varchar(50),
   address2 varchar(50),
   zipcode varchar(10),
   city varchar(30),
   country varchar(30),
   phone varchar(30),
   fax varchar(30),
   email varchar(50),
   creation_date datetime,
   ts timestamp(14),
   PRIMARY KEY (id, id),
   UNIQUE id (id),
   UNIQUE contact_name (contact_name),
   KEY contact_name_2 (contact_name)
);

#
# Contenu de la table 'dns_contacts'
#

INSERT INTO dns_contacts VALUES( '1', '0', 'OMNIS', 'Omnis Internet Services', 'Olivier Mueller', 'Tester street', '', '8000', 'Zurich', 'Switzerland', '+41 1 2345463', '+41 3 4313443', 'odns@omnis.ch', '2000-08-17 23:06:42', '20000817230642');
INSERT INTO dns_contacts VALUES( '2', '0', 'TUX', 'Tux Cold Corporation', 'Tux Magnus', '', '', '', '', '', '', '', 'tux@linux.org', '2000-08-17 23:07:27', '20000817230727');
INSERT INTO dns_contacts VALUES( '3', '2', 'PRIVATE', 'My company', '', '', '', '', '', '', '', '', '', '2000-08-17 23:30:56', '20000817233056');

# --------------------------------------------------------
#
# Structure de la table 'dns_domains'
#

CREATE TABLE dns_domains (
   domain varchar(50) NOT NULL,
   type enum('primary','slave','not_active') DEFAULT 'primary' NOT NULL,
   host_id varchar(30),
   owner_id int(11),
   creation_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   timestamp timestamp(14),
   open_for_subdom enum('0','1'),
   PRIMARY KEY (domain),
   KEY domain (domain),
   UNIQUE domain_2 (domain)
);

#
# Contenu de la table 'dns_domains'
#

INSERT INTO dns_domains VALUES( 'slave.com', 'slave', 'Omnis DNS 1', '0', '2000-08-17 23:20:25', '20000817232025', '0');
INSERT INTO dns_domains VALUES( 'slaveinet.org', 'slave', 'Omnis DNS 2', '0', '2000-08-17 23:20:44', '20000817232044', '0');
INSERT INTO dns_domains VALUES( 'primary.com', 'primary', '', '0', '2000-08-17 23:23:30', '20000817232551', '0');
INSERT INTO dns_domains VALUES( 'private.net', 'slave', 'Private DNS 1', '2', '2000-08-17 23:30:17', '20000817233017', '0');
INSERT INTO dns_domains VALUES( 'private-primary.com', 'primary', '', '2', '2000-08-17 23:30:40', '20000817235849', '0');

# --------------------------------------------------------
#
# Structure de la table 'dns_entries'
#

CREATE TABLE dns_entries (
   id int(11) NOT NULL auto_increment,
   domain varchar(50) NOT NULL,
   var_name varchar(30) NOT NULL,
   host_id varchar(30),
   var_content varchar(30),
   entry_type enum('soa','a_cname','mx') DEFAULT 'soa',
   mx_pref enum('1','2','3','10','20','30') DEFAULT '10',
   creation_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   ts timestamp(14),
   PRIMARY KEY (id),
   KEY domain (domain)
);

#
# Contenu de la table 'dns_entries'
#

INSERT INTO dns_entries VALUES( '22', 'primary.com', 'www.secure', 'Omnis Webserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '21', 'primary.com', 'secure', 'Omnis Webserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '19', 'primary.com', 'ftp', 'Omnis Webserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '18', 'primary.com', 'mail', 'Omnis Mailserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '20', 'primary.com', 'imap', 'Omnis Mailserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '17', 'primary.com', 'pop3', 'Omnis Mailserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '16', 'primary.com', 'pop', 'Omnis Mailserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '15', 'primary.com', 'www', 'Omnis Webserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '14', 'primary.com', 'production', '', 'somewhere.else.com', 'mx', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '13', 'primary.com', 'sales', 'Omnis Mailserver', '', 'mx', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '12', 'primary.com', 'primary.com', 'Omnis Backup Mailserver', '', 'mx', '20', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '11', 'primary.com', 'primary.com', 'Omnis Mailserver', '', 'mx', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '10', 'primary.com', 'soa_nic_tec', '', 'TUX', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '9', 'primary.com', 'soa_nic_adm', '', 'OMNIS', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '8', 'primary.com', 'soa_nic_bil', '', 'OMNIS', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '7', 'primary.com', 'soa_ns2', 'Omnis DNS 2', '', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '6', 'primary.com', 'soa_ns1', 'Omnis DNS 1', '', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '5', 'primary.com', 'soa_ttl', '', '43200', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '4', 'primary.com', 'soa_expire', '', '604800', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '3', 'primary.com', 'soa_retry', '', '3600', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '2', 'primary.com', 'soa_refresh', '', '10800', 'soa', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '1', 'primary.com', 'soa_serial', '', '2000081710', 'soa', '10', '2000-08-17 23:25:51', '20000818000011');
INSERT INTO dns_entries VALUES( '23', 'primary.com', 'workstation', '', '192.168.0.23', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '24', 'primary.com', 'primary.com', 'Omnis Webserver', '', 'a_cname', '10', '2000-08-17 23:25:51', '20000817232551');
INSERT INTO dns_entries VALUES( '37', 'private-primary.com', 'www', 'Private DNS 1', '', 'a_cname', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '36', 'private-primary.com', 'private-primary.com', 'Private DNS 1', '', 'mx', '20', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '35', 'private-primary.com', 'private-primary.com', 'Private DNS 1', '', 'mx', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '34', 'private-primary.com', 'soa_nic_tec', '', 'PRIVATE', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '33', 'private-primary.com', 'soa_nic_adm', '', 'PRIVATE', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '32', 'private-primary.com', 'soa_nic_bil', '', 'PRIVATE', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '31', 'private-primary.com', 'soa_ns2', 'Omnis DNS 2', '', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '29', 'private-primary.com', 'soa_ttl', '', '86400', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '28', 'private-primary.com', 'soa_expire', '', '2592000', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '30', 'private-primary.com', 'soa_ns1', 'Private DNS 1', '', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '27', 'private-primary.com', 'soa_retry', '', '3600', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '26', 'private-primary.com', 'soa_refresh', '', '10800', 'soa', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '25', 'private-primary.com', 'soa_serial', '', '2000081711', 'soa', '10', '2000-08-17 23:58:49', '20000818000011');
INSERT INTO dns_entries VALUES( '38', 'private-primary.com', 'ftp', 'Private DNS 1', '', 'a_cname', '10', '2000-08-17 23:58:49', '20000817235849');
INSERT INTO dns_entries VALUES( '39', 'private-primary.com', 'private-primary.com', 'Private DNS 1', '', 'a_cname', '10', '2000-08-17 23:58:49', '20000817235849');

# --------------------------------------------------------
#
# Structure de la table 'dns_hosts'
#

CREATE TABLE dns_hosts (
   host_id varchar(30) NOT NULL,
   owner_id int(11),
   host varchar(30) NOT NULL,
   creation_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   ts timestamp(14),
   PRIMARY KEY (host_id),
   KEY host_id (host_id),
   UNIQUE host_id_2 (host_id)
);

#
# Contenu de la table 'dns_hosts'
#

INSERT INTO dns_hosts VALUES( 'dns1.omnis.ch', '0', '111.222.111.222', '2000-08-17 23:07:56', '20000817230756');
INSERT INTO dns_hosts VALUES( 'dns2.omnis.ch', '0', '222.222.222.222', '2000-08-17 23:08:13', '20000817230813');
INSERT INTO dns_hosts VALUES( 'dns3.omnis.ch', '0', '222.001.222.001', '2000-08-17 23:08:43', '20000817230843');
INSERT INTO dns_hosts VALUES( 'Omnis DNS 1', '0', 'dns1.omnis.ch', '2000-08-17 23:09:07', '20000817230907');
INSERT INTO dns_hosts VALUES( 'Omnis DNS 2', '0', 'dns2.omnis.ch', '2000-08-17 23:09:21', '20000817230921');
INSERT INTO dns_hosts VALUES( 'Private DNS 1', '2', 'ns1.private.com', '2000-08-17 23:29:54', '20000817232954');
INSERT INTO dns_hosts VALUES( 'Omnis Backup DNS', '0', 'dns3.omnis.ch', '2000-08-17 23:09:45', '20000817230945');
INSERT INTO dns_hosts VALUES( 'tux.omnis.ch', '0', '192.168.0.76', '2000-08-17 23:10:31', '20000817231031');
INSERT INTO dns_hosts VALUES( 'Omnis Webserver', '0', 'tux.omnis.ch', '2000-08-17 23:10:48', '20000817231048');
INSERT INTO dns_hosts VALUES( 'Omnis Mailserver', '0', 'tux.omnis.ch', '2000-08-17 23:10:55', '20000817231055');
INSERT INTO dns_hosts VALUES( 'Omnis Backup Mailserver', '0', 'magnus.omnis.ch', '2000-08-17 23:11:14', '20000817231114');

# --------------------------------------------------------
#
# Structure de la table 'dns_servers'
#

CREATE TABLE dns_servers (
   ip varchar(50) NOT NULL,
   login varchar(20),
   passwd varchar(20),
   dbname varchar(20),
   tbname varchar(20) DEFAULT 'dns_domains',
   creation_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   timestamp timestamp(14),
   PRIMARY KEY (ip),
   KEY domain (ip),
   UNIQUE ip_2 (ip)
);

#
# Contenu de la table 'dns_servers'
#


# --------------------------------------------------------
#
# Structure de la table 'odns_users'
#

CREATE TABLE odns_users (
   user_id int(11) NOT NULL auto_increment,
   login_name varchar(30) NOT NULL,
   passwd varchar(30),
   company varchar(50),
   firstname varchar(50),
   adresse1 varchar(50),
   adresse2 varchar(50),
   postalcode varchar(10),
   city varchar(30),
   country varchar(30),
   phone varchar(30),
   fax varchar(30),
   email varchar(50),
   creation_date datetime,
   ts timestamp(14),
   title varchar(10),
   lastname varchar(40),
   position varchar(50),
   notes varchar(250),
   lastlogin datetime DEFAULT '0000-00-00 00:00:00',
   log text,
   syscomments text,
   lang char(2) DEFAULT 'en',
   PRIMARY KEY (user_id, user_id),
   UNIQUE id (user_id)
);

#
# Contenu de la table 'odns_users'
#

