Files
baby-nas/internal/db/migrations/0002_nfs_structured.sql
T
darroyo 3d956d43c2 fix: split ALTER TABLE into separate ADD COLUMN statements in migration 0002
SQLite does not support adding multiple columns in a single ALTER TABLE
statement. The previous migration tried to add 6 columns at once and
caused a syntax error, crashing the service at startup.

Bump VERSION 0.1.7 -> 0.1.8
2026-07-05 23:26:53 -04:00

9 lines
536 B
SQL

ALTER TABLE nfs_exports ADD COLUMN read_only INTEGER NOT NULL DEFAULT 0;
ALTER TABLE nfs_exports ADD COLUMN async_ INTEGER NOT NULL DEFAULT 0;
ALTER TABLE nfs_exports ADD COLUMN root_squash INTEGER NOT NULL DEFAULT 1;
ALTER TABLE nfs_exports ADD COLUMN subtree_check INTEGER NOT NULL DEFAULT 0;
ALTER TABLE nfs_exports ADD COLUMN fsid INTEGER NOT NULL DEFAULT 0;
ALTER TABLE nfs_exports ADD COLUMN advanced TEXT NOT NULL DEFAULT '{}';
CREATE INDEX IF NOT EXISTS idx_nfs_exports_fsid ON nfs_exports(fsid);