-- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: mariadb.dmz.nausch.org:3306
-- Erstellungszeit: 01. Jul 2015 um 13:55
-- Server-Version: 5.5.41-MariaDB
-- PHP-Version: 5.4.16

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 utf8mb4 */;

--
-- Datenbank: `djigzo`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `admin`
--

CREATE TABLE IF NOT EXISTS `admin` (
  `id` bigint(20) NOT NULL,
  `builtin` tinyint(1) DEFAULT NULL,
  `enabled` tinyint(1) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `passwordencoding` int(11) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `username` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `admin_authority`
--

CREATE TABLE IF NOT EXISTS `admin_authority` (
  `admin_id` bigint(20) NOT NULL,
  `authorities_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `authority`
--

CREATE TABLE IF NOT EXISTS `authority` (
  `id` bigint(20) NOT NULL,
  `role` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `blob`
--

CREATE TABLE IF NOT EXISTS `blob` (
  `id` bigint(20) NOT NULL,
  `blob` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `certificaterequest`
--

CREATE TABLE IF NOT EXISTS `certificaterequest` (
  `id` bigint(20) NOT NULL,
  `certificatehandlername` varchar(255) DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `crldistpoint` text,
  `data` blob,
  `email` text,
  `info` text,
  `iteration` int(11) DEFAULT NULL,
  `keylength` int(11) DEFAULT NULL,
  `lastmessage` text,
  `lastupdated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `nextupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `privatekey` blob,
  `publickey` blob,
  `signaturealgorithm` varchar(255) DEFAULT NULL,
  `subject` blob,
  `validity` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `certificates`
--

CREATE TABLE IF NOT EXISTS `certificates` (
  `id` bigint(20) NOT NULL,
  `notbefore` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `notafter` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `issuer` text NOT NULL,
  `issuerfriendly` text NOT NULL,
  `serial` varchar(1024) NOT NULL,
  `subjectkeyidentifier` text NOT NULL,
  `subject` text NOT NULL,
  `subjectfriendly` text NOT NULL,
  `certificate` blob NOT NULL,
  `thumbprint` varchar(255) NOT NULL,
  `certpath` blob NOT NULL,
  `certpathtype` varchar(255) NOT NULL,
  `creationdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `datepathupdated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `keyalias` varchar(1024) NOT NULL,
  `storename` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `certificates_email`
--

CREATE TABLE IF NOT EXISTS `certificates_email` (
  `certificates_id` bigint(20) NOT NULL,
  `email` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `crls`
--

CREATE TABLE IF NOT EXISTS `crls` (
  `id` bigint(20) NOT NULL,
  `creationdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `issuer` text,
  `nextupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `thisupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `crlnumber` text,
  `crl` blob,
  `thumbprint` varchar(255) DEFAULT NULL,
  `storename` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `ctl`
--

CREATE TABLE IF NOT EXISTS `ctl` (
  `id` bigint(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `thumbprint` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `ctl_namevalues`
--

CREATE TABLE IF NOT EXISTS `ctl_namevalues` (
  `ctl_id` bigint(20) NOT NULL,
  `value` text,
  `name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `keyring`
--

CREATE TABLE IF NOT EXISTS `keyring` (
  `id` bigint(20) NOT NULL,
  `content` blob,
  `contenttype` text,
  `creationdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `publickey` blob NOT NULL,
  `expirationdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fingerprint` text NOT NULL,
  `insertiondate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `keyid` bigint(20) NOT NULL,
  `keyidhex` varchar(255) NOT NULL,
  `keyringname` text NOT NULL,
  `master` tinyint(1) NOT NULL,
  `parentkeyid` bigint(20) DEFAULT NULL,
  `privatekeyalias` text,
  `sha256fingerprint` text NOT NULL,
  `parentid` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `keyring_email`
--

CREATE TABLE IF NOT EXISTS `keyring_email` (
  `keyring_id` bigint(20) NOT NULL,
  `email` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `keyring_userid`
--

CREATE TABLE IF NOT EXISTS `keyring_userid` (
  `keyring_id` bigint(20) NOT NULL,
  `userid` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `keystore`
--

CREATE TABLE IF NOT EXISTS `keystore` (
  `id` bigint(20) NOT NULL,
  `alias` text NOT NULL,
  `certificate` blob,
  `certificatetype` varchar(255) DEFAULT NULL,
  `thumbprint` varchar(255) DEFAULT NULL,
  `certificatechain` blob,
  `creationdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `encodedkey` blob,
  `storename` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `mail_repository`
--

CREATE TABLE IF NOT EXISTS `mail_repository` (
  `id` varchar(255) NOT NULL,
  `data` blob,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `fromheader` text,
  `lastupdated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `messageid` text,
  `originator` text,
  `remoteaddress` text,
  `repository` varchar(255) DEFAULT NULL,
  `sender` text,
  `subject` text,
  `mime_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `mail_repository_recipients`
--

CREATE TABLE IF NOT EXISTS `mail_repository_recipients` (
  `id` varchar(255) NOT NULL,
  `recipients` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `named_blob`
--

CREATE TABLE IF NOT EXISTS `named_blob` (
  `id` bigint(20) NOT NULL,
  `category` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `blobentity_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `named_blob_named_blob`
--

CREATE TABLE IF NOT EXISTS `named_blob_named_blob` (
  `named_blob_id` bigint(20) NOT NULL,
  `namedblobs_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pgp_trust_list`
--

CREATE TABLE IF NOT EXISTS `pgp_trust_list` (
  `id` bigint(20) NOT NULL,
  `fingerprint` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pgp_trust_list_namevalues`
--

CREATE TABLE IF NOT EXISTS `pgp_trust_list_namevalues` (
  `pgp_trust_list_id` bigint(20) NOT NULL,
  `value` text,
  `name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `properties`
--

CREATE TABLE IF NOT EXISTS `properties` (
  `id` bigint(20) NOT NULL,
  `category` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `properties_namevalues`
--

CREATE TABLE IF NOT EXISTS `properties_namevalues` (
  `properties_id` bigint(20) NOT NULL,
  `value` text,
  `name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sms`
--

CREATE TABLE IF NOT EXISTS `sms` (
  `id` bigint(20) NOT NULL,
  `data` blob,
  `datecreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `datelasttry` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lasterror` text,
  `message` text NOT NULL,
  `phonenumber` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `userpreferences`
--

CREATE TABLE IF NOT EXISTS `userpreferences` (
  `id` bigint(20) NOT NULL,
  `category` text NOT NULL,
  `name` text NOT NULL,
  `keyandcertificateentry_id` bigint(20) DEFAULT NULL,
  `propertyentity_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `userpreferences_certificates`
--

CREATE TABLE IF NOT EXISTS `userpreferences_certificates` (
  `userpreferences_id` bigint(20) NOT NULL,
  `certificates_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `userpreferences_inheritedpreferences`
--

CREATE TABLE IF NOT EXISTS `userpreferences_inheritedpreferences` (
  `userpreferences_id` bigint(20) NOT NULL,
  `index` bigint(20) NOT NULL,
  `inherited_preferences_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `userpreferences_named_blob`
--

CREATE TABLE IF NOT EXISTS `userpreferences_named_blob` (
  `userpreferences_id` bigint(20) NOT NULL,
  `namedblobs_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `userpreferences_named_certificates`
--

CREATE TABLE IF NOT EXISTS `userpreferences_named_certificates` (
  `userpreferences_id` bigint(20) NOT NULL,
  `certificateentry_id` bigint(20) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` bigint(20) NOT NULL,
  `email` text NOT NULL,
  `userpreferencesentity_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*!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 */;
