Ferret File System/v0.1/SQL/file: Difference between revisions
< Ferret File System | v0.1 | SQL
Jump to navigation
Jump to search
(original version, before modifications) |
(minor updates, format tidying) |
||
Line 3: | Line 3: | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `files` ( | <mysql>CREATE TABLE `files` ( | ||
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`ID_Folder` INT NOT NULL | `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) | `FileName` VARCHAR(255) COMMENT "just the filename.ext, not the full path", | ||
`WhenCreated` DATETIME DEFAULT NULL COMMENT "file's creation timestamp", | `WhenCreated` DATETIME DEFAULT NULL COMMENT "file's creation timestamp", | ||
`WhenChanged` DATETIME DEFAULT NULL COMMENT "file's modification timestamp", | `WhenChanged` DATETIME DEFAULT NULL COMMENT "file's modification timestamp", | ||
`FirstFound` DATETIME NOT NULL | `FirstFound` DATETIME NOT NULL COMMENT "time/date when file was first found during a scan", | ||
`LastFound` DATETIME NOT NULL | `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", | `isFound` BOOL DEFAULT FALSE COMMENT "TRUE = was found on most recent scan", | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) | ) | ||
ENGINE = MYISAM;</mysql> | ENGINE = MYISAM;</mysql> |
Revision as of 18:51, 25 December 2012
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>