]> source.dussan.org Git - nextcloud-server.git/commitdiff
app migrate: Use = instead of LIKE as described in the comment above.
authorAndreas Fischer <bantu@owncloud.com>
Mon, 29 Jul 2013 16:36:52 +0000 (18:36 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Mon, 29 Jul 2013 16:41:22 +0000 (18:41 +0200)
The LIKE operator is not defined on integers (probably any non-text) columns
on PostgreSQL.

lib/migration/content.php

index 400a46a434041c7d9a4799a214eb58beb0294f49..2d8268a1d74b2a08fbcd15cea3d25ff18e20fc34 100644 (file)
@@ -112,7 +112,7 @@ class OC_Migration_Content{
 
                        foreach( $options['matchval'] as $matchval ) {
                                // Run the query for this match value (where x = y value)
-                               $sql = 'SELECT * FROM `*PREFIX*' . $options['table'] . '` WHERE `' . $options['matchcol'] . '` LIKE ?';
+                               $sql = 'SELECT * FROM `*PREFIX*' . $options['table'] . '` WHERE `' . $options['matchcol'] . '` = ?';
                                $query = OC_DB::prepare( $sql );
                                $results = $query->execute( array( $matchval ) );
                                $newreturns = $this->insertData( $results, $options );