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

Contents of /contributions/modules/deploy/deploy.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Mar 5 02:27:09 2008 UTC (20 months, 3 weeks ago) by heyrocker
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Initial commit of deployment framework. Designed to improve the ability of sites to stage drupal data between servers.
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_install().
6 */
7 function deploy_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {deploy_plan} (
12 pid int unsigned NOT NULL default '0',
13 name varchar(50) NOT NULL,
14 PRIMARY KEY (pid)
15 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
16 db_query("CREATE TABLE {deploy_plan_items} (
17 iid int unsigned NOT NULL default '0',
18 pid int unsigned NOT NULL default '0',
19 module varchar(50) NOT NULL,
20 description varchar(75),
21 weight int NOT NULL default '0',
22 data longtext NOT NULL,
23 PRIMARY KEY (iid, pid)
24 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
25 db_query("CREATE TABLE {deploy_servers} (
26 sid int unsigned NOT NULL default '0',
27 description varchar(100),
28 url varchar(100),
29 api_key varchar(32),
30 PRIMARY KEY (sid)
31 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
32 break;
33 case 'pgsql':
34 break;
35 }
36 }
37
38 /**
39 * Implementation of hook_uninstall().
40 */
41 function deploy_uninstall() {
42 db_query('DROP TABLE {deploy_plan_items}');
43 db_query('DROP TABLE {deploy_servers}');
44 db_query('DROP TABLE {deploy_plan}');
45 }

  ViewVC Help
Powered by ViewVC 1.1.2