From 3cfee53253f52fbbf1dadf1acb0c221c7057bc7d Mon Sep 17 00:00:00 2001 From: Marco Pessotto Date: Tue, 30 Jan 2024 14:47:36 +0100 Subject: [PATCH] Regenerate DDLs --- dbicdh/MySQL/deploy/84/001-auto-__VERSION.sql | 18 + dbicdh/MySQL/deploy/84/001-auto.sql | 980 +++ dbicdh/MySQL/upgrade/83-84/001-auto.sql | 56 + .../deploy/84/001-auto-__VERSION.sql | 18 + dbicdh/PostgreSQL/deploy/84/001-auto.sql | 1329 +++ dbicdh/PostgreSQL/upgrade/83-84/001-auto.sql | 59 + .../SQLite/deploy/84/001-auto-__VERSION.sql | 18 + dbicdh/SQLite/deploy/84/001-auto.sql | 955 +++ dbicdh/SQLite/upgrade/83-84/001-auto.sql | 57 + .../_source/deploy/84/001-auto-__VERSION.yml | 91 + dbicdh/_source/deploy/84/001-auto.yml | 7425 +++++++++++++++++ 11 files changed, 11006 insertions(+) create mode 100644 dbicdh/MySQL/deploy/84/001-auto-__VERSION.sql create mode 100644 dbicdh/MySQL/deploy/84/001-auto.sql create mode 100644 dbicdh/MySQL/upgrade/83-84/001-auto.sql create mode 100644 dbicdh/PostgreSQL/deploy/84/001-auto-__VERSION.sql create mode 100644 dbicdh/PostgreSQL/deploy/84/001-auto.sql create mode 100644 dbicdh/PostgreSQL/upgrade/83-84/001-auto.sql create mode 100644 dbicdh/SQLite/deploy/84/001-auto-__VERSION.sql create mode 100644 dbicdh/SQLite/deploy/84/001-auto.sql create mode 100644 dbicdh/SQLite/upgrade/83-84/001-auto.sql create mode 100644 dbicdh/_source/deploy/84/001-auto-__VERSION.yml create mode 100644 dbicdh/_source/deploy/84/001-auto.yml diff --git a/dbicdh/MySQL/deploy/84/001-auto-__VERSION.sql b/dbicdh/MySQL/deploy/84/001-auto-__VERSION.sql new file mode 100644 index 000000000..414008907 --- /dev/null +++ b/dbicdh/MySQL/deploy/84/001-auto-__VERSION.sql @@ -0,0 +1,18 @@ +-- +-- Created by SQL::Translator::Producer::MySQL +-- Created on Tue Jan 30 14:45:32 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/dbicdh/MySQL/deploy/84/001-auto.sql b/dbicdh/MySQL/deploy/84/001-auto.sql new file mode 100644 index 000000000..be560a5f1 --- /dev/null +++ b/dbicdh/MySQL/deploy/84/001-auto.sql @@ -0,0 +1,980 @@ +-- +-- Created by SQL::Translator::Producer::MySQL +-- Created on Tue Jan 30 14:45:32 2024 +-- +; +SET foreign_key_checks=0; +-- +-- Table: `column_comments` +-- +CREATE TABLE `column_comments` ( + `table_name` varchar(255) NULL, + `column_name` varchar(255) NULL, + `comment_text` text NULL +); +-- +-- Table: `roles` +-- +CREATE TABLE `roles` ( + `id` integer NOT NULL auto_increment, + `role` varchar(128) NULL, + PRIMARY KEY (`id`), + UNIQUE `role_unique` (`role`) +) ENGINE=InnoDB; +-- +-- Table: `site` +-- +CREATE TABLE `site` ( + `id` varchar(16) NOT NULL, + `mode` varchar(16) NOT NULL DEFAULT 'private', + `locale` varchar(3) NOT NULL DEFAULT 'en', + `magic_question` varchar(255) NOT NULL DEFAULT '12 + 4 =', + `magic_answer` varchar(255) NOT NULL DEFAULT '16', + `fixed_category_list` text NULL, + `sitename` varchar(255) NOT NULL DEFAULT '', + `siteslogan` varchar(255) NOT NULL DEFAULT '', + `theme` varchar(32) NOT NULL DEFAULT '', + `logo` varchar(255) NOT NULL DEFAULT '', + `mail_notify` text NULL, + `mail_from` text NULL, + `canonical` varchar(255) NOT NULL, + `secure_site` integer(1) NOT NULL DEFAULT 1, + `secure_site_only` integer(1) NOT NULL DEFAULT 0, + `sitegroup` varchar(255) NOT NULL DEFAULT '', + `cgit_integration` integer(1) NOT NULL DEFAULT 0, + `ssl_key` varchar(255) NOT NULL DEFAULT '', + `ssl_cert` varchar(255) NOT NULL DEFAULT '', + `ssl_ca_cert` varchar(255) NOT NULL DEFAULT '', + `ssl_chained_cert` varchar(255) NOT NULL DEFAULT '', + `acme_certificate` integer(1) NOT NULL DEFAULT 0, + `multilanguage` varchar(255) NOT NULL DEFAULT '', + `active` integer(1) NOT NULL DEFAULT 1, + `blog_style` integer(1) NOT NULL DEFAULT 0, + `bb_page_limit` integer NOT NULL DEFAULT 1000, + `tex` integer(1) NOT NULL DEFAULT 1, + `pdf` integer(1) NOT NULL DEFAULT 1, + `a4_pdf` integer(1) NOT NULL DEFAULT 0, + `lt_pdf` integer(1) NOT NULL DEFAULT 0, + `sl_pdf` integer(1) NOT NULL DEFAULT 0, + `html` integer(1) NOT NULL DEFAULT 1, + `bare_html` integer(1) NOT NULL DEFAULT 1, + `epub` integer(1) NOT NULL DEFAULT 1, + `zip` integer(1) NOT NULL DEFAULT 1, + `ttdir` varchar(255) NOT NULL DEFAULT '', + `papersize` varchar(64) NOT NULL DEFAULT '', + `division` integer NOT NULL DEFAULT 12, + `bcor` varchar(16) NOT NULL DEFAULT '0mm', + `fontsize` integer NOT NULL DEFAULT 10, + `mainfont` varchar(255) NOT NULL DEFAULT 'CMU Serif', + `sansfont` varchar(255) NOT NULL DEFAULT 'CMU Sans Serif', + `monofont` varchar(255) NOT NULL DEFAULT 'CMU Typewriter Text', + `beamertheme` varchar(255) NOT NULL DEFAULT 'default', + `beamercolortheme` varchar(255) NOT NULL DEFAULT 'dove', + `nocoverpage` integer(1) NOT NULL DEFAULT 0, + `logo_with_sitename` integer(1) NOT NULL DEFAULT 0, + `opening` varchar(16) NOT NULL DEFAULT 'any', + `twoside` integer(1) NOT NULL DEFAULT 0, + `binary_upload_max_size_in_mega` integer NOT NULL DEFAULT 8, + `git_token` text NULL, + `last_updated` datetime NULL, + PRIMARY KEY (`id`), + UNIQUE `canonical_unique` (`canonical`) +) ENGINE=InnoDB; +-- +-- Table: `table_comments` +-- +CREATE TABLE `table_comments` ( + `table_name` varchar(255) NULL, + `comment_text` text NULL +); +-- +-- Table: `users` +-- +CREATE TABLE `users` ( + `id` integer NOT NULL auto_increment, + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(255) NULL, + `created_by` varchar(255) NULL, + `active` integer(1) NOT NULL DEFAULT 1, + `edit_option_preview_box_height` integer NOT NULL DEFAULT 500, + `edit_option_show_filters` integer(1) NOT NULL DEFAULT 1, + `edit_option_show_cheatsheet` integer(1) NOT NULL DEFAULT 1, + `edit_option_page_left_bs_columns` integer NULL DEFAULT 6, + `preferred_language` varchar(8) NULL, + `api_access_token` text NULL, + `api_access_created` datetime NULL, + `reset_token` text NULL, + `reset_until` integer NULL, + PRIMARY KEY (`id`), + UNIQUE `username_unique` (`username`) +) ENGINE=InnoDB; +-- +-- Table: `aggregation_series` +-- +CREATE TABLE `aggregation_series` ( + `aggregation_series_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `aggregation_series_uri` varchar(255) NOT NULL, + `aggregation_series_name` varchar(255) NOT NULL, + `publisher` varchar(255) NULL, + `publication_place` varchar(255) NULL, + INDEX `aggregation_series_idx_site_id` (`site_id`), + PRIMARY KEY (`aggregation_series_id`), + UNIQUE `aggregation_series_uri_site_id_unique` (`aggregation_series_uri`, `site_id`), + CONSTRAINT `aggregation_series_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `amw_session` +-- +CREATE TABLE `amw_session` ( + `session_id` varchar(255) NOT NULL, + `site_id` varchar(16) NOT NULL, + `expires` integer NULL, + `session_data` blob NULL, + `flash_data` blob NULL, + `generic_data` blob NULL, + INDEX `amw_session_idx_site_id` (`site_id`), + PRIMARY KEY (`session_id`, `site_id`), + CONSTRAINT `amw_session_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `annotation` +-- +CREATE TABLE `annotation` ( + `annotation_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `annotation_name` varchar(255) NOT NULL, + `annotation_type` varchar(32) NOT NULL, + `label` varchar(255) NOT NULL DEFAULT '', + `priority` integer NOT NULL DEFAULT 0, + `active` integer(1) NOT NULL DEFAULT 1, + `private` integer(1) NOT NULL DEFAULT 0, + INDEX `annotation_idx_site_id` (`site_id`), + PRIMARY KEY (`annotation_id`), + UNIQUE `site_id_annotation_name_unique` (`site_id`, `annotation_name`), + CONSTRAINT `annotation_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `attachment` +-- +CREATE TABLE `attachment` ( + `id` integer NOT NULL auto_increment, + `f_path` text NOT NULL, + `f_name` varchar(255) NOT NULL, + `f_archive_rel_path` varchar(32) NOT NULL, + `f_timestamp` datetime NOT NULL, + `f_timestamp_epoch` integer NOT NULL DEFAULT 0, + `f_full_path_name` text NOT NULL, + `f_suffix` varchar(16) NOT NULL, + `f_class` varchar(16) NOT NULL, + `uri` varchar(255) NOT NULL, + `title_muse` text NULL, + `comment_muse` text NULL, + `title_html` text NULL, + `comment_html` text NULL, + `alt_text` text NULL, + `mime_type` varchar(255) NULL, + `errors` text NULL, + `site_id` varchar(16) NOT NULL, + INDEX `attachment_idx_site_id` (`site_id`), + PRIMARY KEY (`id`), + UNIQUE `uri_site_id_unique` (`uri`, `site_id`), + CONSTRAINT `attachment_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `bookbuilder_profile` +-- +CREATE TABLE `bookbuilder_profile` ( + `bookbuilder_profile_id` integer NOT NULL auto_increment, + `user_id` integer NOT NULL, + `profile_name` varchar(255) NOT NULL, + `profile_data` text NOT NULL, + INDEX `bookbuilder_profile_idx_user_id` (`user_id`), + PRIMARY KEY (`bookbuilder_profile_id`), + CONSTRAINT `bookbuilder_profile_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `bookbuilder_session` +-- +CREATE TABLE `bookbuilder_session` ( + `bookbuilder_session_id` integer NOT NULL auto_increment, + `token` varchar(16) NOT NULL, + `site_id` varchar(16) NOT NULL, + `bb_data` text NOT NULL, + `last_updated` datetime NOT NULL, + INDEX `bookbuilder_session_idx_site_id` (`site_id`), + PRIMARY KEY (`bookbuilder_session_id`), + CONSTRAINT `bookbuilder_session_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `bulk_job` +-- +CREATE TABLE `bulk_job` ( + `bulk_job_id` integer NOT NULL auto_increment, + `task` varchar(32) NULL, + `created` datetime NOT NULL, + `started` datetime NULL, + `completed` datetime NULL, + `site_id` varchar(16) NOT NULL, + `status` varchar(32) NULL, + `payload` text NULL, + `produced` varchar(255) NULL, + `username` varchar(255) NULL, + INDEX `bulk_job_idx_site_id` (`site_id`), + PRIMARY KEY (`bulk_job_id`), + CONSTRAINT `bulk_job_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `category` +-- +CREATE TABLE `category` ( + `id` integer NOT NULL auto_increment, + `name` text NULL, + `uri` varchar(255) NOT NULL, + `type` varchar(16) NOT NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + `text_count` integer NOT NULL DEFAULT 0, + `active` smallint NOT NULL DEFAULT 1, + `site_id` varchar(16) NOT NULL, + INDEX `category_idx_site_id` (`site_id`), + PRIMARY KEY (`id`), + UNIQUE `uri_site_id_type_unique` (`uri`, `site_id`, `type`), + CONSTRAINT `category_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `custom_formats` +-- +CREATE TABLE `custom_formats` ( + `custom_formats_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `format_name` varchar(255) NOT NULL, + `format_description` text NULL, + `format_alias` varchar(8) NULL, + `format_code` varchar(8) NULL, + `format_priority` integer NOT NULL DEFAULT 0, + `active` smallint NULL DEFAULT 1, + `bb_format` varchar(16) NOT NULL DEFAULT 'pdf', + `bb_epub_embed_fonts` smallint NULL DEFAULT 1, + `bb_bcor` integer NOT NULL DEFAULT 0, + `bb_beamercolortheme` varchar(32) NOT NULL DEFAULT 'dove', + `bb_beamertheme` varchar(32) NOT NULL DEFAULT 'default', + `bb_cover` smallint NULL DEFAULT 1, + `bb_crop_marks` smallint NULL DEFAULT 0, + `bb_crop_papersize` varchar(32) NOT NULL DEFAULT 'a4', + `bb_crop_paper_height` integer NOT NULL DEFAULT 0, + `bb_crop_paper_width` integer NOT NULL DEFAULT 0, + `bb_crop_paper_thickness` varchar(16) NOT NULL DEFAULT '0.10mm', + `bb_division` integer NOT NULL DEFAULT 12, + `bb_fontsize` integer NOT NULL DEFAULT 10, + `bb_headings` varchar(64) NOT NULL DEFAULT '0', + `bb_imposed` smallint NULL DEFAULT 0, + `bb_mainfont` varchar(255) NULL, + `bb_sansfont` varchar(255) NULL, + `bb_monofont` varchar(255) NULL, + `bb_nocoverpage` smallint NULL DEFAULT 0, + `bb_coverpage_only_if_toc` smallint NULL DEFAULT 0, + `bb_nofinalpage` smallint NULL DEFAULT 0, + `bb_notoc` smallint NULL DEFAULT 0, + `bb_impressum` smallint NULL DEFAULT 0, + `bb_sansfontsections` smallint NULL DEFAULT 0, + `bb_nobold` smallint NULL DEFAULT 0, + `bb_secondary_footnotes_alpha` smallint NULL DEFAULT 0, + `bb_start_with_empty_page` smallint NULL DEFAULT 0, + `bb_continuefootnotes` smallint NULL DEFAULT 0, + `bb_centerchapter` smallint NULL DEFAULT 0, + `bb_centersection` smallint NULL DEFAULT 0, + `bb_opening` varchar(16) NOT NULL DEFAULT 'any', + `bb_papersize` varchar(32) NOT NULL DEFAULT 'generic', + `bb_paper_height` integer NOT NULL DEFAULT 0, + `bb_paper_width` integer NOT NULL DEFAULT 0, + `bb_schema` varchar(64) NOT NULL DEFAULT '2up', + `bb_signature` integer NOT NULL DEFAULT 0, + `bb_signature_2up` varchar(8) NOT NULL DEFAULT '40-80', + `bb_signature_4up` varchar(8) NOT NULL DEFAULT '40-80', + `bb_twoside` smallint NULL DEFAULT 0, + `bb_unbranded` smallint NULL DEFAULT 0, + `bb_areaset_height` integer NOT NULL DEFAULT 0, + `bb_areaset_width` integer NOT NULL DEFAULT 0, + `bb_geometry_top_margin` integer NOT NULL DEFAULT 0, + `bb_geometry_outer_margin` integer NOT NULL DEFAULT 0, + `bb_fussy_last_word` smallint NULL DEFAULT 0, + `bb_tex_emergencystretch` integer NOT NULL DEFAULT 30, + `bb_tex_tolerance` integer NOT NULL DEFAULT 200, + `bb_ignore_cover` smallint NULL DEFAULT 0, + `bb_linespacing` integer NOT NULL DEFAULT 0, + `bb_parindent` integer NOT NULL DEFAULT 15, + `bb_body_only` smallint NULL DEFAULT 0, + INDEX `custom_formats_idx_site_id` (`site_id`), + PRIMARY KEY (`custom_formats_id`), + UNIQUE `site_id_format_alias_unique` (`site_id`, `format_alias`), + UNIQUE `site_id_format_code_unique` (`site_id`, `format_code`), + CONSTRAINT `custom_formats_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `include_path` +-- +CREATE TABLE `include_path` ( + `include_path_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `directory` text NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + INDEX `include_path_idx_site_id` (`site_id`), + PRIMARY KEY (`include_path_id`), + CONSTRAINT `include_path_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `legacy_link` +-- +CREATE TABLE `legacy_link` ( + `site_id` varchar(16) NOT NULL, + `legacy_path` varchar(255) NOT NULL, + `new_path` varchar(255) NOT NULL, + INDEX `legacy_link_idx_site_id` (`site_id`), + PRIMARY KEY (`site_id`, `legacy_path`), + CONSTRAINT `legacy_link_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `mirror_origin` +-- +CREATE TABLE `mirror_origin` ( + `mirror_origin_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `remote_domain` varchar(255) NOT NULL, + `remote_path` varchar(255) NOT NULL, + `active` integer(1) NOT NULL DEFAULT 0, + `status_message` text NULL, + `last_downloaded` datetime NULL, + INDEX `mirror_origin_idx_site_id` (`site_id`), + PRIMARY KEY (`mirror_origin_id`), + CONSTRAINT `mirror_origin_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `monthly_archive` +-- +CREATE TABLE `monthly_archive` ( + `monthly_archive_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `month` integer(2) NOT NULL, + `year` integer(4) NOT NULL, + INDEX `monthly_archive_idx_site_id` (`site_id`), + PRIMARY KEY (`monthly_archive_id`), + UNIQUE `site_id_month_year_unique` (`site_id`, `month`, `year`), + CONSTRAINT `monthly_archive_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node` +-- +CREATE TABLE `node` ( + `node_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `uri` varchar(255) NOT NULL, + `canonical_title` varchar(255) NOT NULL DEFAULT '', + `last_updated_epoch` integer NOT NULL DEFAULT 0, + `last_updated_dt` datetime NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + `full_path` text NULL, + `parent_node_id` integer NULL, + INDEX `node_idx_parent_node_id` (`parent_node_id`), + INDEX `node_idx_site_id` (`site_id`), + PRIMARY KEY (`node_id`), + UNIQUE `site_id_uri_unique` (`site_id`, `uri`), + CONSTRAINT `node_fk_parent_node_id` FOREIGN KEY (`parent_node_id`) REFERENCES `node` (`node_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `node_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `oai_pmh_set` +-- +CREATE TABLE `oai_pmh_set` ( + `oai_pmh_set_id` integer NOT NULL auto_increment, + `set_spec` varchar(255) NOT NULL, + `site_id` varchar(16) NOT NULL, + `set_name` text NULL, + INDEX `oai_pmh_set_idx_site_id` (`site_id`), + PRIMARY KEY (`oai_pmh_set_id`), + UNIQUE `set_spec_site_id_unique` (`set_spec`, `site_id`), + CONSTRAINT `oai_pmh_set_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `redirection` +-- +CREATE TABLE `redirection` ( + `id` integer NOT NULL auto_increment, + `uri` varchar(255) NOT NULL, + `type` varchar(16) NOT NULL, + `redirect` varchar(255) NOT NULL, + `site_id` varchar(16) NOT NULL, + INDEX `redirection_idx_site_id` (`site_id`), + PRIMARY KEY (`id`), + UNIQUE `uri_type_site_id_unique` (`uri`, `type`, `site_id`), + CONSTRAINT `redirection_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `site_category_type` +-- +CREATE TABLE `site_category_type` ( + `site_id` varchar(16) NOT NULL, + `category_type` varchar(16) NOT NULL, + `active` smallint NOT NULL DEFAULT 1, + `priority` integer NOT NULL DEFAULT 0, + `name_singular` varchar(255) NOT NULL, + `name_plural` varchar(255) NOT NULL, + `generate_index` smallint NOT NULL DEFAULT 1, + `in_colophon` smallint NOT NULL DEFAULT 0, + `xapian_custom_slot` smallint NULL, + `description` text NULL, + INDEX `site_category_type_idx_site_id` (`site_id`), + PRIMARY KEY (`site_id`, `category_type`), + CONSTRAINT `site_category_type_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `site_link` +-- +CREATE TABLE `site_link` ( + `url` varchar(255) NOT NULL, + `label` varchar(255) NOT NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + `menu` varchar(32) NOT NULL DEFAULT 'specials', + `site_id` varchar(16) NOT NULL, + INDEX `site_link_idx_site_id` (`site_id`), + CONSTRAINT `site_link_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `site_options` +-- +CREATE TABLE `site_options` ( + `site_id` varchar(16) NOT NULL, + `option_name` varchar(64) NOT NULL, + `option_value` text NULL, + INDEX `site_options_idx_site_id` (`site_id`), + PRIMARY KEY (`site_id`, `option_name`), + CONSTRAINT `site_options_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `title` +-- +CREATE TABLE `title` ( + `id` integer NOT NULL auto_increment, + `title` text NULL, + `subtitle` text NULL, + `lang` varchar(3) NOT NULL DEFAULT 'en', + `date` text NULL, + `datefirst` text NULL, + `notes` text NULL, + `source` text NULL, + `list_title` text NULL, + `author` text NULL, + `uid` varchar(255) NOT NULL DEFAULT '', + `attach` text NULL, + `pubdate` datetime NOT NULL, + `status` varchar(16) NOT NULL DEFAULT 'unpublished', + `parent` varchar(255) NULL, + `publisher` text NULL, + `isbn` text NULL, + `rights` text NULL, + `seriesname` text NULL, + `seriesnumber` text NULL, + `f_path` text NOT NULL, + `f_name` varchar(255) NOT NULL, + `f_archive_rel_path` varchar(32) NOT NULL, + `f_timestamp` datetime NOT NULL, + `f_timestamp_epoch` integer NOT NULL DEFAULT 0, + `f_full_path_name` text NOT NULL, + `f_suffix` varchar(16) NOT NULL, + `f_class` varchar(16) NOT NULL, + `uri` varchar(255) NOT NULL, + `deleted` text NULL, + `slides` integer(1) NOT NULL DEFAULT 0, + `text_structure` text NULL, + `cover` varchar(255) NOT NULL DEFAULT '', + `teaser` text NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + `sku` varchar(64) NOT NULL DEFAULT '', + `text_qualification` varchar(32) NULL, + `text_size` integer NOT NULL DEFAULT 0, + `attachment_index` integer NOT NULL DEFAULT 0, + `blob_container` integer(1) NOT NULL DEFAULT 0, + `site_id` varchar(16) NOT NULL, + INDEX `title_idx_site_id` (`site_id`), + PRIMARY KEY (`id`), + UNIQUE `uri_f_class_site_id_unique` (`uri`, `f_class`, `site_id`), + CONSTRAINT `title_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `vhost` +-- +CREATE TABLE `vhost` ( + `name` varchar(255) NOT NULL, + `site_id` varchar(16) NOT NULL, + INDEX `vhost_idx_site_id` (`site_id`), + PRIMARY KEY (`name`), + CONSTRAINT `vhost_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `whitelist_ip` +-- +CREATE TABLE `whitelist_ip` ( + `site_id` varchar(16) NOT NULL, + `ip` varchar(64) NOT NULL, + `user_editable` smallint NOT NULL DEFAULT 0, + `granted_by_username` varchar(255) NULL, + `expire_epoch` integer NULL, + INDEX `whitelist_ip_idx_site_id` (`site_id`), + INDEX `whitelist_ip_ip_amw_index` (`ip`), + PRIMARY KEY (`site_id`, `ip`), + CONSTRAINT `whitelist_ip_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `aggregation` +-- +CREATE TABLE `aggregation` ( + `aggregation_id` integer NOT NULL auto_increment, + `aggregation_series_id` integer NULL, + `aggregation_uri` varchar(255) NOT NULL, + `aggregation_name` varchar(255) NULL, + `publication_date` varchar(255) NULL, + `publication_date_year` integer NULL, + `publication_date_month` integer NULL, + `publication_date_day` integer NULL, + `issue` varchar(255) NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + `publication_place` varchar(255) NULL, + `publisher` varchar(255) NULL, + `isbn` varchar(32) NULL, + `site_id` varchar(16) NOT NULL, + INDEX `aggregation_idx_aggregation_series_id` (`aggregation_series_id`), + INDEX `aggregation_idx_site_id` (`site_id`), + INDEX `aggregation_uri_amw_index` (`aggregation_uri`), + PRIMARY KEY (`aggregation_id`), + UNIQUE `aggregation_uri_site_id_unique` (`aggregation_uri`, `site_id`), + CONSTRAINT `aggregation_fk_aggregation_series_id` FOREIGN KEY (`aggregation_series_id`) REFERENCES `aggregation_series` (`aggregation_series_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `aggregation_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `bookcover` +-- +CREATE TABLE `bookcover` ( + `bookcover_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `title` varchar(255) NOT NULL DEFAULT '', + `coverheight` integer NOT NULL DEFAULT 210, + `coverwidth` integer NOT NULL DEFAULT 148, + `spinewidth` integer NOT NULL DEFAULT 0, + `flapwidth` integer NOT NULL DEFAULT 0, + `wrapwidth` integer NOT NULL DEFAULT 0, + `bleedwidth` integer NOT NULL DEFAULT 10, + `marklength` integer NOT NULL DEFAULT 5, + `foldingmargin` smallint NOT NULL DEFAULT 0, + `created` datetime NOT NULL, + `compiled` datetime NULL, + `zip_path` varchar(255) NULL, + `pdf_path` varchar(255) NULL, + `template` varchar(64) NULL, + `font_name` varchar(255) NULL, + `language_code` varchar(8) NULL, + `comments` text NULL, + `session_id` varchar(255) NULL, + `user_id` integer NULL, + INDEX `bookcover_idx_site_id` (`site_id`), + INDEX `bookcover_idx_user_id` (`user_id`), + PRIMARY KEY (`bookcover_id`), + CONSTRAINT `bookcover_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `bookcover_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `category_description` +-- +CREATE TABLE `category_description` ( + `category_description_id` integer NOT NULL auto_increment, + `muse_body` text NULL, + `html_body` text NULL, + `lang` varchar(3) NOT NULL DEFAULT 'en', + `last_modified_by` varchar(255) NULL, + `category_id` integer NOT NULL, + INDEX `category_description_idx_category_id` (`category_id`), + PRIMARY KEY (`category_description_id`), + UNIQUE `category_id_lang_unique` (`category_id`, `lang`), + CONSTRAINT `category_description_fk_category_id` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `global_site_files` +-- +CREATE TABLE `global_site_files` ( + `site_id` varchar(16) NOT NULL, + `attachment_id` integer NULL, + `file_name` varchar(255) NOT NULL, + `file_type` varchar(255) NOT NULL, + `file_path` text NOT NULL, + `image_width` integer NULL, + `image_height` integer NULL, + INDEX `global_site_files_idx_attachment_id` (`attachment_id`), + INDEX `global_site_files_idx_site_id` (`site_id`), + PRIMARY KEY (`site_id`, `file_name`, `file_type`), + CONSTRAINT `global_site_files_fk_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `attachment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `global_site_files_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `included_file` +-- +CREATE TABLE `included_file` ( + `included_file_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `title_id` integer NOT NULL, + `file_path` text NOT NULL, + `file_timestamp` datetime NULL, + `file_epoch` integer NULL, + INDEX `included_file_idx_site_id` (`site_id`), + INDEX `included_file_idx_title_id` (`title_id`), + PRIMARY KEY (`included_file_id`), + CONSTRAINT `included_file_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `included_file_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `job` +-- +CREATE TABLE `job` ( + `id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `bulk_job_id` integer NULL, + `task` varchar(32) NULL, + `payload` text NULL, + `status` varchar(32) NULL, + `created` datetime NOT NULL, + `started` datetime NULL, + `completed` datetime NULL, + `priority` integer NOT NULL DEFAULT 10, + `produced` varchar(255) NULL, + `username` varchar(255) NULL, + `errors` text NULL, + INDEX `job_idx_bulk_job_id` (`bulk_job_id`), + INDEX `job_idx_site_id` (`site_id`), + INDEX `job_status_index` (`status`), + PRIMARY KEY (`id`), + CONSTRAINT `job_fk_bulk_job_id` FOREIGN KEY (`bulk_job_id`) REFERENCES `bulk_job` (`bulk_job_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `job_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `muse_header` +-- +CREATE TABLE `muse_header` ( + `title_id` integer NOT NULL, + `muse_header` varchar(255) NOT NULL, + `muse_value` text NULL, + `muse_value_html` text NULL, + INDEX `muse_header_idx_title_id` (`title_id`), + PRIMARY KEY (`title_id`, `muse_header`), + CONSTRAINT `muse_header_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node_body` +-- +CREATE TABLE `node_body` ( + `node_id` integer NOT NULL, + `lang` varchar(3) NOT NULL DEFAULT 'en', + `title_muse` text NULL, + `title_html` text NULL, + `body_muse` text NULL, + `body_html` text NULL, + INDEX `node_body_idx_node_id` (`node_id`), + PRIMARY KEY (`node_id`, `lang`), + CONSTRAINT `node_body_fk_node_id` FOREIGN KEY (`node_id`) REFERENCES `node` (`node_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `revision` +-- +CREATE TABLE `revision` ( + `id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `title_id` integer NOT NULL, + `f_full_path_name` text NULL, + `message` text NULL, + `status` varchar(16) NOT NULL DEFAULT 'editing', + `session_id` varchar(255) NULL, + `username` varchar(255) NULL, + `updated` datetime NOT NULL, + INDEX `revision_idx_site_id` (`site_id`), + INDEX `revision_idx_title_id` (`title_id`), + PRIMARY KEY (`id`), + CONSTRAINT `revision_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `revision_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `text_internal_link` +-- +CREATE TABLE `text_internal_link` ( + `title_id` integer NOT NULL, + `site_id` varchar(16) NOT NULL, + `f_class` varchar(255) NOT NULL, + `uri` varchar(255) NOT NULL, + `full_link` text NOT NULL, + INDEX `text_internal_link_idx_site_id` (`site_id`), + INDEX `text_internal_link_idx_title_id` (`title_id`), + CONSTRAINT `text_internal_link_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `text_internal_link_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `text_part` +-- +CREATE TABLE `text_part` ( + `title_id` integer NOT NULL, + `part_index` varchar(16) NOT NULL, + `part_level` integer NOT NULL, + `part_title` text NOT NULL, + `part_size` integer NOT NULL, + `toc_index` integer NOT NULL, + `part_order` integer NOT NULL, + INDEX `text_part_idx_title_id` (`title_id`), + PRIMARY KEY (`title_id`, `part_index`), + CONSTRAINT `text_part_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `title_stat` +-- +CREATE TABLE `title_stat` ( + `title_stat_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `title_id` integer NOT NULL, + `accessed` datetime NOT NULL, + `user_agent` text NULL, + `type` text NULL, + INDEX `title_stat_idx_site_id` (`site_id`), + INDEX `title_stat_idx_title_id` (`title_id`), + PRIMARY KEY (`title_stat_id`), + CONSTRAINT `title_stat_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `title_stat_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `user_role` +-- +CREATE TABLE `user_role` ( + `user_id` integer NOT NULL, + `role_id` integer NOT NULL, + INDEX `user_role_idx_role_id` (`role_id`), + INDEX `user_role_idx_user_id` (`user_id`), + PRIMARY KEY (`user_id`, `role_id`), + CONSTRAINT `user_role_fk_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `user_role_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `user_site` +-- +CREATE TABLE `user_site` ( + `user_id` integer NOT NULL, + `site_id` varchar(16) NOT NULL, + INDEX `user_site_idx_site_id` (`site_id`), + INDEX `user_site_idx_user_id` (`user_id`), + PRIMARY KEY (`user_id`, `site_id`), + CONSTRAINT `user_site_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `user_site_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `aggregation_title` +-- +CREATE TABLE `aggregation_title` ( + `aggregation_id` integer NOT NULL, + `title_uri` varchar(255) NOT NULL, + `sorting_pos` integer NOT NULL DEFAULT 0, + INDEX `aggregation_title_idx_aggregation_id` (`aggregation_id`), + INDEX `aggregation_title_uri_amw_index` (`title_uri`), + PRIMARY KEY (`aggregation_id`, `title_uri`), + CONSTRAINT `aggregation_title_fk_aggregation_id` FOREIGN KEY (`aggregation_id`) REFERENCES `aggregation` (`aggregation_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `bookcover_token` +-- +CREATE TABLE `bookcover_token` ( + `bookcover_id` integer NOT NULL, + `token_name` varchar(255) NOT NULL, + `token_value` text NULL, + INDEX `bookcover_token_idx_bookcover_id` (`bookcover_id`), + INDEX `bookcover_token_name_amw_index` (`token_name`), + PRIMARY KEY (`bookcover_id`, `token_name`), + CONSTRAINT `bookcover_token_fk_bookcover_id` FOREIGN KEY (`bookcover_id`) REFERENCES `bookcover` (`bookcover_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `job_file` +-- +CREATE TABLE `job_file` ( + `filename` varchar(255) NOT NULL, + `slot` varchar(255) NOT NULL DEFAULT '', + `job_id` integer NOT NULL, + INDEX `job_file_idx_job_id` (`job_id`), + PRIMARY KEY (`filename`), + CONSTRAINT `job_file_fk_job_id` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node_aggregation_series` +-- +CREATE TABLE `node_aggregation_series` ( + `node_id` integer NOT NULL, + `aggregation_series_id` integer NOT NULL, + INDEX `node_aggregation_series_idx_aggregation_series_id` (`aggregation_series_id`), + INDEX `node_aggregation_series_idx_node_id` (`node_id`), + PRIMARY KEY (`node_id`, `aggregation_series_id`), + CONSTRAINT `node_aggregation_series_fk_aggregation_series_id` FOREIGN KEY (`aggregation_series_id`) REFERENCES `aggregation_series` (`aggregation_series_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `node_aggregation_series_fk_node_id` FOREIGN KEY (`node_id`) REFERENCES `node` (`node_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node_category` +-- +CREATE TABLE `node_category` ( + `node_id` integer NOT NULL, + `category_id` integer NOT NULL, + INDEX `node_category_idx_category_id` (`category_id`), + INDEX `node_category_idx_node_id` (`node_id`), + PRIMARY KEY (`node_id`, `category_id`), + CONSTRAINT `node_category_fk_category_id` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `node_category_fk_node_id` FOREIGN KEY (`node_id`) REFERENCES `node` (`node_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node_title` +-- +CREATE TABLE `node_title` ( + `node_id` integer NOT NULL, + `title_id` integer NOT NULL, + INDEX `node_title_idx_node_id` (`node_id`), + INDEX `node_title_idx_title_id` (`title_id`), + PRIMARY KEY (`node_id`, `title_id`), + CONSTRAINT `node_title_fk_node_id` FOREIGN KEY (`node_id`) REFERENCES `node` (`node_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `node_title_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `text_month` +-- +CREATE TABLE `text_month` ( + `title_id` integer NOT NULL, + `monthly_archive_id` integer NOT NULL, + INDEX `text_month_idx_monthly_archive_id` (`monthly_archive_id`), + INDEX `text_month_idx_title_id` (`title_id`), + PRIMARY KEY (`title_id`, `monthly_archive_id`), + CONSTRAINT `text_month_fk_monthly_archive_id` FOREIGN KEY (`monthly_archive_id`) REFERENCES `monthly_archive` (`monthly_archive_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `text_month_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `title_annotation` +-- +CREATE TABLE `title_annotation` ( + `annotation_id` integer NOT NULL, + `title_id` integer NOT NULL, + `annotation_value` text NULL, + INDEX `title_annotation_idx_annotation_id` (`annotation_id`), + INDEX `title_annotation_idx_title_id` (`title_id`), + PRIMARY KEY (`annotation_id`, `title_id`), + CONSTRAINT `title_annotation_fk_annotation_id` FOREIGN KEY (`annotation_id`) REFERENCES `annotation` (`annotation_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `title_annotation_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `title_attachment` +-- +CREATE TABLE `title_attachment` ( + `title_id` integer NOT NULL, + `attachment_id` integer NOT NULL, + INDEX `title_attachment_idx_attachment_id` (`attachment_id`), + INDEX `title_attachment_idx_title_id` (`title_id`), + PRIMARY KEY (`title_id`, `attachment_id`), + CONSTRAINT `title_attachment_fk_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `attachment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `title_attachment_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `title_category` +-- +CREATE TABLE `title_category` ( + `title_id` integer NOT NULL, + `category_id` integer NOT NULL, + INDEX `title_category_idx_category_id` (`category_id`), + INDEX `title_category_idx_title_id` (`title_id`), + PRIMARY KEY (`title_id`, `category_id`), + CONSTRAINT `title_category_fk_category_id` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `title_category_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `aggregation_annotation` +-- +CREATE TABLE `aggregation_annotation` ( + `annotation_id` integer NOT NULL, + `aggregation_id` integer NOT NULL, + `annotation_value` text NULL, + INDEX `aggregation_annotation_idx_aggregation_id` (`aggregation_id`), + INDEX `aggregation_annotation_idx_annotation_id` (`annotation_id`), + PRIMARY KEY (`annotation_id`, `aggregation_id`), + CONSTRAINT `aggregation_annotation_fk_aggregation_id` FOREIGN KEY (`aggregation_id`) REFERENCES `aggregation` (`aggregation_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `aggregation_annotation_fk_annotation_id` FOREIGN KEY (`annotation_id`) REFERENCES `annotation` (`annotation_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `mirror_info` +-- +CREATE TABLE `mirror_info` ( + `mirror_info_id` integer NOT NULL auto_increment, + `title_id` integer NULL, + `attachment_id` integer NULL, + `mirror_origin_id` integer NULL, + `site_id` varchar(16) NOT NULL, + `checksum` varchar(128) NULL, + `download_source` text NULL, + `download_destination` text NULL, + `mirror_exception` varchar(32) NOT NULL DEFAULT '', + `last_updated` datetime NULL, + INDEX `mirror_info_idx_attachment_id` (`attachment_id`), + INDEX `mirror_info_idx_mirror_origin_id` (`mirror_origin_id`), + INDEX `mirror_info_idx_site_id` (`site_id`), + INDEX `mirror_info_idx_title_id` (`title_id`), + PRIMARY KEY (`mirror_info_id`), + UNIQUE `attachment_id_unique` (`attachment_id`), + UNIQUE `title_id_unique` (`title_id`), + CONSTRAINT `mirror_info_fk_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `attachment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `mirror_info_fk_mirror_origin_id` FOREIGN KEY (`mirror_origin_id`) REFERENCES `mirror_origin` (`mirror_origin_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `mirror_info_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `mirror_info_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `node_aggregation` +-- +CREATE TABLE `node_aggregation` ( + `node_id` integer NOT NULL, + `aggregation_id` integer NOT NULL, + INDEX `node_aggregation_idx_aggregation_id` (`aggregation_id`), + INDEX `node_aggregation_idx_node_id` (`node_id`), + PRIMARY KEY (`node_id`, `aggregation_id`), + CONSTRAINT `node_aggregation_fk_aggregation_id` FOREIGN KEY (`aggregation_id`) REFERENCES `aggregation` (`aggregation_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `node_aggregation_fk_node_id` FOREIGN KEY (`node_id`) REFERENCES `node` (`node_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `oai_pmh_record` +-- +CREATE TABLE `oai_pmh_record` ( + `oai_pmh_record_id` integer NOT NULL auto_increment, + `identifier` varchar(255) NOT NULL, + `datestamp` datetime NOT NULL, + `site_id` varchar(16) NOT NULL, + `title_id` integer NULL, + `attachment_id` integer NULL, + `custom_formats_id` integer NULL, + `metadata_type` varchar(32) NULL, + `metadata_format` varchar(32) NULL, + `metadata_format_description` varchar(255) NULL, + `deleted` integer(1) NOT NULL DEFAULT 0, + `update_run` integer NOT NULL DEFAULT 0, + INDEX `oai_pmh_record_idx_attachment_id` (`attachment_id`), + INDEX `oai_pmh_record_idx_custom_formats_id` (`custom_formats_id`), + INDEX `oai_pmh_record_idx_site_id` (`site_id`), + INDEX `oai_pmh_record_idx_title_id` (`title_id`), + PRIMARY KEY (`oai_pmh_record_id`), + UNIQUE `identifier_site_id_unique` (`identifier`, `site_id`), + CONSTRAINT `oai_pmh_record_fk_attachment_id` FOREIGN KEY (`attachment_id`) REFERENCES `attachment` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `oai_pmh_record_fk_custom_formats_id` FOREIGN KEY (`custom_formats_id`) REFERENCES `custom_formats` (`custom_formats_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `oai_pmh_record_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `oai_pmh_record_fk_title_id` FOREIGN KEY (`title_id`) REFERENCES `title` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB; +-- +-- Table: `oai_pmh_record_set` +-- +CREATE TABLE `oai_pmh_record_set` ( + `oai_pmh_record_id` integer NOT NULL, + `oai_pmh_set_id` integer NOT NULL, + INDEX `oai_pmh_record_set_idx_oai_pmh_record_id` (`oai_pmh_record_id`), + INDEX `oai_pmh_record_set_idx_oai_pmh_set_id` (`oai_pmh_set_id`), + PRIMARY KEY (`oai_pmh_record_id`, `oai_pmh_set_id`), + CONSTRAINT `oai_pmh_record_set_fk_oai_pmh_record_id` FOREIGN KEY (`oai_pmh_record_id`) REFERENCES `oai_pmh_record` (`oai_pmh_record_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `oai_pmh_record_set_fk_oai_pmh_set_id` FOREIGN KEY (`oai_pmh_set_id`) REFERENCES `oai_pmh_set` (`oai_pmh_set_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; +SET foreign_key_checks=1; diff --git a/dbicdh/MySQL/upgrade/83-84/001-auto.sql b/dbicdh/MySQL/upgrade/83-84/001-auto.sql new file mode 100644 index 000000000..560ee0957 --- /dev/null +++ b/dbicdh/MySQL/upgrade/83-84/001-auto.sql @@ -0,0 +1,56 @@ +-- Convert schema '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/83/001-auto.yml' to '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/84/001-auto.yml':; + +; +BEGIN; + +; +SET foreign_key_checks=0; + +; +CREATE TABLE `bookcover` ( + `bookcover_id` integer NOT NULL auto_increment, + `site_id` varchar(16) NOT NULL, + `title` varchar(255) NOT NULL DEFAULT '', + `coverheight` integer NOT NULL DEFAULT 210, + `coverwidth` integer NOT NULL DEFAULT 148, + `spinewidth` integer NOT NULL DEFAULT 0, + `flapwidth` integer NOT NULL DEFAULT 0, + `wrapwidth` integer NOT NULL DEFAULT 0, + `bleedwidth` integer NOT NULL DEFAULT 10, + `marklength` integer NOT NULL DEFAULT 5, + `foldingmargin` smallint NOT NULL DEFAULT 0, + `created` datetime NOT NULL, + `compiled` datetime NULL, + `zip_path` varchar(255) NULL, + `pdf_path` varchar(255) NULL, + `template` varchar(64) NULL, + `font_name` varchar(255) NULL, + `language_code` varchar(8) NULL, + `comments` text NULL, + `session_id` varchar(255) NULL, + `user_id` integer NULL, + INDEX `bookcover_idx_site_id` (`site_id`), + INDEX `bookcover_idx_user_id` (`user_id`), + PRIMARY KEY (`bookcover_id`), + CONSTRAINT `bookcover_fk_site_id` FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `bookcover_fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +; +CREATE TABLE `bookcover_token` ( + `bookcover_id` integer NOT NULL, + `token_name` varchar(255) NOT NULL, + `token_value` text NULL, + INDEX `bookcover_token_idx_bookcover_id` (`bookcover_id`), + INDEX `bookcover_token_name_amw_index` (`token_name`), + PRIMARY KEY (`bookcover_id`, `token_name`), + CONSTRAINT `bookcover_token_fk_bookcover_id` FOREIGN KEY (`bookcover_id`) REFERENCES `bookcover` (`bookcover_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +; +SET foreign_key_checks=1; + +; + +COMMIT; + diff --git a/dbicdh/PostgreSQL/deploy/84/001-auto-__VERSION.sql b/dbicdh/PostgreSQL/deploy/84/001-auto-__VERSION.sql new file mode 100644 index 000000000..d8dc14b17 --- /dev/null +++ b/dbicdh/PostgreSQL/deploy/84/001-auto-__VERSION.sql @@ -0,0 +1,18 @@ +-- +-- Created by SQL::Translator::Producer::PostgreSQL +-- Created on Tue Jan 30 14:45:32 2024 +-- +; +-- +-- Table: dbix_class_deploymenthandler_versions +-- +CREATE TABLE "dbix_class_deploymenthandler_versions" ( + "id" serial NOT NULL, + "version" character varying(50) NOT NULL, + "ddl" text, + "upgrade_sql" text, + PRIMARY KEY ("id"), + CONSTRAINT "dbix_class_deploymenthandler_versions_version" UNIQUE ("version") +); + +; diff --git a/dbicdh/PostgreSQL/deploy/84/001-auto.sql b/dbicdh/PostgreSQL/deploy/84/001-auto.sql new file mode 100644 index 000000000..00f83bb26 --- /dev/null +++ b/dbicdh/PostgreSQL/deploy/84/001-auto.sql @@ -0,0 +1,1329 @@ +-- +-- Created by SQL::Translator::Producer::PostgreSQL +-- Created on Tue Jan 30 14:45:32 2024 +-- +; +-- +-- Table: column_comments +-- +CREATE TABLE "column_comments" ( + "table_name" character varying(255), + "column_name" character varying(255), + "comment_text" text +); + +; +-- +-- Table: roles +-- +CREATE TABLE "roles" ( + "id" serial NOT NULL, + "role" character varying(128), + PRIMARY KEY ("id"), + CONSTRAINT "role_unique" UNIQUE ("role") +); + +; +-- +-- Table: site +-- +CREATE TABLE "site" ( + "id" character varying(16) NOT NULL, + "mode" character varying(16) DEFAULT 'private' NOT NULL, + "locale" character varying(3) DEFAULT 'en' NOT NULL, + "magic_question" character varying(255) DEFAULT '12 + 4 =' NOT NULL, + "magic_answer" character varying(255) DEFAULT '16' NOT NULL, + "fixed_category_list" text, + "sitename" character varying(255) DEFAULT '' NOT NULL, + "siteslogan" character varying(255) DEFAULT '' NOT NULL, + "theme" character varying(32) DEFAULT '' NOT NULL, + "logo" character varying(255) DEFAULT '' NOT NULL, + "mail_notify" text, + "mail_from" text, + "canonical" character varying(255) NOT NULL, + "secure_site" smallint DEFAULT 1 NOT NULL, + "secure_site_only" smallint DEFAULT 0 NOT NULL, + "sitegroup" character varying(255) DEFAULT '' NOT NULL, + "cgit_integration" smallint DEFAULT 0 NOT NULL, + "ssl_key" character varying(255) DEFAULT '' NOT NULL, + "ssl_cert" character varying(255) DEFAULT '' NOT NULL, + "ssl_ca_cert" character varying(255) DEFAULT '' NOT NULL, + "ssl_chained_cert" character varying(255) DEFAULT '' NOT NULL, + "acme_certificate" smallint DEFAULT 0 NOT NULL, + "multilanguage" character varying(255) DEFAULT '' NOT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "blog_style" smallint DEFAULT 0 NOT NULL, + "bb_page_limit" integer DEFAULT 1000 NOT NULL, + "tex" smallint DEFAULT 1 NOT NULL, + "pdf" smallint DEFAULT 1 NOT NULL, + "a4_pdf" smallint DEFAULT 0 NOT NULL, + "lt_pdf" smallint DEFAULT 0 NOT NULL, + "sl_pdf" smallint DEFAULT 0 NOT NULL, + "html" smallint DEFAULT 1 NOT NULL, + "bare_html" smallint DEFAULT 1 NOT NULL, + "epub" smallint DEFAULT 1 NOT NULL, + "zip" smallint DEFAULT 1 NOT NULL, + "ttdir" character varying(255) DEFAULT '' NOT NULL, + "papersize" character varying(64) DEFAULT '' NOT NULL, + "division" integer DEFAULT 12 NOT NULL, + "bcor" character varying(16) DEFAULT '0mm' NOT NULL, + "fontsize" integer DEFAULT 10 NOT NULL, + "mainfont" character varying(255) DEFAULT 'CMU Serif' NOT NULL, + "sansfont" character varying(255) DEFAULT 'CMU Sans Serif' NOT NULL, + "monofont" character varying(255) DEFAULT 'CMU Typewriter Text' NOT NULL, + "beamertheme" character varying(255) DEFAULT 'default' NOT NULL, + "beamercolortheme" character varying(255) DEFAULT 'dove' NOT NULL, + "nocoverpage" smallint DEFAULT 0 NOT NULL, + "logo_with_sitename" smallint DEFAULT 0 NOT NULL, + "opening" character varying(16) DEFAULT 'any' NOT NULL, + "twoside" smallint DEFAULT 0 NOT NULL, + "binary_upload_max_size_in_mega" integer DEFAULT 8 NOT NULL, + "git_token" text, + "last_updated" timestamp, + PRIMARY KEY ("id"), + CONSTRAINT "canonical_unique" UNIQUE ("canonical") +); + +; +-- +-- Table: table_comments +-- +CREATE TABLE "table_comments" ( + "table_name" character varying(255), + "comment_text" text +); + +; +-- +-- Table: users +-- +CREATE TABLE "users" ( + "id" serial NOT NULL, + "username" character varying(255) NOT NULL, + "password" character varying(255) NOT NULL, + "email" character varying(255), + "created_by" character varying(255), + "active" smallint DEFAULT 1 NOT NULL, + "edit_option_preview_box_height" integer DEFAULT 500 NOT NULL, + "edit_option_show_filters" smallint DEFAULT 1 NOT NULL, + "edit_option_show_cheatsheet" smallint DEFAULT 1 NOT NULL, + "edit_option_page_left_bs_columns" integer DEFAULT 6, + "preferred_language" character varying(8), + "api_access_token" text, + "api_access_created" timestamp, + "reset_token" text, + "reset_until" integer, + PRIMARY KEY ("id"), + CONSTRAINT "username_unique" UNIQUE ("username") +); + +; +-- +-- Table: aggregation_series +-- +CREATE TABLE "aggregation_series" ( + "aggregation_series_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "aggregation_series_uri" character varying(255) NOT NULL, + "aggregation_series_name" character varying(255) NOT NULL, + "publisher" character varying(255), + "publication_place" character varying(255), + PRIMARY KEY ("aggregation_series_id"), + CONSTRAINT "aggregation_series_uri_site_id_unique" UNIQUE ("aggregation_series_uri", "site_id") +); +CREATE INDEX "aggregation_series_idx_site_id" on "aggregation_series" ("site_id"); + +; +-- +-- Table: amw_session +-- +CREATE TABLE "amw_session" ( + "session_id" character varying(255) NOT NULL, + "site_id" character varying(16) NOT NULL, + "expires" integer, + "session_data" bytea, + "flash_data" bytea, + "generic_data" bytea, + PRIMARY KEY ("session_id", "site_id") +); +CREATE INDEX "amw_session_idx_site_id" on "amw_session" ("site_id"); + +; +-- +-- Table: annotation +-- +CREATE TABLE "annotation" ( + "annotation_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "annotation_name" character varying(255) NOT NULL, + "annotation_type" character varying(32) NOT NULL, + "label" character varying(255) DEFAULT '' NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "private" smallint DEFAULT 0 NOT NULL, + PRIMARY KEY ("annotation_id"), + CONSTRAINT "site_id_annotation_name_unique" UNIQUE ("site_id", "annotation_name") +); +CREATE INDEX "annotation_idx_site_id" on "annotation" ("site_id"); + +; +-- +-- Table: attachment +-- +CREATE TABLE "attachment" ( + "id" serial NOT NULL, + "f_path" text NOT NULL, + "f_name" character varying(255) NOT NULL, + "f_archive_rel_path" character varying(32) NOT NULL, + "f_timestamp" timestamp NOT NULL, + "f_timestamp_epoch" integer DEFAULT 0 NOT NULL, + "f_full_path_name" text NOT NULL, + "f_suffix" character varying(16) NOT NULL, + "f_class" character varying(16) NOT NULL, + "uri" character varying(255) NOT NULL, + "title_muse" text, + "comment_muse" text, + "title_html" text, + "comment_html" text, + "alt_text" text, + "mime_type" character varying(255), + "errors" text, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "uri_site_id_unique" UNIQUE ("uri", "site_id") +); +CREATE INDEX "attachment_idx_site_id" on "attachment" ("site_id"); + +; +-- +-- Table: bookbuilder_profile +-- +CREATE TABLE "bookbuilder_profile" ( + "bookbuilder_profile_id" serial NOT NULL, + "user_id" integer NOT NULL, + "profile_name" character varying(255) NOT NULL, + "profile_data" text NOT NULL, + PRIMARY KEY ("bookbuilder_profile_id") +); +CREATE INDEX "bookbuilder_profile_idx_user_id" on "bookbuilder_profile" ("user_id"); + +; +-- +-- Table: bookbuilder_session +-- +CREATE TABLE "bookbuilder_session" ( + "bookbuilder_session_id" serial NOT NULL, + "token" character varying(16) NOT NULL, + "site_id" character varying(16) NOT NULL, + "bb_data" text NOT NULL, + "last_updated" timestamp NOT NULL, + PRIMARY KEY ("bookbuilder_session_id") +); +CREATE INDEX "bookbuilder_session_idx_site_id" on "bookbuilder_session" ("site_id"); + +; +-- +-- Table: bulk_job +-- +CREATE TABLE "bulk_job" ( + "bulk_job_id" serial NOT NULL, + "task" character varying(32), + "created" timestamp NOT NULL, + "started" timestamp, + "completed" timestamp, + "site_id" character varying(16) NOT NULL, + "status" character varying(32), + "payload" text, + "produced" character varying(255), + "username" character varying(255), + PRIMARY KEY ("bulk_job_id") +); +CREATE INDEX "bulk_job_idx_site_id" on "bulk_job" ("site_id"); + +; +-- +-- Table: category +-- +CREATE TABLE "category" ( + "id" serial NOT NULL, + "name" text, + "uri" character varying(255) NOT NULL, + "type" character varying(16) NOT NULL, + "sorting_pos" integer DEFAULT 0 NOT NULL, + "text_count" integer DEFAULT 0 NOT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "uri_site_id_type_unique" UNIQUE ("uri", "site_id", "type") +); +CREATE INDEX "category_idx_site_id" on "category" ("site_id"); + +; +-- +-- Table: custom_formats +-- +CREATE TABLE "custom_formats" ( + "custom_formats_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "format_name" character varying(255) NOT NULL, + "format_description" text, + "format_alias" character varying(8), + "format_code" character varying(8), + "format_priority" integer DEFAULT 0 NOT NULL, + "active" smallint DEFAULT 1, + "bb_format" character varying(16) DEFAULT 'pdf' NOT NULL, + "bb_epub_embed_fonts" smallint DEFAULT 1, + "bb_bcor" integer DEFAULT 0 NOT NULL, + "bb_beamercolortheme" character varying(32) DEFAULT 'dove' NOT NULL, + "bb_beamertheme" character varying(32) DEFAULT 'default' NOT NULL, + "bb_cover" smallint DEFAULT 1, + "bb_crop_marks" smallint DEFAULT 0, + "bb_crop_papersize" character varying(32) DEFAULT 'a4' NOT NULL, + "bb_crop_paper_height" integer DEFAULT 0 NOT NULL, + "bb_crop_paper_width" integer DEFAULT 0 NOT NULL, + "bb_crop_paper_thickness" character varying(16) DEFAULT '0.10mm' NOT NULL, + "bb_division" integer DEFAULT 12 NOT NULL, + "bb_fontsize" integer DEFAULT 10 NOT NULL, + "bb_headings" character varying(64) DEFAULT '0' NOT NULL, + "bb_imposed" smallint DEFAULT 0, + "bb_mainfont" character varying(255), + "bb_sansfont" character varying(255), + "bb_monofont" character varying(255), + "bb_nocoverpage" smallint DEFAULT 0, + "bb_coverpage_only_if_toc" smallint DEFAULT 0, + "bb_nofinalpage" smallint DEFAULT 0, + "bb_notoc" smallint DEFAULT 0, + "bb_impressum" smallint DEFAULT 0, + "bb_sansfontsections" smallint DEFAULT 0, + "bb_nobold" smallint DEFAULT 0, + "bb_secondary_footnotes_alpha" smallint DEFAULT 0, + "bb_start_with_empty_page" smallint DEFAULT 0, + "bb_continuefootnotes" smallint DEFAULT 0, + "bb_centerchapter" smallint DEFAULT 0, + "bb_centersection" smallint DEFAULT 0, + "bb_opening" character varying(16) DEFAULT 'any' NOT NULL, + "bb_papersize" character varying(32) DEFAULT 'generic' NOT NULL, + "bb_paper_height" integer DEFAULT 0 NOT NULL, + "bb_paper_width" integer DEFAULT 0 NOT NULL, + "bb_schema" character varying(64) DEFAULT '2up' NOT NULL, + "bb_signature" integer DEFAULT 0 NOT NULL, + "bb_signature_2up" character varying(8) DEFAULT '40-80' NOT NULL, + "bb_signature_4up" character varying(8) DEFAULT '40-80' NOT NULL, + "bb_twoside" smallint DEFAULT 0, + "bb_unbranded" smallint DEFAULT 0, + "bb_areaset_height" integer DEFAULT 0 NOT NULL, + "bb_areaset_width" integer DEFAULT 0 NOT NULL, + "bb_geometry_top_margin" integer DEFAULT 0 NOT NULL, + "bb_geometry_outer_margin" integer DEFAULT 0 NOT NULL, + "bb_fussy_last_word" smallint DEFAULT 0, + "bb_tex_emergencystretch" integer DEFAULT 30 NOT NULL, + "bb_tex_tolerance" integer DEFAULT 200 NOT NULL, + "bb_ignore_cover" smallint DEFAULT 0, + "bb_linespacing" integer DEFAULT 0 NOT NULL, + "bb_parindent" integer DEFAULT 15 NOT NULL, + "bb_body_only" smallint DEFAULT 0, + PRIMARY KEY ("custom_formats_id"), + CONSTRAINT "site_id_format_alias_unique" UNIQUE ("site_id", "format_alias"), + CONSTRAINT "site_id_format_code_unique" UNIQUE ("site_id", "format_code") +); +CREATE INDEX "custom_formats_idx_site_id" on "custom_formats" ("site_id"); + +; +-- +-- Table: include_path +-- +CREATE TABLE "include_path" ( + "include_path_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "directory" text, + "sorting_pos" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("include_path_id") +); +CREATE INDEX "include_path_idx_site_id" on "include_path" ("site_id"); + +; +-- +-- Table: legacy_link +-- +CREATE TABLE "legacy_link" ( + "site_id" character varying(16) NOT NULL, + "legacy_path" character varying(255) NOT NULL, + "new_path" character varying(255) NOT NULL, + PRIMARY KEY ("site_id", "legacy_path") +); +CREATE INDEX "legacy_link_idx_site_id" on "legacy_link" ("site_id"); + +; +-- +-- Table: mirror_origin +-- +CREATE TABLE "mirror_origin" ( + "mirror_origin_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "remote_domain" character varying(255) NOT NULL, + "remote_path" character varying(255) NOT NULL, + "active" smallint DEFAULT 0 NOT NULL, + "status_message" text, + "last_downloaded" timestamp, + PRIMARY KEY ("mirror_origin_id") +); +CREATE INDEX "mirror_origin_idx_site_id" on "mirror_origin" ("site_id"); + +; +-- +-- Table: monthly_archive +-- +CREATE TABLE "monthly_archive" ( + "monthly_archive_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "month" smallint NOT NULL, + "year" smallint NOT NULL, + PRIMARY KEY ("monthly_archive_id"), + CONSTRAINT "site_id_month_year_unique" UNIQUE ("site_id", "month", "year") +); +CREATE INDEX "monthly_archive_idx_site_id" on "monthly_archive" ("site_id"); + +; +-- +-- Table: node +-- +CREATE TABLE "node" ( + "node_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "uri" character varying(255) NOT NULL, + "canonical_title" character varying(255) DEFAULT '' NOT NULL, + "last_updated_epoch" integer DEFAULT 0 NOT NULL, + "last_updated_dt" timestamp, + "sorting_pos" integer DEFAULT 0 NOT NULL, + "full_path" text, + "parent_node_id" integer, + PRIMARY KEY ("node_id"), + CONSTRAINT "site_id_uri_unique" UNIQUE ("site_id", "uri") +); +CREATE INDEX "node_idx_parent_node_id" on "node" ("parent_node_id"); +CREATE INDEX "node_idx_site_id" on "node" ("site_id"); + +; +-- +-- Table: oai_pmh_set +-- +CREATE TABLE "oai_pmh_set" ( + "oai_pmh_set_id" serial NOT NULL, + "set_spec" character varying(255) NOT NULL, + "site_id" character varying(16) NOT NULL, + "set_name" text, + PRIMARY KEY ("oai_pmh_set_id"), + CONSTRAINT "set_spec_site_id_unique" UNIQUE ("set_spec", "site_id") +); +CREATE INDEX "oai_pmh_set_idx_site_id" on "oai_pmh_set" ("site_id"); + +; +-- +-- Table: redirection +-- +CREATE TABLE "redirection" ( + "id" serial NOT NULL, + "uri" character varying(255) NOT NULL, + "type" character varying(16) NOT NULL, + "redirect" character varying(255) NOT NULL, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "uri_type_site_id_unique" UNIQUE ("uri", "type", "site_id") +); +CREATE INDEX "redirection_idx_site_id" on "redirection" ("site_id"); + +; +-- +-- Table: site_category_type +-- +CREATE TABLE "site_category_type" ( + "site_id" character varying(16) NOT NULL, + "category_type" character varying(16) NOT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "priority" integer DEFAULT 0 NOT NULL, + "name_singular" character varying(255) NOT NULL, + "name_plural" character varying(255) NOT NULL, + "generate_index" smallint DEFAULT 1 NOT NULL, + "in_colophon" smallint DEFAULT 0 NOT NULL, + "xapian_custom_slot" smallint, + "description" text, + PRIMARY KEY ("site_id", "category_type") +); +CREATE INDEX "site_category_type_idx_site_id" on "site_category_type" ("site_id"); + +; +-- +-- Table: site_link +-- +CREATE TABLE "site_link" ( + "url" character varying(255) NOT NULL, + "label" character varying(255) NOT NULL, + "sorting_pos" integer DEFAULT 0 NOT NULL, + "menu" character varying(32) DEFAULT 'specials' NOT NULL, + "site_id" character varying(16) NOT NULL +); +CREATE INDEX "site_link_idx_site_id" on "site_link" ("site_id"); + +; +-- +-- Table: site_options +-- +CREATE TABLE "site_options" ( + "site_id" character varying(16) NOT NULL, + "option_name" character varying(64) NOT NULL, + "option_value" text, + PRIMARY KEY ("site_id", "option_name") +); +CREATE INDEX "site_options_idx_site_id" on "site_options" ("site_id"); + +; +-- +-- Table: title +-- +CREATE TABLE "title" ( + "id" serial NOT NULL, + "title" text, + "subtitle" text, + "lang" character varying(3) DEFAULT 'en' NOT NULL, + "date" text, + "datefirst" text, + "notes" text, + "source" text, + "list_title" text, + "author" text, + "uid" character varying(255) DEFAULT '' NOT NULL, + "attach" text, + "pubdate" timestamp NOT NULL, + "status" character varying(16) DEFAULT 'unpublished' NOT NULL, + "parent" character varying(255), + "publisher" text, + "isbn" text, + "rights" text, + "seriesname" text, + "seriesnumber" text, + "f_path" text NOT NULL, + "f_name" character varying(255) NOT NULL, + "f_archive_rel_path" character varying(32) NOT NULL, + "f_timestamp" timestamp NOT NULL, + "f_timestamp_epoch" integer DEFAULT 0 NOT NULL, + "f_full_path_name" text NOT NULL, + "f_suffix" character varying(16) NOT NULL, + "f_class" character varying(16) NOT NULL, + "uri" character varying(255) NOT NULL, + "deleted" text, + "slides" smallint DEFAULT 0 NOT NULL, + "text_structure" text, + "cover" character varying(255) DEFAULT '' NOT NULL, + "teaser" text, + "sorting_pos" integer DEFAULT 0 NOT NULL, + "sku" character varying(64) DEFAULT '' NOT NULL, + "text_qualification" character varying(32), + "text_size" integer DEFAULT 0 NOT NULL, + "attachment_index" integer DEFAULT 0 NOT NULL, + "blob_container" smallint DEFAULT 0 NOT NULL, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "uri_f_class_site_id_unique" UNIQUE ("uri", "f_class", "site_id") +); +CREATE INDEX "title_idx_site_id" on "title" ("site_id"); + +; +-- +-- Table: vhost +-- +CREATE TABLE "vhost" ( + "name" character varying(255) NOT NULL, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("name") +); +CREATE INDEX "vhost_idx_site_id" on "vhost" ("site_id"); + +; +-- +-- Table: whitelist_ip +-- +CREATE TABLE "whitelist_ip" ( + "site_id" character varying(16) NOT NULL, + "ip" character varying(64) NOT NULL, + "user_editable" smallint DEFAULT 0 NOT NULL, + "granted_by_username" character varying(255), + "expire_epoch" integer, + PRIMARY KEY ("site_id", "ip") +); +CREATE INDEX "whitelist_ip_idx_site_id" on "whitelist_ip" ("site_id"); +CREATE INDEX "whitelist_ip_ip_amw_index" on "whitelist_ip" ("ip"); + +; +-- +-- Table: aggregation +-- +CREATE TABLE "aggregation" ( + "aggregation_id" serial NOT NULL, + "aggregation_series_id" integer, + "aggregation_uri" character varying(255) NOT NULL, + "aggregation_name" character varying(255), + "publication_date" character varying(255), + "publication_date_year" integer, + "publication_date_month" integer, + "publication_date_day" integer, + "issue" character varying(255), + "sorting_pos" integer DEFAULT 0 NOT NULL, + "publication_place" character varying(255), + "publisher" character varying(255), + "isbn" character varying(32), + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("aggregation_id"), + CONSTRAINT "aggregation_uri_site_id_unique" UNIQUE ("aggregation_uri", "site_id") +); +CREATE INDEX "aggregation_idx_aggregation_series_id" on "aggregation" ("aggregation_series_id"); +CREATE INDEX "aggregation_idx_site_id" on "aggregation" ("site_id"); +CREATE INDEX "aggregation_uri_amw_index" on "aggregation" ("aggregation_uri"); + +; +-- +-- Table: bookcover +-- +CREATE TABLE "bookcover" ( + "bookcover_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "title" character varying(255) DEFAULT '' NOT NULL, + "coverheight" integer DEFAULT 210 NOT NULL, + "coverwidth" integer DEFAULT 148 NOT NULL, + "spinewidth" integer DEFAULT 0 NOT NULL, + "flapwidth" integer DEFAULT 0 NOT NULL, + "wrapwidth" integer DEFAULT 0 NOT NULL, + "bleedwidth" integer DEFAULT 10 NOT NULL, + "marklength" integer DEFAULT 5 NOT NULL, + "foldingmargin" smallint DEFAULT 0 NOT NULL, + "created" timestamp NOT NULL, + "compiled" timestamp, + "zip_path" character varying(255), + "pdf_path" character varying(255), + "template" character varying(64), + "font_name" character varying(255), + "language_code" character varying(8), + "comments" text, + "session_id" character varying(255), + "user_id" integer, + PRIMARY KEY ("bookcover_id") +); +CREATE INDEX "bookcover_idx_site_id" on "bookcover" ("site_id"); +CREATE INDEX "bookcover_idx_user_id" on "bookcover" ("user_id"); + +; +-- +-- Table: category_description +-- +CREATE TABLE "category_description" ( + "category_description_id" serial NOT NULL, + "muse_body" text, + "html_body" text, + "lang" character varying(3) DEFAULT 'en' NOT NULL, + "last_modified_by" character varying(255), + "category_id" integer NOT NULL, + PRIMARY KEY ("category_description_id"), + CONSTRAINT "category_id_lang_unique" UNIQUE ("category_id", "lang") +); +CREATE INDEX "category_description_idx_category_id" on "category_description" ("category_id"); + +; +-- +-- Table: global_site_files +-- +CREATE TABLE "global_site_files" ( + "site_id" character varying(16) NOT NULL, + "attachment_id" integer, + "file_name" character varying(255) NOT NULL, + "file_type" character varying(255) NOT NULL, + "file_path" text NOT NULL, + "image_width" integer, + "image_height" integer, + PRIMARY KEY ("site_id", "file_name", "file_type") +); +CREATE INDEX "global_site_files_idx_attachment_id" on "global_site_files" ("attachment_id"); +CREATE INDEX "global_site_files_idx_site_id" on "global_site_files" ("site_id"); + +; +-- +-- Table: included_file +-- +CREATE TABLE "included_file" ( + "included_file_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "title_id" integer NOT NULL, + "file_path" text NOT NULL, + "file_timestamp" timestamp, + "file_epoch" integer, + PRIMARY KEY ("included_file_id") +); +CREATE INDEX "included_file_idx_site_id" on "included_file" ("site_id"); +CREATE INDEX "included_file_idx_title_id" on "included_file" ("title_id"); + +; +-- +-- Table: job +-- +CREATE TABLE "job" ( + "id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "bulk_job_id" integer, + "task" character varying(32), + "payload" text, + "status" character varying(32), + "created" timestamp NOT NULL, + "started" timestamp, + "completed" timestamp, + "priority" integer DEFAULT 10 NOT NULL, + "produced" character varying(255), + "username" character varying(255), + "errors" text, + PRIMARY KEY ("id") +); +CREATE INDEX "job_idx_bulk_job_id" on "job" ("bulk_job_id"); +CREATE INDEX "job_idx_site_id" on "job" ("site_id"); +CREATE INDEX "job_status_index" on "job" ("status"); + +; +-- +-- Table: muse_header +-- +CREATE TABLE "muse_header" ( + "title_id" integer NOT NULL, + "muse_header" character varying(255) NOT NULL, + "muse_value" text, + "muse_value_html" text, + PRIMARY KEY ("title_id", "muse_header") +); +CREATE INDEX "muse_header_idx_title_id" on "muse_header" ("title_id"); + +; +-- +-- Table: node_body +-- +CREATE TABLE "node_body" ( + "node_id" integer NOT NULL, + "lang" character varying(3) DEFAULT 'en' NOT NULL, + "title_muse" text, + "title_html" text, + "body_muse" text, + "body_html" text, + PRIMARY KEY ("node_id", "lang") +); +CREATE INDEX "node_body_idx_node_id" on "node_body" ("node_id"); + +; +-- +-- Table: revision +-- +CREATE TABLE "revision" ( + "id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "title_id" integer NOT NULL, + "f_full_path_name" text, + "message" text, + "status" character varying(16) DEFAULT 'editing' NOT NULL, + "session_id" character varying(255), + "username" character varying(255), + "updated" timestamp NOT NULL, + PRIMARY KEY ("id") +); +CREATE INDEX "revision_idx_site_id" on "revision" ("site_id"); +CREATE INDEX "revision_idx_title_id" on "revision" ("title_id"); + +; +-- +-- Table: text_internal_link +-- +CREATE TABLE "text_internal_link" ( + "title_id" integer NOT NULL, + "site_id" character varying(16) NOT NULL, + "f_class" character varying(255) NOT NULL, + "uri" character varying(255) NOT NULL, + "full_link" text NOT NULL +); +CREATE INDEX "text_internal_link_idx_site_id" on "text_internal_link" ("site_id"); +CREATE INDEX "text_internal_link_idx_title_id" on "text_internal_link" ("title_id"); + +; +-- +-- Table: text_part +-- +CREATE TABLE "text_part" ( + "title_id" integer NOT NULL, + "part_index" character varying(16) NOT NULL, + "part_level" integer NOT NULL, + "part_title" text NOT NULL, + "part_size" integer NOT NULL, + "toc_index" integer NOT NULL, + "part_order" integer NOT NULL, + PRIMARY KEY ("title_id", "part_index") +); +CREATE INDEX "text_part_idx_title_id" on "text_part" ("title_id"); + +; +-- +-- Table: title_stat +-- +CREATE TABLE "title_stat" ( + "title_stat_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "title_id" integer NOT NULL, + "accessed" timestamp NOT NULL, + "user_agent" text, + "type" text, + PRIMARY KEY ("title_stat_id") +); +CREATE INDEX "title_stat_idx_site_id" on "title_stat" ("site_id"); +CREATE INDEX "title_stat_idx_title_id" on "title_stat" ("title_id"); + +; +-- +-- Table: user_role +-- +CREATE TABLE "user_role" ( + "user_id" integer NOT NULL, + "role_id" integer NOT NULL, + PRIMARY KEY ("user_id", "role_id") +); +CREATE INDEX "user_role_idx_role_id" on "user_role" ("role_id"); +CREATE INDEX "user_role_idx_user_id" on "user_role" ("user_id"); + +; +-- +-- Table: user_site +-- +CREATE TABLE "user_site" ( + "user_id" integer NOT NULL, + "site_id" character varying(16) NOT NULL, + PRIMARY KEY ("user_id", "site_id") +); +CREATE INDEX "user_site_idx_site_id" on "user_site" ("site_id"); +CREATE INDEX "user_site_idx_user_id" on "user_site" ("user_id"); + +; +-- +-- Table: aggregation_title +-- +CREATE TABLE "aggregation_title" ( + "aggregation_id" integer NOT NULL, + "title_uri" character varying(255) NOT NULL, + "sorting_pos" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("aggregation_id", "title_uri") +); +CREATE INDEX "aggregation_title_idx_aggregation_id" on "aggregation_title" ("aggregation_id"); +CREATE INDEX "aggregation_title_uri_amw_index" on "aggregation_title" ("title_uri"); + +; +-- +-- Table: bookcover_token +-- +CREATE TABLE "bookcover_token" ( + "bookcover_id" integer NOT NULL, + "token_name" character varying(255) NOT NULL, + "token_value" text, + PRIMARY KEY ("bookcover_id", "token_name") +); +CREATE INDEX "bookcover_token_idx_bookcover_id" on "bookcover_token" ("bookcover_id"); +CREATE INDEX "bookcover_token_name_amw_index" on "bookcover_token" ("token_name"); + +; +-- +-- Table: job_file +-- +CREATE TABLE "job_file" ( + "filename" character varying(255) NOT NULL, + "slot" character varying(255) DEFAULT '' NOT NULL, + "job_id" integer NOT NULL, + PRIMARY KEY ("filename") +); +CREATE INDEX "job_file_idx_job_id" on "job_file" ("job_id"); + +; +-- +-- Table: node_aggregation_series +-- +CREATE TABLE "node_aggregation_series" ( + "node_id" integer NOT NULL, + "aggregation_series_id" integer NOT NULL, + PRIMARY KEY ("node_id", "aggregation_series_id") +); +CREATE INDEX "node_aggregation_series_idx_aggregation_series_id" on "node_aggregation_series" ("aggregation_series_id"); +CREATE INDEX "node_aggregation_series_idx_node_id" on "node_aggregation_series" ("node_id"); + +; +-- +-- Table: node_category +-- +CREATE TABLE "node_category" ( + "node_id" integer NOT NULL, + "category_id" integer NOT NULL, + PRIMARY KEY ("node_id", "category_id") +); +CREATE INDEX "node_category_idx_category_id" on "node_category" ("category_id"); +CREATE INDEX "node_category_idx_node_id" on "node_category" ("node_id"); + +; +-- +-- Table: node_title +-- +CREATE TABLE "node_title" ( + "node_id" integer NOT NULL, + "title_id" integer NOT NULL, + PRIMARY KEY ("node_id", "title_id") +); +CREATE INDEX "node_title_idx_node_id" on "node_title" ("node_id"); +CREATE INDEX "node_title_idx_title_id" on "node_title" ("title_id"); + +; +-- +-- Table: text_month +-- +CREATE TABLE "text_month" ( + "title_id" integer NOT NULL, + "monthly_archive_id" integer NOT NULL, + PRIMARY KEY ("title_id", "monthly_archive_id") +); +CREATE INDEX "text_month_idx_monthly_archive_id" on "text_month" ("monthly_archive_id"); +CREATE INDEX "text_month_idx_title_id" on "text_month" ("title_id"); + +; +-- +-- Table: title_annotation +-- +CREATE TABLE "title_annotation" ( + "annotation_id" integer NOT NULL, + "title_id" integer NOT NULL, + "annotation_value" text, + PRIMARY KEY ("annotation_id", "title_id") +); +CREATE INDEX "title_annotation_idx_annotation_id" on "title_annotation" ("annotation_id"); +CREATE INDEX "title_annotation_idx_title_id" on "title_annotation" ("title_id"); + +; +-- +-- Table: title_attachment +-- +CREATE TABLE "title_attachment" ( + "title_id" integer NOT NULL, + "attachment_id" integer NOT NULL, + PRIMARY KEY ("title_id", "attachment_id") +); +CREATE INDEX "title_attachment_idx_attachment_id" on "title_attachment" ("attachment_id"); +CREATE INDEX "title_attachment_idx_title_id" on "title_attachment" ("title_id"); + +; +-- +-- Table: title_category +-- +CREATE TABLE "title_category" ( + "title_id" integer NOT NULL, + "category_id" integer NOT NULL, + PRIMARY KEY ("title_id", "category_id") +); +CREATE INDEX "title_category_idx_category_id" on "title_category" ("category_id"); +CREATE INDEX "title_category_idx_title_id" on "title_category" ("title_id"); + +; +-- +-- Table: aggregation_annotation +-- +CREATE TABLE "aggregation_annotation" ( + "annotation_id" integer NOT NULL, + "aggregation_id" integer NOT NULL, + "annotation_value" text, + PRIMARY KEY ("annotation_id", "aggregation_id") +); +CREATE INDEX "aggregation_annotation_idx_aggregation_id" on "aggregation_annotation" ("aggregation_id"); +CREATE INDEX "aggregation_annotation_idx_annotation_id" on "aggregation_annotation" ("annotation_id"); + +; +-- +-- Table: mirror_info +-- +CREATE TABLE "mirror_info" ( + "mirror_info_id" serial NOT NULL, + "title_id" integer, + "attachment_id" integer, + "mirror_origin_id" integer, + "site_id" character varying(16) NOT NULL, + "checksum" character varying(128), + "download_source" text, + "download_destination" text, + "mirror_exception" character varying(32) DEFAULT '' NOT NULL, + "last_updated" timestamp, + PRIMARY KEY ("mirror_info_id"), + CONSTRAINT "attachment_id_unique" UNIQUE ("attachment_id"), + CONSTRAINT "title_id_unique" UNIQUE ("title_id") +); +CREATE INDEX "mirror_info_idx_attachment_id" on "mirror_info" ("attachment_id"); +CREATE INDEX "mirror_info_idx_mirror_origin_id" on "mirror_info" ("mirror_origin_id"); +CREATE INDEX "mirror_info_idx_site_id" on "mirror_info" ("site_id"); +CREATE INDEX "mirror_info_idx_title_id" on "mirror_info" ("title_id"); + +; +-- +-- Table: node_aggregation +-- +CREATE TABLE "node_aggregation" ( + "node_id" integer NOT NULL, + "aggregation_id" integer NOT NULL, + PRIMARY KEY ("node_id", "aggregation_id") +); +CREATE INDEX "node_aggregation_idx_aggregation_id" on "node_aggregation" ("aggregation_id"); +CREATE INDEX "node_aggregation_idx_node_id" on "node_aggregation" ("node_id"); + +; +-- +-- Table: oai_pmh_record +-- +CREATE TABLE "oai_pmh_record" ( + "oai_pmh_record_id" serial NOT NULL, + "identifier" character varying(255) NOT NULL, + "datestamp" timestamp NOT NULL, + "site_id" character varying(16) NOT NULL, + "title_id" integer, + "attachment_id" integer, + "custom_formats_id" integer, + "metadata_type" character varying(32), + "metadata_format" character varying(32), + "metadata_format_description" character varying(255), + "deleted" smallint DEFAULT 0 NOT NULL, + "update_run" integer DEFAULT 0 NOT NULL, + PRIMARY KEY ("oai_pmh_record_id"), + CONSTRAINT "identifier_site_id_unique" UNIQUE ("identifier", "site_id") +); +CREATE INDEX "oai_pmh_record_idx_attachment_id" on "oai_pmh_record" ("attachment_id"); +CREATE INDEX "oai_pmh_record_idx_custom_formats_id" on "oai_pmh_record" ("custom_formats_id"); +CREATE INDEX "oai_pmh_record_idx_site_id" on "oai_pmh_record" ("site_id"); +CREATE INDEX "oai_pmh_record_idx_title_id" on "oai_pmh_record" ("title_id"); + +; +-- +-- Table: oai_pmh_record_set +-- +CREATE TABLE "oai_pmh_record_set" ( + "oai_pmh_record_id" integer NOT NULL, + "oai_pmh_set_id" integer NOT NULL, + PRIMARY KEY ("oai_pmh_record_id", "oai_pmh_set_id") +); +CREATE INDEX "oai_pmh_record_set_idx_oai_pmh_record_id" on "oai_pmh_record_set" ("oai_pmh_record_id"); +CREATE INDEX "oai_pmh_record_set_idx_oai_pmh_set_id" on "oai_pmh_record_set" ("oai_pmh_set_id"); + +; +-- +-- Foreign Key Definitions +-- + +; +ALTER TABLE "aggregation_series" ADD CONSTRAINT "aggregation_series_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "amw_session" ADD CONSTRAINT "amw_session_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "annotation" ADD CONSTRAINT "annotation_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "attachment" ADD CONSTRAINT "attachment_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookbuilder_profile" ADD CONSTRAINT "bookbuilder_profile_fk_user_id" FOREIGN KEY ("user_id") + REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookbuilder_session" ADD CONSTRAINT "bookbuilder_session_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bulk_job" ADD CONSTRAINT "bulk_job_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "category" ADD CONSTRAINT "category_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "custom_formats" ADD CONSTRAINT "custom_formats_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "include_path" ADD CONSTRAINT "include_path_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "legacy_link" ADD CONSTRAINT "legacy_link_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "mirror_origin" ADD CONSTRAINT "mirror_origin_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "monthly_archive" ADD CONSTRAINT "monthly_archive_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node" ADD CONSTRAINT "node_fk_parent_node_id" FOREIGN KEY ("parent_node_id") + REFERENCES "node" ("node_id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "node" ADD CONSTRAINT "node_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_set" ADD CONSTRAINT "oai_pmh_set_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "redirection" ADD CONSTRAINT "redirection_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "site_category_type" ADD CONSTRAINT "site_category_type_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "site_link" ADD CONSTRAINT "site_link_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "site_options" ADD CONSTRAINT "site_options_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title" ADD CONSTRAINT "title_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "vhost" ADD CONSTRAINT "vhost_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "whitelist_ip" ADD CONSTRAINT "whitelist_ip_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "aggregation" ADD CONSTRAINT "aggregation_fk_aggregation_series_id" FOREIGN KEY ("aggregation_series_id") + REFERENCES "aggregation_series" ("aggregation_series_id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "aggregation" ADD CONSTRAINT "aggregation_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookcover" ADD CONSTRAINT "bookcover_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookcover" ADD CONSTRAINT "bookcover_fk_user_id" FOREIGN KEY ("user_id") + REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "category_description" ADD CONSTRAINT "category_description_fk_category_id" FOREIGN KEY ("category_id") + REFERENCES "category" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "global_site_files" ADD CONSTRAINT "global_site_files_fk_attachment_id" FOREIGN KEY ("attachment_id") + REFERENCES "attachment" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "global_site_files" ADD CONSTRAINT "global_site_files_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "included_file" ADD CONSTRAINT "included_file_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "included_file" ADD CONSTRAINT "included_file_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "job" ADD CONSTRAINT "job_fk_bulk_job_id" FOREIGN KEY ("bulk_job_id") + REFERENCES "bulk_job" ("bulk_job_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "job" ADD CONSTRAINT "job_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "muse_header" ADD CONSTRAINT "muse_header_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_body" ADD CONSTRAINT "node_body_fk_node_id" FOREIGN KEY ("node_id") + REFERENCES "node" ("node_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "revision" ADD CONSTRAINT "revision_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "revision" ADD CONSTRAINT "revision_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "text_internal_link" ADD CONSTRAINT "text_internal_link_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "text_internal_link" ADD CONSTRAINT "text_internal_link_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "text_part" ADD CONSTRAINT "text_part_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_stat" ADD CONSTRAINT "title_stat_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_stat" ADD CONSTRAINT "title_stat_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "user_role" ADD CONSTRAINT "user_role_fk_role_id" FOREIGN KEY ("role_id") + REFERENCES "roles" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "user_role" ADD CONSTRAINT "user_role_fk_user_id" FOREIGN KEY ("user_id") + REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "user_site" ADD CONSTRAINT "user_site_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "user_site" ADD CONSTRAINT "user_site_fk_user_id" FOREIGN KEY ("user_id") + REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "aggregation_title" ADD CONSTRAINT "aggregation_title_fk_aggregation_id" FOREIGN KEY ("aggregation_id") + REFERENCES "aggregation" ("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookcover_token" ADD CONSTRAINT "bookcover_token_fk_bookcover_id" FOREIGN KEY ("bookcover_id") + REFERENCES "bookcover" ("bookcover_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "job_file" ADD CONSTRAINT "job_file_fk_job_id" FOREIGN KEY ("job_id") + REFERENCES "job" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_aggregation_series" ADD CONSTRAINT "node_aggregation_series_fk_aggregation_series_id" FOREIGN KEY ("aggregation_series_id") + REFERENCES "aggregation_series" ("aggregation_series_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_aggregation_series" ADD CONSTRAINT "node_aggregation_series_fk_node_id" FOREIGN KEY ("node_id") + REFERENCES "node" ("node_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_category" ADD CONSTRAINT "node_category_fk_category_id" FOREIGN KEY ("category_id") + REFERENCES "category" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_category" ADD CONSTRAINT "node_category_fk_node_id" FOREIGN KEY ("node_id") + REFERENCES "node" ("node_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_title" ADD CONSTRAINT "node_title_fk_node_id" FOREIGN KEY ("node_id") + REFERENCES "node" ("node_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_title" ADD CONSTRAINT "node_title_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "text_month" ADD CONSTRAINT "text_month_fk_monthly_archive_id" FOREIGN KEY ("monthly_archive_id") + REFERENCES "monthly_archive" ("monthly_archive_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "text_month" ADD CONSTRAINT "text_month_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_annotation" ADD CONSTRAINT "title_annotation_fk_annotation_id" FOREIGN KEY ("annotation_id") + REFERENCES "annotation" ("annotation_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_annotation" ADD CONSTRAINT "title_annotation_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_attachment" ADD CONSTRAINT "title_attachment_fk_attachment_id" FOREIGN KEY ("attachment_id") + REFERENCES "attachment" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_attachment" ADD CONSTRAINT "title_attachment_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_category" ADD CONSTRAINT "title_category_fk_category_id" FOREIGN KEY ("category_id") + REFERENCES "category" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "title_category" ADD CONSTRAINT "title_category_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "aggregation_annotation" ADD CONSTRAINT "aggregation_annotation_fk_aggregation_id" FOREIGN KEY ("aggregation_id") + REFERENCES "aggregation" ("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "aggregation_annotation" ADD CONSTRAINT "aggregation_annotation_fk_annotation_id" FOREIGN KEY ("annotation_id") + REFERENCES "annotation" ("annotation_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "mirror_info" ADD CONSTRAINT "mirror_info_fk_attachment_id" FOREIGN KEY ("attachment_id") + REFERENCES "attachment" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "mirror_info" ADD CONSTRAINT "mirror_info_fk_mirror_origin_id" FOREIGN KEY ("mirror_origin_id") + REFERENCES "mirror_origin" ("mirror_origin_id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "mirror_info" ADD CONSTRAINT "mirror_info_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "mirror_info" ADD CONSTRAINT "mirror_info_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_aggregation" ADD CONSTRAINT "node_aggregation_fk_aggregation_id" FOREIGN KEY ("aggregation_id") + REFERENCES "aggregation" ("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "node_aggregation" ADD CONSTRAINT "node_aggregation_fk_node_id" FOREIGN KEY ("node_id") + REFERENCES "node" ("node_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record" ADD CONSTRAINT "oai_pmh_record_fk_attachment_id" FOREIGN KEY ("attachment_id") + REFERENCES "attachment" ("id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record" ADD CONSTRAINT "oai_pmh_record_fk_custom_formats_id" FOREIGN KEY ("custom_formats_id") + REFERENCES "custom_formats" ("custom_formats_id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record" ADD CONSTRAINT "oai_pmh_record_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record" ADD CONSTRAINT "oai_pmh_record_fk_title_id" FOREIGN KEY ("title_id") + REFERENCES "title" ("id") ON DELETE SET NULL ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record_set" ADD CONSTRAINT "oai_pmh_record_set_fk_oai_pmh_record_id" FOREIGN KEY ("oai_pmh_record_id") + REFERENCES "oai_pmh_record" ("oai_pmh_record_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "oai_pmh_record_set" ADD CONSTRAINT "oai_pmh_record_set_fk_oai_pmh_set_id" FOREIGN KEY ("oai_pmh_set_id") + REFERENCES "oai_pmh_set" ("oai_pmh_set_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; diff --git a/dbicdh/PostgreSQL/upgrade/83-84/001-auto.sql b/dbicdh/PostgreSQL/upgrade/83-84/001-auto.sql new file mode 100644 index 000000000..3003d9146 --- /dev/null +++ b/dbicdh/PostgreSQL/upgrade/83-84/001-auto.sql @@ -0,0 +1,59 @@ +-- Convert schema '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/83/001-auto.yml' to '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/84/001-auto.yml':; + +; +BEGIN; + +; +CREATE TABLE "bookcover" ( + "bookcover_id" serial NOT NULL, + "site_id" character varying(16) NOT NULL, + "title" character varying(255) DEFAULT '' NOT NULL, + "coverheight" integer DEFAULT 210 NOT NULL, + "coverwidth" integer DEFAULT 148 NOT NULL, + "spinewidth" integer DEFAULT 0 NOT NULL, + "flapwidth" integer DEFAULT 0 NOT NULL, + "wrapwidth" integer DEFAULT 0 NOT NULL, + "bleedwidth" integer DEFAULT 10 NOT NULL, + "marklength" integer DEFAULT 5 NOT NULL, + "foldingmargin" smallint DEFAULT 0 NOT NULL, + "created" timestamp NOT NULL, + "compiled" timestamp, + "zip_path" character varying(255), + "pdf_path" character varying(255), + "template" character varying(64), + "font_name" character varying(255), + "language_code" character varying(8), + "comments" text, + "session_id" character varying(255), + "user_id" integer, + PRIMARY KEY ("bookcover_id") +); +CREATE INDEX "bookcover_idx_site_id" on "bookcover" ("site_id"); +CREATE INDEX "bookcover_idx_user_id" on "bookcover" ("user_id"); + +; +CREATE TABLE "bookcover_token" ( + "bookcover_id" integer NOT NULL, + "token_name" character varying(255) NOT NULL, + "token_value" text, + PRIMARY KEY ("bookcover_id", "token_name") +); +CREATE INDEX "bookcover_token_idx_bookcover_id" on "bookcover_token" ("bookcover_id"); +CREATE INDEX "bookcover_token_name_amw_index" on "bookcover_token" ("token_name"); + +; +ALTER TABLE "bookcover" ADD CONSTRAINT "bookcover_fk_site_id" FOREIGN KEY ("site_id") + REFERENCES "site" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookcover" ADD CONSTRAINT "bookcover_fk_user_id" FOREIGN KEY ("user_id") + REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE; + +; +ALTER TABLE "bookcover_token" ADD CONSTRAINT "bookcover_token_fk_bookcover_id" FOREIGN KEY ("bookcover_id") + REFERENCES "bookcover" ("bookcover_id") ON DELETE CASCADE ON UPDATE CASCADE; + +; + +COMMIT; + diff --git a/dbicdh/SQLite/deploy/84/001-auto-__VERSION.sql b/dbicdh/SQLite/deploy/84/001-auto-__VERSION.sql new file mode 100644 index 000000000..c300b5a8c --- /dev/null +++ b/dbicdh/SQLite/deploy/84/001-auto-__VERSION.sql @@ -0,0 +1,18 @@ +-- +-- Created by SQL::Translator::Producer::SQLite +-- Created on Tue Jan 30 14:45:32 2024 +-- + +; +BEGIN TRANSACTION; +-- +-- Table: "dbix_class_deploymenthandler_versions" +-- +CREATE TABLE "dbix_class_deploymenthandler_versions" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "version" varchar(50) NOT NULL, + "ddl" text, + "upgrade_sql" text +); +CREATE UNIQUE INDEX "dbix_class_deploymenthandler_versions_version" ON "dbix_class_deploymenthandler_versions" ("version"); +COMMIT; diff --git a/dbicdh/SQLite/deploy/84/001-auto.sql b/dbicdh/SQLite/deploy/84/001-auto.sql new file mode 100644 index 000000000..249f0a067 --- /dev/null +++ b/dbicdh/SQLite/deploy/84/001-auto.sql @@ -0,0 +1,955 @@ +-- +-- Created by SQL::Translator::Producer::SQLite +-- Created on Tue Jan 30 14:45:32 2024 +-- + +; +BEGIN TRANSACTION; +-- +-- Table: "column_comments" +-- +CREATE TABLE "column_comments" ( + "table_name" varchar(255), + "column_name" varchar(255), + "comment_text" text +); +-- +-- Table: "roles" +-- +CREATE TABLE "roles" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "role" varchar(128) +); +CREATE UNIQUE INDEX "role_unique" ON "roles" ("role"); +-- +-- Table: "site" +-- +CREATE TABLE "site" ( + "id" varchar(16) NOT NULL, + "mode" varchar(16) NOT NULL DEFAULT 'private', + "locale" varchar(3) NOT NULL DEFAULT 'en', + "magic_question" varchar(255) NOT NULL DEFAULT '12 + 4 =', + "magic_answer" varchar(255) NOT NULL DEFAULT '16', + "fixed_category_list" text, + "sitename" varchar(255) NOT NULL DEFAULT '', + "siteslogan" varchar(255) NOT NULL DEFAULT '', + "theme" varchar(32) NOT NULL DEFAULT '', + "logo" varchar(255) NOT NULL DEFAULT '', + "mail_notify" text, + "mail_from" text, + "canonical" varchar(255) NOT NULL, + "secure_site" integer(1) NOT NULL DEFAULT 1, + "secure_site_only" integer(1) NOT NULL DEFAULT 0, + "sitegroup" varchar(255) NOT NULL DEFAULT '', + "cgit_integration" integer(1) NOT NULL DEFAULT 0, + "ssl_key" varchar(255) NOT NULL DEFAULT '', + "ssl_cert" varchar(255) NOT NULL DEFAULT '', + "ssl_ca_cert" varchar(255) NOT NULL DEFAULT '', + "ssl_chained_cert" varchar(255) NOT NULL DEFAULT '', + "acme_certificate" integer(1) NOT NULL DEFAULT 0, + "multilanguage" varchar(255) NOT NULL DEFAULT '', + "active" integer(1) NOT NULL DEFAULT 1, + "blog_style" integer(1) NOT NULL DEFAULT 0, + "bb_page_limit" integer NOT NULL DEFAULT 1000, + "tex" integer(1) NOT NULL DEFAULT 1, + "pdf" integer(1) NOT NULL DEFAULT 1, + "a4_pdf" integer(1) NOT NULL DEFAULT 0, + "lt_pdf" integer(1) NOT NULL DEFAULT 0, + "sl_pdf" integer(1) NOT NULL DEFAULT 0, + "html" integer(1) NOT NULL DEFAULT 1, + "bare_html" integer(1) NOT NULL DEFAULT 1, + "epub" integer(1) NOT NULL DEFAULT 1, + "zip" integer(1) NOT NULL DEFAULT 1, + "ttdir" varchar(255) NOT NULL DEFAULT '', + "papersize" varchar(64) NOT NULL DEFAULT '', + "division" integer NOT NULL DEFAULT 12, + "bcor" varchar(16) NOT NULL DEFAULT '0mm', + "fontsize" integer NOT NULL DEFAULT 10, + "mainfont" varchar(255) NOT NULL DEFAULT 'CMU Serif', + "sansfont" varchar(255) NOT NULL DEFAULT 'CMU Sans Serif', + "monofont" varchar(255) NOT NULL DEFAULT 'CMU Typewriter Text', + "beamertheme" varchar(255) NOT NULL DEFAULT 'default', + "beamercolortheme" varchar(255) NOT NULL DEFAULT 'dove', + "nocoverpage" integer(1) NOT NULL DEFAULT 0, + "logo_with_sitename" integer(1) NOT NULL DEFAULT 0, + "opening" varchar(16) NOT NULL DEFAULT 'any', + "twoside" integer(1) NOT NULL DEFAULT 0, + "binary_upload_max_size_in_mega" integer NOT NULL DEFAULT 8, + "git_token" text, + "last_updated" datetime, + PRIMARY KEY ("id") +); +CREATE UNIQUE INDEX "canonical_unique" ON "site" ("canonical"); +-- +-- Table: "table_comments" +-- +CREATE TABLE "table_comments" ( + "table_name" varchar(255), + "comment_text" text +); +-- +-- Table: "users" +-- +CREATE TABLE "users" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "username" varchar(255) NOT NULL, + "password" varchar(255) NOT NULL, + "email" varchar(255), + "created_by" varchar(255), + "active" integer(1) NOT NULL DEFAULT 1, + "edit_option_preview_box_height" integer NOT NULL DEFAULT 500, + "edit_option_show_filters" integer(1) NOT NULL DEFAULT 1, + "edit_option_show_cheatsheet" integer(1) NOT NULL DEFAULT 1, + "edit_option_page_left_bs_columns" integer DEFAULT 6, + "preferred_language" varchar(8), + "api_access_token" text, + "api_access_created" datetime, + "reset_token" text, + "reset_until" integer +); +CREATE UNIQUE INDEX "username_unique" ON "users" ("username"); +-- +-- Table: "aggregation_series" +-- +CREATE TABLE "aggregation_series" ( + "aggregation_series_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "aggregation_series_uri" varchar(255) NOT NULL, + "aggregation_series_name" varchar(255) NOT NULL, + "publisher" varchar(255), + "publication_place" varchar(255), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "aggregation_series_idx_site_id" ON "aggregation_series" ("site_id"); +CREATE UNIQUE INDEX "aggregation_series_uri_site_id_unique" ON "aggregation_series" ("aggregation_series_uri", "site_id"); +-- +-- Table: "amw_session" +-- +CREATE TABLE "amw_session" ( + "session_id" varchar(255) NOT NULL, + "site_id" varchar(16) NOT NULL, + "expires" integer, + "session_data" blob, + "flash_data" blob, + "generic_data" blob, + PRIMARY KEY ("session_id", "site_id"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "amw_session_idx_site_id" ON "amw_session" ("site_id"); +-- +-- Table: "annotation" +-- +CREATE TABLE "annotation" ( + "annotation_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "annotation_name" varchar(255) NOT NULL, + "annotation_type" varchar(32) NOT NULL, + "label" varchar(255) NOT NULL DEFAULT '', + "priority" integer NOT NULL DEFAULT 0, + "active" integer(1) NOT NULL DEFAULT 1, + "private" integer(1) NOT NULL DEFAULT 0, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "annotation_idx_site_id" ON "annotation" ("site_id"); +CREATE UNIQUE INDEX "site_id_annotation_name_unique" ON "annotation" ("site_id", "annotation_name"); +-- +-- Table: "attachment" +-- +CREATE TABLE "attachment" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "f_path" text NOT NULL, + "f_name" varchar(255) NOT NULL, + "f_archive_rel_path" varchar(32) NOT NULL, + "f_timestamp" datetime NOT NULL, + "f_timestamp_epoch" integer NOT NULL DEFAULT 0, + "f_full_path_name" text NOT NULL, + "f_suffix" varchar(16) NOT NULL, + "f_class" varchar(16) NOT NULL, + "uri" varchar(255) NOT NULL, + "title_muse" text, + "comment_muse" text, + "title_html" text, + "comment_html" text, + "alt_text" text, + "mime_type" varchar(255), + "errors" text, + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "attachment_idx_site_id" ON "attachment" ("site_id"); +CREATE UNIQUE INDEX "uri_site_id_unique" ON "attachment" ("uri", "site_id"); +-- +-- Table: "bookbuilder_profile" +-- +CREATE TABLE "bookbuilder_profile" ( + "bookbuilder_profile_id" INTEGER PRIMARY KEY NOT NULL, + "user_id" integer NOT NULL, + "profile_name" varchar(255) NOT NULL, + "profile_data" text NOT NULL, + FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "bookbuilder_profile_idx_user_id" ON "bookbuilder_profile" ("user_id"); +-- +-- Table: "bookbuilder_session" +-- +CREATE TABLE "bookbuilder_session" ( + "bookbuilder_session_id" INTEGER PRIMARY KEY NOT NULL, + "token" varchar(16) NOT NULL, + "site_id" varchar(16) NOT NULL, + "bb_data" text NOT NULL, + "last_updated" datetime NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "bookbuilder_session_idx_site_id" ON "bookbuilder_session" ("site_id"); +-- +-- Table: "bulk_job" +-- +CREATE TABLE "bulk_job" ( + "bulk_job_id" INTEGER PRIMARY KEY NOT NULL, + "task" varchar(32), + "created" datetime NOT NULL, + "started" datetime, + "completed" datetime, + "site_id" varchar(16) NOT NULL, + "status" varchar(32), + "payload" text, + "produced" varchar(255), + "username" varchar(255), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "bulk_job_idx_site_id" ON "bulk_job" ("site_id"); +-- +-- Table: "category" +-- +CREATE TABLE "category" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "name" text, + "uri" varchar(255) NOT NULL, + "type" varchar(16) NOT NULL, + "sorting_pos" integer NOT NULL DEFAULT 0, + "text_count" integer NOT NULL DEFAULT 0, + "active" smallint NOT NULL DEFAULT 1, + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "category_idx_site_id" ON "category" ("site_id"); +CREATE UNIQUE INDEX "uri_site_id_type_unique" ON "category" ("uri", "site_id", "type"); +-- +-- Table: "custom_formats" +-- +CREATE TABLE "custom_formats" ( + "custom_formats_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "format_name" varchar(255) NOT NULL, + "format_description" text, + "format_alias" varchar(8), + "format_code" varchar(8), + "format_priority" integer NOT NULL DEFAULT 0, + "active" smallint DEFAULT 1, + "bb_format" varchar(16) NOT NULL DEFAULT 'pdf', + "bb_epub_embed_fonts" smallint DEFAULT 1, + "bb_bcor" integer NOT NULL DEFAULT 0, + "bb_beamercolortheme" varchar(32) NOT NULL DEFAULT 'dove', + "bb_beamertheme" varchar(32) NOT NULL DEFAULT 'default', + "bb_cover" smallint DEFAULT 1, + "bb_crop_marks" smallint DEFAULT 0, + "bb_crop_papersize" varchar(32) NOT NULL DEFAULT 'a4', + "bb_crop_paper_height" integer NOT NULL DEFAULT 0, + "bb_crop_paper_width" integer NOT NULL DEFAULT 0, + "bb_crop_paper_thickness" varchar(16) NOT NULL DEFAULT '0.10mm', + "bb_division" integer NOT NULL DEFAULT 12, + "bb_fontsize" integer NOT NULL DEFAULT 10, + "bb_headings" varchar(64) NOT NULL DEFAULT '0', + "bb_imposed" smallint DEFAULT 0, + "bb_mainfont" varchar(255), + "bb_sansfont" varchar(255), + "bb_monofont" varchar(255), + "bb_nocoverpage" smallint DEFAULT 0, + "bb_coverpage_only_if_toc" smallint DEFAULT 0, + "bb_nofinalpage" smallint DEFAULT 0, + "bb_notoc" smallint DEFAULT 0, + "bb_impressum" smallint DEFAULT 0, + "bb_sansfontsections" smallint DEFAULT 0, + "bb_nobold" smallint DEFAULT 0, + "bb_secondary_footnotes_alpha" smallint DEFAULT 0, + "bb_start_with_empty_page" smallint DEFAULT 0, + "bb_continuefootnotes" smallint DEFAULT 0, + "bb_centerchapter" smallint DEFAULT 0, + "bb_centersection" smallint DEFAULT 0, + "bb_opening" varchar(16) NOT NULL DEFAULT 'any', + "bb_papersize" varchar(32) NOT NULL DEFAULT 'generic', + "bb_paper_height" integer NOT NULL DEFAULT 0, + "bb_paper_width" integer NOT NULL DEFAULT 0, + "bb_schema" varchar(64) NOT NULL DEFAULT '2up', + "bb_signature" integer NOT NULL DEFAULT 0, + "bb_signature_2up" varchar(8) NOT NULL DEFAULT '40-80', + "bb_signature_4up" varchar(8) NOT NULL DEFAULT '40-80', + "bb_twoside" smallint DEFAULT 0, + "bb_unbranded" smallint DEFAULT 0, + "bb_areaset_height" integer NOT NULL DEFAULT 0, + "bb_areaset_width" integer NOT NULL DEFAULT 0, + "bb_geometry_top_margin" integer NOT NULL DEFAULT 0, + "bb_geometry_outer_margin" integer NOT NULL DEFAULT 0, + "bb_fussy_last_word" smallint DEFAULT 0, + "bb_tex_emergencystretch" integer NOT NULL DEFAULT 30, + "bb_tex_tolerance" integer NOT NULL DEFAULT 200, + "bb_ignore_cover" smallint DEFAULT 0, + "bb_linespacing" integer NOT NULL DEFAULT 0, + "bb_parindent" integer NOT NULL DEFAULT 15, + "bb_body_only" smallint DEFAULT 0, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "custom_formats_idx_site_id" ON "custom_formats" ("site_id"); +CREATE UNIQUE INDEX "site_id_format_alias_unique" ON "custom_formats" ("site_id", "format_alias"); +CREATE UNIQUE INDEX "site_id_format_code_unique" ON "custom_formats" ("site_id", "format_code"); +-- +-- Table: "include_path" +-- +CREATE TABLE "include_path" ( + "include_path_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "directory" text, + "sorting_pos" integer NOT NULL DEFAULT 0, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "include_path_idx_site_id" ON "include_path" ("site_id"); +-- +-- Table: "legacy_link" +-- +CREATE TABLE "legacy_link" ( + "site_id" varchar(16) NOT NULL, + "legacy_path" varchar(255) NOT NULL, + "new_path" varchar(255) NOT NULL, + PRIMARY KEY ("site_id", "legacy_path"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "legacy_link_idx_site_id" ON "legacy_link" ("site_id"); +-- +-- Table: "mirror_origin" +-- +CREATE TABLE "mirror_origin" ( + "mirror_origin_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "remote_domain" varchar(255) NOT NULL, + "remote_path" varchar(255) NOT NULL, + "active" integer(1) NOT NULL DEFAULT 0, + "status_message" text, + "last_downloaded" datetime, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "mirror_origin_idx_site_id" ON "mirror_origin" ("site_id"); +-- +-- Table: "monthly_archive" +-- +CREATE TABLE "monthly_archive" ( + "monthly_archive_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "month" integer(2) NOT NULL, + "year" integer(4) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "monthly_archive_idx_site_id" ON "monthly_archive" ("site_id"); +CREATE UNIQUE INDEX "site_id_month_year_unique" ON "monthly_archive" ("site_id", "month", "year"); +-- +-- Table: "node" +-- +CREATE TABLE "node" ( + "node_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "uri" varchar(255) NOT NULL, + "canonical_title" varchar(255) NOT NULL DEFAULT '', + "last_updated_epoch" integer NOT NULL DEFAULT 0, + "last_updated_dt" datetime, + "sorting_pos" integer NOT NULL DEFAULT 0, + "full_path" text, + "parent_node_id" integer, + FOREIGN KEY ("parent_node_id") REFERENCES "node"("node_id") ON DELETE SET NULL ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_idx_parent_node_id" ON "node" ("parent_node_id"); +CREATE INDEX "node_idx_site_id" ON "node" ("site_id"); +CREATE UNIQUE INDEX "site_id_uri_unique" ON "node" ("site_id", "uri"); +-- +-- Table: "oai_pmh_set" +-- +CREATE TABLE "oai_pmh_set" ( + "oai_pmh_set_id" INTEGER PRIMARY KEY NOT NULL, + "set_spec" varchar(255) NOT NULL, + "site_id" varchar(16) NOT NULL, + "set_name" text, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "oai_pmh_set_idx_site_id" ON "oai_pmh_set" ("site_id"); +CREATE UNIQUE INDEX "set_spec_site_id_unique" ON "oai_pmh_set" ("set_spec", "site_id"); +-- +-- Table: "redirection" +-- +CREATE TABLE "redirection" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "uri" varchar(255) NOT NULL, + "type" varchar(16) NOT NULL, + "redirect" varchar(255) NOT NULL, + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "redirection_idx_site_id" ON "redirection" ("site_id"); +CREATE UNIQUE INDEX "uri_type_site_id_unique" ON "redirection" ("uri", "type", "site_id"); +-- +-- Table: "site_category_type" +-- +CREATE TABLE "site_category_type" ( + "site_id" varchar(16) NOT NULL, + "category_type" varchar(16) NOT NULL, + "active" smallint NOT NULL DEFAULT 1, + "priority" integer NOT NULL DEFAULT 0, + "name_singular" varchar(255) NOT NULL, + "name_plural" varchar(255) NOT NULL, + "generate_index" smallint NOT NULL DEFAULT 1, + "in_colophon" smallint NOT NULL DEFAULT 0, + "xapian_custom_slot" smallint, + "description" text, + PRIMARY KEY ("site_id", "category_type"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "site_category_type_idx_site_id" ON "site_category_type" ("site_id"); +-- +-- Table: "site_link" +-- +CREATE TABLE "site_link" ( + "url" varchar(255) NOT NULL, + "label" varchar(255) NOT NULL, + "sorting_pos" integer NOT NULL DEFAULT 0, + "menu" varchar(32) NOT NULL DEFAULT 'specials', + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "site_link_idx_site_id" ON "site_link" ("site_id"); +-- +-- Table: "site_options" +-- +CREATE TABLE "site_options" ( + "site_id" varchar(16) NOT NULL, + "option_name" varchar(64) NOT NULL, + "option_value" text, + PRIMARY KEY ("site_id", "option_name"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "site_options_idx_site_id" ON "site_options" ("site_id"); +-- +-- Table: "title" +-- +CREATE TABLE "title" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "title" text, + "subtitle" text, + "lang" varchar(3) NOT NULL DEFAULT 'en', + "date" text, + "datefirst" text, + "notes" text, + "source" text, + "list_title" text, + "author" text, + "uid" varchar(255) NOT NULL DEFAULT '', + "attach" text, + "pubdate" datetime NOT NULL, + "status" varchar(16) NOT NULL DEFAULT 'unpublished', + "parent" varchar(255), + "publisher" text, + "isbn" text, + "rights" text, + "seriesname" text, + "seriesnumber" text, + "f_path" text NOT NULL, + "f_name" varchar(255) NOT NULL, + "f_archive_rel_path" varchar(32) NOT NULL, + "f_timestamp" datetime NOT NULL, + "f_timestamp_epoch" integer NOT NULL DEFAULT 0, + "f_full_path_name" text NOT NULL, + "f_suffix" varchar(16) NOT NULL, + "f_class" varchar(16) NOT NULL, + "uri" varchar(255) NOT NULL, + "deleted" text, + "slides" integer(1) NOT NULL DEFAULT 0, + "text_structure" text, + "cover" varchar(255) NOT NULL DEFAULT '', + "teaser" text, + "sorting_pos" integer NOT NULL DEFAULT 0, + "sku" varchar(64) NOT NULL DEFAULT '', + "text_qualification" varchar(32), + "text_size" integer NOT NULL DEFAULT 0, + "attachment_index" integer NOT NULL DEFAULT 0, + "blob_container" integer(1) NOT NULL DEFAULT 0, + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "title_idx_site_id" ON "title" ("site_id"); +CREATE UNIQUE INDEX "uri_f_class_site_id_unique" ON "title" ("uri", "f_class", "site_id"); +-- +-- Table: "vhost" +-- +CREATE TABLE "vhost" ( + "name" varchar(255) NOT NULL, + "site_id" varchar(16) NOT NULL, + PRIMARY KEY ("name"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "vhost_idx_site_id" ON "vhost" ("site_id"); +-- +-- Table: "whitelist_ip" +-- +CREATE TABLE "whitelist_ip" ( + "site_id" varchar(16) NOT NULL, + "ip" varchar(64) NOT NULL, + "user_editable" smallint NOT NULL DEFAULT 0, + "granted_by_username" varchar(255), + "expire_epoch" integer, + PRIMARY KEY ("site_id", "ip"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "whitelist_ip_idx_site_id" ON "whitelist_ip" ("site_id"); +CREATE INDEX "whitelist_ip_ip_amw_index" ON "whitelist_ip" ("ip"); +-- +-- Table: "aggregation" +-- +CREATE TABLE "aggregation" ( + "aggregation_id" INTEGER PRIMARY KEY NOT NULL, + "aggregation_series_id" integer, + "aggregation_uri" varchar(255) NOT NULL, + "aggregation_name" varchar(255), + "publication_date" varchar(255), + "publication_date_year" integer, + "publication_date_month" integer, + "publication_date_day" integer, + "issue" varchar(255), + "sorting_pos" integer NOT NULL DEFAULT 0, + "publication_place" varchar(255), + "publisher" varchar(255), + "isbn" varchar(32), + "site_id" varchar(16) NOT NULL, + FOREIGN KEY ("aggregation_series_id") REFERENCES "aggregation_series"("aggregation_series_id") ON DELETE SET NULL ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "aggregation_idx_aggregation_series_id" ON "aggregation" ("aggregation_series_id"); +CREATE INDEX "aggregation_idx_site_id" ON "aggregation" ("site_id"); +CREATE INDEX "aggregation_uri_amw_index" ON "aggregation" ("aggregation_uri"); +CREATE UNIQUE INDEX "aggregation_uri_site_id_unique" ON "aggregation" ("aggregation_uri", "site_id"); +-- +-- Table: "bookcover" +-- +CREATE TABLE "bookcover" ( + "bookcover_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "title" varchar(255) NOT NULL DEFAULT '', + "coverheight" integer NOT NULL DEFAULT 210, + "coverwidth" integer NOT NULL DEFAULT 148, + "spinewidth" integer NOT NULL DEFAULT 0, + "flapwidth" integer NOT NULL DEFAULT 0, + "wrapwidth" integer NOT NULL DEFAULT 0, + "bleedwidth" integer NOT NULL DEFAULT 10, + "marklength" integer NOT NULL DEFAULT 5, + "foldingmargin" smallint NOT NULL DEFAULT 0, + "created" datetime NOT NULL, + "compiled" datetime, + "zip_path" varchar(255), + "pdf_path" varchar(255), + "template" varchar(64), + "font_name" varchar(255), + "language_code" varchar(8), + "comments" text, + "session_id" varchar(255), + "user_id" integer, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "bookcover_idx_site_id" ON "bookcover" ("site_id"); +CREATE INDEX "bookcover_idx_user_id" ON "bookcover" ("user_id"); +-- +-- Table: "category_description" +-- +CREATE TABLE "category_description" ( + "category_description_id" INTEGER PRIMARY KEY NOT NULL, + "muse_body" text, + "html_body" text, + "lang" varchar(3) NOT NULL DEFAULT 'en', + "last_modified_by" varchar(255), + "category_id" integer NOT NULL, + FOREIGN KEY ("category_id") REFERENCES "category"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "category_description_idx_category_id" ON "category_description" ("category_id"); +CREATE UNIQUE INDEX "category_id_lang_unique" ON "category_description" ("category_id", "lang"); +-- +-- Table: "global_site_files" +-- +CREATE TABLE "global_site_files" ( + "site_id" varchar(16) NOT NULL, + "attachment_id" integer, + "file_name" varchar(255) NOT NULL, + "file_type" varchar(255) NOT NULL, + "file_path" text NOT NULL, + "image_width" integer, + "image_height" integer, + PRIMARY KEY ("site_id", "file_name", "file_type"), + FOREIGN KEY ("attachment_id") REFERENCES "attachment"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "global_site_files_idx_attachment_id" ON "global_site_files" ("attachment_id"); +CREATE INDEX "global_site_files_idx_site_id" ON "global_site_files" ("site_id"); +-- +-- Table: "included_file" +-- +CREATE TABLE "included_file" ( + "included_file_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "title_id" integer NOT NULL, + "file_path" text NOT NULL, + "file_timestamp" datetime, + "file_epoch" integer, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "included_file_idx_site_id" ON "included_file" ("site_id"); +CREATE INDEX "included_file_idx_title_id" ON "included_file" ("title_id"); +-- +-- Table: "job" +-- +CREATE TABLE "job" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "bulk_job_id" integer, + "task" varchar(32), + "payload" text, + "status" varchar(32), + "created" datetime NOT NULL, + "started" datetime, + "completed" datetime, + "priority" integer NOT NULL DEFAULT 10, + "produced" varchar(255), + "username" varchar(255), + "errors" text, + FOREIGN KEY ("bulk_job_id") REFERENCES "bulk_job"("bulk_job_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "job_idx_bulk_job_id" ON "job" ("bulk_job_id"); +CREATE INDEX "job_idx_site_id" ON "job" ("site_id"); +CREATE INDEX "job_status_index" ON "job" ("status"); +-- +-- Table: "muse_header" +-- +CREATE TABLE "muse_header" ( + "title_id" integer NOT NULL, + "muse_header" varchar(255) NOT NULL, + "muse_value" text, + "muse_value_html" text, + PRIMARY KEY ("title_id", "muse_header"), + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "muse_header_idx_title_id" ON "muse_header" ("title_id"); +-- +-- Table: "node_body" +-- +CREATE TABLE "node_body" ( + "node_id" integer NOT NULL, + "lang" varchar(3) NOT NULL DEFAULT 'en', + "title_muse" text, + "title_html" text, + "body_muse" text, + "body_html" text, + PRIMARY KEY ("node_id", "lang"), + FOREIGN KEY ("node_id") REFERENCES "node"("node_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_body_idx_node_id" ON "node_body" ("node_id"); +-- +-- Table: "revision" +-- +CREATE TABLE "revision" ( + "id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "title_id" integer NOT NULL, + "f_full_path_name" text, + "message" text, + "status" varchar(16) NOT NULL DEFAULT 'editing', + "session_id" varchar(255), + "username" varchar(255), + "updated" datetime NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "revision_idx_site_id" ON "revision" ("site_id"); +CREATE INDEX "revision_idx_title_id" ON "revision" ("title_id"); +-- +-- Table: "text_internal_link" +-- +CREATE TABLE "text_internal_link" ( + "title_id" integer NOT NULL, + "site_id" varchar(16) NOT NULL, + "f_class" varchar(255) NOT NULL, + "uri" varchar(255) NOT NULL, + "full_link" text NOT NULL, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "text_internal_link_idx_site_id" ON "text_internal_link" ("site_id"); +CREATE INDEX "text_internal_link_idx_title_id" ON "text_internal_link" ("title_id"); +-- +-- Table: "text_part" +-- +CREATE TABLE "text_part" ( + "title_id" integer NOT NULL, + "part_index" varchar(16) NOT NULL, + "part_level" integer NOT NULL, + "part_title" text NOT NULL, + "part_size" integer NOT NULL, + "toc_index" integer NOT NULL, + "part_order" integer NOT NULL, + PRIMARY KEY ("title_id", "part_index"), + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "text_part_idx_title_id" ON "text_part" ("title_id"); +-- +-- Table: "title_stat" +-- +CREATE TABLE "title_stat" ( + "title_stat_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "title_id" integer NOT NULL, + "accessed" datetime NOT NULL, + "user_agent" text, + "type" text, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "title_stat_idx_site_id" ON "title_stat" ("site_id"); +CREATE INDEX "title_stat_idx_title_id" ON "title_stat" ("title_id"); +-- +-- Table: "user_role" +-- +CREATE TABLE "user_role" ( + "user_id" integer NOT NULL, + "role_id" integer NOT NULL, + PRIMARY KEY ("user_id", "role_id"), + FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "user_role_idx_role_id" ON "user_role" ("role_id"); +CREATE INDEX "user_role_idx_user_id" ON "user_role" ("user_id"); +-- +-- Table: "user_site" +-- +CREATE TABLE "user_site" ( + "user_id" integer NOT NULL, + "site_id" varchar(16) NOT NULL, + PRIMARY KEY ("user_id", "site_id"), + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "user_site_idx_site_id" ON "user_site" ("site_id"); +CREATE INDEX "user_site_idx_user_id" ON "user_site" ("user_id"); +-- +-- Table: "aggregation_title" +-- +CREATE TABLE "aggregation_title" ( + "aggregation_id" integer NOT NULL, + "title_uri" varchar(255) NOT NULL, + "sorting_pos" integer NOT NULL DEFAULT 0, + PRIMARY KEY ("aggregation_id", "title_uri"), + FOREIGN KEY ("aggregation_id") REFERENCES "aggregation"("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "aggregation_title_idx_aggregation_id" ON "aggregation_title" ("aggregation_id"); +CREATE INDEX "aggregation_title_uri_amw_index" ON "aggregation_title" ("title_uri"); +-- +-- Table: "bookcover_token" +-- +CREATE TABLE "bookcover_token" ( + "bookcover_id" integer NOT NULL, + "token_name" varchar(255) NOT NULL, + "token_value" text, + PRIMARY KEY ("bookcover_id", "token_name"), + FOREIGN KEY ("bookcover_id") REFERENCES "bookcover"("bookcover_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "bookcover_token_idx_bookcover_id" ON "bookcover_token" ("bookcover_id"); +CREATE INDEX "bookcover_token_name_amw_index" ON "bookcover_token" ("token_name"); +-- +-- Table: "job_file" +-- +CREATE TABLE "job_file" ( + "filename" varchar(255) NOT NULL, + "slot" varchar(255) NOT NULL DEFAULT '', + "job_id" integer NOT NULL, + PRIMARY KEY ("filename"), + FOREIGN KEY ("job_id") REFERENCES "job"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "job_file_idx_job_id" ON "job_file" ("job_id"); +-- +-- Table: "node_aggregation_series" +-- +CREATE TABLE "node_aggregation_series" ( + "node_id" integer NOT NULL, + "aggregation_series_id" integer NOT NULL, + PRIMARY KEY ("node_id", "aggregation_series_id"), + FOREIGN KEY ("aggregation_series_id") REFERENCES "aggregation_series"("aggregation_series_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("node_id") REFERENCES "node"("node_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_aggregation_series_idx_aggregation_series_id" ON "node_aggregation_series" ("aggregation_series_id"); +CREATE INDEX "node_aggregation_series_idx_node_id" ON "node_aggregation_series" ("node_id"); +-- +-- Table: "node_category" +-- +CREATE TABLE "node_category" ( + "node_id" integer NOT NULL, + "category_id" integer NOT NULL, + PRIMARY KEY ("node_id", "category_id"), + FOREIGN KEY ("category_id") REFERENCES "category"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("node_id") REFERENCES "node"("node_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_category_idx_category_id" ON "node_category" ("category_id"); +CREATE INDEX "node_category_idx_node_id" ON "node_category" ("node_id"); +-- +-- Table: "node_title" +-- +CREATE TABLE "node_title" ( + "node_id" integer NOT NULL, + "title_id" integer NOT NULL, + PRIMARY KEY ("node_id", "title_id"), + FOREIGN KEY ("node_id") REFERENCES "node"("node_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_title_idx_node_id" ON "node_title" ("node_id"); +CREATE INDEX "node_title_idx_title_id" ON "node_title" ("title_id"); +-- +-- Table: "text_month" +-- +CREATE TABLE "text_month" ( + "title_id" integer NOT NULL, + "monthly_archive_id" integer NOT NULL, + PRIMARY KEY ("title_id", "monthly_archive_id"), + FOREIGN KEY ("monthly_archive_id") REFERENCES "monthly_archive"("monthly_archive_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "text_month_idx_monthly_archive_id" ON "text_month" ("monthly_archive_id"); +CREATE INDEX "text_month_idx_title_id" ON "text_month" ("title_id"); +-- +-- Table: "title_annotation" +-- +CREATE TABLE "title_annotation" ( + "annotation_id" integer NOT NULL, + "title_id" integer NOT NULL, + "annotation_value" text, + PRIMARY KEY ("annotation_id", "title_id"), + FOREIGN KEY ("annotation_id") REFERENCES "annotation"("annotation_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "title_annotation_idx_annotation_id" ON "title_annotation" ("annotation_id"); +CREATE INDEX "title_annotation_idx_title_id" ON "title_annotation" ("title_id"); +-- +-- Table: "title_attachment" +-- +CREATE TABLE "title_attachment" ( + "title_id" integer NOT NULL, + "attachment_id" integer NOT NULL, + PRIMARY KEY ("title_id", "attachment_id"), + FOREIGN KEY ("attachment_id") REFERENCES "attachment"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "title_attachment_idx_attachment_id" ON "title_attachment" ("attachment_id"); +CREATE INDEX "title_attachment_idx_title_id" ON "title_attachment" ("title_id"); +-- +-- Table: "title_category" +-- +CREATE TABLE "title_category" ( + "title_id" integer NOT NULL, + "category_id" integer NOT NULL, + PRIMARY KEY ("title_id", "category_id"), + FOREIGN KEY ("category_id") REFERENCES "category"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "title_category_idx_category_id" ON "title_category" ("category_id"); +CREATE INDEX "title_category_idx_title_id" ON "title_category" ("title_id"); +-- +-- Table: "aggregation_annotation" +-- +CREATE TABLE "aggregation_annotation" ( + "annotation_id" integer NOT NULL, + "aggregation_id" integer NOT NULL, + "annotation_value" text, + PRIMARY KEY ("annotation_id", "aggregation_id"), + FOREIGN KEY ("aggregation_id") REFERENCES "aggregation"("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("annotation_id") REFERENCES "annotation"("annotation_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "aggregation_annotation_idx_aggregation_id" ON "aggregation_annotation" ("aggregation_id"); +CREATE INDEX "aggregation_annotation_idx_annotation_id" ON "aggregation_annotation" ("annotation_id"); +-- +-- Table: "mirror_info" +-- +CREATE TABLE "mirror_info" ( + "mirror_info_id" INTEGER PRIMARY KEY NOT NULL, + "title_id" integer, + "attachment_id" integer, + "mirror_origin_id" integer, + "site_id" varchar(16) NOT NULL, + "checksum" varchar(128), + "download_source" text, + "download_destination" text, + "mirror_exception" varchar(32) NOT NULL DEFAULT '', + "last_updated" datetime, + FOREIGN KEY ("attachment_id") REFERENCES "attachment"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("mirror_origin_id") REFERENCES "mirror_origin"("mirror_origin_id") ON DELETE SET NULL ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "mirror_info_idx_attachment_id" ON "mirror_info" ("attachment_id"); +CREATE INDEX "mirror_info_idx_mirror_origin_id" ON "mirror_info" ("mirror_origin_id"); +CREATE INDEX "mirror_info_idx_site_id" ON "mirror_info" ("site_id"); +CREATE INDEX "mirror_info_idx_title_id" ON "mirror_info" ("title_id"); +CREATE UNIQUE INDEX "attachment_id_unique" ON "mirror_info" ("attachment_id"); +CREATE UNIQUE INDEX "title_id_unique" ON "mirror_info" ("title_id"); +-- +-- Table: "node_aggregation" +-- +CREATE TABLE "node_aggregation" ( + "node_id" integer NOT NULL, + "aggregation_id" integer NOT NULL, + PRIMARY KEY ("node_id", "aggregation_id"), + FOREIGN KEY ("aggregation_id") REFERENCES "aggregation"("aggregation_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("node_id") REFERENCES "node"("node_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "node_aggregation_idx_aggregation_id" ON "node_aggregation" ("aggregation_id"); +CREATE INDEX "node_aggregation_idx_node_id" ON "node_aggregation" ("node_id"); +-- +-- Table: "oai_pmh_record" +-- +CREATE TABLE "oai_pmh_record" ( + "oai_pmh_record_id" INTEGER PRIMARY KEY NOT NULL, + "identifier" varchar(255) NOT NULL, + "datestamp" datetime NOT NULL, + "site_id" varchar(16) NOT NULL, + "title_id" integer, + "attachment_id" integer, + "custom_formats_id" integer, + "metadata_type" varchar(32), + "metadata_format" varchar(32), + "metadata_format_description" varchar(255), + "deleted" integer(1) NOT NULL DEFAULT 0, + "update_run" integer NOT NULL DEFAULT 0, + FOREIGN KEY ("attachment_id") REFERENCES "attachment"("id") ON DELETE SET NULL ON UPDATE CASCADE, + FOREIGN KEY ("custom_formats_id") REFERENCES "custom_formats"("custom_formats_id") ON DELETE SET NULL ON UPDATE CASCADE, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("title_id") REFERENCES "title"("id") ON DELETE SET NULL ON UPDATE CASCADE +); +CREATE INDEX "oai_pmh_record_idx_attachment_id" ON "oai_pmh_record" ("attachment_id"); +CREATE INDEX "oai_pmh_record_idx_custom_formats_id" ON "oai_pmh_record" ("custom_formats_id"); +CREATE INDEX "oai_pmh_record_idx_site_id" ON "oai_pmh_record" ("site_id"); +CREATE INDEX "oai_pmh_record_idx_title_id" ON "oai_pmh_record" ("title_id"); +CREATE UNIQUE INDEX "identifier_site_id_unique" ON "oai_pmh_record" ("identifier", "site_id"); +-- +-- Table: "oai_pmh_record_set" +-- +CREATE TABLE "oai_pmh_record_set" ( + "oai_pmh_record_id" integer NOT NULL, + "oai_pmh_set_id" integer NOT NULL, + PRIMARY KEY ("oai_pmh_record_id", "oai_pmh_set_id"), + FOREIGN KEY ("oai_pmh_record_id") REFERENCES "oai_pmh_record"("oai_pmh_record_id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("oai_pmh_set_id") REFERENCES "oai_pmh_set"("oai_pmh_set_id") ON DELETE CASCADE ON UPDATE CASCADE +); +CREATE INDEX "oai_pmh_record_set_idx_oai_pmh_record_id" ON "oai_pmh_record_set" ("oai_pmh_record_id"); +CREATE INDEX "oai_pmh_record_set_idx_oai_pmh_set_id" ON "oai_pmh_record_set" ("oai_pmh_set_id"); +COMMIT; diff --git a/dbicdh/SQLite/upgrade/83-84/001-auto.sql b/dbicdh/SQLite/upgrade/83-84/001-auto.sql new file mode 100644 index 000000000..6d0823def --- /dev/null +++ b/dbicdh/SQLite/upgrade/83-84/001-auto.sql @@ -0,0 +1,57 @@ +-- Convert schema '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/83/001-auto.yml' to '/home/marco/amw/AmuseWikiFarm/dbicdh/_source/deploy/84/001-auto.yml':; + +; +BEGIN; + +; +CREATE TABLE "bookcover" ( + "bookcover_id" INTEGER PRIMARY KEY NOT NULL, + "site_id" varchar(16) NOT NULL, + "title" varchar(255) NOT NULL DEFAULT '', + "coverheight" integer NOT NULL DEFAULT 210, + "coverwidth" integer NOT NULL DEFAULT 148, + "spinewidth" integer NOT NULL DEFAULT 0, + "flapwidth" integer NOT NULL DEFAULT 0, + "wrapwidth" integer NOT NULL DEFAULT 0, + "bleedwidth" integer NOT NULL DEFAULT 10, + "marklength" integer NOT NULL DEFAULT 5, + "foldingmargin" smallint NOT NULL DEFAULT 0, + "created" datetime NOT NULL, + "compiled" datetime, + "zip_path" varchar(255), + "pdf_path" varchar(255), + "template" varchar(64), + "font_name" varchar(255), + "language_code" varchar(8), + "comments" text, + "session_id" varchar(255), + "user_id" integer, + FOREIGN KEY ("site_id") REFERENCES "site"("id") ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +; +CREATE INDEX "bookcover_idx_site_id" ON "bookcover" ("site_id"); + +; +CREATE INDEX "bookcover_idx_user_id" ON "bookcover" ("user_id"); + +; +CREATE TABLE "bookcover_token" ( + "bookcover_id" integer NOT NULL, + "token_name" varchar(255) NOT NULL, + "token_value" text, + PRIMARY KEY ("bookcover_id", "token_name"), + FOREIGN KEY ("bookcover_id") REFERENCES "bookcover"("bookcover_id") ON DELETE CASCADE ON UPDATE CASCADE +); + +; +CREATE INDEX "bookcover_token_idx_bookcover_id" ON "bookcover_token" ("bookcover_id"); + +; +CREATE INDEX "bookcover_token_name_amw_index" ON "bookcover_token" ("token_name"); + +; + +COMMIT; + diff --git a/dbicdh/_source/deploy/84/001-auto-__VERSION.yml b/dbicdh/_source/deploy/84/001-auto-__VERSION.yml new file mode 100644 index 000000000..487f2d77b --- /dev/null +++ b/dbicdh/_source/deploy/84/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/dbicdh/_source/deploy/84/001-auto.yml b/dbicdh/_source/deploy/84/001-auto.yml new file mode 100644 index 000000000..5845e05e1 --- /dev/null +++ b/dbicdh/_source/deploy/84/001-auto.yml @@ -0,0 +1,7425 @@ +--- +schema: + procedures: {} + tables: + aggregation: + constraints: + - deferrable: 1 + expression: '' + fields: + - aggregation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - aggregation_uri + - site_id + match_type: '' + name: aggregation_uri_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - aggregation_series_id + match_type: '' + name: aggregation_fk_aggregation_series_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - aggregation_series_id + reference_table: aggregation_series + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: aggregation_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + aggregation_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_id + order: 1 + size: + - 0 + aggregation_name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: aggregation_name + order: 4 + size: + - 255 + aggregation_series_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: aggregation_series_id + order: 2 + size: + - 0 + aggregation_uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: aggregation_uri + order: 3 + size: + - 255 + isbn: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: isbn + order: 13 + size: + - 32 + issue: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: issue + order: 9 + size: + - 255 + publication_date: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_date + order: 5 + size: + - 255 + publication_date_day: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_date_day + order: 8 + size: + - 0 + publication_date_month: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_date_month + order: 7 + size: + - 0 + publication_date_year: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_date_year + order: 6 + size: + - 0 + publication_place: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_place + order: 11 + size: + - 255 + publisher: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publisher + order: 12 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 14 + size: + - 16 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 10 + size: + - 0 + indices: + - fields: + - aggregation_series_id + name: aggregation_idx_aggregation_series_id + options: [] + type: NORMAL + - fields: + - site_id + name: aggregation_idx_site_id + options: [] + type: NORMAL + - fields: + - aggregation_uri + name: aggregation_uri_amw_index + options: [] + type: NORMAL + name: aggregation + options: [] + order: 28 + aggregation_annotation: + constraints: + - deferrable: 1 + expression: '' + fields: + - annotation_id + - aggregation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - aggregation_id + match_type: '' + name: aggregation_annotation_fk_aggregation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - aggregation_id + reference_table: aggregation + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - annotation_id + match_type: '' + name: aggregation_annotation_fk_annotation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - annotation_id + reference_table: annotation + type: FOREIGN KEY + fields: + aggregation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_id + order: 2 + size: + - 0 + annotation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: annotation_id + order: 1 + size: + - 0 + annotation_value: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: annotation_value + order: 3 + size: + - 0 + indices: + - fields: + - aggregation_id + name: aggregation_annotation_idx_aggregation_id + options: [] + type: NORMAL + - fields: + - annotation_id + name: aggregation_annotation_idx_annotation_id + options: [] + type: NORMAL + name: aggregation_annotation + options: [] + order: 52 + aggregation_series: + constraints: + - deferrable: 1 + expression: '' + fields: + - aggregation_series_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - aggregation_series_uri + - site_id + match_type: '' + name: aggregation_series_uri_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: aggregation_series_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + aggregation_series_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_series_id + order: 1 + size: + - 0 + aggregation_series_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: aggregation_series_name + order: 4 + size: + - 255 + aggregation_series_uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: aggregation_series_uri + order: 3 + size: + - 255 + publication_place: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publication_place + order: 6 + size: + - 255 + publisher: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publisher + order: 5 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: aggregation_series_idx_site_id + options: [] + type: NORMAL + name: aggregation_series + options: [] + order: 6 + aggregation_title: + constraints: + - deferrable: 1 + expression: '' + fields: + - aggregation_id + - title_uri + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - aggregation_id + match_type: '' + name: aggregation_title_fk_aggregation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - aggregation_id + reference_table: aggregation + type: FOREIGN KEY + fields: + aggregation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_id + order: 1 + size: + - 0 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 3 + size: + - 0 + title_uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_uri + order: 2 + size: + - 255 + indices: + - fields: + - aggregation_id + name: aggregation_title_idx_aggregation_id + options: [] + type: NORMAL + - fields: + - title_uri + name: aggregation_title_uri_amw_index + options: [] + type: NORMAL + name: aggregation_title + options: [] + order: 42 + amw_session: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - session_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: amw_session_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + expires: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: expires + order: 3 + size: + - 0 + flash_data: + data_type: blob + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: flash_data + order: 5 + size: + - 0 + generic_data: + data_type: blob + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: generic_data + order: 6 + size: + - 0 + session_data: + data_type: blob + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: session_data + order: 4 + size: + - 0 + session_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: session_id + order: 1 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: amw_session_idx_site_id + options: [] + type: NORMAL + name: amw_session + options: [] + order: 7 + annotation: + constraints: + - deferrable: 1 + expression: '' + fields: + - annotation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - site_id + - annotation_name + match_type: '' + name: site_id_annotation_name_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: annotation_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + active: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 7 + size: + - 1 + annotation_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: annotation_id + order: 1 + size: + - 0 + annotation_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: annotation_name + order: 3 + size: + - 255 + annotation_type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: annotation_type + order: 4 + size: + - 32 + label: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: label + order: 5 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 6 + size: + - 0 + private: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: private + order: 8 + size: + - 1 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: annotation_idx_site_id + options: [] + type: NORMAL + name: annotation + options: [] + order: 8 + attachment: + 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: + - uri + - site_id + match_type: '' + name: uri_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: attachment_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + alt_text: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: alt_text + order: 15 + size: + - 0 + comment_html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: comment_html + order: 14 + size: + - 0 + comment_muse: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: comment_muse + order: 12 + size: + - 0 + errors: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: errors + order: 17 + size: + - 0 + f_archive_rel_path: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_archive_rel_path + order: 4 + size: + - 32 + f_class: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_class + order: 9 + size: + - 16 + f_full_path_name: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_full_path_name + order: 7 + size: + - 0 + f_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_name + order: 3 + size: + - 255 + f_path: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_path + order: 2 + size: + - 0 + f_suffix: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_suffix + order: 8 + size: + - 16 + f_timestamp: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_timestamp + order: 5 + size: + - 0 + f_timestamp_epoch: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_timestamp_epoch + order: 6 + 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 + mime_type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: mime_type + order: 16 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 18 + size: + - 16 + title_html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title_html + order: 13 + size: + - 0 + title_muse: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title_muse + order: 11 + size: + - 0 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 10 + size: + - 255 + indices: + - fields: + - site_id + name: attachment_idx_site_id + options: [] + type: NORMAL + name: attachment + options: [] + order: 9 + bookbuilder_profile: + constraints: + - deferrable: 1 + expression: '' + fields: + - bookbuilder_profile_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - user_id + match_type: '' + name: bookbuilder_profile_fk_user_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: users + type: FOREIGN KEY + fields: + bookbuilder_profile_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: bookbuilder_profile_id + order: 1 + size: + - 0 + profile_data: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: profile_data + order: 4 + size: + - 0 + profile_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: profile_name + order: 3 + size: + - 255 + user_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user_id + order: 2 + size: + - 0 + indices: + - fields: + - user_id + name: bookbuilder_profile_idx_user_id + options: [] + type: NORMAL + name: bookbuilder_profile + options: [] + order: 10 + bookbuilder_session: + constraints: + - deferrable: 1 + expression: '' + fields: + - bookbuilder_session_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: bookbuilder_session_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + bb_data: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_data + order: 4 + size: + - 0 + bookbuilder_session_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: bookbuilder_session_id + order: 1 + size: + - 0 + last_updated: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_updated + order: 5 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 3 + size: + - 16 + token: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: token + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: bookbuilder_session_idx_site_id + options: [] + type: NORMAL + name: bookbuilder_session + options: [] + order: 11 + bookcover: + constraints: + - deferrable: 1 + expression: '' + fields: + - bookcover_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: bookcover_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - user_id + match_type: '' + name: bookcover_fk_user_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: users + type: FOREIGN KEY + fields: + bleedwidth: + data_type: integer + default_value: 10 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bleedwidth + order: 9 + size: + - 0 + bookcover_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: bookcover_id + order: 1 + size: + - 0 + comments: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: comments + order: 19 + size: + - 0 + compiled: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: compiled + order: 13 + size: + - 0 + coverheight: + data_type: integer + default_value: 210 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: coverheight + order: 4 + size: + - 0 + coverwidth: + data_type: integer + default_value: 148 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: coverwidth + order: 5 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 12 + size: + - 0 + flapwidth: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: flapwidth + order: 7 + size: + - 0 + foldingmargin: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: foldingmargin + order: 11 + size: + - 0 + font_name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: font_name + order: 17 + size: + - 255 + language_code: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: language_code + order: 18 + size: + - 8 + marklength: + data_type: integer + default_value: 5 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: marklength + order: 10 + size: + - 0 + pdf_path: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: pdf_path + order: 15 + size: + - 255 + session_id: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: session_id + order: 20 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + spinewidth: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: spinewidth + order: 6 + size: + - 0 + template: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: template + order: 16 + size: + - 64 + title: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title + order: 3 + size: + - 255 + user_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user_id + order: 21 + size: + - 0 + wrapwidth: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: wrapwidth + order: 8 + size: + - 0 + zip_path: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: zip_path + order: 14 + size: + - 255 + indices: + - fields: + - site_id + name: bookcover_idx_site_id + options: [] + type: NORMAL + - fields: + - user_id + name: bookcover_idx_user_id + options: [] + type: NORMAL + name: bookcover + options: [] + order: 29 + bookcover_token: + constraints: + - deferrable: 1 + expression: '' + fields: + - bookcover_id + - token_name + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - bookcover_id + match_type: '' + name: bookcover_token_fk_bookcover_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - bookcover_id + reference_table: bookcover + type: FOREIGN KEY + fields: + bookcover_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: bookcover_id + order: 1 + size: + - 0 + token_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: token_name + order: 2 + size: + - 255 + token_value: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: token_value + order: 3 + size: + - 0 + indices: + - fields: + - bookcover_id + name: bookcover_token_idx_bookcover_id + options: [] + type: NORMAL + - fields: + - token_name + name: bookcover_token_name_amw_index + options: [] + type: NORMAL + name: bookcover_token + options: [] + order: 43 + bulk_job: + constraints: + - deferrable: 1 + expression: '' + fields: + - bulk_job_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: bulk_job_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + bulk_job_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: bulk_job_id + order: 1 + size: + - 0 + completed: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: completed + order: 5 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 3 + size: + - 0 + payload: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: payload + order: 8 + size: + - 0 + produced: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: produced + order: 9 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 6 + size: + - 16 + started: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: started + order: 4 + size: + - 0 + status: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: status + order: 7 + size: + - 32 + task: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: task + order: 2 + size: + - 32 + username: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: username + order: 10 + size: + - 255 + indices: + - fields: + - site_id + name: bulk_job_idx_site_id + options: [] + type: NORMAL + name: bulk_job + options: [] + order: 12 + category: + 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: + - uri + - site_id + - type + match_type: '' + name: uri_site_id_type_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: category_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + active: + data_type: smallint + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 7 + 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 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 8 + size: + - 16 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 5 + size: + - 0 + text_count: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: text_count + order: 6 + size: + - 0 + type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 4 + size: + - 16 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 3 + size: + - 255 + indices: + - fields: + - site_id + name: category_idx_site_id + options: [] + type: NORMAL + name: category + options: [] + order: 13 + category_description: + constraints: + - deferrable: 1 + expression: '' + fields: + - category_description_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - category_id + - lang + match_type: '' + name: category_id_lang_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - category_id + match_type: '' + name: category_description_fk_category_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: category + type: FOREIGN KEY + fields: + category_description_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: category_description_id + order: 1 + size: + - 0 + category_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: category_id + order: 6 + size: + - 0 + html_body: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: html_body + order: 3 + size: + - 0 + lang: + data_type: varchar + default_value: en + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: lang + order: 4 + size: + - 3 + last_modified_by: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_modified_by + order: 5 + size: + - 255 + muse_body: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: muse_body + order: 2 + size: + - 0 + indices: + - fields: + - category_id + name: category_description_idx_category_id + options: [] + type: NORMAL + name: category_description + options: [] + order: 30 + column_comments: + constraints: [] + fields: + column_name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: column_name + order: 2 + size: + - 255 + comment_text: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: comment_text + order: 3 + size: + - 0 + table_name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: table_name + order: 1 + size: + - 255 + indices: [] + name: column_comments + options: [] + order: 1 + custom_formats: + constraints: + - deferrable: 1 + expression: '' + fields: + - custom_formats_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - site_id + - format_alias + match_type: '' + name: site_id_format_alias_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - site_id + - format_code + match_type: '' + name: site_id_format_code_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: custom_formats_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + active: + data_type: smallint + default_value: 1 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: active + order: 8 + size: + - 0 + bb_areaset_height: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_areaset_height + order: 49 + size: + - 0 + bb_areaset_width: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_areaset_width + order: 50 + size: + - 0 + bb_bcor: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_bcor + order: 11 + size: + - 0 + bb_beamercolortheme: + data_type: varchar + default_value: dove + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_beamercolortheme + order: 12 + size: + - 32 + bb_beamertheme: + data_type: varchar + default_value: default + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_beamertheme + order: 13 + size: + - 32 + bb_body_only: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_body_only + order: 59 + size: + - 0 + bb_centerchapter: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_centerchapter + order: 37 + size: + - 0 + bb_centersection: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_centersection + order: 38 + size: + - 0 + bb_continuefootnotes: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_continuefootnotes + order: 36 + size: + - 0 + bb_cover: + data_type: smallint + default_value: 1 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_cover + order: 14 + size: + - 0 + bb_coverpage_only_if_toc: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_coverpage_only_if_toc + order: 28 + size: + - 0 + bb_crop_marks: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_crop_marks + order: 15 + size: + - 0 + bb_crop_paper_height: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_crop_paper_height + order: 17 + size: + - 0 + bb_crop_paper_thickness: + data_type: varchar + default_value: 0.10mm + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_crop_paper_thickness + order: 19 + size: + - 16 + bb_crop_paper_width: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_crop_paper_width + order: 18 + size: + - 0 + bb_crop_papersize: + data_type: varchar + default_value: a4 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_crop_papersize + order: 16 + size: + - 32 + bb_division: + data_type: integer + default_value: 12 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_division + order: 20 + size: + - 0 + bb_epub_embed_fonts: + data_type: smallint + default_value: 1 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_epub_embed_fonts + order: 10 + size: + - 0 + bb_fontsize: + data_type: integer + default_value: 10 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_fontsize + order: 21 + size: + - 0 + bb_format: + data_type: varchar + default_value: pdf + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_format + order: 9 + size: + - 16 + bb_fussy_last_word: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_fussy_last_word + order: 53 + size: + - 0 + bb_geometry_outer_margin: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_geometry_outer_margin + order: 52 + size: + - 0 + bb_geometry_top_margin: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_geometry_top_margin + order: 51 + size: + - 0 + bb_headings: + data_type: varchar + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_headings + order: 22 + size: + - 64 + bb_ignore_cover: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_ignore_cover + order: 56 + size: + - 0 + bb_imposed: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_imposed + order: 23 + size: + - 0 + bb_impressum: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_impressum + order: 31 + size: + - 0 + bb_linespacing: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_linespacing + order: 57 + size: + - 0 + bb_mainfont: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_mainfont + order: 24 + size: + - 255 + bb_monofont: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_monofont + order: 26 + size: + - 255 + bb_nobold: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_nobold + order: 33 + size: + - 0 + bb_nocoverpage: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_nocoverpage + order: 27 + size: + - 0 + bb_nofinalpage: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_nofinalpage + order: 29 + size: + - 0 + bb_notoc: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_notoc + order: 30 + size: + - 0 + bb_opening: + data_type: varchar + default_value: any + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_opening + order: 39 + size: + - 16 + bb_paper_height: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_paper_height + order: 41 + size: + - 0 + bb_paper_width: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_paper_width + order: 42 + size: + - 0 + bb_papersize: + data_type: varchar + default_value: generic + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_papersize + order: 40 + size: + - 32 + bb_parindent: + data_type: integer + default_value: 15 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_parindent + order: 58 + size: + - 0 + bb_sansfont: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_sansfont + order: 25 + size: + - 255 + bb_sansfontsections: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_sansfontsections + order: 32 + size: + - 0 + bb_schema: + data_type: varchar + default_value: 2up + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_schema + order: 43 + size: + - 64 + bb_secondary_footnotes_alpha: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_secondary_footnotes_alpha + order: 34 + size: + - 0 + bb_signature: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_signature + order: 44 + size: + - 0 + bb_signature_2up: + data_type: varchar + default_value: 40-80 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_signature_2up + order: 45 + size: + - 8 + bb_signature_4up: + data_type: varchar + default_value: 40-80 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_signature_4up + order: 46 + size: + - 8 + bb_start_with_empty_page: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_start_with_empty_page + order: 35 + size: + - 0 + bb_tex_emergencystretch: + data_type: integer + default_value: 30 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_tex_emergencystretch + order: 54 + size: + - 0 + bb_tex_tolerance: + data_type: integer + default_value: 200 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_tex_tolerance + order: 55 + size: + - 0 + bb_twoside: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_twoside + order: 47 + size: + - 0 + bb_unbranded: + data_type: smallint + default_value: 0 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bb_unbranded + order: 48 + size: + - 0 + custom_formats_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: custom_formats_id + order: 1 + size: + - 0 + format_alias: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: format_alias + order: 5 + size: + - 8 + format_code: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: format_code + order: 6 + size: + - 8 + format_description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: format_description + order: 4 + size: + - 0 + format_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: format_name + order: 3 + size: + - 255 + format_priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: format_priority + order: 7 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: custom_formats_idx_site_id + options: [] + type: NORMAL + name: custom_formats + options: [] + order: 14 + global_site_files: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - file_name + - file_type + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - attachment_id + match_type: '' + name: global_site_files_fk_attachment_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: attachment + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: global_site_files_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + attachment_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: attachment_id + order: 2 + size: + - 0 + file_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: file_name + order: 3 + size: + - 255 + file_path: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: file_path + order: 5 + size: + - 0 + file_type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: file_type + order: 4 + size: + - 255 + image_height: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: image_height + order: 7 + size: + - 0 + image_width: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: image_width + order: 6 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 1 + size: + - 16 + indices: + - fields: + - attachment_id + name: global_site_files_idx_attachment_id + options: [] + type: NORMAL + - fields: + - site_id + name: global_site_files_idx_site_id + options: [] + type: NORMAL + name: global_site_files + options: [] + order: 31 + include_path: + constraints: + - deferrable: 1 + expression: '' + fields: + - include_path_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: include_path_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + directory: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: directory + order: 3 + size: + - 0 + include_path_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: include_path_id + order: 1 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 4 + size: + - 0 + indices: + - fields: + - site_id + name: include_path_idx_site_id + options: [] + type: NORMAL + name: include_path + options: [] + order: 15 + included_file: + constraints: + - deferrable: 1 + expression: '' + fields: + - included_file_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: included_file_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: included_file_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + file_epoch: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_epoch + order: 6 + size: + - 0 + file_path: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: file_path + order: 4 + size: + - 0 + file_timestamp: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: file_timestamp + order: 5 + size: + - 0 + included_file_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: included_file_id + order: 1 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title_id + order: 3 + size: + - 0 + indices: + - fields: + - site_id + name: included_file_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: included_file_idx_title_id + options: [] + type: NORMAL + name: included_file + options: [] + order: 32 + job: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - bulk_job_id + match_type: '' + name: job_fk_bulk_job_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - bulk_job_id + reference_table: bulk_job + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: job_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + bulk_job_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: bulk_job_id + order: 3 + size: + - 0 + completed: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: completed + order: 9 + size: + - 0 + created: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: created + order: 7 + size: + - 0 + errors: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: errors + order: 13 + 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 + payload: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: payload + order: 5 + size: + - 0 + priority: + data_type: integer + default_value: 10 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 10 + size: + - 0 + produced: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: produced + order: 11 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + started: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: started + order: 8 + size: + - 0 + status: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: status + order: 6 + size: + - 32 + task: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: task + order: 4 + size: + - 32 + username: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: username + order: 12 + size: + - 255 + indices: + - fields: + - bulk_job_id + name: job_idx_bulk_job_id + options: [] + type: NORMAL + - fields: + - site_id + name: job_idx_site_id + options: [] + type: NORMAL + - fields: + - status + name: job_status_index + options: [] + type: NORMAL + name: job + options: [] + order: 33 + job_file: + constraints: + - deferrable: 1 + expression: '' + fields: + - filename + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - job_id + match_type: '' + name: job_file_fk_job_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: job + type: FOREIGN KEY + fields: + filename: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: filename + order: 1 + size: + - 255 + job_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: job_id + order: 3 + size: + - 0 + slot: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: slot + order: 2 + size: + - 255 + indices: + - fields: + - job_id + name: job_file_idx_job_id + options: [] + type: NORMAL + name: job_file + options: [] + order: 44 + legacy_link: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - legacy_path + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: legacy_link_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + legacy_path: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: legacy_path + order: 2 + size: + - 255 + new_path: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: new_path + order: 3 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 1 + size: + - 16 + indices: + - fields: + - site_id + name: legacy_link_idx_site_id + options: [] + type: NORMAL + name: legacy_link + options: [] + order: 16 + mirror_info: + constraints: + - deferrable: 1 + expression: '' + fields: + - mirror_info_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - attachment_id + match_type: '' + name: attachment_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 1 + expression: '' + fields: + - title_id + match_type: '' + name: title_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - attachment_id + match_type: '' + name: mirror_info_fk_attachment_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: attachment + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - mirror_origin_id + match_type: '' + name: mirror_info_fk_mirror_origin_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - mirror_origin_id + reference_table: mirror_origin + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: mirror_info_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: mirror_info_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + attachment_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: attachment_id + order: 3 + size: + - 0 + checksum: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: checksum + order: 6 + size: + - 128 + download_destination: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: download_destination + order: 8 + size: + - 0 + download_source: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: download_source + order: 7 + size: + - 0 + last_updated: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_updated + order: 10 + size: + - 0 + mirror_exception: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: mirror_exception + order: 9 + size: + - 32 + mirror_info_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: mirror_info_id + order: 1 + size: + - 0 + mirror_origin_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: mirror_origin_id + order: 4 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 5 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: title_id + order: 2 + size: + - 0 + indices: + - fields: + - attachment_id + name: mirror_info_idx_attachment_id + options: [] + type: NORMAL + - fields: + - mirror_origin_id + name: mirror_info_idx_mirror_origin_id + options: [] + type: NORMAL + - fields: + - site_id + name: mirror_info_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: mirror_info_idx_title_id + options: [] + type: NORMAL + name: mirror_info + options: [] + order: 53 + mirror_origin: + constraints: + - deferrable: 1 + expression: '' + fields: + - mirror_origin_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: mirror_origin_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + active: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 5 + size: + - 1 + last_downloaded: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_downloaded + order: 7 + size: + - 0 + mirror_origin_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: mirror_origin_id + order: 1 + size: + - 0 + remote_domain: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: remote_domain + order: 3 + size: + - 255 + remote_path: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: remote_path + order: 4 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + status_message: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: status_message + order: 6 + size: + - 0 + indices: + - fields: + - site_id + name: mirror_origin_idx_site_id + options: [] + type: NORMAL + name: mirror_origin + options: [] + order: 17 + monthly_archive: + constraints: + - deferrable: 1 + expression: '' + fields: + - monthly_archive_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - site_id + - month + - year + match_type: '' + name: site_id_month_year_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: monthly_archive_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + month: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: month + order: 3 + size: + - 2 + monthly_archive_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: monthly_archive_id + order: 1 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 2 + size: + - 16 + year: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: year + order: 4 + size: + - 4 + indices: + - fields: + - site_id + name: monthly_archive_idx_site_id + options: [] + type: NORMAL + name: monthly_archive + options: [] + order: 18 + muse_header: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_id + - muse_header + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: muse_header_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + muse_header: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: muse_header + order: 2 + size: + - 255 + muse_value: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: muse_value + order: 3 + size: + - 0 + muse_value_html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: muse_value_html + order: 4 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + indices: + - fields: + - title_id + name: muse_header_idx_title_id + options: [] + type: NORMAL + name: muse_header + options: [] + order: 34 + node: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - site_id + - uri + match_type: '' + name: site_id_uri_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - parent_node_id + match_type: '' + name: node_fk_parent_node_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: node_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + canonical_title: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: canonical_title + order: 4 + size: + - 255 + full_path: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: full_path + order: 8 + size: + - 0 + last_updated_dt: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_updated_dt + order: 6 + size: + - 0 + last_updated_epoch: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: last_updated_epoch + order: 5 + size: + - 0 + node_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + parent_node_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: parent_node_id + order: 9 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 2 + size: + - 16 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 7 + size: + - 0 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 3 + size: + - 255 + indices: + - fields: + - parent_node_id + name: node_idx_parent_node_id + options: [] + type: NORMAL + - fields: + - site_id + name: node_idx_site_id + options: [] + type: NORMAL + name: node + options: [] + order: 19 + node_aggregation: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + - aggregation_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - aggregation_id + match_type: '' + name: node_aggregation_fk_aggregation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - aggregation_id + reference_table: aggregation + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - node_id + match_type: '' + name: node_aggregation_fk_node_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + fields: + aggregation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_id + order: 2 + size: + - 0 + node_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + indices: + - fields: + - aggregation_id + name: node_aggregation_idx_aggregation_id + options: [] + type: NORMAL + - fields: + - node_id + name: node_aggregation_idx_node_id + options: [] + type: NORMAL + name: node_aggregation + options: [] + order: 54 + node_aggregation_series: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + - aggregation_series_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - aggregation_series_id + match_type: '' + name: node_aggregation_series_fk_aggregation_series_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - aggregation_series_id + reference_table: aggregation_series + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - node_id + match_type: '' + name: node_aggregation_series_fk_node_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + fields: + aggregation_series_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: aggregation_series_id + order: 2 + size: + - 0 + node_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + indices: + - fields: + - aggregation_series_id + name: node_aggregation_series_idx_aggregation_series_id + options: [] + type: NORMAL + - fields: + - node_id + name: node_aggregation_series_idx_node_id + options: [] + type: NORMAL + name: node_aggregation_series + options: [] + order: 45 + node_body: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + - lang + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - node_id + match_type: '' + name: node_body_fk_node_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + fields: + body_html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: body_html + order: 6 + size: + - 0 + body_muse: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: body_muse + order: 5 + size: + - 0 + lang: + data_type: varchar + default_value: en + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: lang + order: 2 + size: + - 3 + node_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + title_html: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title_html + order: 4 + size: + - 0 + title_muse: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title_muse + order: 3 + size: + - 0 + indices: + - fields: + - node_id + name: node_body_idx_node_id + options: [] + type: NORMAL + name: node_body + options: [] + order: 35 + node_category: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + - category_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - category_id + match_type: '' + name: node_category_fk_category_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: category + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - node_id + match_type: '' + name: node_category_fk_node_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + fields: + category_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: category_id + order: 2 + size: + - 0 + node_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + indices: + - fields: + - category_id + name: node_category_idx_category_id + options: [] + type: NORMAL + - fields: + - node_id + name: node_category_idx_node_id + options: [] + type: NORMAL + name: node_category + options: [] + order: 46 + node_title: + constraints: + - deferrable: 1 + expression: '' + fields: + - node_id + - title_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - node_id + match_type: '' + name: node_title_fk_node_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - node_id + reference_table: node + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: node_title_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + node_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: node_id + order: 1 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 2 + size: + - 0 + indices: + - fields: + - node_id + name: node_title_idx_node_id + options: [] + type: NORMAL + - fields: + - title_id + name: node_title_idx_title_id + options: [] + type: NORMAL + name: node_title + options: [] + order: 47 + oai_pmh_record: + constraints: + - deferrable: 1 + expression: '' + fields: + - oai_pmh_record_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - identifier + - site_id + match_type: '' + name: identifier_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - attachment_id + match_type: '' + name: oai_pmh_record_fk_attachment_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: attachment + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - custom_formats_id + match_type: '' + name: oai_pmh_record_fk_custom_formats_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - custom_formats_id + reference_table: custom_formats + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: oai_pmh_record_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: oai_pmh_record_fk_title_id + on_delete: SET NULL + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + attachment_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: attachment_id + order: 6 + size: + - 0 + custom_formats_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: custom_formats_id + order: 7 + size: + - 0 + datestamp: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: datestamp + order: 3 + size: + - 0 + deleted: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: deleted + order: 11 + size: + - 1 + identifier: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: identifier + order: 2 + size: + - 255 + metadata_format: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: metadata_format + order: 9 + size: + - 32 + metadata_format_description: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: metadata_format_description + order: 10 + size: + - 255 + metadata_type: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: metadata_type + order: 8 + size: + - 32 + oai_pmh_record_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: oai_pmh_record_id + order: 1 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 4 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title_id + order: 5 + size: + - 0 + update_run: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: update_run + order: 12 + size: + - 0 + indices: + - fields: + - attachment_id + name: oai_pmh_record_idx_attachment_id + options: [] + type: NORMAL + - fields: + - custom_formats_id + name: oai_pmh_record_idx_custom_formats_id + options: [] + type: NORMAL + - fields: + - site_id + name: oai_pmh_record_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: oai_pmh_record_idx_title_id + options: [] + type: NORMAL + name: oai_pmh_record + options: [] + order: 55 + oai_pmh_record_set: + constraints: + - deferrable: 1 + expression: '' + fields: + - oai_pmh_record_id + - oai_pmh_set_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - oai_pmh_record_id + match_type: '' + name: oai_pmh_record_set_fk_oai_pmh_record_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - oai_pmh_record_id + reference_table: oai_pmh_record + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - oai_pmh_set_id + match_type: '' + name: oai_pmh_record_set_fk_oai_pmh_set_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - oai_pmh_set_id + reference_table: oai_pmh_set + type: FOREIGN KEY + fields: + oai_pmh_record_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: oai_pmh_record_id + order: 1 + size: + - 0 + oai_pmh_set_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: oai_pmh_set_id + order: 2 + size: + - 0 + indices: + - fields: + - oai_pmh_record_id + name: oai_pmh_record_set_idx_oai_pmh_record_id + options: [] + type: NORMAL + - fields: + - oai_pmh_set_id + name: oai_pmh_record_set_idx_oai_pmh_set_id + options: [] + type: NORMAL + name: oai_pmh_record_set + options: [] + order: 56 + oai_pmh_set: + constraints: + - deferrable: 1 + expression: '' + fields: + - oai_pmh_set_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 1 + expression: '' + fields: + - set_spec + - site_id + match_type: '' + name: set_spec_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: oai_pmh_set_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + oai_pmh_set_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: oai_pmh_set_id + order: 1 + size: + - 0 + set_name: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: set_name + order: 4 + size: + - 0 + set_spec: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: set_spec + order: 2 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 3 + size: + - 16 + indices: + - fields: + - site_id + name: oai_pmh_set_idx_site_id + options: [] + type: NORMAL + name: oai_pmh_set + options: [] + order: 20 + redirection: + 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: + - uri + - type + - site_id + match_type: '' + name: uri_type_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: redirection_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + 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 + redirect: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: redirect + order: 4 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 5 + size: + - 16 + type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: type + order: 3 + size: + - 16 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 2 + size: + - 255 + indices: + - fields: + - site_id + name: redirection_idx_site_id + options: [] + type: NORMAL + name: redirection + options: [] + order: 21 + revision: + constraints: + - deferrable: 1 + expression: '' + fields: + - id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: revision_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: revision_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + f_full_path_name: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: f_full_path_name + 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 + message: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: message + order: 5 + size: + - 0 + session_id: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: session_id + order: 7 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + status: + data_type: varchar + default_value: editing + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 6 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title_id + order: 3 + size: + - 0 + updated: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: updated + order: 9 + size: + - 0 + username: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: username + order: 8 + size: + - 255 + indices: + - fields: + - site_id + name: revision_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: revision_idx_title_id + options: [] + type: NORMAL + name: revision + options: [] + order: 36 + roles: + 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: + - role + match_type: '' + name: role_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + 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 + role: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 1 + name: role + order: 2 + size: + - 128 + indices: [] + name: roles + options: [] + order: 2 + 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: + - canonical + match_type: '' + name: canonical_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + a4_pdf: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: a4_pdf + order: 29 + size: + - 1 + acme_certificate: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: acme_certificate + order: 22 + size: + - 1 + active: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 24 + size: + - 1 + bare_html: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bare_html + order: 33 + size: + - 1 + bb_page_limit: + data_type: integer + default_value: 1000 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bb_page_limit + order: 26 + size: + - 0 + bcor: + data_type: varchar + default_value: 0mm + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: bcor + order: 39 + size: + - 16 + beamercolortheme: + data_type: varchar + default_value: dove + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: beamercolortheme + order: 45 + size: + - 255 + beamertheme: + data_type: varchar + default_value: default + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: beamertheme + order: 44 + size: + - 255 + binary_upload_max_size_in_mega: + data_type: integer + default_value: 8 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: binary_upload_max_size_in_mega + order: 50 + size: + - 0 + blog_style: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: blog_style + order: 25 + size: + - 1 + canonical: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: canonical + order: 13 + size: + - 255 + cgit_integration: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cgit_integration + order: 17 + size: + - 1 + division: + data_type: integer + default_value: 12 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: division + order: 38 + size: + - 0 + epub: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: epub + order: 34 + size: + - 1 + fixed_category_list: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: fixed_category_list + order: 6 + size: + - 0 + fontsize: + data_type: integer + default_value: 10 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: fontsize + order: 40 + size: + - 0 + git_token: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: git_token + order: 51 + size: + - 0 + html: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: html + order: 32 + size: + - 1 + id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: id + order: 1 + size: + - 16 + last_updated: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: last_updated + order: 52 + size: + - 0 + locale: + data_type: varchar + default_value: en + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: locale + order: 3 + size: + - 3 + logo: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: logo + order: 10 + size: + - 255 + logo_with_sitename: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: logo_with_sitename + order: 47 + size: + - 1 + lt_pdf: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: lt_pdf + order: 30 + size: + - 1 + magic_answer: + data_type: varchar + default_value: 16 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: magic_answer + order: 5 + size: + - 255 + magic_question: + data_type: varchar + default_value: 12 + 4 = + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: magic_question + order: 4 + size: + - 255 + mail_from: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: mail_from + order: 12 + size: + - 0 + mail_notify: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: mail_notify + order: 11 + size: + - 0 + mainfont: + data_type: varchar + default_value: CMU Serif + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: mainfont + order: 41 + size: + - 255 + mode: + data_type: varchar + default_value: private + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: mode + order: 2 + size: + - 16 + monofont: + data_type: varchar + default_value: CMU Typewriter Text + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: monofont + order: 43 + size: + - 255 + multilanguage: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: multilanguage + order: 23 + size: + - 255 + nocoverpage: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: nocoverpage + order: 46 + size: + - 1 + opening: + data_type: varchar + default_value: any + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: opening + order: 48 + size: + - 16 + papersize: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: papersize + order: 37 + size: + - 64 + pdf: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: pdf + order: 28 + size: + - 1 + sansfont: + data_type: varchar + default_value: CMU Sans Serif + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sansfont + order: 42 + size: + - 255 + secure_site: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: secure_site + order: 14 + size: + - 1 + secure_site_only: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: secure_site_only + order: 15 + size: + - 1 + sitegroup: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sitegroup + order: 16 + size: + - 255 + sitename: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sitename + order: 7 + size: + - 255 + siteslogan: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: siteslogan + order: 8 + size: + - 255 + sl_pdf: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sl_pdf + order: 31 + size: + - 1 + ssl_ca_cert: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: ssl_ca_cert + order: 20 + size: + - 255 + ssl_cert: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: ssl_cert + order: 19 + size: + - 255 + ssl_chained_cert: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: ssl_chained_cert + order: 21 + size: + - 255 + ssl_key: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: ssl_key + order: 18 + size: + - 255 + tex: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: tex + order: 27 + size: + - 1 + theme: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: theme + order: 9 + size: + - 32 + ttdir: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: ttdir + order: 36 + size: + - 255 + twoside: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: twoside + order: 49 + size: + - 1 + zip: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: zip + order: 35 + size: + - 1 + indices: [] + name: site + options: [] + order: 3 + site_category_type: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - category_type + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: site_category_type_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + active: + data_type: smallint + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 3 + size: + - 0 + category_type: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: category_type + order: 2 + size: + - 16 + description: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: description + order: 10 + size: + - 0 + generate_index: + data_type: smallint + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: generate_index + order: 7 + size: + - 0 + in_colophon: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: in_colophon + order: 8 + size: + - 0 + name_plural: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name_plural + order: 6 + size: + - 255 + name_singular: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: name_singular + order: 5 + size: + - 255 + priority: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: priority + order: 4 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 1 + size: + - 16 + xapian_custom_slot: + data_type: smallint + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: xapian_custom_slot + order: 9 + size: + - 0 + indices: + - fields: + - site_id + name: site_category_type_idx_site_id + options: [] + type: NORMAL + name: site_category_type + options: [] + order: 22 + site_link: + constraints: + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: site_link_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + label: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: label + order: 2 + size: + - 255 + menu: + data_type: varchar + default_value: specials + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: menu + order: 4 + size: + - 32 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 5 + size: + - 16 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 3 + size: + - 0 + url: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: url + order: 1 + size: + - 255 + indices: + - fields: + - site_id + name: site_link_idx_site_id + options: [] + type: NORMAL + name: site_link + options: [] + order: 23 + site_options: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - option_name + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: site_options_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + option_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: option_name + order: 2 + size: + - 64 + option_value: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: option_value + order: 3 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 1 + size: + - 16 + indices: + - fields: + - site_id + name: site_options_idx_site_id + options: [] + type: NORMAL + name: site_options + options: [] + order: 24 + table_comments: + constraints: [] + fields: + comment_text: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: comment_text + order: 2 + size: + - 0 + table_name: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: table_name + order: 1 + size: + - 255 + indices: [] + name: table_comments + options: [] + order: 4 + text_internal_link: + constraints: + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: text_internal_link_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: text_internal_link_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + f_class: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_class + order: 3 + size: + - 255 + full_link: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: full_link + order: 5 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: uri + order: 4 + size: + - 255 + indices: + - fields: + - site_id + name: text_internal_link_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: text_internal_link_idx_title_id + options: [] + type: NORMAL + name: text_internal_link + options: [] + order: 37 + text_month: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_id + - monthly_archive_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - monthly_archive_id + match_type: '' + name: text_month_fk_monthly_archive_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - monthly_archive_id + reference_table: monthly_archive + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: text_month_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + monthly_archive_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: monthly_archive_id + order: 2 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + indices: + - fields: + - monthly_archive_id + name: text_month_idx_monthly_archive_id + options: [] + type: NORMAL + - fields: + - title_id + name: text_month_idx_title_id + options: [] + type: NORMAL + name: text_month + options: [] + order: 48 + text_part: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_id + - part_index + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: text_part_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + part_index: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: part_index + order: 2 + size: + - 16 + part_level: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: part_level + order: 3 + size: + - 0 + part_order: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: part_order + order: 7 + size: + - 0 + part_size: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: part_size + order: 5 + size: + - 0 + part_title: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: part_title + order: 4 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + toc_index: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: toc_index + order: 6 + size: + - 0 + indices: + - fields: + - title_id + name: text_part_idx_title_id + options: [] + type: NORMAL + name: text_part + options: [] + order: 38 + title: + 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: + - uri + - f_class + - site_id + match_type: '' + name: uri_f_class_site_id_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: title_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + attach: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: attach + order: 12 + size: + - 0 + attachment_index: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: attachment_index + order: 39 + size: + - 0 + author: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: author + order: 10 + size: + - 0 + blob_container: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: blob_container + order: 40 + size: + - 1 + cover: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: cover + order: 33 + size: + - 255 + date: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: date + order: 5 + size: + - 0 + datefirst: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: datefirst + order: 6 + size: + - 0 + deleted: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: deleted + order: 30 + size: + - 0 + f_archive_rel_path: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_archive_rel_path + order: 23 + size: + - 32 + f_class: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: f_class + order: 28 + size: + - 16 + f_full_path_name: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_full_path_name + order: 26 + size: + - 0 + f_name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_name + order: 22 + size: + - 255 + f_path: + data_type: text + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_path + order: 21 + size: + - 0 + f_suffix: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_suffix + order: 27 + size: + - 16 + f_timestamp: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_timestamp + order: 24 + size: + - 0 + f_timestamp_epoch: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: f_timestamp_epoch + order: 25 + 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 + isbn: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: isbn + order: 17 + size: + - 0 + lang: + data_type: varchar + default_value: en + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: lang + order: 4 + size: + - 3 + list_title: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: list_title + order: 9 + size: + - 0 + notes: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: notes + order: 7 + size: + - 0 + parent: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: parent + order: 15 + size: + - 255 + pubdate: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: pubdate + order: 13 + size: + - 0 + publisher: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: publisher + order: 16 + size: + - 0 + rights: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: rights + order: 18 + size: + - 0 + seriesname: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: seriesname + order: 19 + size: + - 0 + seriesnumber: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: seriesnumber + order: 20 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: site_id + order: 41 + size: + - 16 + sku: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sku + order: 36 + size: + - 64 + slides: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: slides + order: 31 + size: + - 1 + sorting_pos: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: sorting_pos + order: 35 + size: + - 0 + source: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: source + order: 8 + size: + - 0 + status: + data_type: varchar + default_value: unpublished + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: status + order: 14 + size: + - 16 + subtitle: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: subtitle + order: 3 + size: + - 0 + teaser: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: teaser + order: 34 + size: + - 0 + text_qualification: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: text_qualification + order: 37 + size: + - 32 + text_size: + data_type: integer + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: text_size + order: 38 + size: + - 0 + text_structure: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: text_structure + order: 32 + size: + - 0 + title: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: title + order: 2 + size: + - 0 + uid: + data_type: varchar + default_value: '' + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: uid + order: 11 + size: + - 255 + uri: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: uri + order: 29 + size: + - 255 + indices: + - fields: + - site_id + name: title_idx_site_id + options: [] + type: NORMAL + name: title + options: [] + order: 25 + title_annotation: + constraints: + - deferrable: 1 + expression: '' + fields: + - annotation_id + - title_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - annotation_id + match_type: '' + name: title_annotation_fk_annotation_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - annotation_id + reference_table: annotation + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: title_annotation_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + annotation_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: annotation_id + order: 1 + size: + - 0 + annotation_value: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: annotation_value + order: 3 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 2 + size: + - 0 + indices: + - fields: + - annotation_id + name: title_annotation_idx_annotation_id + options: [] + type: NORMAL + - fields: + - title_id + name: title_annotation_idx_title_id + options: [] + type: NORMAL + name: title_annotation + options: [] + order: 49 + title_attachment: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_id + - attachment_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - attachment_id + match_type: '' + name: title_attachment_fk_attachment_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: attachment + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: title_attachment_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + attachment_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: attachment_id + order: 2 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + indices: + - fields: + - attachment_id + name: title_attachment_idx_attachment_id + options: [] + type: NORMAL + - fields: + - title_id + name: title_attachment_idx_title_id + options: [] + type: NORMAL + name: title_attachment + options: [] + order: 50 + title_category: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_id + - category_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - category_id + match_type: '' + name: title_category_fk_category_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: category + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: title_category_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + category_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: category_id + order: 2 + size: + - 0 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_id + order: 1 + size: + - 0 + indices: + - fields: + - category_id + name: title_category_idx_category_id + options: [] + type: NORMAL + - fields: + - title_id + name: title_category_idx_title_id + options: [] + type: NORMAL + name: title_category + options: [] + order: 51 + title_stat: + constraints: + - deferrable: 1 + expression: '' + fields: + - title_stat_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: title_stat_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - title_id + match_type: '' + name: title_stat_fk_title_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: title + type: FOREIGN KEY + fields: + accessed: + data_type: datetime + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: accessed + order: 4 + size: + - 0 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + title_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: title_id + order: 3 + size: + - 0 + title_stat_id: + data_type: integer + default_value: ~ + is_auto_increment: 1 + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: title_stat_id + order: 1 + size: + - 0 + type: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: type + order: 6 + size: + - 0 + user_agent: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: user_agent + order: 5 + size: + - 0 + indices: + - fields: + - site_id + name: title_stat_idx_site_id + options: [] + type: NORMAL + - fields: + - title_id + name: title_stat_idx_title_id + options: [] + type: NORMAL + name: title_stat + options: [] + order: 39 + user_role: + constraints: + - deferrable: 1 + expression: '' + fields: + - user_id + - role_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - role_id + match_type: '' + name: user_role_fk_role_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: roles + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - user_id + match_type: '' + name: user_role_fk_user_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: users + type: FOREIGN KEY + fields: + role_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: role_id + order: 2 + size: + - 0 + user_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: user_id + order: 1 + size: + - 0 + indices: + - fields: + - role_id + name: user_role_idx_role_id + options: [] + type: NORMAL + - fields: + - user_id + name: user_role_idx_user_id + options: [] + type: NORMAL + name: user_role + options: [] + order: 40 + user_site: + constraints: + - deferrable: 1 + expression: '' + fields: + - user_id + - site_id + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: user_site_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + - deferrable: 0 + expression: '' + fields: + - user_id + match_type: '' + name: user_site_fk_user_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: users + type: FOREIGN KEY + fields: + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + user_id: + data_type: integer + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: user_id + order: 1 + size: + - 0 + indices: + - fields: + - site_id + name: user_site_idx_site_id + options: [] + type: NORMAL + - fields: + - user_id + name: user_site_idx_user_id + options: [] + type: NORMAL + name: user_site + options: [] + order: 41 + users: + 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: + - username + match_type: '' + name: username_unique + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: UNIQUE + fields: + active: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: active + order: 6 + size: + - 1 + api_access_created: + data_type: datetime + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: api_access_created + order: 13 + size: + - 0 + api_access_token: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: api_access_token + order: 12 + size: + - 0 + created_by: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: created_by + order: 5 + size: + - 255 + edit_option_page_left_bs_columns: + data_type: integer + default_value: 6 + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: edit_option_page_left_bs_columns + order: 10 + size: + - 0 + edit_option_preview_box_height: + data_type: integer + default_value: 500 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: edit_option_preview_box_height + order: 7 + size: + - 0 + edit_option_show_cheatsheet: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: edit_option_show_cheatsheet + order: 9 + size: + - 1 + edit_option_show_filters: + data_type: integer + default_value: 1 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: edit_option_show_filters + order: 8 + size: + - 1 + email: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: email + order: 4 + size: + - 255 + 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 + password: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: password + order: 3 + size: + - 255 + preferred_language: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: preferred_language + order: 11 + size: + - 8 + reset_token: + data_type: text + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: reset_token + order: 14 + size: + - 0 + reset_until: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: reset_until + order: 15 + size: + - 0 + username: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 1 + name: username + order: 2 + size: + - 255 + indices: [] + name: users + options: [] + order: 5 + vhost: + constraints: + - deferrable: 1 + expression: '' + fields: + - name + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: vhost_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + name: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: name + order: 1 + size: + - 255 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: site_id + order: 2 + size: + - 16 + indices: + - fields: + - site_id + name: vhost_idx_site_id + options: [] + type: NORMAL + name: vhost + options: [] + order: 26 + whitelist_ip: + constraints: + - deferrable: 1 + expression: '' + fields: + - site_id + - ip + match_type: '' + name: '' + on_delete: '' + on_update: '' + options: [] + reference_fields: [] + reference_table: '' + type: PRIMARY KEY + - deferrable: 0 + expression: '' + fields: + - site_id + match_type: '' + name: whitelist_ip_fk_site_id + on_delete: CASCADE + on_update: CASCADE + options: [] + reference_fields: + - id + reference_table: site + type: FOREIGN KEY + fields: + expire_epoch: + data_type: integer + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: expire_epoch + order: 5 + size: + - 0 + granted_by_username: + data_type: varchar + default_value: ~ + is_nullable: 1 + is_primary_key: 0 + is_unique: 0 + name: granted_by_username + order: 4 + size: + - 255 + ip: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: ip + order: 2 + size: + - 64 + site_id: + data_type: varchar + default_value: ~ + is_nullable: 0 + is_primary_key: 1 + is_unique: 0 + name: site_id + order: 1 + size: + - 16 + user_editable: + data_type: smallint + default_value: 0 + is_nullable: 0 + is_primary_key: 0 + is_unique: 0 + name: user_editable + order: 3 + size: + - 0 + indices: + - fields: + - site_id + name: whitelist_ip_idx_site_id + options: [] + type: NORMAL + - fields: + - ip + name: whitelist_ip_ip_amw_index + options: [] + type: NORMAL + name: whitelist_ip + options: [] + order: 27 + triggers: {} + views: {} +translator: + add_drop_table: 0 + filename: ~ + no_comments: 0 + parser_args: + sources: + - Aggregation + - AggregationAnnotation + - AggregationSeries + - AggregationTitle + - AmwSession + - Annotation + - Attachment + - BookbuilderProfile + - BookbuilderSession + - Bookcover + - BookcoverToken + - BulkJob + - Category + - CategoryDescription + - ColumnComment + - CustomFormat + - GlobalSiteFile + - IncludePath + - IncludedFile + - Job + - JobFile + - LegacyLink + - MirrorInfo + - MirrorOrigin + - MonthlyArchive + - MuseHeader + - Node + - NodeAggregation + - NodeAggregationSeries + - NodeBody + - NodeCategory + - NodeTitle + - OaiPmhRecord + - OaiPmhRecordSet + - OaiPmhSet + - Redirection + - Revision + - Role + - Site + - SiteCategoryType + - SiteLink + - SiteOption + - TableComment + - TextInternalLink + - TextMonth + - TextPart + - Title + - TitleAnnotation + - TitleAttachment + - TitleCategory + - TitleStat + - User + - UserRole + - UserSite + - Vhost + - WhitelistIp + parser_type: SQL::Translator::Parser::DBIx::Class + producer_args: {} + producer_type: SQL::Translator::Producer::YAML + show_warnings: 0 + trace: 0 + version: 1.62