diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -359,8 +359,10 @@ throw new SchemaObjectExistsException(t("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); } // @TODO The server is likely going to rename indexes and constraints - // during the copy process, and it will not match our - // table_name + constraint name convention anymore. Fix this. + // during the copy process, and it will not match our + // table_name + constraint name convention anymore. + throw new \Exception('Not implemented, see https://drupal.org/node/2056133'); + // This is how the implementation could look like: $info = $this->getPrefixInfo($destination); return $this->connection->query('CREATE TABLE `' . $info['table'] . '` (LIKE {' . $source . '} INCLUDING ALL)'); } diff -u b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php --- b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php @@ -282,6 +282,7 @@ if ($this->tableExists($destination)) { throw new SchemaObjectExistsException(t("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); } + $this->createTable($destination, $this->introspectSchema($source)); }