| 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 |
}
|