Ferret File System/v0.1/SQL/file

From Woozle Writes Code
< Ferret File System‎ | v0.1‎ | SQL
Revision as of 18:49, 25 December 2012 by Woozle (talk | contribs) (original version, before modifications)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Tracks actual locations of files, and stats which may be different from file to file without affecting the data/content.

SQL

<mysql>CREATE TABLE `files` (

 `ID`          INT NOT NULL AUTO_INCREMENT,
 `ID_Folder`   INT NOT NULL     COMMENT "Folders.ID of parent folder",
 `ID_Fideal`   INT DEFAULT NULL COMMENT "Fideals.ID for this file",
 `FileName`    VARCHAR(255)     COMMENT "just the filename.ext, not the full path",
 `FileSize`    INT DEFAULT NULL COMMENT "number of bytes in file",
 `FileCksum`   INT DEFAULT NULL COMMENT "file's checksum (algorithm to be worked out later)",
 `WhenCreated` DATETIME DEFAULT NULL COMMENT "file's creation timestamp",
 `WhenChanged` DATETIME DEFAULT NULL COMMENT "file's modification timestamp",
 `FirstFound`  DATETIME NOT NULL     COMMENT "time/date when file was first found during a scan",
 `LastFound`   DATETIME NOT NULL     COMMENT "time/date when file was most recently found during a scan",
 `isFound`     BOOL DEFAULT FALSE    COMMENT "TRUE = was found on most recent scan",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>