Commit Graph

127 Commits

Author SHA1 Message Date
Joas Schilling f877096a28
Fix typo in template for migration generation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-09 11:01:08 +02:00
Morris Jobke c40352c030 Merge pull request #5816 from nextcloud/fix-oracle
Fix oracle
2017-08-02 20:54:58 +02:00
Joas Schilling 3b648645f4
Allow to specify the table space on occ
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:15 +02:00
Morris Jobke cd02b2205e Use public methods for OC_App::isShipped
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-01 18:57:00 +02:00
sualko 7720e19e10 add namespace
Signed-off-by: sualko <klaus@jsxc.org>
2017-07-26 15:24:24 +02:00
sualko 3e62a25155 add occ app:install command
Signed-off-by: Klaus Herberth <klaus@jsxc.org>
2017-07-26 14:35:42 +02:00
Joas Schilling b729cc2a02
Add *lob support for all tables
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:49:15 +02:00
Joas Schilling 087138f228
use template placeholders instead of html
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:49:15 +02:00
Joas Schilling e023899078
Always order by all values, to make sure all entries are copied correctly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:49:15 +02:00
Joas Schilling 1b7c1ad5c0
Only migrate to the current state
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:49:15 +02:00
Joas Schilling 10d7cbb71f
Use order by to avoid problems when chunking finds a same item again...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:49:12 +02:00
Joas Schilling 0a0dbbdf15
Remove generate change script which doesnt work with migrations anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:39 +02:00
Joas Schilling 3fedfe67b9
Use default connection parameters for utf8 4byte support
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:39 +02:00
Joas Schilling 42ed7a18cc
Skip migrations table because it was already done when creating the schema
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:39 +02:00
Joas Schilling 1d56b52761
Use migrations on convert
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:39 +02:00
Joas Schilling 9307aaee49
Core is converted, so this is dead code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:39 +02:00
Joas Schilling f6c48b1548
Add a script to generate a migration from database.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:45:38 +02:00
Lukas Reschke 3d2600b039
Add Phan plugin to check for SQL injections
This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues.

As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections.

The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-20 22:48:13 +02:00
Joas Schilling 0f275b1550
Only create the migration directory when necessary
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-06 09:58:39 +02:00
Joas Schilling 3b267b165f Check the migration files for table, column and index length errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:02:16 +02:00
Joas Schilling 5d9d1b1cb5 Allow to check the schema in pre and post as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Joas Schilling 817783e4c7 Add a version to migrations, so parallel legacy branches can also have migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Joas Schilling df6b839b23 Add author and copyright
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Joas Schilling 8c39e66619 Do not allow to go back on productive systems
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Joas Schilling 194ef1a171 Adjust the code to use our interface and abstract
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Joas Schilling 15eec7b83c Start migrations
Fixme:
- Install and update of apps
- No revert on live systems (debug only)
- Service adjustment to our interface
- Loading via autoloader

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Julius Härtl 2e47210d6f Add command to apply updates to custom themes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-07-05 12:38:07 +02:00
Joas Schilling eebd2811dc
Version and dependency are now required
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-22 09:54:44 +02:00
Morris Jobke 6dea5e6aad Implement skip checkers and log the currently tested app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-16 16:18:02 -05:00
Joas Schilling f920dfe09b
Skip the code checking for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-16 16:17:56 +02:00
Joas Schilling 31bb65fa36
Check the name length of database items
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-16 16:16:11 +02:00
Joas Schilling 93fc7fcdbe
Check the syntax of the language file
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-16 16:16:07 +02:00
Morris Jobke caa0ae94e8 Proper logging for appstore updates
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-11 13:35:17 -05:00
Thomas Müller 43427e26d7
Add console command to migrate the charset 2017-04-28 09:35:36 +02:00
Morris Jobke aa10cca61b
Do not disable 3rdparty apps on occ upgrade
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-27 18:11:33 -03:00
Morris Jobke c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:01 -05:00
Joas Schilling 75eee315a3
Use false because null crashes the cache
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-26 22:43:19 +02:00
Joas Schilling 2961c735e3
Make sure blob columns are correctly converted as parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-26 17:11:57 +02:00
Morris Jobke 8a4466f9ae
Improve error message of charset convert script and behaviour
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 15:36:22 -06:00
Morris Jobke 3329f44a76
Address comments
* fix URL to documentation
* improve logic of UTF8mb4 check
* fix connection parameter creation - it's done already in ConnectionFactory::createConnectionParams
* remove unused attributes of MDB2SchemaReader

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:42 -06:00
Morris Jobke 713f684a8b
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes

Add config option to update charset of mysql to utf8mb4

* fully optional
* requires additional options set in the database

only disable unicode test on mysql

Fixing ctor call

Adding docker based unit test execution for mysql utf8mb4

Add mysqlmb4 test configuration to Jenkinsfile

fix collation on utf8mb4

Properly setup charset and collation in the doctrine connection

Allow files containing 4-byte chars in case the database supports it

During setup of a mysql database we try to detect if charset 'utf8mb4' can be used

Fix mysql settings

Add console command to migrate the charset

Set ROW_FORMAT before setting collation to mb4

Also select tables with wrong collation

Faster MySQL docker

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:12 -06:00
Morris Jobke 8b670b41f1 Merge pull request #3952 from nextcloud/downstream-27209
Log files:scan exception, add InterruptedException
2017-03-20 03:22:58 -06:00
Vincent Petry b8a8f43fce
Log files:scan exception, add InterruptedException
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 02:24:28 -06:00
Morris Jobke daa7e11095 Merge pull request #3947 from nextcloud/downstream-27323
Disable empty password for user::resetpassword command using CLI
2017-03-20 01:53:28 -06:00
Sujith H a860ee3a45
Disable empty password for user::resetpassword command using CLI
Fixes issue: https://github.com/owncloud/core/issues/25206

Signed-off-by: Sujith H <sharidasan@owncloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 00:01:12 -06:00
Morris Jobke 0f2ee20885
ownC -> Nextc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 22:02:21 -06:00
Matthew Setter d4058b73c2
Update the occ:encrypt-all prompt
The message isn't as clear, nor as succinct, as it could be.
Given that, this commit seeks to address both those points.
This commit was prompted by https://github.com/owncloud/documentation/pull/2835.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 22:02:14 -06:00
Morris Jobke edd55b0ea9
Use SystemConfig instead of AllConfig for DB stuff
* preparation for followup PRs to clean up the DB bootstrapping

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 15:53:49 -06:00
Morris Jobke 9533f4e5ed
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since
we heavily rely on WebDAV and OCS also in the web UI it's basically useless.
An admin only sees a broken interface and can't even change any settings nor
sees any files. Also sharing is not possible.

As this is at least the case since Nextcloud 9 and we haven't received any
reports for this it seems that this feature is not used at all so I removed it.

The encryption commands now rely on the well tested maintenance mode.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 23:02:31 -06:00