Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // $Id$
- /**
- * Implementation of hook_install().
- */
- function freeway_install() {
- drupal_install_schema('freeway');
- }
- /**
- * Implementation of hook_uninstall().
- */
- function freeway_uninstall() {
- drupal_uninstall_schema('freeway');
- }
- function freeway_schema() {
- $schema['freeway'] = array(
- 'description' => t('Database for Freeway related activities'),
- 'fields' => array(
- 'sr_id' => array(
- 'description' => t('The serial initializer'),
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'node_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => t("The node ID"),
- ),
- 'file_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => t("The File ID"),
- ),
- 'project_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => t("The File ID"),
- ),
- 'src_lang' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The source language"),
- ),
- 'tar_lang' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The target language"),
- ),
- 'node_title' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The node title"),
- ),
- 'node_body' => array(
- 'type' => 'text',
- //'length'=> 255,
- 'not null' => TRUE,
- //'default' => '0',
- 'description' => t("The node body"),
- ),
- ),
- 'primary key' => array('sr_id'),
- );
- $schema['freeway_mode'] = array(
- 'description' => t('Database for Freeway mode'),
- 'fields' => array(
- 'sr_id' => array(
- 'description' => t('The serial initializer'),
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'mode_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => t("The Mode Global or Non-Global"),
- ),
- ),
- 'primary key' => array('sr_id'),
- );
- $schema['freeway_users'] = array(
- 'description' => t('Database for Freeway users'),
- 'fields' => array(
- 'sr_id' => array(
- 'description' => t('The serial initializer'),
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'drupal_username' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The Drupal Username"),
- ),
- 'freeway_username' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => FALSE,
- 'default' => '0',
- 'description' => t("The Username"),
- ),
- 'freeway_password' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => FALSE,
- 'default' => '0',
- 'description' => t("The Password"),
- ),
- ),
- 'primary key' => array('sr_id'),
- );
- $schema['freeway_global_user'] = array(
- 'description' => t('Database for Freeway global user'),
- 'fields' => array(
- 'sr_id' => array(
- 'description' => t('The serial initializer'),
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'freeway_global_username' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The Global Username"),
- ),
- 'freeway_global_password' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The Global Password"),
- ),
- ),
- 'primary key' => array('sr_id'),
- );
- $schema['freeway_fileid'] = array(
- 'description' => t('Preserves File IDs of Freeway files'),
- 'fields' => array(
- 'sr_id' => array(
- 'description' => t('The serial initializer'),
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'freeway_file_id' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The File ID"),
- ),
- 'freeway_tar_lang' => array(
- 'type' => 'varchar',
- 'length'=> 255,
- 'not null' => TRUE,
- 'default' => '0',
- 'description' => t("The Target Language"),
- ),
- ),
- 'primary key' => array('sr_id'),
- );
- return $schema;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement