diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mssql.sql new file mode 100644 index 0000000000..23cda9006a --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mssql.sql @@ -0,0 +1,29 @@ +-- ----------------------------------------------------- +-- Table `AD_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE AD_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL, + GCM_TOKEN VARCHAR(45) NULL DEFAULT NULL, + DEVICE_INFO VARCHAR(8000) NULL DEFAULT NULL, + IMEI VARCHAR(45) NULL DEFAULT NULL, + IMSI VARCHAR(45) NULL DEFAULT NULL, + OS_VERSION VARCHAR(45) NULL DEFAULT NULL, + DEVICE_MODEL VARCHAR(45) NULL DEFAULT NULL, + VENDOR VARCHAR(45) NULL DEFAULT NULL, + LATITUDE VARCHAR(45) NULL DEFAULT NULL, + LONGITUDE VARCHAR(45) NULL DEFAULT NULL, + SERIAL VARCHAR(45) NULL DEFAULT NULL, + MAC_ADDRESS VARCHAR(45) NULL DEFAULT NULL, + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID)); + +-- ----------------------------------------------------- +-- Table `AD_FEATURE` +-- ----------------------------------------------------- +CREATE TABLE AD_FEATURE ( + ID INT NOT NULL IDENTITY, + CODE VARCHAR(45) NOT NULL, + NAME VARCHAR(100) NULL, + DESCRIPTION VARCHAR(200) NULL, + PRIMARY KEY (ID) +); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mysql.sql index ce25caf6ed..0f80bdd344 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/android/mysql.sql @@ -1,10 +1,10 @@ -- ----------------------------------------------------- -- Table `AD_DEVICE` -- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( - `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , - `DEVICE_INFO` VARCHAR(500) NULL DEFAULT NULL, +CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( + `DEVICE_ID` VARCHAR(45) NOT NULL, `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL, + `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL, `IMEI` VARCHAR(45) NULL DEFAULT NULL, `IMSI` VARCHAR(45) NULL DEFAULT NULL, `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL, @@ -15,9 +15,8 @@ CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( `SERIAL` VARCHAR(45) NULL DEFAULT NULL, `MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL, `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (`ANDROID_DEVICE_ID`)) -ENGINE = InnoDB; - + PRIMARY KEY (`DEVICE_ID`)) + ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `AD_FEATURE` @@ -27,6 +26,6 @@ CREATE TABLE IF NOT EXISTS `AD_FEATURE` ( `CODE` VARCHAR(45) NOT NULL, `NAME` VARCHAR(100) NULL, `DESCRIPTION` VARCHAR(200) NULL, - PRIMARY KEY (`ID`)) -ENGINE = InnoDB; + PRIMARY KEY (`ID`) + ) ENGINE = InnoDB; diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/ios/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/ios/mssql.sql new file mode 100644 index 0000000000..78cbc22c21 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/ios/mssql.sql @@ -0,0 +1,33 @@ +-- ----------------------------------------------------- +-- Table `IOS_FEATURE` +-- ----------------------------------------------------- +CREATE TABLE IOS_FEATURE ( + ID INT NOT NULL IDENTITY, + CODE VARCHAR(45) NOT NULL, + NAME VARCHAR(100) NULL, + DESCRIPTION VARCHAR(200) NULL, + PRIMARY KEY (ID) +); + +-- ----------------------------------------------------- +-- Table `IOS_DEVICE` +-- ----------------------------------------------------- + CREATE TABLE IOS_DEVICE ( + DEVICE_ID VARCHAR(45) NOT NULL, + APNS_PUSH_TOKEN VARCHAR(100) NULL DEFAULT NULL, + MAGIC_TOKEN VARCHAR(100) NULL DEFAULT NULL, + MDM_TOKEN VARCHAR(100) NULL DEFAULT NULL, + UNLOCK_TOKEN VARCHAR(2000) NULL DEFAULT NULL, + CHALLENGE_TOKEN VARCHAR(45) NULL DEFAULT NULL, + DEVICE_INFO VARCHAR(8000) NULL DEFAULT NULL, + SERIAL VARCHAR(45) NULL DEFAULT NULL, + PRODUCT VARCHAR(45) NULL DEFAULT NULL, + IMEI VARCHAR(45) NULL DEFAULT NULL, + VERSION VARCHAR(45) NULL DEFAULT NULL, + MAC_ADDRESS VARCHAR(45) NULL DEFAULT NULL, + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + ICCID VARCHAR(45) NULL DEFAULT NULL, + LATITUDE VARCHAR(45) NULL DEFAULT NULL, + LONGITUDE VARCHAR(45) NULL DEFAULT NULL, + PRIMARY KEY (DEVICE_ID) +); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/windows/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/windows/mssql.sql new file mode 100644 index 0000000000..c905c89a42 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.mobile.feature/src/main/resources/dbscripts/plugins/windows/mssql.sql @@ -0,0 +1,30 @@ +-- ----------------------------------------------------- +-- Table `WINDOWS_FEATURE` +-- ----------------------------------------------------- +CREATE TABLE WINDOWS_FEATURE ( + ID INT NOT NULL IDENTITY, + CODE VARCHAR(45) NOT NULL, + NAME VARCHAR(100) NULL, + DESCRIPTION VARCHAR(200) NULL, + PRIMARY KEY (ID) +); + +-- ----------------------------------------------------- +-- Table `WINDOWS_DEVICE` +-- ----------------------------------------------------- + CREATE TABLE WINDOWS_DEVICE ( + DEVICE_ID VARCHAR(45) NOT NULL, + CHANNEL_URI VARCHAR(100) NULL DEFAULT NULL, + DEVICE_INFO VARCHAR(8000) NULL DEFAULT NULL, + IMEI VARCHAR(45) NULL DEFAULT NULL, + IMSI VARCHAR(45) NULL DEFAULT NULL, + OS_VERSION VARCHAR(45) NULL DEFAULT NULL, + DEVICE_MODEL VARCHAR(45) NULL DEFAULT NULL, + VENDOR VARCHAR(45) NULL DEFAULT NULL, + LATITUDE VARCHAR(45) NULL DEFAULT NULL, + LONGITUDE VARCHAR(45) NULL DEFAULT NULL, + SERIAL VARCHAR(45) NULL DEFAULT NULL, + MAC_ADDRESS VARCHAR(45) NULL DEFAULT NULL, + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DEVICE_ID) +);