/[drupal]/contributions/modules/workflow_fields/workflow_fields.install
ViewVC logotype

Contents of /contributions/modules/workflow_fields/workflow_fields.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Sat Feb 3 12:45:03 2007 UTC (2 years, 9 months ago) by kratib
Branch: MAIN
CVS Tags: DRUPAL-4-7--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-4-7
File MIME type: text/x-php
Initial checkin
1 <?php
2 // $Id$
3
4 function workflow_fields_install() {
5 $result = array();
6
7 switch ($GLOBALS['db_type']) {
8 case 'mysqli':
9 case 'mysql':
10 $result[] = db_query(
11 <<<QUERY
12 CREATE TABLE {workflow_fields} (
13 `sid` int(10) NOT NULL,
14 `name` varchar(100) NOT NULL,
15 `type` varchar(100) NOT NULL,
16 `visible` tinyint(4) NOT NULL,
17 `editable` tinyint(4) NOT NULL,
18 PRIMARY KEY (`sid`,`name`,`type`)
19 ) /*!40100 DEFAULT CHARACTER SET utf8 */;
20 QUERY
21 );
22 break;
23 }
24 if (count($result) == count(array_filter($result))) {
25 drupal_set_message(t('The workflow_fields module has successfully added tables to the database.'));
26 }
27 else {
28 drupal_set_message(t('Drupal was unable to install the database tables for the workflow_fields module.'), 'error');
29 }
30 }
31
32 ?>

  ViewVC Help
Powered by ViewVC 1.1.2