addon
This commit is contained in:
8
backend/migrations/007_add_cli_split_fields.sql
Executable file
8
backend/migrations/007_add_cli_split_fields.sql
Executable file
@@ -0,0 +1,8 @@
|
||||
-- Migration 007: Add cli_yaml and cli_raw fields
|
||||
-- Split CLI field into structured YAML and raw Markdown
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN cli_yaml TEXT;
|
||||
ALTER TABLE peripherals ADD COLUMN cli_raw TEXT;
|
||||
|
||||
-- Optional: Migrate existing cli data to cli_raw for backward compatibility
|
||||
UPDATE peripherals SET cli_raw = cli WHERE cli IS NOT NULL AND cli != '';
|
||||
11
backend/migrations/008_add_specifications_notes.sql
Executable file
11
backend/migrations/008_add_specifications_notes.sql
Executable file
@@ -0,0 +1,11 @@
|
||||
-- Migration 008: Add specifications and notes fields
|
||||
-- Date: 2025-12-31
|
||||
|
||||
-- Add specifications field (Markdown format - technical specs from imported .md files)
|
||||
ALTER TABLE peripherals ADD COLUMN specifications TEXT;
|
||||
|
||||
-- Add notes field (Markdown format - free notes)
|
||||
ALTER TABLE peripherals ADD COLUMN notes TEXT;
|
||||
|
||||
-- Optional: Migrate existing notes from other fields if needed
|
||||
-- (No migration needed as this is a new field)
|
||||
8
backend/migrations/009_add_thumbnail_path.sql
Executable file
8
backend/migrations/009_add_thumbnail_path.sql
Executable file
@@ -0,0 +1,8 @@
|
||||
-- Migration 009: Add thumbnail_path to peripheral_photos
|
||||
-- Date: 2025-12-31
|
||||
|
||||
-- Add thumbnail_path field (path to thumbnail image)
|
||||
ALTER TABLE peripheral_photos ADD COLUMN thumbnail_path TEXT;
|
||||
|
||||
-- Thumbnails will be stored in uploads/peripherals/photos/{id}/thumbnail/
|
||||
-- and generated automatically on upload
|
||||
13
backend/migrations/010_add_usb_manufacturer_product.sql
Executable file
13
backend/migrations/010_add_usb_manufacturer_product.sql
Executable file
@@ -0,0 +1,13 @@
|
||||
-- Migration 010: Add USB manufacturer and product strings
|
||||
-- Date: 2025-12-31
|
||||
-- Description: Add iManufacturer and iProduct fields for USB device information
|
||||
|
||||
-- Add iManufacturer field (USB manufacturer string from lsusb)
|
||||
ALTER TABLE peripherals ADD COLUMN iManufacturer TEXT;
|
||||
|
||||
-- Add iProduct field (USB product string from lsusb)
|
||||
ALTER TABLE peripherals ADD COLUMN iProduct TEXT;
|
||||
|
||||
-- Create indexes for searching
|
||||
CREATE INDEX IF NOT EXISTS idx_peripherals_imanufacturer ON peripherals(iManufacturer);
|
||||
CREATE INDEX IF NOT EXISTS idx_peripherals_iproduct ON peripherals(iProduct);
|
||||
8
backend/migrations/011_add_fabricant_produit.sql
Executable file
8
backend/migrations/011_add_fabricant_produit.sql
Executable file
@@ -0,0 +1,8 @@
|
||||
-- Migration 011: Add fabricant and produit fields
|
||||
-- Date: 2025-12-31
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN fabricant TEXT;
|
||||
ALTER TABLE peripherals ADD COLUMN produit TEXT;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_peripherals_fabricant ON peripherals(fabricant);
|
||||
CREATE INDEX IF NOT EXISTS idx_peripherals_produit ON peripherals(produit);
|
||||
5
backend/migrations/012_add_usb_device_id.sql
Normal file
5
backend/migrations/012_add_usb_device_id.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Migration 012: Add usb_device_id field
|
||||
-- Date: 2025-12-31
|
||||
|
||||
ALTER TABLE peripherals ADD COLUMN usb_device_id TEXT;
|
||||
CREATE INDEX IF NOT EXISTS idx_peripherals_usb_device_id ON peripherals(usb_device_id);
|
||||
Reference in New Issue
Block a user