source: sipes/0.3-modules/proyectos_reformulacion/proyectos_reformulacion.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: 11.0 KB
Línea 
1<?php
2
3  /**
4  * Sistema Integral de Planificación y Presupuesto (SIPP)
5  * @file proyectos_reformulacion.install
6  * Drupal part Module to Sistema Integral de Planificación y Presupuesto (SIPP)
7  * Copyright 2013 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 - Msc. Juan Vizcarrondo
24  * @date 2013-04-11 // (a&#241;o-mes-dia)
25  * @version 0.1 // (0.1)
26  *
27  */
28
29/*
30 * Implementation of hook_install()
31 */
32function proyectos_reformulacion_install() {
33  // Notify content module when this module is uninstalled.
34  drupal_install_schema('proyectos_reformulacion');
35}
36
37/*
38 * Implementation of hook_uninstall()
39 */
40function proyectos_reformulacion_uninstall() {
41  drupal_uninstall_schema('proyectos_reformulacion');
42  db_query("DELETE FROM {variable} WHERE name LIKE '%s'", 'proyectos_operativos_state_r%');
43}
44
45
46/*
47 * Implementation of hook_schema
48 */
49function proyectos_reformulacion_schema() {
50  $schema['proyectos_reformular'] = array(
51    'description' => 'proyectos reformular.',
52    'fields' => array(
53      'id_ref' => array(
54        'description' => 'The id identifier to reformular.',
55        'type' => 'serial',
56        'not null' => TRUE,
57      ),
58      'uid' => array(
59        'description' => 'uid del autor.',
60        'type' => 'int',
61        'unsigned' => TRUE,
62        'not null' => TRUE,
63        'default' => 0,
64      ),
65      'nid' => array(
66        'description' => 'Enlace del nodo.',
67        'type' => 'int',
68        'unsigned' => TRUE,
69        'not null' => TRUE,
70        'default' => 0,
71      ),
72      'estado' => array(
73        'description' => 'Estado de la reformulacion.',
74        'type' => 'int',
75        'unsigned' => TRUE,
76        'not null' => TRUE,
77        'default' => 0,
78      ),
79      'estado_ant' => array(
80        'description' => 'Estado anterior de la reformulacion.',
81        'type' => 'int',
82        'unsigned' => TRUE,
83        'not null' => TRUE,
84        'default' => 0,
85      ),
86      'date' => array(
87        'description' => 'Fecha de la reformulacion.',
88        'type' => 'int',
89        'unsigned' => TRUE,
90        'not null' => TRUE,
91        'default' => 0,
92      ),
93      'variacion' => array(
94        'description' => 'Variacion de la reformulacion.',
95        'type' => 'numeric',
96        'size' => 'normal',
97        'not null' => TRUE,
98        'default' => 0,
99        'precision' => 32,
100        'scale' => 0,
101      ),
102      'monto' => array(
103        'description' => 'Monto de la reformulacion.',
104        'type' => 'numeric',
105        'size' => 'normal',
106        'not null' => TRUE,
107        'default' => 0,
108        'precision' => 32,
109        'scale' => 0,
110      ),
111      'unidad' => array(
112        'description' => 'unidad de medida.',
113        'type' => 'int',
114        'unsigned' => TRUE,
115        'not null' => TRUE,
116        'default' => 0,
117      ),
118      'fecha_onapre' => array(
119        'description' => 'Fecha de Aprobación en Onapre.',
120        'type' => 'int',
121        'unsigned' => TRUE,
122        'not null' => TRUE,
123        'default' => 0,
124      ),
125      'justificacion' => array(
126        'type' => 'text',
127        'size' => 'big',
128        'not null' => TRUE,
129        'default' => ''
130      ),
131    ),
132    'indexes' => array(
133      'nid' => array('nid'),
134      'id_ref' => array('id_ref'),
135      'uid' => array('uid'),
136      'estado' => array('estado'),
137    ),
138    'primary key' => array('id_ref'),
139  );
140  $schema['proyectos_reformula'] = array(
141    'description' => 'proyectos reformula.',
142    'fields' => array(
143      'id_ref' => array(
144        'description' => 'id de la reformulacion.',
145        'type' => 'int',
146        'unsigned' => TRUE,
147        'not null' => TRUE,
148        'default' => 0,
149      ),
150      'nid' => array(
151        'description' => 'nid del nodo.',
152        'type' => 'int',
153        'unsigned' => TRUE,
154        'not null' => TRUE,
155        'default' => 0,
156      ),
157      'partida' => array(
158        'description' => 'Partida del la reformulacion.',
159        'type' => 'int',
160        'unsigned' => TRUE,
161        'not null' => TRUE,
162        'default' => 0,
163      ),
164      'field_name' => array(
165        'type' => 'varchar',
166        'length' => 255,
167        'not null' => TRUE,
168        'default' => ''
169      ),
170      'value' => array(
171        'description' => 'Monto enero de la reformulacion.',
172        'type' => 'numeric',
173        'size' => 'normal',
174        'not null' => TRUE,
175        'default' => 0,
176        'precision' => 32,
177        'scale' => 0,
178      ),
179      'value_1' => array(
180        'description' => 'Monto febrero de la reformulacion.',
181        'type' => 'numeric',
182        'size' => 'normal',
183        'not null' => TRUE,
184        'default' => 0,
185        'precision' => 32,
186        'scale' => 0,
187      ),
188      'value_2' => array(
189        'description' => 'Monto marzo de la reformulacion.',
190        'type' => 'numeric',
191        'size' => 'normal',
192        'not null' => TRUE,
193        'default' => 0,
194        'precision' => 32,
195        'scale' => 0,
196      ),
197      'value_3' => array(
198        'description' => 'Monto abril de la reformulacion.',
199        'type' => 'numeric',
200        'size' => 'normal',
201        'not null' => TRUE,
202        'default' => 0,
203        'precision' => 32,
204        'scale' => 0,
205      ),
206      'value_4' => array(
207        'description' => 'Monto mayo de la reformulacion.',
208        'type' => 'numeric',
209        'size' => 'normal',
210        'not null' => TRUE,
211        'default' => 0,
212        'precision' => 32,
213        'scale' => 0,
214      ),
215      'value_5' => array(
216        'description' => 'Monto junio de la reformulacion.',
217        'type' => 'numeric',
218        'size' => 'normal',
219        'not null' => TRUE,
220        'default' => 0,
221        'precision' => 32,
222        'scale' => 0,
223      ),
224      'value_6' => array(
225        'description' => 'Monto julio de la reformulacion.',
226        'type' => 'numeric',
227        'size' => 'normal',
228        'not null' => TRUE,
229        'default' => 0,
230        'precision' => 32,
231        'scale' => 0,
232      ),
233      'value_7' => array(
234        'description' => 'Monto agosto de la reformulacion.',
235        'type' => 'numeric',
236        'size' => 'normal',
237        'not null' => TRUE,
238        'default' => 0,
239        'precision' => 32,
240        'scale' => 0,
241      ),
242      'value_8' => array(
243        'description' => 'Monto septiembre de la reformulacion.',
244        'type' => 'numeric',
245        'size' => 'normal',
246        'not null' => TRUE,
247        'default' => 0,
248        'precision' => 32,
249        'scale' => 0,
250      ),
251      'value_9' => array(
252        'description' => 'Monto octubre de la reformulacion.',
253        'type' => 'numeric',
254        'size' => 'normal',
255        'not null' => TRUE,
256        'default' => 0,
257        'precision' => 32,
258        'scale' => 0,
259      ),
260      'value_10' => array(
261        'description' => 'Monto noviembre de la reformulacion.',
262        'type' => 'numeric',
263        'size' => 'normal',
264        'not null' => TRUE,
265        'default' => 0,
266        'precision' => 32,
267        'scale' => 0,
268      ),
269      'value_11' => array(
270        'description' => 'Monto diciembre de la reformulacion.',
271        'type' => 'numeric',
272        'size' => 'normal',
273        'not null' => TRUE,
274        'default' => 0,
275        'precision' => 32,
276        'scale' => 0,
277      ),
278      'ae' => array(
279        'description' => 'Accion especifica.',
280        'type' => 'int',
281        'not null' => TRUE,
282        'default' => 0,
283      ),
284      'unidad' => array(
285        'description' => 'Unidad de Medida.',
286        'type' => 'int',
287        'not null' => TRUE,
288        'default' => 0,
289      ),
290    ),
291    'indexes' => array(
292      'nid' => array('nid'),
293      'id_ref' => array('id_ref'),
294      'partida' => array('partida'),
295      'ae' => array('ae'),
296    ),
297  );
298  $schema['proyectos_reformular_state'] = array(
299    'description' => 'Estados reformulacion.',
300    'fields' => array(
301      'nid' => array(
302        'description' => 'nid del nodo.',
303        'type' => 'int',
304        'unsigned' => TRUE,
305        'not null' => TRUE,
306        'default' => 0,
307      ),
308      'estado' => array(
309        'description' => 'estado.',
310        'type' => 'int',
311        'unsigned' => TRUE,
312        'not null' => TRUE,
313        'default' => 0,
314      ),
315      'estado_ant' => array(
316        'description' => 'estado anterior.',
317        'type' => 'int',
318        'unsigned' => TRUE,
319        'not null' => TRUE,
320        'default' => 0,
321      ),
322      'date' => array(
323        'description' => 'Fecha.',
324        'type' => 'int',
325        'unsigned' => TRUE,
326        'not null' => TRUE,
327        'default' => 0,
328      ),
329      'id_ref' => array(
330        'description' => 'Referencia a la reformulacion.',
331        'type' => 'int',
332        'unsigned' => TRUE,
333        'not null' => TRUE,
334        'default' => 0,
335      ),
336      'uid' => array(
337        'description' => 'Referencia al autor.',
338        'type' => 'int',
339        'unsigned' => TRUE,
340        'not null' => TRUE,
341        'default' => 0,
342      ),
343      'comentario' => array(
344        'type' => 'text',
345        'size' => 'big',
346        'not null' => TRUE,
347        'default' => ''
348      ),
349    ),
350    'indexes' => array(
351      'nid' => array('nid'),
352      'id_ref' => array('id_ref'),
353      'uid' => array('uid'),
354    ),
355  );
356
357  $schema['proyectos_reformula_fuente'] = array(
358    'description' => 'proyectos reformula fuente.',
359    'fields' => array(
360      'nid' => array(
361        'description' => 'nid del nodo.',
362        'type' => 'int',
363        'unsigned' => TRUE,
364        'not null' => TRUE,
365        'default' => 0,
366      ),
367      'ae' => array(
368        'description' => 'Accion especifica.',
369        'type' => 'int',
370        'not null' => TRUE,
371        'default' => 0,
372      ),
373      'value' => array(
374        'description' => 'Monto enero de la reformulacion.',
375        'type' => 'numeric',
376        'size' => 'normal',
377        'not null' => TRUE,
378        'default' => 0,
379        'precision' => 32,
380        'scale' => 0,
381      ),
382      'field_name' => array(
383        'type' => 'varchar',
384        'length' => 255,
385        'not null' => TRUE,
386        'default' => ''
387      ),
388      'id_ref' => array(
389        'description' => 'Referencia a la reformulacion.',
390        'type' => 'int',
391        'unsigned' => TRUE,
392        'not null' => TRUE,
393        'default' => 0,
394      ),
395    ),
396    'indexes' => array(
397      'nid' => array('nid'),
398      'id_ref' => array('id_ref'),
399      'ae' => array('ae'),
400    ),
401  );
402
403  return $schema;
404}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.