source: sipp/0.3-stable-modules/reportes_sipp/reportes_sipp.install

0.3-stable
Last change on this file was a0b4327, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

Se agregaron los nuevos cambios a los modulos

  • Propiedad mode establecida a 100644
File size: 3.5 KB
Línea 
1<?php
2  /**
3  * Sistema Integral de Planificación y Presupuesto (SIPP)
4  * @file reportes_sipp.install
5  * Drupal part Module to Sistema Integral de Planificación y Presupuesto (SIPP)
6  * Copyright 2013 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL)
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  *
22  * @author Cenditel Merida - Ing. Diego Uzcátegui (diego.uzc [at] gmail [dot] com)
23  * @date 2013-05-01 // (a&#241;o-mes-dia)
24  * @version 0.1 // (0.1)
25  *
26  */
27
28/*
29 * Implementation of hook_install()
30 */
31function reportes_sipp_install() {
32  // Notify content module when this module is uninstalled.
33  drupal_install_schema('reportes_sipp');
34  db_query("DELETE FROM {cache}");
35 
36}
37
38/*
39 * Implementation of hook_uninstall()
40 */
41function  reportes_sipp_uninstall() {
42  // Notify content module when this module is uninstalled.
43  drupal_uninstall_schema('reportes_sipp');
44  db_query("DELETE FROM {cache}");
45
46}
47
48/**
49 * Implementation of hook_schema()
50 * @return array of Schema API table definitions.
51 */
52function reportes_sipp_schema() {
53  $schema = array();
54
55  $schema['microinformes_area_estrategica_mcti'] = array(
56    'description' => 'Microinformes.',
57    'fields' => array(
58      'id_microinforme' => array(
59        'description' => 'The id identifier to microinforme.',
60        'type' => 'serial',
61        'not null' => TRUE,
62      ),
63      'anho' => array(
64        'description' => 'anho para el microinforme.',
65        'type' => 'int',
66        'unsigned' => TRUE,
67        'not null' => TRUE,
68        'default' => 0,
69      ),
70      'id_area_estrategica' => array(
71        'description' => 'identificador a area estrategica.',
72        'type' => 'int',
73        'unsigned' => TRUE,
74        'not null' => TRUE,
75        'default' => 0,
76      ),
77      'informacion_textual' => array(
78        'type' => 'text',
79        'size' => 'big',
80        'not null' => TRUE,
81        'default' => ''
82      ),
83      'datos_graficas_y_tablas' => array(
84        'type' => 'text',
85        'size' => 'big',
86        'not null' => TRUE,
87        'default' => ''
88      ),
89      'fecha_creacion' => array(
90        'description' => 'Fecha de creación.',
91        'type' => 'int',
92        'unsigned' => TRUE,
93        'not null' => TRUE,
94        'default' => 0,
95      ),
96          'fecha_ultima_actualizacion' => array(
97        'description' => 'Fecha última actualización.',
98        'type' => 'int',
99        'unsigned' => TRUE,
100        'not null' => TRUE,
101        'default' => 0,
102      ),
103      'uid' => array(
104        'description' => 'Referencia al autor.',
105        'type' => 'int',
106        'unsigned' => TRUE,
107        'not null' => TRUE,
108        'default' => 0,
109      ),
110    ),
111    'indexes' => array(
112      'id_microinforme' => array('id_microinforme'),
113    ),
114    'primary key' => array('id_microinforme'),
115  );
116
117  return $schema;
118}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.