diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 5ddcee39fd..3e528bbbaa 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -2,7 +2,7 @@ /* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */ CREATE TABLE DM_DEVICE_TYPE ( - ID INT identity NOT NULL, + ID INT IDENTITY NOT NULL, NAME VARCHAR(300) DEFAULT NULL, PRIMARY KEY (ID) ); @@ -406,4 +406,4 @@ CREATE TABLE DM_NOTIFICATION ( -- TO:DO - Remo... *** SQLINES FOR EVALUATION USE ONLY *** --Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** ---Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** \ No newline at end of file +--Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index eb887f68c6..56bf241c20 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -2,8 +2,8 @@ -- Table `DM_DEVICE_TYPE` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` ( - `ID` INT(11) NOT NULL , - `NAME` VARCHAR(300) DEFAULT NULL , + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `NAME` VARCHAR(300) NOT NULL , PRIMARY KEY (`ID`) ) ENGINE = InnoDB DEFAULT CHARACTER SET = latin1; @@ -13,12 +13,12 @@ DEFAULT CHARACTER SET = latin1; -- Table `DM_DEVICE` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `DM_DEVICE` ( - `ID` VARCHAR(20) NOT NULL , + `ID` VARCHAR(20) NOT NULL AUTO_INCREMENT , `DESCRIPTION` TEXT DEFAULT NULL , - `NAME` VARCHAR(100) DEFAULT NULL , - `DEVICE_TYPE_ID` INT(11) DEFAULT NULL , - `DEVICE_IDENTIFICATION` VARCHAR(300) DEFAULT NULL , - `TENANT_ID` INTEGER DEFAULT 0, + `NAME` VARCHAR(100) NOT NULL , + `DEVICE_TYPE_ID` INT(11) NOT NULL , + `DEVICE_IDENTIFICATION` VARCHAR(300) NOT NULL , + `TENANT_ID` INTEGER NOT NULL, PRIMARY KEY (`ID`) , INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) , CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2` diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index 2982217eec..ef8909f917 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -2,7 +2,7 @@ /* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */ CREATE TABLE DM_DEVICE_TYPE ( - ID NUMBER(10) NOT NULL, + ID NUMBER(10) NOT NULL, NAME VARCHAR2(300) DEFAULT NULL, PRIMARY KEY (ID) ); @@ -632,4 +632,4 @@ END; -- TO:DO - Remo... *** SQLINES FOR EVALUATION USE ONLY *** --Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** ---Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** \ No newline at end of file +--Insert into D... *** SQLINES FOR EVALUATION USE ONLY ***