public function prepareHasOneConstraintStatement(TypeInterface $type, HasOneAssociation $association)
    {
        $result = [];

        $result[] = 'ALTER TABLE ' . $this->getConnection()->escapeTableName($type->getName());
        $result[] = '    ADD CONSTRAINT ' . $this->getConnection()->escapeFieldName($association->getConstraintName());
        $result[] = '    FOREIGN KEY (' . $this->getConnection()->escapeFieldName($association->getFieldName()) . ') REFERENCES ' . $this->getConnection()->escapeTableName($association->getTargetTypeName()) . '(`id`)';

        if ($association->isRequired()) {
            $result[] = '    ON UPDATE CASCADE ON DELETE CASCADE;';
        } else {
            $result[] = '    ON UPDATE SET NULL ON DELETE SET NULL;';
        }

        return implode("\n", $result);
    }