/[drupal]/contributions/modules/i18n/i18nstrings/i18nstrings.install
ViewVC logotype

Contents of /contributions/modules/i18n/i18nstrings/i18nstrings.install

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


Revision 1.2 - (show annotations) (download) (as text)
Thu Oct 25 18:57:51 2007 UTC (2 years, 1 month ago) by jareyero
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA3, DRUPAL-6--1-0-BETA2, DRUPAL-6--1-0-BETA1, DRUPAL-6--1-0-BETA4, HEAD
Branch point for: DRUPAL-5--3, DRUPAL-6--1
Changes since 1.1: +9 -4 lines
File MIME type: text/x-php
Upgrading for Drupal 6
1 <?php
2 // $Id: i18nstrings.install,v 1.1 2007/10/24 18:06:16 jareyero Exp $
3
4 function i18nstrings_install() {
5 // Create database tables
6 drupal_install_schema('i18nstrings');
7 // Set module weight for it to run after core modules
8 db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18nstrings' AND type = 'module'");
9 }
10
11 function i18nstrings_uninstall() {
12 // Create database tables
13 drupal_uninstall_schema('i18nstrings');
14 }
15
16 /**
17 * Implementation of hook_schema().
18 */
19 function i18nstrings_schema() {
20 $schema['i18n_strings'] = array(
21 'description' => t('Metadata for source strings.'),
22 'fields' => array(
23 'lid' => array(
24 'type' => 'int',
25 'not null' => TRUE,
26 'default' => 0,
27 'description' => t('Source string ID. References {locales_source}.lid.'),
28 ),
29 'oid' => array(
30 'type' => 'int',
31 'not null' => TRUE,
32 'default' => 0,
33 'description' => t('Object ID.'),
34 ),
35 'type' => array(
36 'type' => 'varchar',
37 'length' => 255,
38 'not null' => TRUE,
39 'default' => '',
40 'description' => t('Object type for this string.'),
41 ),
42 'property' => array(
43 'type' => 'varchar',
44 'length' => 255,
45 'not null' => TRUE,
46 'default' => 'default',
47 'description' => t('Object property for this string.'),
48 ),
49 ),
50 'primary key' => array('lid'),
51 );
52 return $schema;
53 }

  ViewVC Help
Powered by ViewVC 1.1.2