Merge pull request #47 from dilee/master

Fixed Postgresql Related Issues
revert-70aa11f8
Geeth 9 years ago
commit 18682291e7

@ -134,7 +134,8 @@ public class CommandOperationDAOImpl extends OperationDAOImpl {
while (rs.next()) { while (rs.next()) {
commandOperation = new CommandOperation(); commandOperation = new CommandOperation();
commandOperation.setId(rs.getInt("ID")); commandOperation.setId(rs.getInt("ID"));
commandOperation.setEnabled(rs.getInt("ENABLED") != 0); //commandOperation.setEnabled(rs.getInt("ENABLED") != 0);
commandOperation.setEnabled(rs.getBoolean("ENABLED") != false);
commandOperation.setStatus(Operation.Status.valueOf(rs.getString("STATUS"))); commandOperation.setStatus(Operation.Status.valueOf(rs.getString("STATUS")));
commandOperation.setType(Operation.Type.valueOf(rs.getString("TYPE"))); commandOperation.setType(Operation.Type.valueOf(rs.getString("TYPE")));
commandOperation.setCreatedTimeStamp(rs.getString("CREATED_TIMESTAMP")); commandOperation.setCreatedTimeStamp(rs.getString("CREATED_TIMESTAMP"));

@ -315,6 +315,17 @@ CREATE TABLE IF NOT EXISTS DM_APPLICATION (
TENANT_ID INTEGER NOT NULL TENANT_ID INTEGER NOT NULL
); );
CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID BIGSERIAL NOT NULL PRIMARY KEY,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_application FOREIGN KEY (APPLICATION_ID) REFERENCES
DM_APPLICATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- POLICY RELATED TABLES FINISHED -- -- POLICY RELATED TABLES FINISHED --
-- NOTIFICATION TABLE -- -- NOTIFICATION TABLE --

Loading…
Cancel
Save