Commit graph

205 commits

Author SHA1 Message Date
provokateurin
dd8b4fb384
style(PHP): Fix
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-06-11 20:01:52 +02:00
Ferdinand Thiessen
9bc22fd2c4
chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-06-11 17:19:41 +02:00
Louis Chmn
9f6984d0a1 fix(DB): Improve wording about unused indexes
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 16:46:23 +02:00
Louis Chmn
1c48481217 fix: Psalm errors from #60840
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 15:07:54 +02:00
rodrigocorreiaist
29d79d3637
Merge branch 'master' into feature/db-diagnostics 2026-06-03 14:15:00 +01:00
Côme Chilliet
1ab09ec753
chore: Apply new coding standard to all files
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
rodrigocorreiaist
904a5e3640
Merge branch 'master' into feature/db-diagnostics 2026-05-29 15:57:42 +01:00
Rodrigo Correia
729e1e6920 feat(db): add occ db:info, db:size, db:index-usage and db:locks
Implements RFC #59422. Adds four read-only diagnostic commands to
the occ CLI for administrators to inspect database health without
needing external tools:

- db:info: shows engine version and key config variables with
  health check against recommended values
- db:size: lists all tables ordered by total disk usage
- db:index-usage: reports unused indexes via performance_schema
  (MySQL) or pg_stat_user_indexes (PostgreSQL)
- db:locks: detects active blocking transactions and deadlocks

All commands support MySQL/MariaDB and PostgreSQL. A --json flag
is available for automated parsing. Includes 31 unit tests.

Closes #59422
Signed-off-by: Rodrigo Correia <rodrigo.mendes.correia@tecnico.ulisboa.pt>
Signed-off-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
Co-authored-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
2026-05-27 13:37:40 +01:00
Ferdinand Thiessen
1c23feae3d
refactor: migrate usage of OC_App to AppManager
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-13 14:01:49 +02:00
Ferdinand Thiessen
20acaf307e
chore: add missing Override attribute to core code
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:28 +02:00
Côme Chilliet
6b49aa792b
chore: Remove types from const properties for PHP 8.2 compatibility
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-03-23 16:36:01 +01:00
Côme Chilliet
cd2d09de64
fix: Remove static vars from core classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-03-23 16:34:54 +01:00
Josh
636345bac8
fix(db): pending migrations in occ migrations:status
Fixes #58569

Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-02-26 12:38:00 -05:00
Carl Schwan
f6c839d125
refactor(psalm): Modernize migration doc
And remove all the duplication in the subclasses

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-12 11:25:55 +01:00
Carl Schwan
4d47fdaa85 chore: Run rector with new rules for fetch
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-18 17:45:57 +01:00
Carl Schwan
7a43bf26ca refactor(dbal): Migrate away from Type::getName
Instead use Type::lookupName

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-10 16:13:09 +02:00
Carl Schwan
b0c6ef5821 refactor(dbal): Port away from deprecated hasPrimaryKey
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-10 15:44:43 +02:00
Carl Schwan
9e848551be refactor: Port away from more IQueryBuilder::execute
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-02 14:40:28 +02:00
Robin Appelman
4da6081786
feat: add table filter to schema:export and schema:expected
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-07 19:09:07 +02:00
Côme Chilliet
7127ac4b43
fix: Replace OC_App::loadApp calls by IAppManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-10 11:40:27 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Christoph Wurst
3a7c094f3b
refactor: generate migrations with override attributes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-06-04 07:38:06 +02:00
provokateurin
82fb8f8508
refactor: Extend rector to core/
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-15 00:16:54 +02:00
Christoph Wurst
29161c0dfd
fix(db): Create replacement index where original index is missing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-04-17 17:59:19 +02:00
Côme Chilliet
a3685551f7
fix: Replace isInstalled calls with isEnabledForAnyone or isEnabledForUser
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 10:19:19 +01:00
provokateurin
d8cc8aae1a
fix(ConvertType): Read hostname from arguments and not options
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-01-30 09:24:58 +01:00
Nils Wenninghoff
cf5d55edb7
fix(ConvertType): Read dbtype in createConnectionParams and remove safeguard
Signed-off-by: Nils Wenninghoff <nils@ungemein.cool>
2025-01-30 09:24:58 +01:00
Git'Fellow
a1681b0756 chore(db): Apply query prepared statements
Fix: psalm

fix: bad file

fix: bug

chore: add batch

chore: add batch

chore: add batch

fix: psalm
2024-10-17 20:30:47 +02:00
Joas Schilling
c109ae9437
ci: Fix psalm by typing the QuestionHelper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-07 12:11:27 +02:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +02:00
Côme Chilliet
76f2bc0bfc
fix: Replace OC_App::getAllApps with a method in AppManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-13 10:08:44 +02:00
Anna Larch
8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +02:00
John Molakvoæ
c28340dd5b
Merge pull request #39242 from joshtrichards/db-convert-type-mysql-socket-no-pw 2024-09-04 09:32:21 +02:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Josh Richards
71fff03e9b fix(occ): Add support for UNIX sockets to db:convert-type
Fixes #31998

Adds support to `occ db:convert-type` to support UNIX socket connections via MySQL/MariaDB. Uses same `dbhost` / `hostname` parameter parsing logic (adapted) as used elsewhere (at least the relevant parts) for consistency.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2024-08-16 09:04:36 +02:00
Maxence Lange
6ad6fa6425 fix(migration-preview): display a message if no attributes set
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-08-06 22:23:12 -01:00
Maxence Lange
7c1ee524be fix(migration-attributes): privatizing AttributeException
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-07-29 12:44:52 -01:00
Maxence Lange
79e6014879 feat(upgrade): release metadata
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-07-29 12:44:52 -01:00
Maxence Lange
88cfab4f32 feat(upgrade): migration attributes
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>

d

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>

f

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>

d

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-07-29 12:44:52 -01:00
Joas Schilling
829f2b9bc7
fix(db): Promote the use of getDatabaseProvider to reduce the impage of removed upstream platforms
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:14 +02:00
Joas Schilling
a4c1d7291f
fix(db): Use createSchemaManager() method as getSchemaManager() is deprecated
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:11 +02:00
Robin Appelman
5f7b33fbea
Merge pull request #46194 from nextcloud/schema-export-cmnd
feat: add commands for exporting current and expected database schema
2024-07-02 16:44:55 +02:00
Robin Appelman
4f01486da0
feat: add commands for exporting current and expected database schema
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-02 13:45:12 +02:00
Daniel Kesselberg
d00b8ed1f5
chore: use spdx for migrations generator
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-06-28 18:54:50 +02:00
Andy Scherzinger
5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-26 20:05:04 +02:00
Josh
2ccde6f231
fix(db): cs-fix spacing
Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-05-18 10:50:38 -04:00
Josh
59dc6b49cd
fix(db): Prevent data loss by temporarily disabling db:convert-type
Needed until #45257 is addressed to prevent data loss

Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-05-17 22:26:15 -04:00
Josh
20953d0374
Merge pull request #43824 from nextcloud/fix/db/occ-db-convert-disabled-apps
fix(db): db-convert supports disabled apps but not removed ones
2024-03-07 10:17:45 -05:00
Joas Schilling
92fc12918e
fix(migrations): Help developers to add description and copyright info
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-03-05 12:56:38 +01:00
Johannes Merkel
06d076410a
feat(occ): add possibility to edit indices
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
2024-02-27 11:03:08 +01:00