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

version-3.0
Last change on this file since 13316bf was 13316bf, checked in by Cenditel <root@…>, 7 años ago

se agrego el campo acumulativo en la estructura de la tabla de seguimiento del proyecto

  • Propiedad mode establecida a 100755
File size: 7.1 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      ),
79      'estado' => array(
80        'description' => 'estado.',
81        'type' => 'int',
82        'unsigned' => TRUE,
83        'not null' => TRUE,
84        'default' => 0,
85      ),
86      'id_seg_transicion_estado' => array(
87        'description' => 'identificador a ultima transicion.',
88        'type' => 'int',
89        'unsigned' => TRUE,
90        'not null' => TRUE,
91        'default' => 0,
92      ),
93      'fecha' => array(
94        'description' => 'Fecha.',
95        'type' => 'int',
96        'unsigned' => TRUE,
97        'not null' => TRUE,
98        'default' => 0,
99      ),
100      'mes' => array(
101        'description' => 'Referencia a la reformulacion.',
102        'type' => 'int',
103        'unsigned' => TRUE,
104        'not null' => TRUE,
105        'default' => 0,
106      ),
107      'ejecutadometafisica' => array(
108        'description' => 'Cantidad de ejecutado en la meta fisica para el mes actual',
109        'type' => 'int',
110        'unsigned' => TRUE,
111        'not null' => TRUE,
112        'default' => 0,
113      ),
114      'infocomplementaria_metafisica' => array(
115        'type' => 'text',
116        'size' => 'big',
117        'not null' => TRUE,
118        'default' => ''
119      ),
120      'infocomplementaria_metafinanciera' => array(
121        'type' => 'text',
122        'size' => 'big',
123        'not null' => TRUE,
124        'default' => ''
125      ),
126      'uid' => array(
127        'description' => 'Referencia al autor.',
128        'type' => 'int',
129        'unsigned' => TRUE,
130        'not null' => TRUE,
131        'default' => 0,
132      ),
133    ),
134    'indexes' => array(
135      'nid' => array('nid'),
136      'id_seg' => array('id_seg'),
137      'uid' => array('uid'),
138      'mes' => array('mes'),
139      'estado' => array('estado'),
140    ),
141    'primary key' => array('id_seg'),
142  );
143
144  $schema['seguimiento_proyecto_beneficiarios'] = array(
145    'description' => 'seguimiento beneficiarios.',
146    'fields' => array(
147      'id_seg_beneficiario' => array(
148        'description' => 'The id identifier to seguimiento.',
149        'type' => 'serial',
150        'not null' => TRUE,
151      ),
152      'id_seg' => array(
153        'description' => 'id del seguimiento.',
154        'type' => 'int',
155        'unsigned' => TRUE,
156        'not null' => TRUE,
157        'default' => 0,
158      ),
159      'posicion_beneficiario' => array(
160        'description' => 'ubicacion del tipo de beneficiario en la lista de beneficiarios del proyecto.',
161        'type' => 'int',
162        'unsigned' => TRUE,
163        'not null' => TRUE,
164        'default' => 0,
165      ),
166      'cant_beneficiarios_mes' => array(
167        'description' => 'numeros de beneficiarios que hubo en el mes.',
168        'type' => 'int',
169        'unsigned' => TRUE,
170        'not null' => TRUE,
171        'default' => 0,
172      ),
173    ),
174    'indexes' => array(
175      'id_seg' => array('id_seg'),
176      'posicion_beneficiario' => array('posicion_beneficiario'),
177    ),
178    'primary key' => array('id_seg_beneficiario'),
179  );
180
181  $schema['seguimiento_proyecto_transiciones_estados'] = array(
182    'description' => 'Estado del seguimiento.',
183    'fields' => array(
184      'id_seg_transicion_estado' => array(
185        'description' => 'The id identifier to seguimiento.',
186        'type' => 'serial',
187        'not null' => TRUE,
188      ),
189      'estado' => array(
190        'description' => 'estado.',
191        'type' => 'int',
192        'unsigned' => TRUE,
193        'not null' => TRUE,
194        'default' => 0,
195      ),
196      'estado_ant' => array(
197        'description' => 'estado anterior.',
198        'type' => 'int',
199        'unsigned' => TRUE,
200        'not null' => TRUE,
201        'default' => 0,
202      ),
203      'date' => array(
204        'description' => 'Fecha.',
205        'type' => 'int',
206        'unsigned' => TRUE,
207        'not null' => TRUE,
208        'default' => 0,
209      ),
210      'id_seg' => array(
211        'description' => 'Referencia al seguimiento.',
212        'type' => 'int',
213        'unsigned' => TRUE,
214        'not null' => TRUE,
215        'default' => 0,
216      ),
217      'uid' => array(
218        'description' => 'Referencia al autor.',
219        'type' => 'int',
220        'unsigned' => TRUE,
221        'not null' => TRUE,
222        'default' => 0,
223      ),
224      'comentario' => array(
225        'type' => 'text',
226        'size' => 'big',
227        'not null' => TRUE,
228        'default' => ''
229      ),
230    ),
231    'indexes' => array(
232      'id_seg_transicion_estado' => array('id_seg_transicion_estado'),
233      'id_seg' => array('id_seg'),
234      'uid' => array('uid'),
235    ),
236    'primary key' => array('id_seg_transicion_estado'),
237  );
238
239  return $schema;
240}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.