asset_embed.install in Asset 6
File
asset_embed/asset_embed.install
View source
<?php
function asset_embed_install() {
drupal_install_schema('asset_embed');
drupal_set_message(t('Asset Embed tables have been configured.'));
if (module_exists('content')) {
content_notify('install', 'asset_embed');
}
}
function asset_embed_uninstall() {
drupal_uninstall_schema('asset_embed');
if (module_exists('content')) {
content_notify('uninstall', 'asset_embed');
}
}
function asset_embed_schema() {
$schema = array();
$schema['asset_embed'] = array(
'fields' => array(
'aeid' => array(
'type' => 'serial',
'unsigned' => true,
'not null' => true,
),
'aid' => array(
'type' => 'int',
'unsigned' => true,
'not null' => true,
),
'data' => array(
'type' => 'text',
'not null' => true,
),
),
'primary key' => array(
'aeid',
),
'unique keys' => array(
'aid' => array(
'aid',
),
),
);
return $schema;
}