Fresh GDK install asks for truncate-legacy-tables

Problem

The truncate_legacy_tables command assumes truncation is needed if #{GDK.root}/.cache/.truncate_tables does not exist. This flag file is only created after truncation runs successfully.

For fresh GDK installations with empty databases, gdk doctor incorrectly reports that truncation is needed, even though there are no legacy tables with data to truncate.

Implementation

Create the .cache/.truncate_tables flag file during fresh GDK installation so that gdk doctor doesn't unnecessarily prompt for truncation on new installations.

  • lib/gdk/command/truncate_legacy_tables.rb - checks for flag file existence in truncation_needed? method
  • Flag file path: #{GDK.root}/.cache/.truncate_tables
Edited by Mohga Gamea