diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-27 21:52:46 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-27 21:52:46 +0100 |
commit | 93b8aba3a174beed499ffe96d6b1c74e96775052 (patch) | |
tree | b45f7afe453e2406121e3574f7af4058db99eeee | |
parent | e30480961246c33c3938bb5023e4e06675ad5c48 (diff) | |
parent | 22adc397dea060150e6982ba9dda1483eebbfa67 (diff) | |
download | nextcloud-server-93b8aba3a174beed499ffe96d6b1c74e96775052.tar.gz nextcloud-server-93b8aba3a174beed499ffe96d6b1c74e96775052.zip |
Merge pull request #7439 from owncloud/unit-test-for-7430
adding test for migrations on columns using keywords
-rw-r--r-- | lib/private/db/mdb2schemamanager.php | 3 | ||||
-rw-r--r-- | tests/data/db_structure.xml | 15 | ||||
-rw-r--r-- | tests/data/db_structure2.xml | 15 |
3 files changed, 33 insertions, 0 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php index c050d47b499..aaf2ea543b9 100644 --- a/lib/private/db/mdb2schemamanager.php +++ b/lib/private/db/mdb2schemamanager.php @@ -82,6 +82,9 @@ class MDB2SchemaManager { $platform = $this->conn->getDatabasePlatform(); foreach($schemaDiff->changedTables as $tableDiff) { $tableDiff->name = $platform->quoteIdentifier($tableDiff->name); + foreach($tableDiff->changedColumns as $column) { + $column->oldColumnName = $platform->quoteIdentifier($column->oldColumnName); + } } if ($generateSql) { diff --git a/tests/data/db_structure.xml b/tests/data/db_structure.xml index d98066c4b7e..858c9ab1002 100644 --- a/tests/data/db_structure.xml +++ b/tests/data/db_structure.xml @@ -223,4 +223,19 @@ </declaration> </table> +<table> + <name>*dbprefix*migratekeyword</name> + + <declaration> + + <field> + <name>select</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + </declaration> +</table> + </database> diff --git a/tests/data/db_structure2.xml b/tests/data/db_structure2.xml index ae5f22e9573..568d90ab0a9 100644 --- a/tests/data/db_structure2.xml +++ b/tests/data/db_structure2.xml @@ -119,4 +119,19 @@ </declaration> </table> + <table> + <name>*dbprefix*migratekeyword</name> + + <declaration> + + <field> + <name>select</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>255</length> + </field> + </declaration> + </table> + </database> |