Commit Graph

88 Commits (f7d5edfb5f403bc93345fcf4d24b51b015661bd6)

Author SHA1 Message Date
Robin Appelman fc2cda12b5
fix: use proper migration sorting when checking if a migration needs to be executed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-02 14:29:08 +07: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 +07:00
Joas Schilling 46c853146b
fix(migration): Correctly sort migrations by version number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-08-27 16:25:10 +07: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 +07: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 +07: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 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Simon L 8fd2289058
Merge pull request #43357 from nextcloud/enh/41253/fix-occ-upgrade
fix(migration): Make naming constraint fail softer on updates
2024-02-08 18:27:39 +07:00
Louis Chemineau 898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
This reverts commit d9d60238c7, reversing
changes made to ba3fdb0cdc.
2024-02-08 15:31:19 +07:00
Joas Schilling 487c33f479
fix(migration): Make naming constraint fail softer on updates
Only on installation we want to break hard, so that all developers notice
the bugs when installing the app on any database or CI, and can work on
fixing their migrations before releasing a version incompatible with Postgres.

In case of updates we might be running on production instances and the
administrators being faced with the error would not know how to resolve it
anyway. This can also happen with instances, that had the issue before the
current update, so we don't want to make their life more complicated
than needed.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-07 20:45:51 +07:00
Joas Schilling 6f39d82031
fix(install): Make installing more verbose
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-11-03 15:44:46 +07:00
Carl Schwan e966cfbc4b
Cleanup plsam issues in DB/ContactsManager and Console
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-09-05 09:20:26 +07:00
Joas Schilling 0bf738d8cb
feat(db): Ensure that index names are unique across the database
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-20 14:27:26 +07:00
Christoph Wurst 14719110b9 chore: Replace \OC::$server->query with \OCP\Server::get in /lib
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
Roeland Jago Douma d151999fc8
typehint migrationservice closures
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2022-10-09 21:31:27 +07:00
Côme Chilliet c598e3cafa
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-21 16:36:25 +07:00
Côme Chilliet 1bd5222224
Fix PHP 8.2 warnings about undeclared properties
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-21 16:17:52 +07:00
Joas Schilling df36ed4d1a
Log missing primary key until we make it a requirement
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-08 10:47:24 +07:00
Joas Schilling 10b2319aa0
Add missing doc changes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 15:50:33 +07:00
Joas Schilling 82c33be744
Fix typos and empty tabs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 12:42:52 +07:00
John Molakvoæ 0257315c34
Improve error logging on migration failure
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-07 11:49:20 +07:00
John Molakvoæ e20d5fa7fc
Ensure schema change before checking OracleConstraints
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-07 11:18:14 +07:00
Côme Chilliet dd357d7f9b
Merge pull request #31679 from nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000
Ensure string column limit of 4.000 characters
2022-03-31 11:37:43 +07:00
Joas Schilling 129bae62d4
Ensure string column limit of 4.000 characters
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/datatype-limits.html#GUID-963C79C9-9303-49FE-8F2D-C8AAF04D3095

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-25 12:44:51 +07:00
Côme Chilliet ea23523c70
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Joas Schilling 3bed983a9c
Disable for now again until more apps are fixed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-21 12:14:19 +07:00
Joas Schilling 32ede5489e
Limit missing primary key fail to new tables
This will work on CI so devs notice it when they install the app for testing,
and at the same time existing faulty tables don't break the upgrade to 24

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-21 12:14:19 +07:00
Joas Schilling b35253a4c3
Enforce primary keys as they are required to be performant in MySQL clusters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 10:24:05 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst 2ab8268128
Do not check Oracle column constraints in unrelated migrations
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-19 13:05:34 +07:00
Joas Schilling f9d4fa2d38
Rename the method to match what it does
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:18 +07:00
Joas Schilling 3696ef5b96
Don't allow Notnull for boolean columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:17 +07:00
Joas Schilling 133a6f4fe4
Document the constraints we test against
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:17 +07:00
Joas Schilling c98cab137c
Fix exception messages spacing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:10 +07:00
Joas Schilling 1e5fea0460
Only mark migrations as installed after execution
The problem is that if a developer creates a structural error in their migration file,
they will already be marked as executed and an not be rerun.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-04 08:49:42 +07:00
Joas Schilling 1de3b8b0ec
When it kicks in
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-02-18 10:14:12 +07:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +07:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Julius Härtl 36ffad5ba7
Make sure the migrations table schema is always checked
Signed-off-by: Julius Härtl <jus@bitgrid.net>

Revert "Make sure the migrations table schema is always checked"

This reverts commit 258955ef738a52d9da2ac2fe59466e6093d7e9bc.

Set current vendor during upgrade and perform migrations table change if needed

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:24:03 +07:00
Joas Schilling c1f28f8d35
Make debugging migration exceptions easier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 19:35:01 +07:00
Joas Schilling d7b5d4cb58
Revert "Revert "Installation goes brrrr"" 2020-11-11 20:12:13 +07:00
Christoph Wurst d36155620c
Revert "Installation goes brrrr" 2020-11-11 17:40:12 +07:00
Joas Schilling 77713ab454
Don't create a schema to check if the migrations table exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-11 11:45:00 +07:00
Joas Schilling dde0e73c6b
Reduce the number of schemas we generate when we just run all migrations anyway
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-11 11:45:00 +07:00
Joas Schilling 50230847ce
Warn about adding NotNull columns with nullable default
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-07 13:14:49 +07:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Daniel Kesselberg 87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00