summaryrefslogtreecommitdiffstats
path: root/core/Command/Db
Commit message (Collapse)AuthorAgeFilesLines
* add support for boolean defaultMaxence Lange2019-01-091-1/+5
| | | | | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com> code cleaning Signed-off-by: Maxence Lange <maxence@artificial-owl.com> code cleaning Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Fix generated migration class codeChristoph Wurst2018-08-211-3/+0
| | | | | | The `@since` documentation is out of place here. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #10298 from ↵Morris Jobke2018-07-241-1/+1
|\ | | | | | | | | nextcloud/bugfix/talk-714/only-migrate-the-schema-when-moving-database Only create the schema when moving between databases
| * Only create the schema when moving between databasesJoas Schilling2018-07-191-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add filecache index on mtimeRobin Appelman2018-07-191-0/+11
|/ | | | | | Gives searching by mtime and "recent" a proper index to use Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add parent index to share tableRoeland Jago Douma2018-06-031-1/+9
| | | | | | Fixes #9327 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add human readable description to migration stepsRobin Appelman2018-05-301-1/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Emit event when running ./occ db:add-missing-indicesRoeland Jago Douma2018-05-241-7/+15
| | | | | | | This allows apps to listen to this event in order to also update indecies there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add autocomplete to migration commandsJoas Schilling2018-05-035-11/+145
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add mtime and storage_mtime to db:convert-filecache-bigintAlecks Gates2018-02-171-1/+1
|
* Fix the type hints of migrations and correctly inject the wrapped schema ↵Joas Schilling2018-01-172-6/+6
| | | | | | into migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* make occ command more genericBjoern Schiessle2017-12-181-7/+25
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* add occ command to add a index to share_with at the share tableBjoern Schiessle2017-12-181-0/+73
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Update license headersMorris Jobke2017-11-067-13/+16
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Also update the activity table with thisJoas Schilling2017-10-131-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a command to manually migrate to big intsJoas Schilling2017-10-131-0/+101
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix missing "unsigned" on integer columnsJoas Schilling2017-09-191-0/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix typo in template for migration generationJoas Schilling2017-08-091-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add *lob support for all tablesJoas Schilling2017-07-251-14/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* use template placeholders instead of htmlJoas Schilling2017-07-251-6/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Always order by all values, to make sure all entries are copied correctlyJoas Schilling2017-07-251-9/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only migrate to the current stateJoas Schilling2017-07-251-6/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use order by to avoid problems when chunking finds a same item again...Joas Schilling2017-07-251-9/+30
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove generate change script which doesnt work with migrations anymoreJoas Schilling2017-07-251-89/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use default connection parameters for utf8 4byte supportJoas Schilling2017-07-251-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Skip migrations table because it was already done when creating the schemaJoas Schilling2017-07-251-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use migrations on convertJoas Schilling2017-07-251-1/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Core is converted, so this is dead codeJoas Schilling2017-07-251-9/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a script to generate a migration from database.xmlJoas Schilling2017-07-252-5/+214
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add Phan plugin to check for SQL injectionsLukas Reschke2017-07-201-0/+8
| | | | | | | | | | 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>
* Only create the migration directory when necessaryJoas Schilling2017-07-061-0/+17
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to check the schema in pre and post as wellJoas Schilling2017-07-051-4/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a version to migrations, so parallel legacy branches can also have ↵Joas Schilling2017-07-051-9/+19
| | | | | | migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add author and copyrightJoas Schilling2017-07-052-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Do not allow to go back on productive systemsJoas Schilling2017-07-051-1/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust the code to use our interface and abstractJoas Schilling2017-07-051-63/+27
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Start migrationsJoas Schilling2017-07-054-0/+412
| | | | | | | | | | 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>
* Add console command to migrate the charsetThomas Müller2017-04-281-6/+6
|
* Use false because null crashes the cacheJoas Schilling2017-03-261-3/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure blob columns are correctly converted as parametersJoas Schilling2017-03-261-1/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Improve error message of charset convert script and behaviourMorris Jobke2017-03-231-4/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Address commentsMorris Jobke2017-03-211-1/+1
| | | | | | | | | * 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>
* Adding tests for 4 byte unicode charactersMorris Jobke2017-03-211-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Add autocomplete for db:* and log:*Joas Schilling2016-09-292-2/+59
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix dbconvertRoeland Jago Douma2016-09-061-19/+18
|
* Rebranded to Nextcloud for the occ command line toolSander Ruitenbeek2016-07-301-1/+1
|
* Fix othersJoas Schilling2016-07-212-3/+5
|
* Chunk the "db:convert-type" select queries, to not run out of memory so fastJoas Schilling2016-05-131-14/+56
|
* Rename files to be PSR-4 compliantLukas Reschke2016-04-062-0/+369