Files
darroyo 0da789cd96 fix: populate fsid for legacy NFS exports on migration
Migration 0002 added fsid column with DEFAULT 0 but never
populated existing rows. Now PopulateLegacyFSIDs() runs after 0002
to extract fsid from legacy options string or generate random.

Also: move generateRandomFSID to internal/system to avoid import
cycles. Migration 0004 drops the legacy options column.

Version: 0.3.1 -> 0.3.2
2026-07-06 01:22:16 -04:00

5 lines
288 B
SQL

-- Drop the legacy options column after successful migration to structured columns
-- Safe to run on fresh installs (column doesn't exist, silently succeeds in SQLite 3.35+)
-- For SQLite < 3.35 this would fail; nasctl requires modern SQLite.
ALTER TABLE nfs_exports DROP COLUMN options;