public function compare(Schema $oldSchema, Schema $newSchema)
    {
        $createdTables = $this->getCreatedTables($oldSchema, $newSchema);
        $alteredTables = $this->getAlteredTables($oldSchema, $newSchema);
        $droppedTables = $this->getDroppedTables($oldSchema, $newSchema);

        $this->detectRenamedTables($createdTables, $droppedTables, $alteredTables);

        return new SchemaDiff(
            $oldSchema,
            $newSchema,
            $createdTables,
            $alteredTables,
            $droppedTables,
            $this->getCreatedSequences($oldSchema, $newSchema),
            $this->getDroppedSequences($oldSchema, $newSchema),
            $this->getCreatedViews($oldSchema, $newSchema),
            $this->getDroppedViews($oldSchema, $newSchema)
        );
    }