Skip to content

Database

Thomas Lange edited this page Jul 1, 2021 · 10 revisions

Table migration [InnoDB]

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]

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 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 content of the page in the markdown format
  • Column argv: Contains the optional argument string or is NULL

Table post [InnoDB]

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 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 content of the post in the markdown format
  • Column argv: Contains the optional argument string or is NULL

Table user [InnoDB]

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
  • Column time_update: Contains the time stamp (Format: YYYY-MM-DD HH:II:SS) when the user was updated
  • Column slug: Contains the slug part of the users absolute URL
  • Column username: Contains the username of the user
  • 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 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 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.