    DATABASE_PASSWORD  varchar(100) default NULL,
    DATABASE_DIALECT  varchar(100) default NULL,
    DATABASE_DRIVER  varchar(100) default NULL,
-  PRIMARY KEY  ( APPLICATION_ID ),
   CONSTRAINT UQ_APPLICATION_NAME UNIQUE (APPLICATION_NAME)	
 )  
+alter table CSM_APPLICATION add constraint PK_CSM_APPLICATION_ID primary key (APPLICATION_ID);
+
 /* Dumping data for table csm_application*/
-SET IDENTITY_INSERT dbo.CSM_APPLICATION ON
+SET IDENTITY_INSERT CSM_APPLICATION ON
 INSERT INTO CSM_APPLICATION (APPLICATION_ID,APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,UPDATE_DATE) VALUES (1,'catissuecore','caTISSUE Core',0,0,'2005-08-22');
-SET IDENTITY_INSERT dbo.CSM_APPLICATION OFF
+SET IDENTITY_INSERT CSM_APPLICATION OFF
 
 /* Table Objects for table csm_group*/
-IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_GROUP') DROP TABLE CSM_GROUP ;
+--IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_GROUP') DROP TABLE CSM_GROUP ;
 CREATE TABLE  CSM_GROUP  (
    GROUP_ID  numeric(20) NOT NULL  identity,
    GROUP_NAME  varchar(255) NOT NULL default '',
    GROUP_DESC  varchar(200) default NULL,
    UPDATE_DATE  smalldatetime NOT NULL default '2005-01-01',
    APPLICATION_ID  numeric(20) NOT NULL default '0',
-
-    PRIMARY KEY  ( GROUP_ID ),
-	CONSTRAINT UQ_GROUP_GROUP_NAME UNIQUE (APPLICATION_ID , GROUP_NAME)
+   CONSTRAINT UQ_GROUP_GROUP_NAME UNIQUE (APPLICATION_ID , GROUP_NAME)
 )  
-
-SET IDENTITY_INSERT dbo.CSM_GROUP ON
+alter table CSM_GROUP add constraint PK_CSM_GROUP_ID primary key (GROUP_ID);
+
+
+SET IDENTITY_INSERT CSM_GROUP ON
 /* Table Objects for table csm_group*/
 INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID) VALUES (1,'ADMINISTRATOR_GROUP','Group of Administrators',0000-00-00,1);
 INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID) VALUES (2,'SUPERVISOR_GROUP','Group of Supervisors',0000-00-00,1);
 INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID) VALUES (3,'TECHNICIAN_GROUP','Group of Technicians',0000-00-00,1);
 INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID) VALUES (4,'PUBLIC_GROUP','Group of Public Users',0000-00-00,1);
-SET IDENTITY_INSERT dbo.CSM_GROUP OFF
+SET IDENTITY_INSERT CSM_GROUP OFF
 
 /* Table Objects for table csm_pg_pe*/
-IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_PG_PE ') DROP TABLE CSM_PG_PE ;
+--IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_PG_PE ') DROP TABLE CSM_PG_PE ;
 CREATE TABLE  CSM_PG_PE  (
    PG_PE_ID  numeric(20) NOT NULL  identity,
    PROTECTION_GROUP_ID  numeric(20) NOT NULL default '0',
    PROTECTION_ELEMENT_ID  numeric(20) NOT NULL default '0',
    UPDATE_DATE  smalldatetime default NULL,
-  PRIMARY KEY  ( PG_PE_ID ),
-  CONSTRAINT UQ_PROTECTION_GROUP_PROTECTION_ELEMENT_PROTECTION_GROUP_ID UNIQUE (PROTECTION_ELEMENT_ID , PROTECTION_GROUP_ID)
+   CONSTRAINT UQ_PROTECTION_GROUP_PROTECTION_ELEMENT_PROTECTION_GROUP_ID UNIQUE (PROTECTION_ELEMENT_ID , PROTECTION_GROUP_ID)
 )  
+alter table CSM_PG_PE add constraint PK_CSM_PG_PE_ID primary key (PG_PE_ID);
+
 
 /* Dumping data for table csm_pg_pe*/
 
-SET IDENTITY_INSERT dbo.CSM_PG_PE ON
+SET IDENTITY_INSERT CSM_PG_PE ON
 INSERT INTO CSM_PG_PE (PG_PE_ID,PROTECTION_GROUP_ID,PROTECTION_ELEMENT_ID,UPDATE_DATE) VALUES (16,21,9,NULL);
 INSERT INTO CSM_PG_PE (PG_PE_ID,PROTECTION_GROUP_ID,PROTECTION_ELEMENT_ID,UPDATE_DATE) VALUES (17,2,10,NULL);
 INSERT INTO CSM_PG_PE (PG_PE_ID,PROTECTION_GROUP_ID,PROTECTION_ELEMENT_ID,UPDATE_DATE) VALUES (19,2,11,NULL);

INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID,UPDATE_DATE) VALUES (27,10,12,0000-00-00);
INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID,UPDATE_DATE) VALUES (28,11,3,0000-00-00);
INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID,UPDATE_DATE) VALUES (29,11,11,0000-00-00);
SET IDENTITY_INSERT dbo.CSM_ROLE_PRIVILEGE OFF

/* Table Objects for table csm_user*/

IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_USER ') DROP TABLE CSM_USER ;
CREATE TABLE  CSM_USER  (
   USER_ID  numeric(20) NOT NULL  identity,
   LOGIN_NAME  varchar(100) NOT NULL default '',


/*  Aarti Assigning technician role to technicians on public data group */
INSERT INTO CSM_USER_GROUP_ROLE_PG  (USER_GROUP_ROLE_PG_ID,USER_ID,GROUP_ID,ROLE_ID,PROTECTION_GROUP_ID,UPDATE_DATE) VALUES (75,NULL,3,3,20,'2005-08-24');
SET IDENTITY_INSERT CSM_USER_GROUP_ROLE_PG OFF

/* Table Objects for table csm_user_pe*/
--IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CSM_USER_PE') DROP TABLE CSM_USER_PE ;

/* Table Objects for table csm_user_pe*/

