@@ -78,7 +78,21 @@ function cauldron_repair --description "Repair broken Cauldron installation"
7878 end
7979 end
8080
81- # Check 4: Verify functions are installed
81+ # Check 4: Verify dependencies table has date column
82+ if test -f " $CAULDRON_DATABASE "
83+ echo " → Checking dependencies table schema..."
84+ set -l has_date_column (sqlite3 " $CAULDRON_DATABASE " " PRAGMA table_info(dependencies);" 2> /dev/null | grep -c " date" )
85+
86+ if test $has_date_column -eq 0
87+ set issues_found (math $issues_found + 1)
88+ set -a issues " Dependencies table missing 'date' column (required for parallel installs)"
89+ echo " ✗ Dependencies table schema outdated"
90+ else
91+ echo " ✓ Dependencies table schema OK"
92+ end
93+ end
94+
95+ # Check 5: Verify functions are installed
8296 echo " → Checking Fish functions..."
8397 set -l functions_dir " $HOME /.config/cauldron/functions"
8498
@@ -114,7 +128,7 @@ function cauldron_repair --description "Repair broken Cauldron installation"
114128 end
115129 end
116130
117- # Check 5 : Verify data files
131+ # Check 6 : Verify data files
118132 echo " → Checking data files..."
119133 set -l required_files palettes.json spinners.json
120134
@@ -135,7 +149,7 @@ function cauldron_repair --description "Repair broken Cauldron installation"
135149 echo " ✓ Data files OK"
136150 end
137151
138- # Check 6 : Verify Fish config
152+ # Check 7 : Verify Fish config
139153 echo " → Checking Fish configuration..."
140154 set -l fish_config " $HOME /.config/fish/config.fish"
141155
@@ -216,7 +230,29 @@ function cauldron_repair --description "Repair broken Cauldron installation"
216230 end
217231 end
218232
219- # Fix 2: Reinstall functions
233+ # Fix 2: Update dependencies table schema
234+ if string match -q " *Dependencies table*" -- $issues
235+ echo " → Updating dependencies table schema..."
236+
237+ # Check if the date column exists before trying to add it
238+ set -l has_date_column (sqlite3 " $CAULDRON_DATABASE " " PRAGMA table_info(dependencies);" 2> /dev/null | grep -c " date" )
239+
240+ if test $has_date_column -eq 0
241+ sqlite3 " $CAULDRON_DATABASE " " ALTER TABLE dependencies ADD COLUMN date TEXT;" 2> /dev/null
242+
243+ if test $status -eq 0
244+ echo " ✓ Added date column to dependencies table"
245+ set issues_fixed (math $issues_fixed + 1)
246+ else
247+ echo " ✗ Failed to add date column"
248+ end
249+ else
250+ echo " ✓ Date column already exists"
251+ set issues_fixed (math $issues_fixed + 1)
252+ end
253+ end
254+
255+ # Fix 3: Reinstall functions
220256 if string match -q " *function*" -- $issues
221257 echo " → Reinstalling functions..."
222258
@@ -244,7 +280,7 @@ function cauldron_repair --description "Repair broken Cauldron installation"
244280 set issues_fixed (math $issues_fixed + 1)
245281 end
246282
247- # Fix 3 : Restore data files
283+ # Fix 4 : Restore data files
248284 if string match -q " *data file*" -- $issues
249285 echo " → Restoring data files..."
250286
@@ -262,7 +298,7 @@ function cauldron_repair --description "Repair broken Cauldron installation"
262298 set issues_fixed (math $issues_fixed + 1)
263299 end
264300
265- # Fix 4 : Fix Fish config
301+ # Fix 5 : Fix Fish config
266302 if string match -q " *Fish config*" -- $issues
267303 echo " → Updating Fish configuration..."
268304
0 commit comments