source: sipp/0.3-stable-modules/entes_detail_workflow/entes_detail_workflow.install @ 4b7848a

0.3-stable
Last change on this file since 4b7848a 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 100644
File size: 4.0 KB
Línea 
1<?php
2  /**
3  * Modulo para la gestión de los detalles de comentarios en workflow
4  * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana
5  * @file entes_detail_workflow.install
6  * Drupal part Module to code ente planificador 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 - Msc. Juan Vizcarrondo
24  * @date 2015-05-21 // (a&#241;o-mes-dia)
25  * @version 0.2 // (0.1)
26  *
27  */
28/*
29 * Implementation of hook_install()
30 */
31function entes_detail_workflow_install() {
32  // Notify content module when this module is uninstalled.
33  drupal_install_schema('entes_detail_workflow');
34}
35
36/*
37 * Implementation of hook_uninstall()
38 */
39function entes_detail_workflow_uninstall() {
40  drupal_uninstall_schema('entes_detail_workflow');
41  db_query("DELETE FROM {variable} WHERE name LIKE '%s'", 'entes_detail_workflow_r%');
42}
43
44
45/*
46 * Implementation of hook_schema
47 */
48function entes_detail_workflow_schema() {
49  $schema['entes_detail_workflow'] = array(
50    'description' => 'proyectos reformula.',
51    'fields' => array(
52      'id' => array(
53        'description' => 'id de la entidad a que se le hace el woirkflow.',
54        'type' => 'int',
55        'unsigned' => TRUE,
56        'not null' => TRUE,
57        'default' => 0,
58      ),
59      'vid' => array(
60        'description' => 'vid de la version de la entidad a que se le hace el woirkflow.',
61        'type' => 'int',
62        'unsigned' => TRUE,
63        'not null' => FALSE,
64        'default' => 0,
65      ),
66      'sid' => array(
67        'description' => 'El id del del cambio de workflow.',
68        'type' => 'int',
69        'unsigned' => TRUE,
70        'not null' => TRUE,
71        'default' => 0,
72      ),
73      'active' => array(
74        'description' => 'El id del del cambio de workflow.',
75        'type' => 'int',
76        'unsigned' => TRUE,
77        'not null' => FALSE,
78        'default' => 0,
79      ),
80      'time' => array(
81        'description' => 'El id del del cambio de workflow.',
82        'type' => 'int',
83        'unsigned' => TRUE,
84        'not null' => FALSE,
85        'default' => 0,
86      ),
87      'tipo' => array(
88        'type' => 'varchar',
89        'description' => 'El tipo de entidad.',
90        'length' => 255,
91        'not null' => FALSE,
92        'default' => ''
93      ),
94      'field_name' => array(
95        'type' => 'varchar',
96        'description' => 'El tipo de entidad.',
97        'length' => 255,
98        'not null' => TRUE,
99        'default' => ''
100      ),
101      'hid' => array(
102        'description' => 'El id del historico del worflow.',
103        'type' => 'int',
104        'unsigned' => TRUE,
105        'not null' => FALSE,
106        'default' => 0,
107      ),
108      'comentario' => array(
109        'type' => 'text',
110        'size' => 'big',
111        'not null' => FALSE,
112        'default' => ''
113      ),
114    ),
115    'indexes' => array(
116      'id' => array('id'),
117      'sid' => array('sid'),
118      'tipo' => array('tipo'),
119      'field_name' => array('field_name'),
120      'id_sid' => array('id', 'sid'),
121      'id_tipo' => array('id', 'tipo'),
122      'id_field_name' => array('id', 'field_name'),
123      'id_active_field_name' => array('id', 'active'),
124    ),
125  );
126  return $schema;
127}
128
129
130
131
132?>
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.