Commit Graph

82 Commits

Author SHA1 Message Date
Lukas Reschke af335a39f1 Add PHPDoc about sanitization of "insertIfNotExist"
Let's document this potential pitfall properly.
2014-10-17 11:06:49 +02:00
Thomas Müller 7537d405e3 adding 'smallint unsigned' to type mapping for sqlite 2014-09-20 20:06:44 +02:00
Robin Appelman a85f0ae2da Fix ILIKE without wildcards for oracle 2014-09-18 15:09:57 +02:00
Robin Appelman 67b1ec1faf Implement ILIKE for sqlite 2014-09-17 13:47:55 +02:00
Robin Appelman 60587e9dcd Make sqlite LIKE case sensitive on default 2014-09-17 13:47:33 +02:00
Thomas Müller ca35d86c5a adding ILIKE to AdapterSQLSrv 2014-09-16 15:44:21 +02:00
Robin Appelman 1771bfc2f2 Introduce cross-db ILIKE 2014-09-16 15:32:34 +02:00
Thomas Müller d824d03fe1 Disable database migrations for MSSQL - scripts have to be applied manually 2014-09-15 15:00:32 +02:00
Lukas Reschke 353155b516 Merge pull request #7323 from owncloud/Jonny007-MKD-master
Update adapter.php
2014-09-09 11:31:50 +02:00
Thomas Müller b8b2ef8748 no statement caching for Oracle 2014-08-22 12:06:36 +02:00
Thomas Müller 58472a2660 migration test for sqlite - adding type mapping for 'tinyint unsigned' 2014-07-29 09:18:37 +02:00
Thomas Müller c87f425fe7 generate copy of sqlite database file in data directory 2014-07-28 10:29:39 +02:00
Thomas Müller 7d60f7a222 register type mappings for unknown/unsupported mysql types 2014-07-24 12:17:26 +02:00
Thomas Müller 363ba04f5e only commit in case a transaction is active 2014-07-23 20:13:19 +02:00
Andreas Fischer d8bd8c4b66 Document why we have to check with defined() first. 2014-07-16 15:13:35 +02:00
Andreas Fischer e26612244a Make MySQL return "number of found rows" instead of number of "affected rows". 2014-07-16 14:35:47 +02:00
Vincent Petry 10a29556b0 - Added test to trigger index id error
- re-enable encryption migration tests
- sqlite requires reconnect after schema changes
2014-07-14 16:20:09 +02:00
Robin Appelman 76c709d7de Add repair step to set MySQL collation to utf8_bin
Set default collation of mysql connection to utf8_bin
Set utf_bin as default collation for new tables
2014-07-08 15:12:07 +02:00
Robin Appelman c4fa07d7cf Also update sqliteadapter 2014-07-02 15:27:27 +02:00
Jonny007-MKD 4161fd2408 Update adapter.php
Modified insertIfNotExist() to support NULL values
2014-07-01 17:47:27 +02:00
Vincent Petry b752aff51d Fix migrator tests to use the correct migrator instances 2014-07-01 12:54:35 +02:00
Joas Schilling 0c711e1cfa Use get random bytes as uniqeid() is not unique in some cases
Fix #9161
2014-06-30 11:10:10 +02:00
Vincent Petry 7aa11b4361 Do not rename primary key index when renaming table
When the migrator renames a table, for example for upgrade simulation,
it should not rename the primary key to avoid messing up with the diff
because the MySQL Doctrine code expects that index to always be called
"primary".
2014-06-17 15:23:18 +02:00
Thomas Müller fe8bae31dc adding PK to table encryption
adding auto increment/PK to table files_trash

adding PK to table ldap_user_mapping and ldap_group_members

adding PK to table ldap_group_mapping

truncate permissions table to allow smooth creation of primary key

adding unit test for creating an auto increment column on a table which already contains data

remove unneeded table files_trashsizes

fix unit test

no need to truncate *PREFIX*permissions

On Oracle adding auto increment columns is not working out of the box - Oracle migrations are to be done manually
2014-06-06 13:33:56 +02:00
Vincent Petry d4ffafe467 Removed simulate db update flag and split into separate methods 2014-06-04 18:17:46 +02:00
Vincent Petry 5b97369b00 Simulate apps database schema update on upgrade
When upgrade, also simulate the database schema update for apps before
doing the actual upgrade.
2014-06-04 17:16:44 +02:00
icewind1991 68b15f3282 Merge pull request #7015 from owncloud/db-migration-check-copy
Check database migration on a copy of the table first
2014-06-03 16:27:06 +02:00
Thomas Müller 2b1a7a76c3 Merge pull request #8425 from owncloud/columns_should_be_nullable_by_default
columns should be nullable by default
2014-06-03 12:55:42 +02:00
Robin Appelman 4429b54ce4 Fix typo 2014-06-03 12:00:39 +02:00
Robin Appelman 82b982a4eb Better unique names for temporary tables 2014-06-03 11:24:31 +02:00
Robin Appelman 3be2643168 Add `generateChangeScript()` back 2014-06-03 11:19:58 +02:00
Robin Appelman 397a763c49 add a getter for the table 2014-06-03 11:18:46 +02:00
Robin Appelman c6053b2830 Quote identifiers on mysql 2014-06-03 11:18:45 +02:00
Robin Appelman 6f71419f2b Skip migration checks for all sql backends besides mysql, postgres and sqlite 2014-06-03 11:18:45 +02:00
Robin Appelman a59f6818eb Only quote identifiers for oracle during migration 2014-06-03 11:18:45 +02:00
Robin Appelman 3b4555ca91 Try and check migration before applying it 2014-06-03 11:18:17 +02:00
Robin Appelman adeac7aa39 Check sqlite migration on a copy of the database file 2014-06-03 11:17:21 +02:00
Robin Appelman 35550e8d9a Fix migrator for postgres 2014-06-03 11:17:21 +02:00
Robin Appelman be80dce585 Fix temporary schema creation 2014-06-03 11:17:21 +02:00
Robin Appelman 58c61c8336 Fix generating migration test schemas 2014-06-03 11:17:21 +02:00
Robin Appelman 0035147be9 Create unique names for temporary indexes 2014-06-03 11:17:21 +02:00
Robin Appelman 9c6a93a87c Add a mechanism to try the database migration on a copy of the tables before running it on the "real" data 2014-06-03 11:17:21 +02:00
Thomas Müller 999f6216dc - fix dropTable() and introduce tableExists()
- kill replaceDB() - this function is unused and it's implementation obviously wrong
- add method annotation OC_DB_StatementWrapper::fetchAll
- remove duplicate code in Test_DBSchema and reuse OC_DB::tableExists
- remove unused variables
2014-05-30 23:34:42 +02:00
Thomas Müller b6d2d6329d Merge pull request #8639 from owncloud/drop-brief
Remove all occurences of @brief and @returns from PHPDoc
2014-05-19 20:18:32 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Frank Karlitschek 090d127050 Merge pull request #6457 from owncloud/db-convert-tool
Command line tool to convert current database to others, except sqlite
2014-05-19 16:41:31 +01:00
Robin McCorkell 87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Thomas Müller 8314e5f4d1 fixing typos and adding PHPDoc 2014-05-12 21:58:09 +02:00
Jörn Friedrich Dreyer 6694129cbc columns should be nullable by default 2014-05-01 23:03:45 +02:00