Linked Questions

Popular Questions

When uninstall module then why delete all table from database without module_uninstall() function in .install file.

Also, why create table without module_install() function .install file code is only:

function commerce_quickpay_schema() {
    $schema['webc_crypto_meta'] = [
        'description' => 'Custom Cryptography Meta',
        'fields' => [...],
        'primary key' => ['wcm_id'],
    ];
    $schema['webc_crypto_payment'] = [
        'description' => 'Custom Cryptography Payment',
        'fields' => [...],
        'primary key' => ['wcp_id'],
    ];
    return $schema;
}

Also, please, CREATE TABLE IF NOT EXISTS condition in .install file.

Related Questions