Ferret File System/v0.1/SQL/file

From Woozle Writes Code
< Ferret File System‎ | v0.1‎ | SQL
Revision as of 18:51, 25 December 2012 by Woozle (talk | contribs) (minor updates, format tidying)
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_Firev`    INT DEFAULT      NULL COMMENT "Firevs.ID for this file",
 `FileName`    VARCHAR(255)          COMMENT "just the filename.ext, not the full path",
 `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>