Added field filtering to API endpoints and store colour presets in the database.

This commit is contained in:
flash 2025-03-28 01:47:08 +00:00
parent 12d40e69a5
commit a1398fb179
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
16 changed files with 727 additions and 117 deletions

View file

@ -0,0 +1,20 @@
<?php
use Index\Db\DbConnection;
use Index\Db\Migration\DbMigration;
final class ColoursPresets_20250327_213508 implements DbMigration {
public function migrate(DbConnection $conn): void {
$conn->execute(<<<SQL
CREATE TABLE msz_colours_presets (
preset_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
preset_order INT(11) NOT NULL DEFAULT '0',
preset_name VARCHAR(255) NOT NULL COLLATE 'ascii_general_ci',
preset_title VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
preset_colour INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (preset_id),
UNIQUE KEY msz_colours_presets_name_unique (preset_name),
KEY msz_colours_presets_order_index (preset_order)
) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
SQL);
}
}