Use a table that hasn't got a foreign key
authorMichael <heluecht@pirati.ca>
Fri, 15 May 2020 18:58:54 +0000 (18:58 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 15 May 2020 18:58:54 +0000 (18:58 +0000)
tests/src/Database/DBStructureTest.php

index 2a254eb..be5ca11 100644 (file)
@@ -75,10 +75,10 @@ class DBStructureTest extends DatabaseTest
         * @small
         */
        public function testChangePrimaryKey() {
-               $oldID = 'client_id';
+               $oldID = 'id';
                $newID = 'pw';
 
-               $this->assertTrue(DBStructure::rename('clients', [ $newID ], DBStructure::RENAME_PRIMARY_KEY));
-               $this->assertTrue(DBStructure::rename('clients', [ $oldID ], DBStructure::RENAME_PRIMARY_KEY));
+               $this->assertTrue(DBStructure::rename('workerqueue', [ $newID ], DBStructure::RENAME_PRIMARY_KEY));
+               $this->assertTrue(DBStructure::rename('workerqueue', [ $oldID ], DBStructure::RENAME_PRIMARY_KEY));
        }
 }