Commit Graph

93 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer e16a58220d allow passing driver options, fixes #11718 2014-10-27 12:30:29 +01:00
Lukas Reschke f901c5ff08 Fix PHPDoc and remove explicit type hint 2014-10-24 15:49:55 +02:00
Lukas Reschke b3a04840b5 Add type hinting to functions
It's only reasonable to have proper type hinting here which might even help us to catch bugs.
2014-10-24 14:13:40 +02:00
Lukas Reschke d060180140 Use function outside of loop
Otherwise the function is executed n times which is a lot of overhead
2014-10-24 12:27:53 +02:00
Thomas Müller 6c1871da06 Merge pull request #10985 from owncloud/db-cleanup
Cleanup database handling
2014-10-23 13:48:33 +02:00
Jörn Friedrich Dreyer b7fa644a54 Merge pull request #9586 from owncloud/enhanced-sql-script-generation-oracle-master
Special treatment for Oracle
2014-10-22 14:54:42 +02:00
Robin Appelman e6f6cdd19f Bit more cleanup 2014-10-22 12:29:53 +02:00
Robin Appelman 2ae6a0d96d Move creating the database connection to the server container 2014-10-22 12:29:53 +02:00
Robin Appelman d4e929c37a Remove implicit prepared statement cache and get the connection from the server container in \OC_DB 2014-10-22 12:26:43 +02:00
Robin Appelman 72f99f5041 Remove \OC\DB\ConnectionWrapper, have \OC\DB\Connection implement \OCP\IDBConnection directly instead 2014-10-22 12:26:43 +02:00
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 f7097faf82 Special treatment for Oracle 2014-10-16 17:02:15 +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