From 76a56af9f61b6171d5533c46d4e5cdc32b2b8ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Sun, 21 Dec 2025 19:55:49 +0100 Subject: [PATCH] Add tl_meilisearch table schema --- src/Resources/contao/dca/tl_meilisearch.php | 43 +++++++++++++++++++++ src/Resources/contao/dca/tl_search.php | 35 ----------------- 2 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 src/Resources/contao/dca/tl_meilisearch.php delete mode 100644 src/Resources/contao/dca/tl_search.php diff --git a/src/Resources/contao/dca/tl_meilisearch.php b/src/Resources/contao/dca/tl_meilisearch.php new file mode 100644 index 0000000..22079fd --- /dev/null +++ b/src/Resources/contao/dca/tl_meilisearch.php @@ -0,0 +1,43 @@ + [ + 'dataContainer' => 'Table', + 'sql' => [ + 'keys' => [ + 'id' => 'primary', + 'pid' => 'unique', + ], + ], + ], + + 'fields' => [ + 'id' => [ + 'sql' => "int(10) unsigned NOT NULL auto_increment", + ], + 'pid' => [ + 'sql' => "int(10) unsigned NOT NULL default 0", + ], + 'source' => [ + 'sql' => "varchar(32) NOT NULL default ''", + ], + 'priority' => [ + 'sql' => "int(1) NOT NULL default 2", + ], + 'keywords' => [ + 'sql' => "varchar(255) NOT NULL default ''", + ], + 'imagepath' => [ + 'sql' => "varchar(512) NOT NULL default ''", + ], + 'startDate' => [ + 'sql' => "bigint(20) NOT NULL default 0", + ], + 'checksum' => [ + 'sql' => "varchar(64) NOT NULL default ''", + ], + 'tstamp' => [ + 'sql' => "int(10) unsigned NOT NULL default 0", + ], + ], +]; \ No newline at end of file diff --git a/src/Resources/contao/dca/tl_search.php b/src/Resources/contao/dca/tl_search.php deleted file mode 100644 index b96146b..0000000 --- a/src/Resources/contao/dca/tl_search.php +++ /dev/null @@ -1,35 +0,0 @@ - ['Keywords', 'Suchbegriffe für die Indexierung'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => ['tl_class' => 'w50', 'maxlength' => 255], - 'sql' => "varchar(255) NOT NULL default ''" -]; - -$GLOBALS['TL_DCA']['tl_search']['fields']['priority'] = [ - 'label' => ['Priorität', 'Priorität für die Suchergebnisse'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => [1, 2, 3], - 'default' => 2, - 'eval' => ['tl_class' => 'w50'], - 'sql' => "int(1) NOT NULL default '2'" -]; - -$GLOBALS['TL_DCA']['tl_search']['fields']['imagepath'] = [ - 'label' => ['Image Path', 'Speichert den Pfad des Bildes'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => ['maxlength' => 512], - 'sql' => "varchar(512) NOT NULL default ''" -]; - -$GLOBALS['TL_DCA']['tl_search']['fields']['startDate'] = [ - 'label' => ['Startdatum', 'Startdatum für die Suchergebnisse (Unix-Timestamp)'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => ['rgxp' => 'digit', 'tl_class' => 'w50'], - 'sql' => "bigint(20) NOT NULL default '0'" -]; \ No newline at end of file