Importing voucher codes from Espresso Store to Verbb Gift Vouchers I'm doing some messing with MySQL to import some Espresso Store voucher codes into a Craft Commerce site as Verbb Gift Vouchers.

I've got a long query that basically reads the data from the EE table(s) and creates rows in giftvoucher_codes table.
It also creates a corresponding row in the elements and elements_sites tables. 

Everything seems to join up and get created but I still don't see the imported vouchers in the Gift Vouchers area of Craft's control panel.

I've tried clearing caches with no luck.

What am I missing? What else needs to be updated to get them to show up?
I think you'd be better off creating a quick module with a controller method to import your voucher codes, to make sure Craft (and Verbb Gift) create all the necessary table rows for the vouchers to work (code is untested, but just to get an idea):

use verbb\giftvoucher\elements\Voucher;

public function actionCopyVouchers()
{
    $esVouchers = Craft::$app-&gt;db-&gt;createCommand()-&gt;select('*')-&gt;from('es_vouchers')-&gt;all();

    foreach ($esVouchers as $esVoucher) {
        $voucher = new Voucher();
        $voucher-&gt;field = $esVoucher-&gt;field;
        $voucher-&gt;anotherField = $esVoucher-&gt;anotherField;
        // ... Whatever your voucher needs ...

        Craft::$app-&gt;getElements()-&gt;saveElement($voucher);
    }
}