View source
<?php
function flash_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query('
CREATE TABLE {flash} (
nid INT(10) UNSIGNED NOT NULL ,
height INT(10) UNSIGNED NOT NULL ,
width INT(10) UNSIGNED NOT NULL ,
version INT(10) UNSIGNED NOT NULL ,
build INT(10) UNSIGNED NOT NULL ,
display TINYINT(3) UNSIGNED NOT NULL ,
PRIMARY KEY (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;');
break;
case 'pgsql':
db_query('
create table {flash} (
nid integer not null,
height integer not null,
width integer not null,
version integer not null,
build integer not null,
display integer not null,
PRIMARY KEY (nid)
);');
break;
}
drupal_set_message(t('Flash node has been setup.'));
}
function flash_update_1() {
return _system_update_utf8(array(
'flash',
));
}
function flash_update_2() {
$ret = array();
$ret[] = update_sql('ALTER TABLE {flash} DROP fid;');
return $ret;
}