Mercurial > defr > drupal > filearchiver
view filearchiver.install @ 0:ddfec30e1789 tip
Import public
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Mon, 01 Sep 2008 19:27:32 +0200 |
parents | |
children |
line wrap: on
line source
<?php // $Id$ /** * @file * File Archiver install file * * This file allows the creation of the tables needed by File Archiver. */ function filearchiver_install() { switch ($GLOBALS['db_type']) { case 'mysql': case 'mysqli': db_query("CREATE TABLE {filearchiver_files}( fid int not null default '0', source int not null default '1', archive varchar(250), PRIMARY KEY(fid, source) );"); break; case 'pgsql': db_query("CREATE TABLE {filearchiver_files}( fid int not null default '0', source int not null default '1', archive varchar(50), PRIMARY KEY(fid, source) "); break; } } function filearchiver_uninstall() { db_query('DROP TABLE {filearchiver_files}'); variable_del('filearchiver_sources'); }