Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 107 lines (102 sloc) 2.662 kB
9ca94c2 @darthsteven Copy over the changes from github.
darthsteven authored
1 <?php
2
3 /**
4 * @file
5 * Install file for views content cache.
6 */
7
8 /**
9 * Implementation of hook_schema().
10 */
11 function views_content_cache_schema() {
12 return views_content_cache_schema_6001();
13 }
14
15 /**
16 * Schema version 6001.
17 *
18 * We'va added a table here that can store timestamps against various cache
19 * segments. These get dynamically mapped to real cache segments, like node type
20 * or organic group ID.
21 */
22 function views_content_cache_schema_6001() {
23 $schema = array();
24 $schema['views_content_cache'] = array(
25 'description' => 'Stores timestamps for various cache segments showing the last time the segment changed.',
26 'fields' => array(
27 'timestamp' => array(
28 'type' => 'int',
29 'not null' => TRUE,
30 'default' => 0,
31 'description' => 'Updated timestamp for a given cache segment.',
32 ),
33 'c1' => array(
34 'type' => 'varchar',
35 'length' => 255,
36 'default' => NULL,
37 'description' => 'Cache segment 1.',
38 ),
39 'c2' => array(
40 'type' => 'varchar',
41 'length' => 255,
42 'default' => NULL,
43 'description' => 'Cache segment 2.',
44 ),
45 'c3' => array(
46 'type' => 'varchar',
47 'length' => 255,
48 'default' => NULL,
49 'description' => 'Cache segment 3.',
50 ),
51 'c4' => array(
52 'type' => 'varchar',
53 'length' => 255,
54 'default' => NULL,
55 'description' => 'Cache segment 4.',
56 ),
57 'c5' => array(
58 'type' => 'varchar',
59 'length' => 255,
60 'default' => NULL,
61 'description' => 'Cache segment 5.',
62 ),
63 'c6' => array(
64 'type' => 'varchar',
65 'length' => 255,
66 'default' => NULL,
67 'description' => 'Cache segment 6.',
68 ),
69 'c7' => array(
70 'type' => 'varchar',
71 'length' => 255,
72 'default' => NULL,
73 'description' => 'Cache segment 7.',
74 ),
75 'c8' => array(
76 'type' => 'varchar',
77 'length' => 255,
78 'default' => NULL,
79 'description' => 'Cache segment 8.',
80 ),
81 ),
82 'indexes' => array(
83 'timestamp' => array('timestamp'),
84 'c1' => array('c1'),
85 'c2' => array('c2'),
86 'c3' => array('c3'),
87 'c4' => array('c4'),
88 'c5' => array('c5'),
89 'c6' => array('c6'),
90 'c7' => array('c7'),
91 'c8' => array('c8'),
92 ),
93 );
94 return $schema;
95 }
96
97 /**
98 * Update 6001: Create tables for schema version 6001.
99 */
100 function views_content_cache_update_6001() {
101 $ret = array();
102 foreach (views_content_cache_schema_6001() as $name => $table) {
4f459e5 @dawehner update .install to d7
dawehner authored
103 db_create_table($name, $table);
9ca94c2 @darthsteven Copy over the changes from github.
darthsteven authored
104 }
105 return $ret;
106 }
Something went wrong with that request. Please try again.