summaryrefslogtreecommitdiffstats
path: root/Database.md
diff options
context:
space:
mode:
Diffstat (limited to 'Database.md')
-rw-r--r--Database.md35
1 files changed, 24 insertions, 11 deletions
diff --git a/Database.md b/Database.md
index 7c898af..053e796 100644
--- a/Database.md
+++ b/Database.md
@@ -1,34 +1,47 @@
## Table `migration` [`InnoDB`]
-This is an internal information table used for database schema upgrades and must contain only one row. Never modify this table manually unless you know what you are doing.
+This is an internal information table used for database schema migrations and must contain only one row with the current schema version used by the database. Never modify this table manually unless you know what you are doing.
* Column `schema_version`: Contains the current schema version of the database structure.
+## Table `category` [`InnoDB`]
+This table contains all category entities.
+
+* Column `id`: Contains the unique primary ID to identify a category
+* Column `time_insert`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the category was created
+* Column `time_update`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the category was updated
+* Column `parent`: Contains the ID of the parent category (`category.id`) or is `NULL`
+* Column `slug`: Contains the slug part of the categories absolute URL
+* Column `name`: Contains the name of the category
+* Column `body`: Contains the content of the category in the markdown format
+* Column `argv`: Contains the optional argument string or is `NULL`
+
## Table `page` [`InnoDB`]
-In this table are all created page objects stored and will be removed if the admin deletes them.
+This table contains all page entities.
* Column `id`: Contains the unique primary ID to identify a page
* Column `time_insert`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the page was created
* Column `time_update`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the page was updated
-* Column `user`: Contains the user ID of the user who created this page (`user.id`)
+* Column `user`: Contains the ID of the user assigned to this page (`user.id`)
* Column `slug`: Contains the slug part of the pages absolute URL
* Column `name`: Contains the name of the page
-* Column `body`: Contains the body of the page in the markdown format
+* Column `body`: Contains the content of the page in the markdown format
* Column `argv`: Contains the optional argument string or is `NULL`
## Table `post` [`InnoDB`]
-In this table are all created post objects stored and will be removed if the admin deletes them.
+This table contains all post entities.
* Column `id`: Contains the unique primary ID to identify a post
* Column `time_insert`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the post was created
* Column `time_update`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the post was updated
-* Column `user`: Contains the user ID of the user who created this post (`user.id`)
+* Column `user`: Contains the ID of the user assigned to this post (`user.id`)
+* Column `category`: Contains the ID of the category in which this post was published (`category.id`) or is `NULL`
* Column `slug`: Contains the slug part of the posts absolute URL
* Column `name`: Contains the name of the post
-* Column `body`: Contains the body of the post in the markdown format
+* Column `body`: Contains the content of the post in the markdown format
* Column `argv`: Contains the optional argument string or is `NULL`
## Table `user` [`InnoDB`]
-In this table are all created user objects stored and will be removed if the admin deletes them.
+This table contains all user entities.
* Column `id`: Contains the unique primary ID to identify a user
* Column `time_insert`: Contains the time stamp (Format: `YYYY-MM-DD HH:II:SS`) when the user was created
@@ -38,8 +51,8 @@ In this table are all created user objects stored and will be removed if the adm
* Column `password`: Contains the `bcrypt` hashed password of the user
* Column `fullname`: Contains the full name of the user
* Column `mailaddr`: Contains the contact email address of the user
-* Column `body`: Contains the body of the user in the markdown format
+* Column `body`: Contains the content of the user in the markdown format
* Column `argv`: Contains the optional argument string or is `NULL`
-## Why database table prefixes are not supported
-The blogging application does not support the definition of a prefix for the database tables. This is because one database should only contain the data from one application (and if this is the case, prefixes are unnecessary). If multiple applications sharing the same database and a security vulnerability is discovered in one of those applications, an attacker may be able to manipulate the data from the second application through the security vulnerability in the first application. \ No newline at end of file
+## Why database table prefixes are not supported?
+The blogging application does not support the definition of a prefix for the database tables. This is because one database should only contain the data from one application (and if this is the case, prefixes are not necessary). If multiple applications sharing the same database and a security vulnerability is discovered in one of those applications, an attacker may be able to manipulate the data from the second application through the security vulnerability in the first application. \ No newline at end of file