50-mtimes.sql 591 B

12345678910111213141516
  1. -- Copyright (C) 2025 The Syncthing Authors.
  2. --
  3. -- This Source Code Form is subject to the terms of the Mozilla Public
  4. -- License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. -- You can obtain one at https://mozilla.org/MPL/2.0/.
  6. --- Backing for the MtimeFS
  7. CREATE TABLE IF NOT EXISTS mtimes (
  8. folder_idx INTEGER NOT NULL,
  9. name TEXT NOT NULL,
  10. ondisk INTEGER NOT NULL, -- unix nanos
  11. virtual INTEGER NOT NULL, -- unix nanos
  12. PRIMARY KEY(folder_idx, name),
  13. FOREIGN KEY(folder_idx) REFERENCES folders(idx) ON DELETE CASCADE
  14. ) STRICT, WITHOUT ROWID
  15. ;