From d6373255902d76851d8d3aa234d23cd0d0854eeb Mon Sep 17 00:00:00 2001 From: NuwanSameera Date: Thu, 31 Mar 2016 17:06:25 +0530 Subject: [PATCH] Add db scripts to mssql, oracle, postgresql databases. --- .../service/impl/VirtualFireAlarmManagerService.java | 12 ++++++------ .../src/main/resources/dbscripts/h2.sql | 3 --- .../src/main/resources/dbscripts/mssql.sql | 8 ++++++++ .../src/main/resources/dbscripts/oracle.sql | 8 ++++++++ .../src/main/resources/dbscripts/postgresql.sql | 8 ++++++++ .../src/main/resources/dbscripts/h2.sql | 3 --- .../src/main/resources/dbscripts/mssql.sql | 8 ++++++++ .../src/main/resources/dbscripts/oracle.sql | 8 ++++++++ .../src/main/resources/dbscripts/postgresql.sql | 8 ++++++++ .../src/main/resources/dbscripts/h2.sql | 3 --- .../src/main/resources/dbscripts/mssql.sql | 8 ++++++++ .../src/main/resources/dbscripts/oracle.sql | 8 ++++++++ .../src/main/resources/dbscripts/postgresql.sql | 8 ++++++++ .../src/main/resources/dbscripts/h2.sql | 2 -- .../src/main/resources/dbscripts/mssql.sql | 9 +++++++++ .../src/main/resources/dbscripts/oracle.sql | 9 +++++++++ .../src/main/resources/dbscripts/postgresql.sql | 9 +++++++++ .../src/main/resources/dbscripts/h2.sql | 2 -- .../src/main/resources/dbscripts/mssql.sql | 9 +++++++++ .../src/main/resources/dbscripts/oracle.sql | 9 +++++++++ .../src/main/resources/dbscripts/postgresql.sql | 9 +++++++++ .../src/main/resources/dbscripts/h2.sql | 3 --- .../src/main/resources/dbscripts/mssql.sql | 8 ++++++++ .../src/main/resources/dbscripts/oracle.sql | 8 ++++++++ .../src/main/resources/dbscripts/postgresql.sql | 8 ++++++++ 25 files changed, 156 insertions(+), 22 deletions(-) create mode 100644 features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql diff --git a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerService.java b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerService.java index 9f89af761d..e8117619cd 100644 --- a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerService.java +++ b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmManagerService.java @@ -36,34 +36,34 @@ import javax.ws.rs.core.Response; @DeviceType(value = "virtual_firealarm") public interface VirtualFireAlarmManagerService { - @Path("manager/device/{device_id}") + @Path("devices/{device_id}") @DELETE Response removeDevice(@PathParam("device_id") String deviceId); - @Path("manager/device/{device_id}") + @Path("devices/{device_id}") @PUT Response updateDevice(@PathParam("device_id") String deviceId, @QueryParam("name") String name); - @Path("manager/device/{device_id}") + @Path("devices/{device_id}") @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getDevice(@PathParam("device_id") String deviceId); - @Path("manager/devices") + @Path("devices") @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getFirealarmDevices(); - @Path("manager/device/{sketch_type}/download") + @Path("devices/{sketch_type}/download") @GET @Produces(MediaType.APPLICATION_JSON) Response downloadSketch(@QueryParam("deviceName") String deviceName, @PathParam("sketch_type") String sketchType); - @Path("manager/device/{sketch_type}/generate_link") + @Path("devices/{sketch_type}/generate_link") @GET Response generateSketchLink(@QueryParam("deviceName") String deviceName, @PathParam("sketch_type") String sketchType); diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql index 218cdbf05c..ee3bfa73a4 100644 --- a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql @@ -6,6 +6,3 @@ CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`ANDROID_DEVICE_ID`) ); - - - diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..cf677ff074 --- /dev/null +++ b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..cf677ff074 --- /dev/null +++ b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..987f4992b3 --- /dev/null +++ b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID)); diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/h2.sql index 2e9bc926b5..7d5b98b725 100644 --- a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/h2.sql @@ -6,6 +6,3 @@ CREATE TABLE IF NOT EXISTS `ARDUINO_DEVICE` ( `ARDUINO_DEVICE_ID` VARCHAR(45) NOT NULL , `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`ARDUINO_DEVICE_ID`) ); - - - diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..e966d462af --- /dev/null +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table for `ARDUINO_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ARDUINO_DEVICE ( + ARDUINO_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ARDUINO_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..e966d462af --- /dev/null +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table for `ARDUINO_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ARDUINO_DEVICE ( + ARDUINO_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ARDUINO_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..e966d462af --- /dev/null +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table for `ARDUINO_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ARDUINO_DEVICE ( + ARDUINO_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ARDUINO_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/h2.sql index 5bf6884c58..ab31bf6e14 100644 --- a/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/h2.sql @@ -6,6 +6,3 @@ CREATE TABLE IF NOT EXISTS `DIGITAL_DISPLAY_DEVICE` ( `DIGITAL_DISPLAY_DEVICE_ID` VARCHAR(45) NOT NULL , `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`DIGITAL_DISPLAY_DEVICE_ID`) ); - - - diff --git a/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..3828224d05 --- /dev/null +++ b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `DIGITAL_DISPLAY_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DIGITAL_DISPLAY_DEVICE ( + DIGITAL_DISPLAY_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DIGITAL_DISPLAY_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..3828224d05 --- /dev/null +++ b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `DIGITAL_DISPLAY_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DIGITAL_DISPLAY_DEVICE ( + DIGITAL_DISPLAY_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DIGITAL_DISPLAY_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..3828224d05 --- /dev/null +++ b/features/iot-plugins-feature/digital-display-plugin-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `DIGITAL_DISPLAY_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DIGITAL_DISPLAY_DEVICE ( + DIGITAL_DISPLAY_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DIGITAL_DISPLAY_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/h2.sql index f7dac408b6..5dc50ce214 100644 --- a/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/h2.sql @@ -7,5 +7,3 @@ CREATE TABLE IF NOT EXISTS `DRONE_DEVICE` ( `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`DRONE_DEVICE_ID`) ); - - diff --git a/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..4dca78f70a --- /dev/null +++ b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `DRONE_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DRONE_DEVICE ( + DRONE_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DRONE_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..4dca78f70a --- /dev/null +++ b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `DRONE_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DRONE_DEVICE ( + DRONE_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DRONE_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..4dca78f70a --- /dev/null +++ b/features/iot-plugins-feature/drone-analyzer-plugin-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `DRONE_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS DRONE_DEVICE ( + DRONE_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (DRONE_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql index aead055a48..67e702ec99 100644 --- a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql @@ -7,5 +7,3 @@ CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` ( `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) ); - - diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..a944f4cb2e --- /dev/null +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..a944f4cb2e --- /dev/null +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..a944f4cb2e --- /dev/null +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql index 340ba6a70c..160b437cbc 100644 --- a/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql +++ b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql @@ -6,6 +6,3 @@ CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` ( `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL , `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) ); - - - diff --git a/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 0000000000..41b7e48480 --- /dev/null +++ b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 0000000000..41b7e48480 --- /dev/null +++ b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) ); diff --git a/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 0000000000..41b7e48480 --- /dev/null +++ b/features/iot-plugins-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );