Refactored DB Scripts

revert-70aa11f8
Dileesha Rajapakse 9 years ago
parent ac73155147
commit d7dc46d3a7

@ -97,10 +97,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_OPERATION_RESPONSE (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
); );
--- POLICY RELATED TABLES ---- -- POLICY RELATED TABLES --
CREATE TABLE IF NOT EXISTS DM_PROFILE ( CREATE TABLE IF NOT EXISTS DM_PROFILE (
ID INT NOT NULL AUTO_INCREMENT , ID INT NOT NULL AUTO_INCREMENT ,
@ -402,5 +399,5 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
-- NOTIFICATION TABLE END -- -- NOTIFICATION TABLE END --
-- TO:DO - Remove this INSERT sql statement. -- TO:DO - Remove this INSERT sql statement.
--Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android'); Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android');
--Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios');

@ -1,6 +1,3 @@
/* SQLINES EVALUATION VERSION TRUNCATES VARIABLE NAMES AND COMMENTS. */
/* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */
CREATE TABLE DM_DEVICE_TYPE ( CREATE TABLE DM_DEVICE_TYPE (
ID INT identity NOT NULL, ID INT identity NOT NULL,
NAME VARCHAR(300) DEFAULT NULL, NAME VARCHAR(300) DEFAULT NULL,
@ -100,7 +97,7 @@ CREATE TABLE DM_DEVICE_OPERATION_RESPONSE (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
); );
--- POLICY RELA... *** SQLINES FOR EVALUATION USE ONLY *** -- POLICY RELATED TABLES --
@ -386,9 +383,9 @@ CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
); );
-- POLICY RELAT... *** SQLINES FOR EVALUATION USE ONLY *** -- POLICY RELATED TABLES FINISHED --
-- NOTIFICATION... *** SQLINES FOR EVALUATION USE ONLY *** -- NOTIFICATION TABLE --
CREATE TABLE DM_NOTIFICATION ( CREATE TABLE DM_NOTIFICATION (
NOTIFICATION_ID INTEGER IDENTITY NOT NULL, NOTIFICATION_ID INTEGER IDENTITY NOT NULL,
DEVICE_ID INTEGER NOT NULL, DEVICE_ID INTEGER NOT NULL,
@ -402,8 +399,8 @@ CREATE TABLE DM_NOTIFICATION (
CONSTRAINT fk_dm_operation_notification FOREIGN KEY (OPERATION_ID) REFERENCES CONSTRAINT fk_dm_operation_notification FOREIGN KEY (OPERATION_ID) REFERENCES
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
); );
-- NOTIFICATION... *** SQLINES FOR EVALUATION USE ONLY *** -- NOTIFICATION TABLE END --
-- TO:DO - Remo... *** SQLINES FOR EVALUATION USE ONLY *** -- TO:DO - Remove this INSERT sql statement.
--Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android');
--Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios');

@ -396,3 +396,6 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
)ENGINE = InnoDB; )ENGINE = InnoDB;
-- NOTIFICATION TABLE END -- -- NOTIFICATION TABLE END --
-- TO:DO - Remove this INSERT sql statement.
Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android');
Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios');

@ -1,6 +1,3 @@
/* SQLINES EVALUATION VERSION TRUNCATES VARIABLE NAMES AND COMMENTS. */
/* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */
CREATE TABLE DM_DEVICE_TYPE ( CREATE TABLE DM_DEVICE_TYPE (
ID NUMBER(10) NOT NULL, ID NUMBER(10) NOT NULL,
NAME VARCHAR2(300) DEFAULT NULL, NAME VARCHAR2(300) DEFAULT NULL,
@ -166,7 +163,7 @@ BEGIN
END; END;
/ /
--- POLICY RELA... *** SQLINES FOR EVALUATION USE ONLY *** -- POLICY RELATED TABLES ---
@ -601,9 +598,9 @@ BEGIN
END; END;
/ /
-- POLICY RELAT... *** SQLINES FOR EVALUATION USE ONLY *** -- POLICY RELATED TABLES FINISHED --
-- NOTIFICATION... *** SQLINES FOR EVALUATION USE ONLY *** -- NOTIFICATION TABLE --
CREATE TABLE DM_NOTIFICATION ( CREATE TABLE DM_NOTIFICATION (
NOTIFICATION_ID NUMBER(10) NOT NULL, NOTIFICATION_ID NUMBER(10) NOT NULL,
DEVICE_ID NUMBER(10) NOT NULL, DEVICE_ID NUMBER(10) NOT NULL,
@ -628,8 +625,8 @@ BEGIN
SELECT DM_NOTIFICATION_seq.NEXTVAL INTO :NEW.NOTIFICATION_ID FROM DUAL; SELECT DM_NOTIFICATION_seq.NEXTVAL INTO :NEW.NOTIFICATION_ID FROM DUAL;
END; END;
/ /
-- NOTIFICATION... *** SQLINES FOR EVALUATION USE ONLY *** -- NOTIFICATION TABLE END --
-- TO:DO - Remo... *** SQLINES FOR EVALUATION USE ONLY *** -- TO:DO - Remove this INSERT sql statement.
--Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android');
--Insert into D... *** SQLINES FOR EVALUATION USE ONLY *** Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios');
Loading…
Cancel
Save