source: sipes/0.3-modules/proyectos_operativos_seguimiento/proyecto_operativo_seguimiento.install @ dc8ba62

stableversion-3.0
Last change on this file since dc8ba62 was 303fae2, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 6.9 KB
Línea 
1<?php
2
3  /**
4  * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana
5  * @file proyecto_operativo_seguimiento.install
6  * Drupal part Module to code proyectos operativos module
7  * Copyright 2011 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL)
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22  *
23  * @author CENDITEL Merida - Ing. Diego Uzcategui
24  * @date 2013-02-07 // (anno-mes-dia)
25  * @version 0.1
26  *
27  */
28
29/*
30 * Implementation of hook_install()
31 */
32function proyecto_operativo_seguimiento_install() {
33  // Notify content module when this module is uninstalled.
34  //drupal_load('module', 'content');
35  //content_notify('install', 'proyecto_operativo_seguimiento');
36  drupal_install_schema('proyecto_operativo_seguimiento');
37  db_query("DELETE FROM {cache}");
38}
39
40/*
41 * Implementation of hook_uninstall()
42 */
43function  proyecto_operativo_seguimiento_uninstall() {
44  // Notify content module when this module is uninstalled.
45  //content_notify('uninstall', 'proyecto_operativo_seguimiento');
46  //drupal_uninstall_schema('proyecto_operativo_seguimiento');
47  drupal_uninstall_schema('proyecto_operativo_seguimiento');
48  db_query("DELETE FROM {cache}");
49}
50
51/**
52 * Implementation of hook_schema()
53 * @return array of Schema API table definitions.
54 */
55function proyecto_operativo_seguimiento_schema() {
56  //$schema = array();
57
58  $schema['seguimiento_proyecto'] = array(
59    'description' => 'Seguimiento.',
60    'fields' => array(
61      'id_seg' => array(
62        'description' => 'The id identifier to seguimiento.',
63        'type' => 'serial',
64        'not null' => TRUE,
65      ),
66      'nid' => array(
67        'description' => 'nid del nodo.',
68        'type' => 'int',
69        'unsigned' => TRUE,
70        'not null' => TRUE,
71        'default' => 0,
72      ),
73      'estado' => array(
74        'description' => 'estado.',
75        'type' => 'int',
76        'unsigned' => TRUE,
77        'not null' => TRUE,
78        'default' => 0,
79      ),
80      'id_seg_transicion_estado' => array(
81        'description' => 'identificador a ultima transicion.',
82        'type' => 'int',
83        'unsigned' => TRUE,
84        'not null' => TRUE,
85        'default' => 0,
86      ),
87      'fecha' => array(
88        'description' => 'Fecha.',
89        'type' => 'int',
90        'unsigned' => TRUE,
91        'not null' => TRUE,
92        'default' => 0,
93      ),
94      'mes' => array(
95        'description' => 'Referencia a la reformulacion.',
96        'type' => 'int',
97        'unsigned' => TRUE,
98        'not null' => TRUE,
99        'default' => 0,
100      ),
101      'ejecutadometafisica' => array(
102        'description' => 'Cantidad de ejecutado en la meta fisica para el mes actual',
103        'type' => 'int',
104        'unsigned' => TRUE,
105        'not null' => TRUE,
106        'default' => 0,
107      ),
108      'infocomplementaria_metafisica' => array(
109        'type' => 'text',
110        'size' => 'big',
111        'not null' => TRUE,
112        'default' => ''
113      ),
114      'infocomplementaria_metafinanciera' => array(
115        'type' => 'text',
116        'size' => 'big',
117        'not null' => TRUE,
118        'default' => ''
119      ),
120      'uid' => array(
121        'description' => 'Referencia al autor.',
122        'type' => 'int',
123        'unsigned' => TRUE,
124        'not null' => TRUE,
125        'default' => 0,
126      ),
127    ),
128    'indexes' => array(
129      'nid' => array('nid'),
130      'id_seg' => array('id_seg'),
131      'uid' => array('uid'),
132      'mes' => array('mes'),
133      'estado' => array('estado'),
134    ),
135    'primary key' => array('id_seg'),
136  );
137
138  $schema['seguimiento_proyecto_beneficiarios'] = array(
139    'description' => 'seguimiento beneficiarios.',
140    'fields' => array(
141      'id_seg_beneficiario' => array(
142        'description' => 'The id identifier to seguimiento.',
143        'type' => 'serial',
144        'not null' => TRUE,
145      ),
146      'id_seg' => array(
147        'description' => 'id del seguimiento.',
148        'type' => 'int',
149        'unsigned' => TRUE,
150        'not null' => TRUE,
151        'default' => 0,
152      ),
153      'posicion_beneficiario' => array(
154        'description' => 'ubicacion del tipo de beneficiario en la lista de beneficiarios del proyecto.',
155        'type' => 'int',
156        'unsigned' => TRUE,
157        'not null' => TRUE,
158        'default' => 0,
159      ),
160      'cant_beneficiarios_mes' => array(
161        'description' => 'numeros de beneficiarios que hubo en el mes.',
162        'type' => 'int',
163        'unsigned' => TRUE,
164        'not null' => TRUE,
165        'default' => 0,
166      ),
167    ),
168    'indexes' => array(
169      'id_seg' => array('id_seg'),
170      'posicion_beneficiario' => array('posicion_beneficiario'),
171    ),
172    'primary key' => array('id_seg_beneficiario'),
173  );
174
175  $schema['seguimiento_proyecto_transiciones_estados'] = array(
176    'description' => 'Estado del seguimiento.',
177    'fields' => array(
178      'id_seg_transicion_estado' => array(
179        'description' => 'The id identifier to seguimiento.',
180        'type' => 'serial',
181        'not null' => TRUE,
182      ),
183      'estado' => array(
184        'description' => 'estado.',
185        'type' => 'int',
186        'unsigned' => TRUE,
187        'not null' => TRUE,
188        'default' => 0,
189      ),
190      'estado_ant' => array(
191        'description' => 'estado anterior.',
192        'type' => 'int',
193        'unsigned' => TRUE,
194        'not null' => TRUE,
195        'default' => 0,
196      ),
197      'date' => array(
198        'description' => 'Fecha.',
199        'type' => 'int',
200        'unsigned' => TRUE,
201        'not null' => TRUE,
202        'default' => 0,
203      ),
204      'id_seg' => array(
205        'description' => 'Referencia al seguimiento.',
206        'type' => 'int',
207        'unsigned' => TRUE,
208        'not null' => TRUE,
209        'default' => 0,
210      ),
211      'uid' => array(
212        'description' => 'Referencia al autor.',
213        'type' => 'int',
214        'unsigned' => TRUE,
215        'not null' => TRUE,
216        'default' => 0,
217      ),
218      'comentario' => array(
219        'type' => 'text',
220        'size' => 'big',
221        'not null' => TRUE,
222        'default' => ''
223      ),
224    ),
225    'indexes' => array(
226      'id_seg_transicion_estado' => array('id_seg_transicion_estado'),
227      'id_seg' => array('id_seg'),
228      'uid' => array('uid'),
229    ),
230    'primary key' => array('id_seg_transicion_estado'),
231  );
232
233  return $schema;
234}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.