Files
VITEC-website/packages/vitec/ext_tables.sql
Oliver Rasche 7bd1161abf Product text import from agency XLSX workbooks
VITEC Import module: Products tab is now a searchable/sortable product
overview. "Edit Product" opens an XLSX upload with per-field source
mapping (component + cell), old/new preview and checkbox apply via
DataHandler; the mapping and manual matches are persisted and preselect
the next workbook. Category workbooks are detected and rejected.

- new: ProductXlsxReader (PhpSpreadsheet), ProductTextImportController,
  Products/ProductTexts templates, 4 module routes
- related products: per-pair card text in new side table
  tx_vitec_product_related_text (survives MM rewrites), emitted as
  `cardtext` in the product JSON; missing MM relations added add-only
- card copy read from Body Copy (D) with fallback to CTA/Card Copy (E) -
  the workbooks fill either depending on row type
- product detail page <title> now uses seotitle with title fallback
  (provider made singleton and fed from the JSON renderer)
- per-user recent-search badges; last loaded workbook stored per product
  (tx_vitec_product_workbook), Edit Product reopens on it
- composer: add phpoffice/phpspreadsheet ^5.9
- diagnostics: migrations/check_workbook.php
2026-08-21 11:00:45 +02:00

365 lines
14 KiB
SQL
Executable File

CREATE TABLE tx_vitec_domain_model_product (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
hidden tinyint(4) DEFAULT '0' NOT NULL,
starttime int(11) DEFAULT '0' NOT NULL,
endtime int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (uid),
urltitle varchar(255) DEFAULT '' NOT NULL,
seotitle varchar(255) DEFAULT '' NOT NULL,
seometa text,
keywords text,
productimage int(11) DEFAULT '0' NOT NULL,
structureddata text,
teaser varchar(255) DEFAULT '' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
applications text,
highlights text,
description text,
image INTEGER,
relatedimage INTEGER,
ogimage INTEGER,
legacy tinyint(4) DEFAULT '0' NOT NULL,
supportproduct tinyint(4) DEFAULT '0' NOT NULL,
subproduct tinyint(4) DEFAULT '0' NOT NULL,
cta varchar(255) DEFAULT '' NOT NULL,
sorting1 smallint(5) NOT NULL,
sorting2 smallint(5) NOT NULL,
sorting3 smallint(5) NOT NULL,
sorting4 smallint(5) NOT NULL,
sorting5 smallint(5) NOT NULL,
links text,
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
hideondatasheets smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonproducts smallint(5) unsigned DEFAULT '0' NOT NULL,
shortcut tinyint(4) DEFAULT '0' NOT NULL,
shortcutpid smallint(5) NOT NULL,
video varchar(255) DEFAULT '' NOT NULL,
key1 varchar(255) DEFAULT '' NOT NULL,
key2 varchar(255) DEFAULT '' NOT NULL,
key3 varchar(255) DEFAULT '' NOT NULL,
apptext1 varchar(255) DEFAULT '' NOT NULL,
apptext2 varchar(255) DEFAULT '' NOT NULL,
apptext3 varchar(255) DEFAULT '' NOT NULL,
productlayout int(11) DEFAULT '0' NOT NULL,
contentelement varchar(255) DEFAULT '' NOT NULL,
contentelementcta varchar(255) DEFAULT '' NOT NULL,
videofile int(11) unsigned DEFAULT '0' NOT NULL,
showdatapath smallint(5) unsigned DEFAULT '0' NOT NULL,
heroimage int(11) unsigned DEFAULT '0' NOT NULL,
description2 text,
capabilities text,
portfolio varchar(1024) DEFAULT '' NOT NULL,
textrelatedproducts text,
KEY parent (pid)
);
CREATE TABLE tx_vitec_domain_model_download (
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
teaser varchar(255) NOT NULL DEFAULT '',
keywords varchar(255) NOT NULL DEFAULT '',
description text,
file int(11) unsigned NOT NULL DEFAULT '0',
sort1 varchar(255) NOT NULL DEFAULT '',
sort2 varchar(255) NOT NULL DEFAULT '',
sort3 varchar(255) NOT NULL DEFAULT '',
private_download smallint(1) unsigned NOT NULL DEFAULT '0',
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
hideondatasheets smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonproducts smallint(5) unsigned DEFAULT '0' NOT NULL,
icon varchar(255) NOT NULL DEFAULT '',
filepath varchar(255) NOT NULL DEFAULT '',
fileprefix varchar(255) NOT NULL DEFAULT '',
useolddl smallint(1) unsigned NOT NULL DEFAULT '0'
);
CREATE TABLE tx_vitec_product_download_mm (
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
sorting_foreign int(11) DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
CREATE TABLE tx_vitec_product_related_mm (
uid_local INT(11) NOT NULL,
uid_foreign INT(11) NOT NULL,
sorting INT(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid_local, uid_foreign)
);
CREATE TABLE tx_vitec_domain_model_usecase (
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
detail_page int(11) DEFAULT '0' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
card_image int(11) unsigned DEFAULT '0' NOT NULL,
customer_logo int(11) unsigned DEFAULT '0' NOT NULL,
teaser text,
markets int(11) unsigned DEFAULT '0' NOT NULL,
hero_bgimage int(11) unsigned DEFAULT '0' NOT NULL,
hero_small_image int(11) unsigned DEFAULT '0' NOT NULL,
hero_video int(11) unsigned DEFAULT '0' NOT NULL,
hero_overlay_color varchar(20) DEFAULT '' NOT NULL,
hero_overlay_opacity decimal(3,2) DEFAULT '0.00' NOT NULL,
content_elements int(11) unsigned DEFAULT '0' NOT NULL,
solutions int(11) unsigned DEFAULT '0' NOT NULL,
products int(11) unsigned DEFAULT '0' NOT NULL,
categories int(11) unsigned DEFAULT '0' NOT NULL,
seo_title varchar(255) DEFAULT '' NOT NULL,
seo_description text,
no_index smallint(5) unsigned DEFAULT '0' NOT NULL,
no_follow smallint(5) unsigned DEFAULT '0' NOT NULL,
canonical_link varchar(1024) DEFAULT '' NOT NULL,
og_title varchar(255) DEFAULT '' NOT NULL,
og_description text,
og_image int(11) unsigned DEFAULT '0' NOT NULL,
twitter_title varchar(255) DEFAULT '' NOT NULL,
twitter_description text,
twitter_image int(11) unsigned DEFAULT '0' NOT NULL,
layout_variant varchar(30) DEFAULT 'standard' NOT NULL,
background_variant varchar(20) DEFAULT 'none' NOT NULL,
accent_color varchar(20) DEFAULT '' NOT NULL,
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
featured smallint(5) unsigned DEFAULT '0' NOT NULL,
show_related smallint(5) unsigned DEFAULT '1' NOT NULL,
hero_layout varchar(20) DEFAULT 'fullscreen' NOT NULL,
text_theme varchar(20) DEFAULT 'light' NOT NULL,
description text,
singlepid varchar(255) DEFAULT '' NOT NULL
);
CREATE TABLE tx_vitec_domain_model_solution (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
hidden tinyint(4) DEFAULT '0' NOT NULL,
starttime int(11) DEFAULT '0' NOT NULL,
endtime int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
detail_page int(11) DEFAULT '0' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
teaser varchar(255) DEFAULT '' NOT NULL,
description text,
image int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid),
KEY language (l10n_parent, sys_language_uid)
);
CREATE TABLE tx_vitec_domain_model_market (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
deleted tinyint(4) DEFAULT '0' NOT NULL,
hidden tinyint(4) DEFAULT '0' NOT NULL,
starttime int(11) DEFAULT '0' NOT NULL,
endtime int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
detail_page int(11) DEFAULT '0' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
teaser varchar(255) DEFAULT '' NOT NULL,
description text,
image int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid),
KEY language (l10n_parent, sys_language_uid)
);
ALTER TABLE sys_category
ADD class VARCHAR(255) DEFAULT '' NOT NULL,
ADD filetype VARCHAR(255) DEFAULT '' NOT NULL,
ADD type VARCHAR(255) DEFAULT '' NOT NULL;
CREATE TABLE tt_content (
tx_vitec_bg_variant VARCHAR(20) DEFAULT 'none' NOT NULL,
tx_vitec_gap VARCHAR(5) DEFAULT '3' NOT NULL,
tx_vitec_col1_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
tx_vitec_col1_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
tx_vitec_col2_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
tx_vitec_col2_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
tx_vitec_col3_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
tx_vitec_col3_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
tx_vitec_col4_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
tx_vitec_col4_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
tx_vitec_bg_image int(11) unsigned DEFAULT '0' NOT NULL,
tx_vitec_bg_size VARCHAR(20) DEFAULT 'cover' NOT NULL,
tx_vitec_bg_size_percent int(11) unsigned DEFAULT '100' NOT NULL,
tx_vitec_bg_position VARCHAR(20) DEFAULT 'center center' NOT NULL,
tx_vitec_bg_pos_top int(11) DEFAULT NULL,
tx_vitec_bg_pos_bottom int(11) DEFAULT NULL,
tx_vitec_bg_pos_left int(11) DEFAULT NULL,
tx_vitec_bg_pos_right int(11) DEFAULT NULL,
tx_vitec_usecase_content int(11) unsigned DEFAULT '0' NOT NULL
);
CREATE TABLE tx_vitec_domain_model_event (
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
teaser varchar(255) DEFAULT '' NOT NULL,
description text,
eventstart int(11) DEFAULT '0' NOT NULL,
eventend int(11) DEFAULT '0' NOT NULL,
venue varchar(255) DEFAULT '' NOT NULL,
booth varchar(255) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL,
country varchar(255) DEFAULT '' NOT NULL,
attendancemode varchar(20) DEFAULT 'offline' NOT NULL,
eventstatus varchar(20) DEFAULT 'scheduled' NOT NULL,
eventurl varchar(1024) DEFAULT '' NOT NULL,
meetinglink varchar(1024) DEFAULT '' NOT NULL,
image int(11) unsigned DEFAULT '0' NOT NULL,
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL
);
CREATE TABLE tx_vitec_usecase_solution_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
CREATE TABLE tx_vitec_usecase_product_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
CREATE TABLE tx_vitec_usecase_market_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
CREATE TABLE tx_vitec_domain_model_location (
title varchar(255) DEFAULT '' NOT NULL,
slug varchar(255) DEFAULT '' NOT NULL,
country_code varchar(5) DEFAULT '' NOT NULL,
latitude decimal(11,7) DEFAULT '0.0000000' NOT NULL,
longitude decimal(11,7) DEFAULT '0.0000000' NOT NULL,
address_company varchar(255) DEFAULT '' NOT NULL,
street varchar(255) DEFAULT '' NOT NULL,
address_additional varchar(255) DEFAULT '' NOT NULL,
postal_code varchar(20) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL,
region varchar(255) DEFAULT '' NOT NULL,
country varchar(255) DEFAULT '' NOT NULL,
phone varchar(100) DEFAULT '' NOT NULL,
fax varchar(100) DEFAULT '' NOT NULL,
email varchar(255) DEFAULT '' NOT NULL,
contact_link varchar(1024) DEFAULT '' NOT NULL,
legal_links text,
marker_label varchar(255) DEFAULT '' NOT NULL,
marker_color varchar(20) DEFAULT '#ff6633' NOT NULL,
marker_size decimal(3,2) DEFAULT '0.50' NOT NULL
);
CREATE TABLE tx_vitec_domain_model_customer (
title varchar(255) DEFAULT '' NOT NULL,
logo int(11) unsigned DEFAULT '0' NOT NULL,
emphasize_logo smallint(5) unsigned DEFAULT '0' NOT NULL
);
CREATE TABLE tx_vitec_form_submission (
form_key varchar(30) DEFAULT '' NOT NULL,
payload text,
delivery_method varchar(20) DEFAULT '' NOT NULL,
delivery_status varchar(20) DEFAULT '' NOT NULL,
delivery_error text
);
CREATE TABLE tx_vitec_import_mapping (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
model varchar(64) DEFAULT '' NOT NULL,
identity_field varchar(64) DEFAULT 'slug' NOT NULL,
mapping text,
record_aliases text,
PRIMARY KEY (uid),
KEY model (model)
);
CREATE TABLE tx_vitec_seo_research (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
be_user int(11) DEFAULT '0' NOT NULL,
filename varchar(255) DEFAULT '' NOT NULL,
row_count int(11) DEFAULT '0' NOT NULL,
payload mediumtext,
PRIMARY KEY (uid)
);
--
-- Per-pair card copy for the related-products relation. Deliberately NOT a
-- column on tx_vitec_product_related_mm: DataHandler rewrites the MM rows on
-- every save of the product (delete + reinsert to apply sorting), which would
-- silently wipe any extra column. This side table survives that; orphaned rows
-- (relation later removed) are simply never joined. No TCA on purpose -
-- written by the product-text import module, read by ProductShowJsonRenderer.
--
CREATE TABLE tx_vitec_product_related_text (
product_uid int(11) DEFAULT '0' NOT NULL,
related_uid int(11) DEFAULT '0' NOT NULL,
cardtext text,
tstamp int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (product_uid, related_uid)
);
--
-- The last successfully loaded product workbook, one row per product - so
-- "Edit Product" reopens on the previous upload instead of an empty form.
-- Parsed JSON, not the binary file; same payload-storage pattern as
-- tx_vitec_seo_research. No TCA on purpose.
--
CREATE TABLE tx_vitec_product_workbook (
product_uid int(11) DEFAULT '0' NOT NULL,
filename varchar(255) DEFAULT '' NOT NULL,
payload mediumtext,
be_user int(11) DEFAULT '0' NOT NULL,
tstamp int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (product_uid)
);