SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
SET time_zone = “+00:00”;
CREATE TABLE sc_tbapl
(
Cod_Prj
varchar(120) NOT NULL,
Versao
int(11) NOT NULL,
Cod_Apl
varchar(120) NOT NULL,
friendly_name
varchar(255) DEFAULT NULL,
Login
varchar(32) NOT NULL,
Tipo_Apl
varchar(20) NOT NULL,
Descricao
text,
Folder
varchar(255) DEFAULT NULL,
Data_Inc
varchar(8) DEFAULT NULL,
Hora_Inc
varchar(8) DEFAULT NULL,
Data_Uacc
varchar(8) DEFAULT NULL,
Hora_Uacc
varchar(8) DEFAULT NULL,
Data_Ger
varchar(8) DEFAULT NULL,
Hora_Ger
varchar(8) DEFAULT NULL,
usa_seguranca
varchar(1) DEFAULT NULL,
Idioma
varchar(50) DEFAULT NULL,
charset_specific
varchar(50) DEFAULT NULL,
NomeConexao
varchar(120) DEFAULT NULL,
NomeTabela
varchar(255) DEFAULT NULL,
Campos_Chave
text,
Template
varchar(255) DEFAULT NULL,
TemplateGrid
varchar(255) DEFAULT NULL,
TemplateEdit
varchar(255) DEFAULT NULL,
TemplateSearch
varchar(255) DEFAULT NULL,
TemplateDetalhe
varchar(255) DEFAULT NULL,
TemplateHeadSearch
varchar(255) DEFAULT NULL,
TemplateFooterSearch
varchar(255) DEFAULT NULL,
SchemaAll
varchar(255) DEFAULT NULL,
schemachart
varchar(255) DEFAULT NULL,
SchemaSearch
varchar(255) DEFAULT NULL,
ButtonAll
varchar(255) DEFAULT NULL,
ButtonSearch
varchar(255) DEFAULT NULL,
Cabecalho_Grid_Mostra
varchar(1) DEFAULT NULL,
Cabecalho_Pesq_Mostra
varchar(1) DEFAULT NULL,
Cabecalho_Edit_Mostra
varchar(1) DEFAULT NULL,
Cabecalho_Detalhe_Mostra
varchar(1) DEFAULT NULL,
Tables
text,
ComandoSelect
text,
Variaveis
text,
Xml_Procedure
text,
Attr1
text,
Attr2
text,
Attr3
text,
Attr4
text,
Attr5
text,
Attr6
text,
Attr7
text,
Attr8
text,
Attr9
text,
Attr10
text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE sc_tbapl
ADD PRIMARY KEY (Cod_Prj
,Versao
,Cod_Apl
),
ADD KEY Login
(Login
),
ADD KEY Folder
(Folder
),
ADD KEY Data_Inc
(Data_Inc
),
ADD KEY Hora_Inc
(Hora_Inc
),
ADD KEY Data_Uacc
(Data_Uacc
),
ADD KEY Hora_Uacc
(Hora_Uacc
),
ADD KEY Data_Ger
(Data_Ger
),
ADD KEY Hora_Ger
(Hora_Ger
);
ALTER TABLE sc_tbapl
ADD CONSTRAINT FKSC_tbapl_tbprj
FOREIGN KEY (Cod_Prj
) REFERENCES sc_tbprj
(Cod_Prj
);