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

Contents of /contributions/modules/inline/inline.install

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


Revision 1.2 - (show annotations) (download) (as text)
Wed Aug 12 05:27:35 2009 UTC (3 months, 2 weeks ago) by sun
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +9 -3 lines
File MIME type: text/x-php
#172613 by sun: Changed $macro into a true object.
1 <?php
2 // $Id: inline.install,v 1.1 2009/08/12 03:35:55 sun Exp $
3
4 /**
5 * @file
6 * Inline installation functions.
7 */
8
9 /**
10 * Implementation of hook_schema().
11 */
12 function inline_schema() {
13 $schema['inline'] = array(
14 'description' => t('Stores inline tags.'),
15 'fields' => array(
16 'iid' => array('type' => 'serial'),
17 'tag' => array('type' => 'varchar', 'length' => '32', 'not null' => FALSE),
18 'params' => array('type' => 'text', 'size' => 'normal',
19 'serialize' => TRUE,
20 ),
21 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0,
22 'description' => 'A flag indicating whether the tag is temporary (1) or permanent (0).',
23 ),
24 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,
25 'description' => 'UNIX timestamp for when the tag was added.',
26 ),
27 ),
28 'primary key' => array('iid'),
29 'indexes' => array(
30 'status' => array('status'),
31 ),
32 );
33 return $schema;
34 }
35
36 /**
37 * Implementation of hook_install().
38 */
39 function inline_install() {
40 drupal_install_schema('inline');
41 }
42
43 /**
44 * Implementation of hook_uninstall()
45 */
46 function inline_uninstall() {
47 drupal_uninstall_schema('inline');
48 }
49
50 /**
51 * Create new {inline} table.
52 */
53 function inline_update_6001() {
54 $ret = array();
55 if (db_table_exists('inline')) {
56 return $ret;
57 }
58 // Install new schema.
59 db_create_table($ret, 'inline', array(
60 'description' => t('Stores inline tags.'),
61 'fields' => array(
62 'iid' => array('type' => 'serial'),
63 'tag' => array('type' => 'varchar', 'length' => '32', 'not null' => FALSE),
64 'params' => array('type' => 'text', 'size' => 'normal',
65 'serialize' => TRUE,
66 ),
67 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0,
68 'description' => 'A flag indicating whether the tag is temporary (1) or permanent (0).',
69 ),
70 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,
71 'description' => 'UNIX timestamp for when the tag was added.',
72 ),
73 ),
74 'primary key' => array('iid'),
75 'indexes' => array(
76 'status' => array('status'),
77 ),
78 ));
79 return $ret;
80 }
81

  ViewVC Help
Powered by ViewVC 1.1.2