aboutsummaryrefslogtreecommitdiffstats
path: root/database.sql
AgeCommit message (Collapse)AuthorFilesLines
2017-10-24Database update: The maximum amount of characters for the argument field has ↵v2.4.1Thomas Lange1-3/+3
been increased from 100 to 250. Database update to version 2.4.1 (no existing data will be lost or changed): ALTER TABLE `page` MODIFY `argv` VARCHAR(250); ALTER TABLE `post` MODIFY `argv` VARCHAR(250); ALTER TABLE `user` MODIFY `argv` VARCHAR(250);
2017-10-13WARNING: This commit updates the table engine for the "post" table from ↵v2.4Thomas Lange1-10/+20
MyISAM to InnoDB and results in version 2.4. The only reason why the post table originally used MyISAM instead of InnoDB as engine was because the post table had a FULLTEXT index, which was only possible with MyISAM tables on MySQL versions smaller than 5.6 and MariaDB versions smaller than 10.0.5. However, MyISAM tables do not know foreign keys, so no relationship between the post and the user table could be established (which is bad for data integrity). In newer versions of MySQL or MariaDB are FULLTEXT indexes also possible on InnoDB tables. So, we can now update the post table to InnoDB to keep the FULLTEXT search functionality and we can add a foreign key for data integrity. This means for you: If you are already using a recent version of MySQL or MariaDB, you can safely make the update (always make a backup first). If you are not using at least MariaDB 10.0.5 or MySQL 5.6, you will have to wait with this (and all further) commits / updates until you have upgraded your database server to a more recent version. Database update to version 2.4 (no existing data will be lost or changed): ALTER TABLE `post` ENGINE=InnoDB; ALTER TABLE `post` DROP INDEX `body`; ALTER TABLE `page` ADD FULLTEXT KEY `search` (`name`, `body`); ALTER TABLE `post` ADD FULLTEXT KEY `search` (`name`, `body`); ALTER TABLE `post` ADD CONSTRAINT `post_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
2017-05-21Bugfixes: There were two problems with the internal sorting of items which ↵v2.1.2Thomas Lange1-3/+3
have been fixed. This results in version 2.1.2 (database update recommended): + Bugfix [core]: If the insertion date of a newly created item has been placed to a datetime in the past after which other items have already appeared, the sorting of the forward and backward functionality has been interrupted because the WHERE clause in the database query had the condition that the next item must have a higher ID and the previous item must have a lower ID than the current one. If this newly created item was the last one and the insertion date had been placed to a datetime in the past, no next item could be fetched because THIS is already the item with the highest ID and the correct sorting by time_insert for this item has stopped working. + Bugfix [core]: If one or more items had exactly the same insertion time, the items with the exact same time has been appeard within the overview list in an order which did not correspond to the insertion sequence. There were several ways to fix this problem, but this would result in more complicated database queries and more code. To fix the problem in the simplest way, the column "time_insert" now has a UNIQUE index to prevent two or more items from having the exactly same insertion time. Database update to version 2.1.2 (no existing data will be lost or changed): ALTER TABLE `page` ADD UNIQUE KEY `time_insert` (`time_insert`); ALTER TABLE `post` ADD UNIQUE KEY `time_insert` (`time_insert`); ALTER TABLE `user` ADD UNIQUE KEY `time_insert` (`time_insert`);
2017-04-27Several changes have been made in this commit, which together with the ↵v2.0Thomas Lange1-9/+12
previous commits result in version 2.0 (database update required): + Implemented [core]: A new database field has been added to all tables to define optional "arguments" for a page, post or user through the content editor. These arguments will be parsed into key->value pairs and can be used within templates to do something special. Please read the wiki of this repository for further information about this new feature. + Bugfix [core]: The function "makeSlugURL" had not convert uppercase umlauts to lowercase because "strtolower" was used instead of the multibyte equivalent "mb_strtolower". + Optimization [core]: The first regular expression within the function "makeSlugURL" has been optimized (checking for uppercase characters at this point is unnecessary because $string is only lowercase). + Optimization [all templates]: Markup for the pagination.php has been simplified (a little bit). + Optimization [admin template]: The javascript for the arrow key navigation has been outsourced to the main.js file. + Optimization [admin template]: The javascript file will now be included with the "defer" attribute. + Optimization [standard template]: Some language variables have been changed. Database update to version 2.0 (no existing data will be lost or changed): ALTER TABLE `page` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`; ALTER TABLE `post` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`; ALTER TABLE `user` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`;
2017-02-24Initial commit.v1.0Thomas Lange1-0/+66