public function alterField(Model $model, Field $oldField, Field $newField, $strict = false)
    {
        $oldType = $oldField->dbType($this->connection);
        $newType = $newField->dbType($this->connection);
        if ((is_null($oldType) && is_null($oldField->relation)) || (is_null($newType) && is_null($newField->relation))) {
            throw new ValueError(
                sprintf(
                    'Cannot alter field %s into %s - they do not properly define '.
                    'db_type (are you using a badly-written custom field?)',
                    $newField->getName(),
                    $oldField->getName()
                )
            );
        } elseif (is_null($oldType) && is_null($newType) &&
            (
                null !== $oldField->relation->through &&
                null !== $newField->relation->through &&
                $oldField->relation->through->getMeta()->autoCreated &&
                $newField->relation->through->getMeta()->autoCreated
            )
        ) {
            $this->alterManyToMany($model, $oldField, $newField, $strict);
        } elseif (is_null($oldType) && is_null($newType) &&
            (
                null !== $oldField->relation->through &&
                null !== $newField->relation->through &&
                !$oldField->relation->through->getMeta()->autoCreated &&
                !$newField->relation->through->getMeta()->autoCreated
            )
        ) {
            return;
        } elseif (is_null($oldType) && is_null($newType)) {
            throw new  ValueError(
                sprintf(
                    'Cannot alter field %s into %s - they are not compatible types '.
                    '(you cannot alter to or from M2M fields, or add or remove through= on M2M fields)',
                    $oldField->getName(),
                    $newField->getName()
                )
            );
        }
        $this->doFieldAlter($model, $oldField, $newField, $strict);
    }