From b33f91c2bd9da1b014b09b1d55430bd3d7535f9f Mon Sep 17 00:00:00 2001 From: Andy Beverley Date: Sun, 14 Jul 2024 20:38:22 +0100 Subject: [PATCH] Enable key to be restricted to server types --- lib/Brass.pm | 8 +- lib/Brass/API.pm | 13 +- lib/Brass/Config/Pwd.pm | 28 + lib/Brass/Schema.pm | 2 +- lib/Brass/Schema/Result/Pw.pm | 7 + lib/Brass/Schema/Result/PwServertype.pm | 46 + lib/Brass/Schema/ResultSet/Server.pm | 18 + share/fixtures/41/conf/all_tables.json | 165 + share/fixtures/41/conf/permission.json | 17 + .../MySQL/deploy/41/001-auto-__VERSION.sql | 18 + share/migrations/MySQL/deploy/41/001-auto.sql | 533 +++ .../MySQL/downgrade/41-40/001-auto.sql | 16 + .../MySQL/upgrade/40-41/001-auto.sql | 27 + .../_source/deploy/41/001-auto-__VERSION.yml | 91 + .../migrations/_source/deploy/41/001-auto.yml | 3700 +++++++++++++++++ views/config/pwd.tt | 12 + 16 files changed, 4694 insertions(+), 7 deletions(-) create mode 100644 lib/Brass/Schema/Result/PwServertype.pm create mode 100644 lib/Brass/Schema/ResultSet/Server.pm create mode 100644 share/fixtures/41/conf/all_tables.json create mode 100644 share/fixtures/41/conf/permission.json create mode 100644 share/migrations/MySQL/deploy/41/001-auto-__VERSION.sql create mode 100644 share/migrations/MySQL/deploy/41/001-auto.sql create mode 100644 share/migrations/MySQL/downgrade/41-40/001-auto.sql create mode 100644 share/migrations/MySQL/upgrade/40-41/001-auto.sql create mode 100644 share/migrations/_source/deploy/41/001-auto-__VERSION.yml create mode 100644 share/migrations/_source/deploy/41/001-auto.yml diff --git a/lib/Brass.pm b/lib/Brass.pm index 6ad1e4b..a4d8fe9 100644 --- a/lib/Brass.pm +++ b/lib/Brass.pm @@ -463,6 +463,7 @@ any ['get', 'post'] => '/config/pwd/?:id?' => require_role 'config' => sub { $pwd->publickey(param 'publickey'); $pwd->last_changed($strp->parse_datetime(param 'last_changed')); $pwd->set_uad(param 'uad'); + $pwd->servertypes([body_parameters->get_all('servertypes')]); $pwd->write; redirect '/config/pwd'; } @@ -473,9 +474,10 @@ any ['get', 'post'] => '/config/pwd/?:id?' => require_role 'config' => sub { $pwd->delete; redirect '/config/pwd'; } - $params->{pwd} = $pwd; - $params->{uads} = $uads->all; - $params->{servers} = $servers->all; + $params->{pwd} = $pwd; + $params->{uads} = $uads->all; + $params->{servers} = $servers->all; + $params->{servertypes} = [$schema->resultset('Servertype')->all]; } template 'config/pwd' => $params; diff --git a/lib/Brass/API.pm b/lib/Brass/API.pm index 3afd9c3..28bacdd 100644 --- a/lib/Brass/API.pm +++ b/lib/Brass/API.pm @@ -302,15 +302,22 @@ get 'api/server/' => sub { elsif ($action eq 'sshkeys') { $server or error __"Please specify server"; + my $server_rs = $schema->resultset('Server')->by_name($server) + or error __"Server not found"; my ($serv) = $schema->resultset('Server')->search({ - 'me.name' => $server, - 'user.deleted' => undef, + 'me.name' => $server, + 'user.deleted' => undef, + # Restrict keys to either ones without a servertype restriction, or + # ones that match the servertype of this server + 'pw_servertypes.servertype_id' => [undef, map { $_->servertype_id } $server_rs->server_servertypes], },{ prefetch => { server_servertypes => { servertype => { user_servertypes => { - user => 'pws', + user => { + pws => 'pw_servertypes', + }, }, }, }, diff --git a/lib/Brass/Config/Pwd.pm b/lib/Brass/Config/Pwd.pm index df18ab6..ee7dcd2 100644 --- a/lib/Brass/Config/Pwd.pm +++ b/lib/Brass/Config/Pwd.pm @@ -189,6 +189,17 @@ sub write server_id => $s, }); } + # Update all the servertypes + $self->schema->resultset('PwServertype')->search({ + pw_id => $self->id, + })->delete; + foreach my $id (@{$self->servertypes}) + { + $self->schema->resultset('PwServertype')->create({ + pw_id => $self->id, + servertype_id => $id, + }); + } $guard->commit; } @@ -241,5 +252,22 @@ sub _build_servers \%servers; } +sub has_servertype +{ my ($self, $servertype_id) = @_; + !! grep $_ == $servertype_id, @{$self->servertypes}; +} + +has servertypes => ( + is => 'rw', + isa => ArrayRef, + lazy => 1, + builder => 1, +); + +sub _build_servertypes +{ my $self = shift; + [map $_->servertype_id, $self->_rset->pw_servertypes]; +} + 1; diff --git a/lib/Brass/Schema.pm b/lib/Brass/Schema.pm index b5f74d0..375ef3d 100644 --- a/lib/Brass/Schema.pm +++ b/lib/Brass/Schema.pm @@ -15,7 +15,7 @@ __PACKAGE__->load_namespaces; # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-01 11:03:29 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GqW9kl7MrcAx0vieFGh+cw -our $VERSION = 40; +our $VERSION = 41; # You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/lib/Brass/Schema/Result/Pw.pm b/lib/Brass/Schema/Result/Pw.pm index 0734be4..f747d24 100644 --- a/lib/Brass/Schema/Result/Pw.pm +++ b/lib/Brass/Schema/Result/Pw.pm @@ -49,6 +49,13 @@ __PACKAGE__->belongs_to( }, ); +__PACKAGE__->has_many( + "pw_servertypes", + "Brass::Schema::Result::PwServertype", + { "foreign.pw_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + __PACKAGE__->belongs_to( "uad", "Brass::Schema::Result::Uad", diff --git a/lib/Brass/Schema/Result/PwServertype.pm b/lib/Brass/Schema/Result/PwServertype.pm new file mode 100644 index 0000000..f4f83d6 --- /dev/null +++ b/lib/Brass/Schema/Result/PwServertype.pm @@ -0,0 +1,46 @@ +use utf8; +package Brass::Schema::Result::PwServertype; + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +__PACKAGE__->table("pw_servertype"); + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "servertype_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "pw_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, +); + +__PACKAGE__->set_primary_key("id"); + +__PACKAGE__->belongs_to( + "servertype", + "Brass::Schema::Result::Servertype", + { id => "servertype_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "NO ACTION", + on_update => "NO ACTION", + }, +); + +__PACKAGE__->belongs_to( + "pw", + "Brass::Schema::Result::Pw", + { id => "pw_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "NO ACTION", + on_update => "NO ACTION", + }, +); + +1; diff --git a/lib/Brass/Schema/ResultSet/Server.pm b/lib/Brass/Schema/ResultSet/Server.pm new file mode 100644 index 0000000..eb6809e --- /dev/null +++ b/lib/Brass/Schema/ResultSet/Server.pm @@ -0,0 +1,18 @@ +package Brass::Schema::ResultSet::Server; + +use strict; +use warnings; + +use Log::Report; + +use base qw(DBIx::Class::ResultSet); + +sub by_name +{ my ($self, $name) = @_; + + $self->search({ + 'me.name' => $name, + })->next; +} + +1; diff --git a/share/fixtures/41/conf/all_tables.json b/share/fixtures/41/conf/all_tables.json new file mode 100644 index 0000000..010ad2a --- /dev/null +++ b/share/fixtures/41/conf/all_tables.json @@ -0,0 +1,165 @@ +{ + "has_many" : { + "fetch" : 0 + }, + "sets" : [ + { + "class" : "Comment", + "quantity" : "all" + }, + { + "class" : "Priority", + "quantity" : "all" + }, + { + "class" : "Domain", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "EventPerson" + }, + { + "class" : "CertLocationUse", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "Project" + }, + { + "quantity" : "all", + "class" : "UserServertype" + }, + { + "quantity" : "all", + "class" : "User" + }, + { + "class" : "App", + "quantity" : "all" + }, + { + "class" : "CertUse", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "CertLocation" + }, + { + "quantity" : "all", + "class" : "Issue" + }, + { + "class" : "UserTopic", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "Pw" + }, + { + "quantity" : "all", + "class" : "Customer" + }, + { + "quantity" : "all", + "class" : "Tag" + }, + { + "quantity" : "all", + "class" : "Uad" + }, + { + "quantity" : "all", + "class" : "Event" + }, + { + "quantity" : "all", + "class" : "Site" + }, + { + "class" : "IssuePriority", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "ServerServertype" + }, + { + "quantity" : "all", + "class" : "IssueTag" + }, + { + "quantity" : "all", + "class" : "Servertype" + }, + { + "class" : "Status", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "Permission" + }, + { + "class" : "ServerPw", + "quantity" : "all" + }, + { + "class" : "Calendar", + "quantity" : "all" + }, + { + "class" : "File", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "UserProject" + }, + { + "class" : "IssueStatus", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "ServerCert" + }, + { + "class" : "Server", + "quantity" : "all" + }, + { + "class" : "UserPermission", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "Eventtype" + }, + { + "quantity" : "all", + "class" : "Cert" + }, + { + "class" : "Docsend", + "quantity" : "all" + }, + { + "class" : "Issuetype", + "quantity" : "all" + }, + { + "quantity" : "all", + "class" : "PwServertype" + } + ], + "might_have" : { + "fetch" : 0 + }, + "belongs_to" : { + "fetch" : 0 + } +} diff --git a/share/fixtures/41/conf/permission.json b/share/fixtures/41/conf/permission.json new file mode 100644 index 0000000..5e5688c --- /dev/null +++ b/share/fixtures/41/conf/permission.json @@ -0,0 +1,17 @@ +{ + "has_many" : { + "fetch" : 0 + }, + "sets" : [ + { + "quantity" : "all", + "class" : "Permission" + } + ], + "might_have" : { + "fetch" : 0 + }, + "belongs_to" : { + "fetch" : 0 + } +} diff --git a/share/migrations/MySQL/deploy/41/001-auto-__VERSION.sql b/share/migrations/MySQL/deploy/41/001-auto-__VERSION.sql new file mode 100644 index 0000000..807971b --- /dev/null +++ b/share/migrations/MySQL/deploy/41/001-auto-__VERSION.sql @@ -0,0 +1,18 @@ +-- +-- Created by SQL::Translator::Producer::MySQL +-- Created on Sun Jul 14 12:56:37 2024 +-- +; +SET foreign_key_checks=0; +-- +-- Table: `dbix_class_deploymenthandler_versions` +-- +CREATE TABLE `dbix_class_deploymenthandler_versions` ( + `id` integer NOT NULL auto_increment, + `version` varchar(50) NOT NULL, + `ddl` text NULL, + `upgrade_sql` text NULL, + PRIMARY KEY (`id`), + UNIQUE `dbix_class_deploymenthandler_versions_version` (`version`) +); +SET foreign_key_checks=1; diff --git a/share/migrations/MySQL/deploy/41/001-auto.sql b/share/migrations/MySQL/deploy/41/001-auto.sql new file mode 100644 index 0000000..8c9e395 --- /dev/null +++ b/share/migrations/MySQL/deploy/41/001-auto.sql @@ -0,0 +1,533 @@ +-- +-- Created by SQL::Translator::Producer::MySQL +-- Created on Sun Jul 14 12:56:37 2024 +-- +; +SET foreign_key_checks=0; +-- +-- Table: `app` +-- +CREATE TABLE `app` ( + `id` integer NOT NULL auto_increment, + `status_last_run` datetime NULL, + PRIMARY KEY (`id`) +); +-- +-- Table: `calendar` +-- +CREATE TABLE `calendar` ( + `id` integer NOT NULL auto_increment, + `start` datetime NULL, + `end` datetime NULL, + `sequence` integer NOT NULL DEFAULT 0, + `description` text NULL, + `location` text NULL, + `attendees` text NULL, + `html` text NULL, + `user_id` integer NULL, + INDEX `calendar_idx_user_id` (`user_id`), + PRIMARY KEY (`id`), + CONSTRAINT `calendar_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `cert` +-- +CREATE TABLE `cert` ( + `id` integer NOT NULL auto_increment, + `content` text NULL, + `cn` varchar(45) NULL, + `type` varchar(45) NULL, + `expiry` date NULL, + `usedby` varchar(45) NULL, + `description` text NULL, + `filename` text NULL, + `file_user` text NULL, + `file_group` text NULL, + `content_cert` text NULL, + `content_key` text NULL, + `content_ca` text NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `cert_location` +-- +CREATE TABLE `cert_location` ( + `id` integer NOT NULL auto_increment, + `cert_id` integer NOT NULL, + `filename_cert` text NULL, + `filename_key` text NULL, + `filename_ca` text NULL, + `file_user` text NULL, + `file_group` text NULL, + INDEX `cert_location_idx_cert_id` (`cert_id`), + PRIMARY KEY (`id`), + CONSTRAINT `cert_location_fk_cert_id` FOREIGN KEY (`cert_id`) REFERENCES `cert` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `cert_location_use` +-- +CREATE TABLE `cert_location_use` ( + `id` integer NOT NULL auto_increment, + `cert_location_id` integer NOT NULL, + `use_id` integer NOT NULL, + INDEX `cert_location_use_idx_cert_location_id` (`cert_location_id`), + INDEX `cert_location_use_idx_use_id` (`use_id`), + PRIMARY KEY (`id`), + CONSTRAINT `cert_location_use_fk_cert_location_id` FOREIGN KEY (`cert_location_id`) REFERENCES `cert_location` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `cert_location_use_fk_use_id` FOREIGN KEY (`use_id`) REFERENCES `cert_use` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `cert_use` +-- +CREATE TABLE `cert_use` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `comment` +-- +CREATE TABLE `comment` ( + `id` integer NOT NULL auto_increment, + `author` integer NOT NULL, + `issue` integer NOT NULL, + `datetime` datetime NULL, + `text` text NULL, + INDEX `comment_idx_author` (`author`), + INDEX `comment_idx_issue` (`issue`), + PRIMARY KEY (`id`), + CONSTRAINT `comment_fk_author` FOREIGN KEY (`author`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `comment_fk_issue` FOREIGN KEY (`issue`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `customer` +-- +CREATE TABLE `customer` ( + `id` integer NOT NULL auto_increment, + `name` text NULL, + `authnames` text NULL, + `updated` datetime NULL, + `updated_by` integer NOT NULL, + INDEX `customer_idx_updated_by` (`updated_by`), + PRIMARY KEY (`id`), + CONSTRAINT `customer_fk_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `docsend` +-- +CREATE TABLE `docsend` ( + `id` integer NOT NULL auto_increment, + `doc_id` integer NULL, + `email` text NULL, + `code` varchar(32) NULL, + `created` datetime NULL, + `download_time` datetime NULL, + `download_ip_address` text NULL, + PRIMARY KEY (`id`), + UNIQUE `docsend_ux_code` (`code`) +); +-- +-- Table: `domain` +-- +CREATE TABLE `domain` ( + `id` integer NOT NULL auto_increment, + `name` varchar(45) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `event` +-- +CREATE TABLE `event` ( + `id` integer NOT NULL auto_increment, + `title` text NULL, + `description` text NULL, + `from` datetime NULL, + `to` datetime NULL, + `editor_id` integer NULL, + `eventtype_id` integer NULL, + `customer_id` integer NULL, + `invoiced` smallint NOT NULL DEFAULT 0, + INDEX `event_idx_customer_id` (`customer_id`), + INDEX `event_idx_editor_id` (`editor_id`), + INDEX `event_idx_eventtype_id` (`eventtype_id`), + PRIMARY KEY (`id`), + CONSTRAINT `event_fk_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `event_fk_editor_id` FOREIGN KEY (`editor_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `event_fk_eventtype_id` FOREIGN KEY (`eventtype_id`) REFERENCES `eventtype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `event_person` +-- +CREATE TABLE `event_person` ( + `id` integer NOT NULL auto_increment, + `event_id` integer NULL, + `user_id` integer NULL, + INDEX `event_person_idx_event_id` (`event_id`), + INDEX `event_person_idx_user_id` (`user_id`), + PRIMARY KEY (`id`), + CONSTRAINT `event_person_fk_event_id` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `event_person_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `eventtype` +-- +CREATE TABLE `eventtype` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `file` +-- +CREATE TABLE `file` ( + `id` integer NOT NULL auto_increment, + `uploaded_by` integer NOT NULL, + `issue` integer NOT NULL, + `datetime` datetime NULL, + `name` text NULL, + `mimetype` text NULL, + `content` longblob NULL, + INDEX `file_idx_issue` (`issue`), + INDEX `file_idx_uploaded_by` (`uploaded_by`), + PRIMARY KEY (`id`), + CONSTRAINT `file_fk_issue` FOREIGN KEY (`issue`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `file_fk_uploaded_by` FOREIGN KEY (`uploaded_by`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `issue` +-- +CREATE TABLE `issue` ( + `id` integer NOT NULL auto_increment, + `title` text NULL, + `description` text NULL, + `type` integer NULL, + `author` integer NULL, + `owner` integer NULL, + `approver` integer NULL, + `reference` varchar(128) NULL, + `project` integer NULL, + `security_considerations` text NULL, + `rca` text NULL, + `corrective_action` text NULL, + `related_issue_id` integer NULL, + `target_date` datetime NULL, + `resources_required` text NULL, + `success_description` text NULL, + INDEX `issue_idx_approver` (`approver`), + INDEX `issue_idx_author` (`author`), + INDEX `issue_idx_owner` (`owner`), + INDEX `issue_idx_project` (`project`), + INDEX `issue_idx_related_issue_id` (`related_issue_id`), + INDEX `issue_idx_type` (`type`), + PRIMARY KEY (`id`), + CONSTRAINT `issue_fk_approver` FOREIGN KEY (`approver`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_fk_author` FOREIGN KEY (`author`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_fk_owner` FOREIGN KEY (`owner`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_fk_project` FOREIGN KEY (`project`) REFERENCES `project` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_fk_related_issue_id` FOREIGN KEY (`related_issue_id`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_fk_type` FOREIGN KEY (`type`) REFERENCES `issuetype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `issue_priority` +-- +CREATE TABLE `issue_priority` ( + `id` integer NOT NULL auto_increment, + `issue` integer NOT NULL, + `priority` integer NOT NULL, + `datetime` datetime NULL, + `user` integer NULL, + INDEX `issue_priority_idx_issue` (`issue`), + INDEX `issue_priority_idx_priority` (`priority`), + INDEX `issue_priority_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `issue_priority_fk_issue` FOREIGN KEY (`issue`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_priority_fk_priority` FOREIGN KEY (`priority`) REFERENCES `priority` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_priority_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `issue_status` +-- +CREATE TABLE `issue_status` ( + `id` integer NOT NULL auto_increment, + `issue` integer NOT NULL, + `status` integer NOT NULL, + `datetime` datetime NULL, + `user` integer NULL, + INDEX `issue_status_idx_issue` (`issue`), + INDEX `issue_status_idx_status` (`status`), + INDEX `issue_status_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `issue_status_fk_issue` FOREIGN KEY (`issue`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_status_fk_status` FOREIGN KEY (`status`) REFERENCES `status` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_status_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `issue_tag` +-- +CREATE TABLE `issue_tag` ( + `id` integer NOT NULL auto_increment, + `issue` integer NOT NULL, + `tag` integer NOT NULL, + INDEX `issue_tag_idx_issue` (`issue`), + INDEX `issue_tag_idx_tag` (`tag`), + PRIMARY KEY (`id`), + CONSTRAINT `issue_tag_fk_issue` FOREIGN KEY (`issue`) REFERENCES `issue` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `issue_tag_fk_tag` FOREIGN KEY (`tag`) REFERENCES `tag` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `issuetype` +-- +CREATE TABLE `issuetype` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + `identifier` varchar(32) NULL, + `is_vulnerability` smallint NOT NULL DEFAULT 0, + `is_breach` smallint NOT NULL DEFAULT 0, + `is_audit` smallint NOT NULL DEFAULT 0, + `is_other_security` smallint NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `permission` +-- +CREATE TABLE `permission` ( + `id` integer NOT NULL auto_increment, + `name` varchar(45) NULL, + `description` text NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `priority` +-- +CREATE TABLE `priority` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `project` +-- +CREATE TABLE `project` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `pw` +-- +CREATE TABLE `pw` ( + `id` integer NOT NULL auto_increment, + `server_id` integer NULL, + `uad_id` integer NULL, + `username` varchar(45) NULL, + `user_id` integer NULL, + `password` varchar(45) NULL, + `pwencrypt` blob NULL, + `type` varchar(128) NULL, + `last_changed` datetime NULL, + `publickey` text NULL, + INDEX `pw_idx_server_id` (`server_id`), + INDEX `pw_idx_uad_id` (`uad_id`), + INDEX `pw_idx_user_id` (`user_id`), + PRIMARY KEY (`id`), + CONSTRAINT `pw_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `server` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `pw_fk_uad_id` FOREIGN KEY (`uad_id`) REFERENCES `uad` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `pw_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `pw_servertype` +-- +CREATE TABLE `pw_servertype` ( + `id` integer NOT NULL auto_increment, + `servertype_id` integer NULL, + `pw_id` integer NULL, + INDEX `pw_servertype_idx_pw_id` (`pw_id`), + INDEX `pw_servertype_idx_servertype_id` (`servertype_id`), + PRIMARY KEY (`id`), + CONSTRAINT `pw_servertype_fk_pw_id` FOREIGN KEY (`pw_id`) REFERENCES `pw` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `pw_servertype_fk_servertype_id` FOREIGN KEY (`servertype_id`) REFERENCES `servertype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `server` +-- +CREATE TABLE `server` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + `domain_id` integer NULL, + `sudo` text NULL, + `update_datetime` datetime NULL, + `update_result` text NULL, + `restart_required` text NULL, + `os_version` varchar(128) NULL, + `backup_verify` text NULL, + `notes` text NULL, + `is_production` smallint NOT NULL DEFAULT 0, + `local_ip` text NULL, + `metadata` text NULL, + INDEX `server_idx_domain_id` (`domain_id`), + PRIMARY KEY (`id`), + UNIQUE `name_UNIQUE` (`name`), + CONSTRAINT `server_fk_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `server_cert` +-- +CREATE TABLE `server_cert` ( + `id` integer NOT NULL auto_increment, + `server_id` integer NOT NULL, + `cert_id` integer NOT NULL, + `type` varchar(45) NULL, + `use` integer NULL, + INDEX `server_cert_idx_cert_id` (`cert_id`), + INDEX `server_cert_idx_server_id` (`server_id`), + INDEX `server_cert_idx_use` (`use`), + PRIMARY KEY (`id`), + CONSTRAINT `server_cert_fk_cert_id` FOREIGN KEY (`cert_id`) REFERENCES `cert` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `server_cert_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `server` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `server_cert_fk_use` FOREIGN KEY (`use`) REFERENCES `cert_use` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `server_pw` +-- +CREATE TABLE `server_pw` ( + `id` integer NOT NULL auto_increment, + `server_id` integer NULL, + `pw_id` integer NULL, + INDEX `server_pw_idx_pw_id` (`pw_id`), + INDEX `server_pw_idx_server_id` (`server_id`), + PRIMARY KEY (`id`), + CONSTRAINT `server_pw_fk_pw_id` FOREIGN KEY (`pw_id`) REFERENCES `pw` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `server_pw_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `server` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `server_servertype` +-- +CREATE TABLE `server_servertype` ( + `id` integer NOT NULL auto_increment, + `server_id` integer NOT NULL, + `servertype_id` integer NOT NULL, + INDEX `server_servertype_idx_server_id` (`server_id`), + INDEX `server_servertype_idx_servertype_id` (`servertype_id`), + PRIMARY KEY (`id`), + CONSTRAINT `server_servertype_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `server` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `server_servertype_fk_servertype_id` FOREIGN KEY (`servertype_id`) REFERENCES `servertype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `servertype` +-- +CREATE TABLE `servertype` ( + `id` integer NOT NULL auto_increment, + `name` varchar(45) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `site` +-- +CREATE TABLE `site` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + `server_id` integer NULL, + INDEX `site_idx_server_id` (`server_id`), + PRIMARY KEY (`id`), + CONSTRAINT `site_fk_server_id` FOREIGN KEY (`server_id`) REFERENCES `server` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `status` +-- +CREATE TABLE `status` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `tag` +-- +CREATE TABLE `tag` ( + `id` integer NOT NULL auto_increment, + `name` varchar(128) NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `uad` +-- +CREATE TABLE `uad` ( + `id` integer NOT NULL auto_increment, + `name` text NULL, + `owner` integer NULL, + `serial` text NULL, + `purchased` date NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `user` +-- +CREATE TABLE `user` ( + `id` integer NOT NULL auto_increment, + `username` varchar(128) NOT NULL, + `firstname` varchar(128) NULL, + `surname` varchar(128) NULL, + `email` varchar(128) NULL, + `deleted` datetime NULL, + `password` varchar(128) NULL, + `pwchanged` datetime NULL, + `pwresetcode` char(32) NULL, + `lastlogin` datetime NULL, + `lastfail` datetime NULL, + `failcount` integer NOT NULL DEFAULT 0, + `api_key` text NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; +-- +-- Table: `user_permission` +-- +CREATE TABLE `user_permission` ( + `id` integer NOT NULL auto_increment, + `user` integer NULL, + `permission` integer NULL, + INDEX `user_permission_idx_permission` (`permission`), + INDEX `user_permission_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `user_permission_fk_permission` FOREIGN KEY (`permission`) REFERENCES `permission` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `user_permission_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `user_project` +-- +CREATE TABLE `user_project` ( + `id` integer NOT NULL auto_increment, + `user` integer NOT NULL, + `project` integer NOT NULL, + INDEX `user_project_idx_project` (`project`), + INDEX `user_project_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `user_project_fk_project` FOREIGN KEY (`project`) REFERENCES `project` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `user_project_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `user_servertype` +-- +CREATE TABLE `user_servertype` ( + `id` integer NOT NULL auto_increment, + `user` integer NOT NULL, + `servertype` integer NOT NULL, + INDEX `user_servertype_idx_servertype` (`servertype`), + INDEX `user_servertype_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `user_servertype_fk_servertype` FOREIGN KEY (`servertype`) REFERENCES `servertype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `user_servertype_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +-- +-- Table: `user_topic` +-- +CREATE TABLE `user_topic` ( + `id` integer NOT NULL auto_increment, + `user` integer NOT NULL, + `topic` integer NOT NULL, + `permission` integer NOT NULL, + INDEX `user_topic_idx_permission` (`permission`), + INDEX `user_topic_idx_user` (`user`), + PRIMARY KEY (`id`), + CONSTRAINT `user_topic_fk_permission` FOREIGN KEY (`permission`) REFERENCES `permission` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `user_topic_fk_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; +SET foreign_key_checks=1; diff --git a/share/migrations/MySQL/downgrade/41-40/001-auto.sql b/share/migrations/MySQL/downgrade/41-40/001-auto.sql new file mode 100644 index 0000000..77ced52 --- /dev/null +++ b/share/migrations/MySQL/downgrade/41-40/001-auto.sql @@ -0,0 +1,16 @@ +-- Convert schema '/srv/Brass/share/migrations/_source/deploy/41/001-auto.yml' to '/srv/Brass/share/migrations/_source/deploy/40/001-auto.yml':; + +; +BEGIN; + +; +ALTER TABLE pw_servertype DROP FOREIGN KEY pw_servertype_fk_pw_id, + DROP FOREIGN KEY pw_servertype_fk_servertype_id; + +; +DROP TABLE pw_servertype; + +; + +COMMIT; + diff --git a/share/migrations/MySQL/upgrade/40-41/001-auto.sql b/share/migrations/MySQL/upgrade/40-41/001-auto.sql new file mode 100644 index 0000000..0d82c4f --- /dev/null +++ b/share/migrations/MySQL/upgrade/40-41/001-auto.sql @@ -0,0 +1,27 @@ +-- Convert schema '/srv/Brass/share/migrations/_source/deploy/40/001-auto.yml' to '/srv/Brass/share/migrations/_source/deploy/41/001-auto.yml':; + +; +BEGIN; + +; +SET foreign_key_checks=0; + +; +CREATE TABLE `pw_servertype` ( + `id` integer NOT NULL auto_increment, + `servertype_id` integer NULL, + `pw_id` integer NULL, + INDEX `pw_servertype_idx_pw_id` (`pw_id`), + INDEX `pw_servertype_idx_servertype_id` (`servertype_id`), + PRIMARY KEY (`id`), + CONSTRAINT `pw_servertype_fk_pw_id` FOREIGN KEY (`pw_id`) REFERENCES `pw` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT `pw_servertype_fk_servertype_id` FOREIGN KEY (`servertype_id`) REFERENCES `servertype` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION +) ENGINE=InnoDB; + +; +SET foreign_key_checks=1; + +; + +COMMIT; + diff --git a/share/migrations/_source/deploy/41/001-auto-__VERSION.yml b/share/migrations/_source/deploy/41/001-auto-__VERSION.yml new file mode 100644 index 0000000..487f2d7 --- /dev/null +++ b/share/migrations/_source/deploy/41/001-auto-__VERSION.yml @@ -0,0 +1,91 @@ +--- +schema: + procedures: {} + tables: + dbix_class_deploymenthandler_versions: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - version + match_type: '' + name: dbix_class_deploymenthandler_versions_version + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + ddl: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: ddl + order: 3 + size: + - 0 + id: + data_type: int + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + upgrade_sql: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: upgrade_sql + order: 4 + size: + - 0 + version: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: version + order: 2 + size: + - 50 + indices: [] + name: dbix_class_deploymenthandler_versions + options: [] + order: 1 + triggers: {} + views: {} +translator: + add_drop_table: 0 + filename: ~ + no_comments: 0 + parser_args: + sources: + - __VERSION + parser_type: SQL::Translator::Parser::DBIx::Class + producer_args: {} + producer_type: SQL::Translator::Producer::YAML + show_warnings: 0 + trace: 0 + version: 1.62 diff --git a/share/migrations/_source/deploy/41/001-auto.yml b/share/migrations/_source/deploy/41/001-auto.yml new file mode 100644 index 0000000..65983a7 --- /dev/null +++ b/share/migrations/_source/deploy/41/001-auto.yml @@ -0,0 +1,3700 @@ +--- +schema: + procedures: {} + tables: + app: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + status_last_run: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: status_last_run + order: 2 + size: + - 0 + indices: [] + name: app + options: [] + order: 1 + calendar: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - user_id + match_type: '' + name: calendar_fk_user_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + attendees: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: attendees + order: 7 + size: + - 0 + description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 5 + size: + - 0 + end: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: end + order: 3 + size: + - 0 + html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: html + order: 8 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + location: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: location + order: 6 + size: + - 0 + sequence: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sequence + order: 4 + size: + - 0 + start: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: start + order: 2 + size: + - 0 + user_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user_id + order: 9 + size: + - 0 + indices: + - fields: + - user_id + name: calendar_idx_user_id + options: [] + type: NORMAL + name: calendar + options: [] + order: 2 + cert: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + cn: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: cn + order: 3 + size: + - 45 + content: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: content + order: 2 + size: + - 0 + content_ca: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: content_ca + order: 13 + size: + - 0 + content_cert: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: content_cert + order: 11 + size: + - 0 + content_key: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: content_key + order: 12 + size: + - 0 + description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 7 + size: + - 0 + expiry: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: expiry + order: 5 + size: + - 0 + file_group: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_group + order: 10 + size: + - 0 + file_user: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_user + order: 9 + size: + - 0 + filename: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: filename + order: 8 + size: + - 256 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 4 + size: + - 45 + usedby: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: usedby + order: 6 + size: + - 45 + indices: [] + name: cert + options: [] + order: 3 + cert_location: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - cert_id + match_type: '' + name: cert_location_fk_cert_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: cert + type: FOREIGN KEY + fields: + cert_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cert_id + order: 2 + size: + - 0 + file_group: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_group + order: 7 + size: + - 0 + file_user: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_user + order: 6 + size: + - 0 + filename_ca: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: filename_ca + order: 5 + size: + - 0 + filename_cert: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: filename_cert + order: 3 + size: + - 0 + filename_key: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: filename_key + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + indices: + - fields: + - cert_id + name: cert_location_idx_cert_id + options: [] + type: NORMAL + name: cert_location + options: [] + order: 4 + cert_location_use: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - cert_location_id + match_type: '' + name: cert_location_use_fk_cert_location_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: cert_location + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - use_id + match_type: '' + name: cert_location_use_fk_use_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: cert_use + type: FOREIGN KEY + fields: + cert_location_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cert_location_id + order: 2 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + use_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: use_id + order: 3 + size: + - 0 + indices: + - fields: + - cert_location_id + name: cert_location_use_idx_cert_location_id + options: [] + type: NORMAL + - fields: + - use_id + name: cert_location_use_idx_use_id + options: [] + type: NORMAL + name: cert_location_use + options: [] + order: 5 + cert_use: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: cert_use + options: [] + order: 6 + comment: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - author + match_type: '' + name: comment_fk_author + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - issue + match_type: '' + name: comment_fk_issue + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + fields: + author: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: author + order: 2 + size: + - 0 + datetime: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: datetime + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + issue: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 3 + size: + - 0 + text: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: text + order: 5 + size: + - 0 + indices: + - fields: + - author + name: comment_idx_author + options: [] + type: NORMAL + - fields: + - issue + name: comment_idx_issue + options: [] + type: NORMAL + name: comment + options: [] + order: 7 + customer: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - updated_by + match_type: '' + name: customer_fk_updated_by + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + authnames: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: authnames + order: 3 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 0 + updated: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: updated + order: 4 + size: + - 0 + updated_by: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: updated_by + order: 5 + size: + - 0 + indices: + - fields: + - updated_by + name: customer_idx_updated_by + options: [] + type: NORMAL + name: customer + options: [] + order: 8 + docsend: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - code + match_type: '' + name: docsend_ux_code + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + code: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: code + order: 4 + size: + - 32 + created: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: created + order: 5 + size: + - 0 + doc_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: doc_id + order: 2 + size: + - 0 + download_ip_address: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: download_ip_address + order: 7 + size: + - 0 + download_time: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: download_time + order: 6 + size: + - 0 + email: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: email + order: 3 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + indices: [] + name: docsend + options: [] + order: 9 + domain: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 45 + indices: [] + name: domain + options: [] + order: 10 + event: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - customer_id + match_type: '' + name: event_fk_customer_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: customer + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - editor_id + match_type: '' + name: event_fk_editor_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - eventtype_id + match_type: '' + name: event_fk_eventtype_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: eventtype + type: FOREIGN KEY + fields: + customer_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: customer_id + order: 8 + size: + - 0 + description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 0 + editor_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: editor_id + order: 6 + size: + - 0 + eventtype_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: eventtype_id + order: 7 + size: + - 0 + from: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: from + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + invoiced: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: invoiced + order: 9 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 256 + to: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: to + order: 5 + size: + - 0 + indices: + - fields: + - customer_id + name: event_idx_customer_id + options: [] + type: NORMAL + - fields: + - editor_id + name: event_idx_editor_id + options: [] + type: NORMAL + - fields: + - eventtype_id + name: event_idx_eventtype_id + options: [] + type: NORMAL + name: event + options: [] + order: 11 + event_person: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - event_id + match_type: '' + name: event_person_fk_event_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: event + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user_id + match_type: '' + name: event_person_fk_user_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + event_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: event_id + order: 2 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + user_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user_id + order: 3 + size: + - 0 + indices: + - fields: + - event_id + name: event_person_idx_event_id + options: [] + type: NORMAL + - fields: + - user_id + name: event_person_idx_user_id + options: [] + type: NORMAL + name: event_person + options: [] + order: 12 + eventtype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: eventtype + options: [] + order: 13 + file: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - issue + match_type: '' + name: file_fk_issue + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - uploaded_by + match_type: '' + name: file_fk_uploaded_by + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + content: + data_type: longblob + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: content + order: 7 + size: + - 0 + datetime: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: datetime + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + issue: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 3 + size: + - 0 + mimetype: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: mimetype + order: 6 + size: + - 0 + name: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 5 + size: + - 0 + uploaded_by: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: uploaded_by + order: 2 + size: + - 0 + indices: + - fields: + - issue + name: file_idx_issue + options: [] + type: NORMAL + - fields: + - uploaded_by + name: file_idx_uploaded_by + options: [] + type: NORMAL + name: file + options: [] + order: 14 + issue: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - approver + match_type: '' + name: issue_fk_approver + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - author + match_type: '' + name: issue_fk_author + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - owner + match_type: '' + name: issue_fk_owner + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - project + match_type: '' + name: issue_fk_project + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: project + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - related_issue_id + match_type: '' + name: issue_fk_related_issue_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - type + match_type: '' + name: issue_fk_type + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issuetype + type: FOREIGN KEY + fields: + approver: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: approver + order: 7 + size: + - 0 + author: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: author + order: 5 + size: + - 0 + corrective_action: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: corrective_action + order: 12 + size: + - 0 + description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + owner: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: owner + order: 6 + size: + - 0 + project: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: project + order: 9 + size: + - 0 + rca: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: rca + order: 11 + size: + - 0 + reference: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: reference + order: 8 + size: + - 128 + related_issue_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: related_issue_id + order: 13 + size: + - 0 + resources_required: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: resources_required + order: 15 + size: + - 0 + security_considerations: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: security_considerations + order: 10 + size: + - 0 + success_description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: success_description + order: 16 + size: + - 0 + target_date: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: target_date + order: 14 + size: + - 0 + title: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 256 + type: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 4 + size: + - 0 + indices: + - fields: + - approver + name: issue_idx_approver + options: [] + type: NORMAL + - fields: + - author + name: issue_idx_author + options: [] + type: NORMAL + - fields: + - owner + name: issue_idx_owner + options: [] + type: NORMAL + - fields: + - project + name: issue_idx_project + options: [] + type: NORMAL + - fields: + - related_issue_id + name: issue_idx_related_issue_id + options: [] + type: NORMAL + - fields: + - type + name: issue_idx_type + options: [] + type: NORMAL + name: issue + options: [] + order: 15 + issue_priority: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - issue + match_type: '' + name: issue_priority_fk_issue + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - priority + match_type: '' + name: issue_priority_fk_priority + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: priority + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: issue_priority_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + datetime: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: datetime + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + issue: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 2 + size: + - 0 + priority: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user + order: 5 + size: + - 0 + indices: + - fields: + - issue + name: issue_priority_idx_issue + options: [] + type: NORMAL + - fields: + - priority + name: issue_priority_idx_priority + options: [] + type: NORMAL + - fields: + - user + name: issue_priority_idx_user + options: [] + type: NORMAL + name: issue_priority + options: [] + order: 16 + issue_status: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - issue + match_type: '' + name: issue_status_fk_issue + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - status + match_type: '' + name: issue_status_fk_status + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: status + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: issue_status_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + datetime: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: datetime + order: 4 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + issue: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 2 + size: + - 0 + status: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user + order: 5 + size: + - 0 + indices: + - fields: + - issue + name: issue_status_idx_issue + options: [] + type: NORMAL + - fields: + - status + name: issue_status_idx_status + options: [] + type: NORMAL + - fields: + - user + name: issue_status_idx_user + options: [] + type: NORMAL + name: issue_status + options: [] + order: 17 + issue_tag: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - issue + match_type: '' + name: issue_tag_fk_issue + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: issue + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - tag + match_type: '' + name: issue_tag_fk_tag + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: tag + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + issue: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 2 + size: + - 0 + tag: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tag + order: 3 + size: + - 0 + indices: + - fields: + - issue + name: issue_tag_idx_issue + options: [] + type: NORMAL + - fields: + - tag + name: issue_tag_idx_tag + options: [] + type: NORMAL + name: issue_tag + options: [] + order: 18 + issuetype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + identifier: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: identifier + order: 3 + size: + - 32 + is_audit: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_audit + order: 6 + size: + - 0 + is_breach: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_breach + order: 5 + size: + - 0 + is_other_security: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_other_security + order: 7 + size: + - 0 + is_vulnerability: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_vulnerability + order: 4 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: issuetype + options: [] + order: 19 + permission: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + description: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 3 + size: + - 256 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 45 + indices: [] + name: permission + options: [] + order: 20 + priority: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: priority + options: [] + order: 21 + project: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: project + options: [] + order: 22 + pw: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - server_id + match_type: '' + name: pw_fk_server_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: server + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - uad_id + match_type: '' + name: pw_fk_uad_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: uad + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user_id + match_type: '' + name: pw_fk_user_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + last_changed: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_changed + order: 9 + size: + - 0 + password: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: password + order: 6 + size: + - 45 + publickey: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publickey + order: 10 + size: + - 0 + pwencrypt: + data_type: blob + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pwencrypt + order: 7 + size: + - 0 + server_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: server_id + order: 2 + size: + - 0 + type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 8 + size: + - 128 + uad_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: uad_id + order: 3 + size: + - 0 + user_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user_id + order: 5 + size: + - 0 + username: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: username + order: 4 + size: + - 45 + indices: + - fields: + - server_id + name: pw_idx_server_id + options: [] + type: NORMAL + - fields: + - uad_id + name: pw_idx_uad_id + options: [] + type: NORMAL + - fields: + - user_id + name: pw_idx_user_id + options: [] + type: NORMAL + name: pw + options: [] + order: 23 + pw_servertype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - pw_id + match_type: '' + name: pw_servertype_fk_pw_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: pw + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - servertype_id + match_type: '' + name: pw_servertype_fk_servertype_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: servertype + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + pw_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pw_id + order: 3 + size: + - 0 + servertype_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: servertype_id + order: 2 + size: + - 0 + indices: + - fields: + - pw_id + name: pw_servertype_idx_pw_id + options: [] + type: NORMAL + - fields: + - servertype_id + name: pw_servertype_idx_servertype_id + options: [] + type: NORMAL + name: pw_servertype + options: [] + order: 24 + server: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - name + match_type: '' + name: name_UNIQUE + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - domain_id + match_type: '' + name: server_fk_domain_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: domain + type: FOREIGN KEY + fields: + backup_verify: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: backup_verify + order: 9 + size: + - 0 + domain_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: domain_id + order: 3 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + is_production: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: is_production + order: 11 + size: + - 0 + local_ip: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: local_ip + order: 12 + size: + - 0 + metadata: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: metadata + order: 13 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: name + order: 2 + size: + - 128 + notes: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: notes + order: 10 + size: + - 0 + os_version: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: os_version + order: 8 + size: + - 128 + restart_required: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: restart_required + order: 7 + size: + - 0 + sudo: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: sudo + order: 4 + size: + - 0 + update_datetime: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: update_datetime + order: 5 + size: + - 0 + update_result: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: update_result + order: 6 + size: + - 0 + indices: + - fields: + - domain_id + name: server_idx_domain_id + options: [] + type: NORMAL + name: server + options: [] + order: 25 + server_cert: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - cert_id + match_type: '' + name: server_cert_fk_cert_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: cert + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - server_id + match_type: '' + name: server_cert_fk_server_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: server + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - use + match_type: '' + name: server_cert_fk_use + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: cert_use + type: FOREIGN KEY + fields: + cert_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cert_id + order: 3 + size: + - 0 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + server_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: server_id + order: 2 + size: + - 0 + type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 4 + size: + - 45 + use: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: use + order: 5 + size: + - 0 + indices: + - fields: + - cert_id + name: server_cert_idx_cert_id + options: [] + type: NORMAL + - fields: + - server_id + name: server_cert_idx_server_id + options: [] + type: NORMAL + - fields: + - use + name: server_cert_idx_use + options: [] + type: NORMAL + name: server_cert + options: [] + order: 26 + server_pw: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - pw_id + match_type: '' + name: server_pw_fk_pw_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: pw + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - server_id + match_type: '' + name: server_pw_fk_server_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: server + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + pw_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pw_id + order: 3 + size: + - 0 + server_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: server_id + order: 2 + size: + - 0 + indices: + - fields: + - pw_id + name: server_pw_idx_pw_id + options: [] + type: NORMAL + - fields: + - server_id + name: server_pw_idx_server_id + options: [] + type: NORMAL + name: server_pw + options: [] + order: 27 + server_servertype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - server_id + match_type: '' + name: server_servertype_fk_server_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: server + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - servertype_id + match_type: '' + name: server_servertype_fk_servertype_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: servertype + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + server_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: server_id + order: 2 + size: + - 0 + servertype_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: servertype_id + order: 3 + size: + - 0 + indices: + - fields: + - server_id + name: server_servertype_idx_server_id + options: [] + type: NORMAL + - fields: + - servertype_id + name: server_servertype_idx_servertype_id + options: [] + type: NORMAL + name: server_servertype + options: [] + order: 28 + servertype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 45 + indices: [] + name: servertype + options: [] + order: 29 + site: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - server_id + match_type: '' + name: site_fk_server_id + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: server + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + server_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: server_id + order: 3 + size: + - 0 + indices: + - fields: + - server_id + name: site_idx_server_id + options: [] + type: NORMAL + name: site + options: [] + order: 30 + status: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: status + options: [] + order: 31 + tag: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 128 + indices: [] + name: tag + options: [] + order: 32 + uad: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: name + order: 2 + size: + - 256 + owner: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: owner + order: 3 + size: + - 0 + purchased: + data_type: date + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: purchased + order: 5 + size: + - 0 + serial: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: serial + order: 4 + size: + - 0 + indices: [] + name: uad + options: [] + order: 33 + user: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + fields: + api_key: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: api_key + order: 13 + size: + - 0 + deleted: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: deleted + order: 6 + size: + - 0 + email: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: email + order: 5 + size: + - 128 + failcount: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: failcount + order: 12 + size: + - 0 + firstname: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: firstname + order: 3 + size: + - 128 + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + lastfail: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: lastfail + order: 11 + size: + - 0 + lastlogin: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: lastlogin + order: 10 + size: + - 0 + password: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: password + order: 7 + size: + - 128 + pwchanged: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pwchanged + order: 8 + size: + - 0 + pwresetcode: + data_type: char + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pwresetcode + order: 9 + size: + - 32 + surname: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: surname + order: 4 + size: + - 128 + username: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: username + order: 2 + size: + - 128 + indices: [] + name: user + options: [] + order: 34 + user_permission: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - permission + match_type: '' + name: user_permission_fk_permission + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: permission + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: user_permission_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + permission: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: permission + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user + order: 2 + size: + - 0 + indices: + - fields: + - permission + name: user_permission_idx_permission + options: [] + type: NORMAL + - fields: + - user + name: user_permission_idx_user + options: [] + type: NORMAL + name: user_permission + options: [] + order: 35 + user_project: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - project + match_type: '' + name: user_project_fk_project + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: project + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: user_project_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + project: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: project + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user + order: 2 + size: + - 0 + indices: + - fields: + - project + name: user_project_idx_project + options: [] + type: NORMAL + - fields: + - user + name: user_project_idx_user + options: [] + type: NORMAL + name: user_project + options: [] + order: 36 + user_servertype: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - servertype + match_type: '' + name: user_servertype_fk_servertype + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: servertype + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: user_servertype_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + servertype: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: servertype + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user + order: 2 + size: + - 0 + indices: + - fields: + - servertype + name: user_servertype_idx_servertype + options: [] + type: NORMAL + - fields: + - user + name: user_servertype_idx_user + options: [] + type: NORMAL + name: user_servertype + options: [] + order: 37 + user_topic: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - permission + match_type: '' + name: user_topic_fk_permission + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: permission + type: FOREIGN KEY + - deferrable: 1 + expression: '' + fields: + - user + match_type: '' + name: user_topic_fk_user + on_delete: NO ACTION + on_update: NO ACTION + options: [] + reference_fields: + - id + reference_table: user + type: FOREIGN KEY + fields: + id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 0 + permission: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: permission + order: 4 + size: + - 0 + topic: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: topic + order: 3 + size: + - 0 + user: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user + order: 2 + size: + - 0 + indices: + - fields: + - permission + name: user_topic_idx_permission + options: [] + type: NORMAL + - fields: + - user + name: user_topic_idx_user + options: [] + type: NORMAL + name: user_topic + options: [] + order: 38 + triggers: {} + views: {} +translator: + add_drop_table: 0 + filename: ~ + no_comments: 0 + parser_args: + sources: + - App + - Calendar + - Cert + - CertLocation + - CertLocationUse + - CertUse + - Comment + - Customer + - Docsend + - Domain + - Event + - EventPerson + - Eventtype + - File + - Issue + - IssuePriority + - IssueStatus + - IssueTag + - Issuetype + - Permission + - Priority + - Project + - Pw + - PwServertype + - Server + - ServerCert + - ServerPw + - ServerServertype + - Servertype + - Site + - Status + - Tag + - Uad + - User + - UserPermission + - UserProject + - UserServertype + - UserTopic + parser_type: SQL::Translator::Parser::DBIx::Class + producer_args: {} + producer_type: SQL::Translator::Producer::YAML + show_warnings: 0 + trace: 0 + version: 1.62 diff --git a/views/config/pwd.tt b/views/config/pwd.tt index 9eef24b..d910254 100644 --- a/views/config/pwd.tt +++ b/views/config/pwd.tt @@ -33,6 +33,18 @@ + +
+ + [% FOREACH servertype IN servertypes %] +
+ +
+ [% END %] +
[% IF user.has_permission('config_write') %] [% IF pwd.id %]