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

Contents of /contributions/modules/datasync/datasync.install

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Jul 21 22:49:59 2008 UTC (16 months, 1 week ago) by andrewlevine
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
Committing actual files
1 <?php
2 // $Id$
3
4 function datasync_install() {
5 db_query("CREATE TABLE {datasync_variable} (
6 name varchar(80) NOT NULL default '',
7 value longtext NOT NULL,
8 PRIMARY KEY (name)
9 ) engine=InnoDB DEFAULT CHARSET=utf8; ");
10 db_query('
11 CREATE TABLE {datasync_jobs} (
12 `job_id` int(10) unsigned NOT NULL,
13 `consumer` varchar(50) NOT NULL,
14 `status` int(10) NOT NULL,
15 `next_status` int(10),
16 `started` int(11) NOT NULL,
17 `completed` int(11) NOT NULL,
18 PRIMARY KEY (`job_id`),
19 INDEX `completed_status_producer` (`completed`, `status`, `consumer`)
20 ) engine=InnoDB DEFAULT CHARSET=utf8;
21 ');
22 db_query('
23 CREATE TABLE {datasync_versions} (
24 `vid` int(10) unsigned NOT NULL,
25 `consumer` varchar(50) NOT NULL,
26 `guid` varchar(150) NOT NULL,
27 `version` int(11) unsigned NOT NULL,
28 `timestamp` int(11) unsigned NOT NULL,
29 PRIMARY KEY (`vid`),
30 INDEX `consumer_guid` (`consumer`, `guid`)
31 ) engine=InnoDB DEFAULT CHARSET=utf8;
32 ');
33 db_query('
34 CREATE TABLE {datasync_queue} (
35 `qid` int(11) unsigned NOT NULL,
36 `action` int(10) NOT NULL,
37 `consumer` varchar(50) NOT NULL,
38 `guid` varchar(150) NOT NULL,
39 `job_id` int(10) NOT NULL,
40 `version` int(11) NOT NULL,
41 `data` longtext,
42 PRIMARY KEY (`qid`),
43 INDEX `job_id` (`job_id`)
44 ) engine=MyISAM DEFAULT CHARSET=utf8;
45 ');
46 db_query("CREATE TABLE {datasync_failures} (
47 fid int NOT NULL auto_increment,
48 value longtext NOT NULL,
49 timestamp int(11) unsigned NOT NULL,
50 PRIMARY KEY (fid)
51 ) engine=MyISAM DEFAULT CHARSET=utf8; ");
52 }
53

  ViewVC Help
Powered by ViewVC 1.1.2