3 -- Host: localhost Database: samurai
4 ---------------------------------------------------------
5 -- Server version 4.0.12-log
8 -- Table structure for table 'perfil'
11 DROP TABLE IF EXISTS perfil;
13 id_perfil bigint(20) NOT NULL auto_increment,
14 desc_perfil varchar(50) default NULL,
15 fch_ult_modif timestamp(14) NOT NULL,
16 responsable varchar(20) default NULL,
17 PRIMARY KEY (id_perfil),
18 UNIQUE KEY desc_perfil (desc_perfil)
22 -- Table structure for table 'perfil_seq'
25 DROP TABLE IF EXISTS perfil_seq;
26 CREATE TABLE perfil_seq (
27 id int(10) unsigned NOT NULL auto_increment,
32 -- Table structure for table 'perfil_sist'
35 DROP TABLE IF EXISTS perfil_sist;
36 CREATE TABLE perfil_sist (
37 id_perfil bigint(20) NOT NULL default '0',
38 id_sistema bigint(20) NOT NULL default '0',
39 fch_ult_modif timestamp(14) NOT NULL,
40 responsable varchar(20) default NULL,
41 tipo_perfil char(1) default NULL,
42 PRIMARY KEY (id_perfil,id_sistema)
46 -- Table structure for table 'perfil_sist_usuario'
49 DROP TABLE IF EXISTS perfil_sist_usuario;
50 CREATE TABLE perfil_sist_usuario (
51 login varchar(20) NOT NULL default '',
52 id_perfil bigint(20) NOT NULL default '0',
53 id_sistema bigint(20) NOT NULL default '0',
54 fch_ult_modif timestamp(14) NOT NULL,
55 responsable varchar(20) default NULL,
56 PRIMARY KEY (login,id_perfil,id_sistema)
60 -- Table structure for table 'perm_perfil_sist'
63 DROP TABLE IF EXISTS perm_perfil_sist;
64 CREATE TABLE perm_perfil_sist (
65 id_permiso bigint(20) NOT NULL default '0',
66 id_perfil bigint(20) NOT NULL default '0',
67 id_sistema bigint(20) NOT NULL default '0',
68 fch_ult_modif timestamp(14) NOT NULL,
69 responsable varchar(20) default NULL,
70 observaciones varchar(255) NOT NULL default '',
71 PRIMARY KEY (id_permiso,id_perfil,id_sistema,observaciones)
75 -- Table structure for table 'perm_sist'
78 DROP TABLE IF EXISTS perm_sist;
79 CREATE TABLE perm_sist (
80 id_permiso bigint(20) NOT NULL default '0',
81 id_sistema bigint(20) NOT NULL default '0',
82 observaciones varchar(255) NOT NULL default '',
83 fch_ult_modif timestamp(14) NOT NULL,
84 responsable varchar(20) default NULL,
85 PRIMARY KEY (id_permiso,id_sistema,observaciones)
89 -- Table structure for table 'permiso'
92 DROP TABLE IF EXISTS permiso;
93 CREATE TABLE permiso (
94 id_permiso bigint(20) NOT NULL auto_increment,
95 desc_permiso varchar(50) default NULL,
96 fch_ult_modif timestamp(14) NOT NULL,
97 responsable varchar(20) default NULL,
98 PRIMARY KEY (id_permiso),
99 UNIQUE KEY desc_permiso (desc_permiso)
103 -- Table structure for table 'permiso_seq'
106 DROP TABLE IF EXISTS permiso_seq;
107 CREATE TABLE permiso_seq (
108 id int(10) unsigned NOT NULL auto_increment,
113 -- Table structure for table 'sistema'
116 DROP TABLE IF EXISTS sistema;
117 CREATE TABLE sistema (
118 id_sistema bigint(20) NOT NULL auto_increment,
119 nombre_sistema varchar(50) default NULL,
121 fecha_inicio date default NULL,
122 fecha_fin date default NULL,
123 fecha_implementacion date default NULL,
125 fch_ult_modif timestamp(14) NOT NULL,
126 responsable varchar(20) default NULL,
127 estado tinyint(4) default NULL,
128 PRIMARY KEY (id_sistema),
129 UNIQUE KEY nombre_sistema (nombre_sistema)
133 -- Table structure for table 'sistema_seq'
136 DROP TABLE IF EXISTS sistema_seq;
137 CREATE TABLE sistema_seq (
138 id int(10) unsigned NOT NULL auto_increment,
143 -- Table structure for table 'usuario'
146 DROP TABLE IF EXISTS usuario;
147 CREATE TABLE usuario (
148 login varchar(20) NOT NULL default '',
149 nrodoc int(11) default NULL,
150 nombre varchar(50) default NULL,
151 fch_ult_modif timestamp(14) NOT NULL,