How To Extend Product_Variations Schema

Hi,
I'm trying to extend schema and I'm having problems.

I want to extend app/addons/product_variations/schemas/product_variations/product_types.php with my_custom_field

$schema = [
    Type::PRODUCT_TYPE_SIMPLE    => [
        'name' => __('product_variations.product_type.catalog_item'),
        'allow_generate_variations' => true,
    ],
    Type::PRODUCT_TYPE_VARIATION => [
        'name'          => __('product_variations.product_type.variation_of_catalog_item'),
        'tabs'          => ['detailed', 'images', 'shippings', 'qty_discounts', 'files', 'subscribers', 'variations'],
        'fields'        => [
            'product_id',
            'product_type',
            'product_code',
            'list_price',
            'prices',
            'amount',
            [b]'my_custom_field',[/b]
            'tax_ids',
            'subscribers',
            'files',
            'variation_code',
            'status',
            'timestamp',
            'shippings',
            'weight',
            'shipping_freight',
            'box_height',
            'box_length',
            'box_width',
            'min_items_in_box',
            'max_items_in_box',
            'min_qty',
            'max_qty',
            'qty_step',
            'list_qty_count',
            'availability',
            'avail_since',
            'free_shipping',
            'parent_product_id',
            'variation_features',
            'shipping_params',
        ],
        'field_aliases' => [
            'detailed_id' => 'detailed_image',
            'image_id'    => 'detailed_image',
            'price'       => 'prices',
            'taxes'       => 'tax_ids',
            'main_pair'   => 'detailed_image',
        ],
        'allow_generate_variations' => true,
    ]
];

I'm creating app/addons/my_changes/schemas/product_variations/product_types.post.php with the content:

<?php
use Tygh\Addons\ProductVariations\Product\Type\Type;
use Tygh\Addons\ProductVariations\ServiceProvider;

$schema[Type::PRODUCT_TYPE_VARIATION][‘fields’][] = ‘my_custom_field’;

return $schema;

But the above doesn't work. What am I doing wrong?

Thanks in advance!

Hello Jacek

I did it yesterday and it works for me.
Try to delete var/cache manually
Best regards
Robert

Thanks Robert,

you're right. It was a cache problem.

Thank you very much! :-)