feat: allow sorting of categories in settings

feat: add filters to statistics page
feat: allow renaming / translation of payment methods
feat: allow deletion of the default payment methods
This commit is contained in:
Miguel Ribeiro
2024-03-05 18:17:15 +01:00
committed by GitHub
parent d7e050b868
commit 83234ab8cd
25 changed files with 755 additions and 99 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
// This migration adds a "order" column to the categories table so that they can be sorted and initializes all values to their id.
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('categories') WHERE name='order'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE categories ADD COLUMN `order` INTEGER DEFAULT 0');
$db->exec('UPDATE categories SET `order` = id');
}
?>