-- ============================================================================
-- KundenKarte Module - Update 3.6.0
-- Autocomplete for text fields + File pinning
-- ============================================================================

-- Add autocomplete option to field definitions
ALTER TABLE llx_kundenkarte_anlage_type_field
ADD COLUMN enable_autocomplete tinyint DEFAULT 0 NOT NULL AFTER show_in_hover;

-- Add pinned flag for files (pinned files appear first)
ALTER TABLE llx_kundenkarte_anlage_files
ADD COLUMN is_pinned tinyint DEFAULT 0 NOT NULL AFTER is_cover;

-- Add tree display mode for fields (badge = right side badge, parentheses = after label in parentheses)
ALTER TABLE llx_kundenkarte_anlage_type_field
ADD COLUMN tree_display_mode varchar(20) DEFAULT 'badge' AFTER show_in_tree;
