source: sipp/0.3-stable-modules/proyectos_operativos_seguimiento/accion_especifica_de_proyecto_seguimiento.install @ 6a22cd8

0.3-stable
Last change on this file since 6a22cd8 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 100755
File size: 8.5 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 accion_especifica_de_proyecto_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 accion_especifica_de_proyecto_seguimiento_install() {
33  // Notify content module when this module is uninstalled.
34  //drupal_load('module', 'content');
35  //content_notify('install', 'accion_especifica_de_proyecto_seguimiento');
36  drupal_install_schema('accion_especifica_de_proyecto_seguimiento');
37  db_query("DELETE FROM {cache}");
38 
39  /*
40  // CCK content_copy.module may not be enabled, so make sure it is included
41  require_once './' . drupal_get_path('module', 'content'). '/modules/content_copy/content_copy.module';
42  module_load_include('inc', 'accion_especifica_de_proyecto_seguimiento', 'includes/00_instalacion/seguimiento_mes_tiponodo.ccknodedef');
43  $content = _seguimientoMesNodo_content_type_export();  // in modulename.ccknodedef.inc
44  $form_state['values']['type_name'] = 'mymodule'; //don't use <create> here as you want to extend existing content type
45  $form_state['values']['macro'] = '$content = ' . var_export($content, TRUE) . ';';
46  // form provided by content_copy.module
47  drupal_execute('content_copy_import_form', $form_state);
48  content_clear_type_cache();
49 
50  module_load_include('inc', 'accion_especifica_de_proyecto_seguimiento', 'includes/00_instalacion/crear_flujodetrabajo.workflow');
51  _crear_flujodetrabajo_seguimientoMes();
52  content_notify('install', 'accion_especifica_de_proyecto_seguimiento');
53  */
54}
55
56/*
57 * Implementation of hook_uninstall()
58 */
59function  accion_especifica_de_proyecto_seguimiento_uninstall() {
60  // Notify content module when this module is uninstalled.
61  //content_notify('uninstall', 'accion_especifica_de_proyecto_seguimiento');
62  //drupal_uninstall_schema('accion_especifica_de_proyecto_seguimiento');
63  drupal_uninstall_schema('accion_especifica_de_proyecto_seguimiento');
64  db_query("DELETE FROM {cache}");
65 
66  /*
67  module_load_include('inc', 'content', 'includes/content.crud');
68  content_field_instance_delete('field_ccktest', 'nodo_seguimiento_mes', FALSE);
69  */
70}
71
72/**
73 * Implementation of hook_schema()
74 * @return array of Schema API table definitions.
75 */
76function accion_especifica_de_proyecto_seguimiento_schema() {
77  //$schema = array();
78
79  $schema['seguimiento_aeproyecto'] = array(
80    'description' => 'Seguimiento.',
81    'fields' => array(
82      'id_seg' => array(
83        'description' => 'The id identifier to seguimiento.',
84        'type' => 'serial',
85        'not null' => TRUE,
86      ),
87      'nid' => array(
88        'description' => 'nid del nodo.',
89        'type' => 'int',
90        'unsigned' => TRUE,
91        'not null' => TRUE,
92        'default' => 0,
93      ),
94      'estado' => array(
95        'description' => 'estado actual.',
96        'type' => 'int',
97        'unsigned' => TRUE,
98        'not null' => TRUE,
99        'default' => 0,
100      ),
101      'id_seg_transicion_estado' => array(
102        'description' => 'identificador a ultima transicion.',
103        'type' => 'int',
104        'unsigned' => TRUE,
105        'not null' => TRUE,
106        'default' => 0,
107      ),
108      'fecha' => array(
109        'description' => 'Fecha.',
110        'type' => 'int',
111        'unsigned' => TRUE,
112        'not null' => TRUE,
113        'default' => 0,
114      ),
115      'mes' => array(
116        'description' => 'Referencia a la reformulacion.',
117        'type' => 'int',
118        'unsigned' => TRUE,
119        'not null' => TRUE,
120        'default' => 0,
121      ),
122      'ejecutadometafisica' => array(
123        'description' => 'Cantidad de ejecutado en la meta fisica para el mes actual',
124        'type' => 'int',
125        'unsigned' => TRUE,
126        'not null' => TRUE,
127        'default' => 0,
128      ),
129      'infocomplementaria_metafisica' => array(
130        'type' => 'text',
131        'size' => 'big',
132        'not null' => TRUE,
133        'default' => ''
134      ),
135      'infocomplementaria_metafinanciera' => array(
136        'type' => 'text',
137        'size' => 'big',
138        'not null' => TRUE,
139        'default' => ''
140      ),
141      'uid' => array(
142        'description' => 'Referencia al autor.',
143        'type' => 'int',
144        'unsigned' => TRUE,
145        'not null' => TRUE,
146        'default' => 0,
147      ),
148    ),
149    'indexes' => array(
150      'nid' => array('nid'),
151      'id_seg' => array('id_seg'),
152      'uid' => array('uid'),
153      'mes' => array('mes'),
154      'estado' => array('estado'),
155    ),
156    'primary key' => array('id_seg'),
157  );
158
159  $schema['seguimiento_aeproyecto_partida'] = array(
160    'description' => 'seguimiento partidas.',
161    'fields' => array(
162      'id_seg_partida' => array(
163        'description' => 'The id identifier to seguimiento.',
164        'type' => 'serial',
165        'not null' => TRUE,
166      ),
167      'id_seg' => array(
168        'description' => 'id del seguimiento.',
169        'type' => 'int',
170        'unsigned' => TRUE,
171        'not null' => TRUE,
172        'default' => 0,
173      ),
174      'partida' => array(
175        'description' => 'Partida del la reformulacion.',
176        'type' => 'int',
177        'unsigned' => TRUE,
178        'not null' => TRUE,
179        'default' => 0,
180      ),
181      'comprometido' => array(
182        'description' => 'Comprometido.',
183        'type' => 'numeric',
184        'size' => 'normal',
185        'not null' => TRUE,
186        'default' => 0,
187        'precision' => 32,
188        'scale' => 0,
189      ),
190      'causado' => array(
191        'description' => 'Causado.',
192        'type' => 'numeric',
193        'size' => 'normal',
194        'not null' => TRUE,
195        'default' => 0,
196        'precision' => 32,
197        'scale' => 0,
198      ),
199      'pagado' => array(
200        'description' => 'Pagado.',
201        'type' => 'numeric',
202        'size' => 'normal',
203        'not null' => TRUE,
204        'default' => 0,
205        'precision' => 32,
206        'scale' => 0,
207      ),
208    ),
209    'indexes' => array(
210      'id_seg' => array('id_seg'),
211      'partida' => array('partida'),
212    ),
213    'primary key' => array('id_seg_partida'),
214  );
215
216  $schema['seguimiento_aeproyecto_transiciones_estados'] = array(
217    'description' => 'Estado del seguimiento.',
218    'fields' => array(
219      'id_seg_transicion_estado' => array(
220        'description' => 'The id identifier to seguimiento.',
221        'type' => 'serial',
222        'not null' => TRUE,
223      ),
224      'estado' => array(
225        'description' => 'estado.',
226        'type' => 'int',
227        'unsigned' => TRUE,
228        'not null' => TRUE,
229        'default' => 0,
230      ),
231      'estado_ant' => array(
232        'description' => 'estado anterior.',
233        'type' => 'int',
234        'unsigned' => TRUE,
235        'not null' => TRUE,
236        'default' => 0,
237      ),
238      'date' => array(
239        'description' => 'Fecha.',
240        'type' => 'int',
241        'unsigned' => TRUE,
242        'not null' => TRUE,
243        'default' => 0,
244      ),
245      'id_seg' => array(
246        'description' => 'Referencia al seguimiento.',
247        'type' => 'int',
248        'unsigned' => TRUE,
249        'not null' => TRUE,
250        'default' => 0,
251      ),
252      'uid' => array(
253        'description' => 'Referencia al autor.',
254        'type' => 'int',
255        'unsigned' => TRUE,
256        'not null' => TRUE,
257        'default' => 0,
258      ),
259      'comentario' => array(
260        'type' => 'text',
261        'size' => 'big',
262        'not null' => TRUE,
263        'default' => ''
264      ),
265    ),
266    'indexes' => array(
267      'id_seg_transicion_estado' => array('id_seg_transicion_estado'),
268      'id_seg' => array('id_seg'),
269      'uid' => array('uid'),
270    ),
271    'primary key' => array('id_seg_transicion_estado'),
272  );
273
274  return $schema;
275}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.