Ferreteria/modules/files/rf node: Difference between revisions
< Ferreteria | modules | files
Jump to navigation
Jump to search
(Created page with "==About== * '''Purpose''': can represent any filesystem entity ==History== * '''2017-07-22''' created for reworking file-management ==SQL== <mysql> CREATE TABLE `fm_node` (...") |
No edit summary |
||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': can represent any filesystem entity | * '''Purpose''': can represent any filesystem entity | ||
Things to keep in mind: [[directory size optimization]] and the fact that the maximum [[URL]] length is somewhere around 1024 characters (varies by browser and server; presumably there is an official limit that is ≤ this). | |||
==History== | ==History== | ||
* '''2017-07-22''' created for reworking file-management | * '''2017-07-22''' created for reworking file-management | ||
==SQL== | ==SQL== | ||
<mysql> CREATE TABLE `fm_node` ( | <mysql> CREATE TABLE `fm_node` ( | ||
ID INT | ID INT NOT NULL AUTO_INCREMENT, | ||
ID_Parent INT | ID_Parent INT DEFAULT NULL, | ||
FSpecPart VARCHAR(255) | FSpecPart VARCHAR(255) NOT NULL COMMENT "relative filespec - the part of the path from parent to this file/folder", | ||
FSpecFull TEXT | FSpecFull TEXT NOT NULL COMMENT "full filespec (calculated)", | ||
WFullPath | WFullPath TEXT NOT NULL COMMENT "full web URL (calculated)", | ||
Descr VARCHAR(255) DEFAULT NULL COMMENT "brief name or description", | Descr VARCHAR(255) DEFAULT NULL COMMENT "brief name or description", | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) ENGINE = InnoDB;</mysql> | ) ENGINE = InnoDB;</mysql> |
Revision as of 22:54, 23 July 2017
About
- Purpose: can represent any filesystem entity
Things to keep in mind: directory size optimization and the fact that the maximum URL length is somewhere around 1024 characters (varies by browser and server; presumably there is an official limit that is ≤ this).
History
- 2017-07-22 created for reworking file-management
SQL
<mysql> CREATE TABLE `fm_node` (
ID INT NOT NULL AUTO_INCREMENT, ID_Parent INT DEFAULT NULL, FSpecPart VARCHAR(255) NOT NULL COMMENT "relative filespec - the part of the path from parent to this file/folder", FSpecFull TEXT NOT NULL COMMENT "full filespec (calculated)", WFullPath TEXT NOT NULL COMMENT "full web URL (calculated)", Descr VARCHAR(255) DEFAULT NULL COMMENT "brief name or description", PRIMARY KEY(`ID`)
) ENGINE = InnoDB;</mysql>