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

stable
Last change on this file since 9acce8c was 9acce8c, checked in by Sipes Apn <root@…>, 7 años ago

se agrego el valor por defecto de acumulativo

  • Propiedad mode establecida a 100755
File size: 7.2 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  $ret = array();
34  // Notify content module when this module is uninstalled.
35  //drupal_load('module', 'content');
36  //content_notify('install', 'proyecto_operativo_seguimiento');
37  drupal_install_schema('proyecto_operativo_seguimiento');
38  db_query("DELETE FROM {cache}");
39}
40
41/*
42 * Implementation of hook_uninstall()
43 */
44function  proyecto_operativo_seguimiento_uninstall() {
45  $ret = array();
46  // Notify content module when this module is uninstalled.
47  //content_notify('uninstall', 'proyecto_operativo_seguimiento');
48  //drupal_uninstall_schema('proyecto_operativo_seguimiento');
49  drupal_uninstall_schema('proyecto_operativo_seguimiento');
50  db_query("DELETE FROM {cache}");
51}
52
53/**
54 * Implementation of hook_schema()
55 * @return array of Schema API table definitions.
56 */
57function proyecto_operativo_seguimiento_schema() {
58  //$schema = array();
59
60  $schema['seguimiento_proyecto'] = array(
61    'description' => 'Seguimiento.',
62    'fields' => array(
63      'id_seg' => array(
64        'description' => 'The id identifier to seguimiento.',
65        'type' => 'serial',
66        'not null' => TRUE,
67      ),
68      'nid' => array(
69        'description' => 'nid del nodo.',
70        'type' => 'int',
71        'unsigned' => TRUE,
72        'not null' => TRUE,
73        'default' => 0,
74      ),
75      'acumulativo' => array(
76        'description' => 'Si el proyecto se considera acumulativo.',
77        'type' => 'int',
78        'unsigned' => TRUE,
79        'not null' => TRUE,
80        'default' => 0,
81      ),
82      'estado' => array(
83        'description' => 'estado.',
84        'type' => 'int',
85        'unsigned' => TRUE,
86        'not null' => TRUE,
87        'default' => 0,
88      ),
89      'id_seg_transicion_estado' => array(
90        'description' => 'identificador a ultima transicion.',
91        'type' => 'int',
92        'unsigned' => TRUE,
93        'not null' => TRUE,
94        'default' => 0,
95      ),
96      'fecha' => array(
97        'description' => 'Fecha.',
98        'type' => 'int',
99        'unsigned' => TRUE,
100        'not null' => TRUE,
101        'default' => 0,
102      ),
103      'mes' => array(
104        'description' => 'Referencia a la reformulacion.',
105        'type' => 'int',
106        'unsigned' => TRUE,
107        'not null' => TRUE,
108        'default' => 0,
109      ),
110      'ejecutadometafisica' => array(
111        'description' => 'Cantidad de ejecutado en la meta fisica para el mes actual',
112        'type' => 'int',
113        'unsigned' => TRUE,
114        'not null' => TRUE,
115        'default' => 0,
116      ),
117      'infocomplementaria_metafisica' => array(
118        'type' => 'text',
119        'size' => 'big',
120        'not null' => TRUE,
121        'default' => ''
122      ),
123      'infocomplementaria_metafinanciera' => array(
124        'type' => 'text',
125        'size' => 'big',
126        'not null' => TRUE,
127        'default' => ''
128      ),
129      'uid' => array(
130        'description' => 'Referencia al autor.',
131        'type' => 'int',
132        'unsigned' => TRUE,
133        'not null' => TRUE,
134        'default' => 0,
135      ),
136    ),
137    'indexes' => array(
138      'nid' => array('nid'),
139      'id_seg' => array('id_seg'),
140      'uid' => array('uid'),
141      'mes' => array('mes'),
142      'estado' => array('estado'),
143    ),
144    'primary key' => array('id_seg'),
145  );
146
147  $schema['seguimiento_proyecto_beneficiarios'] = array(
148    'description' => 'seguimiento beneficiarios.',
149    'fields' => array(
150      'id_seg_beneficiario' => array(
151        'description' => 'The id identifier to seguimiento.',
152        'type' => 'serial',
153        'not null' => TRUE,
154      ),
155      'id_seg' => array(
156        'description' => 'id del seguimiento.',
157        'type' => 'int',
158        'unsigned' => TRUE,
159        'not null' => TRUE,
160        'default' => 0,
161      ),
162      'posicion_beneficiario' => array(
163        'description' => 'ubicacion del tipo de beneficiario en la lista de beneficiarios del proyecto.',
164        'type' => 'int',
165        'unsigned' => TRUE,
166        'not null' => TRUE,
167        'default' => 0,
168      ),
169      'cant_beneficiarios_mes' => array(
170        'description' => 'numeros de beneficiarios que hubo en el mes.',
171        'type' => 'int',
172        'unsigned' => TRUE,
173        'not null' => TRUE,
174        'default' => 0,
175      ),
176    ),
177    'indexes' => array(
178      'id_seg' => array('id_seg'),
179      'posicion_beneficiario' => array('posicion_beneficiario'),
180    ),
181    'primary key' => array('id_seg_beneficiario'),
182  );
183
184  $schema['seguimiento_proyecto_transiciones_estados'] = array(
185    'description' => 'Estado del seguimiento.',
186    'fields' => array(
187      'id_seg_transicion_estado' => array(
188        'description' => 'The id identifier to seguimiento.',
189        'type' => 'serial',
190        'not null' => TRUE,
191      ),
192      'estado' => array(
193        'description' => 'estado.',
194        'type' => 'int',
195        'unsigned' => TRUE,
196        'not null' => TRUE,
197        'default' => 0,
198      ),
199      'estado_ant' => array(
200        'description' => 'estado anterior.',
201        'type' => 'int',
202        'unsigned' => TRUE,
203        'not null' => TRUE,
204        'default' => 0,
205      ),
206      'date' => array(
207        'description' => 'Fecha.',
208        'type' => 'int',
209        'unsigned' => TRUE,
210        'not null' => TRUE,
211        'default' => 0,
212      ),
213      'id_seg' => array(
214        'description' => 'Referencia al seguimiento.',
215        'type' => 'int',
216        'unsigned' => TRUE,
217        'not null' => TRUE,
218        'default' => 0,
219      ),
220      'uid' => array(
221        'description' => 'Referencia al autor.',
222        'type' => 'int',
223        'unsigned' => TRUE,
224        'not null' => TRUE,
225        'default' => 0,
226      ),
227      'comentario' => array(
228        'type' => 'text',
229        'size' => 'big',
230        'not null' => TRUE,
231        'default' => ''
232      ),
233    ),
234    'indexes' => array(
235      'id_seg_transicion_estado' => array('id_seg_transicion_estado'),
236      'id_seg' => array('id_seg'),
237      'uid' => array('uid'),
238    ),
239    'primary key' => array('id_seg_transicion_estado'),
240  );
241
242  return $schema;
243}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.