PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE [ems](

  [reg_lo] DOUBLE, 

  [reg_hi] DOUBLE, 

  [reg_intv] INTEGER, 

  [pcurv_idx] INTEGER, 

  [transf_conm_model] TEXT(32), 

  [transf_conm_idx] INTEGER, 

  [transf_loadm_model] TEXT(32), 

  [transf_loadm_idx] INTEGER, 

  [factory_conm_model] TEXT(32), 

  [factory_conm_idx] INTEGER, 

  [factory_loadm_model] TEXT(32), 

  [factory_loadm_idx] INTEGER);
INSERT INTO ems VALUES(50.0,1500.0,500,0,'na',0,'abb_b23_4',3,'abb_b23_4',0,'na',0);
CREATE TABLE IF NOT EXISTS "mqtt" (
	"enable"	INTEGER,
	"servip"	TEXT(24),
	"servport"	INTEGER,
	"username"	TEXT(64),
	"passwd"	TEXT(64),
	"timezone"	INTEGER,
	"idx"	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE
);
INSERT INTO mqtt VALUES(1,'test.anduwe.com',1883,'3671d5a6c416418595495a3b145a8d4d','111111',0,1);
CREATE TABLE IF NOT EXISTS "tbmqtt" (
	"enable"	INTEGER,
	"servip"	TEXT(24),
	"servport"	INTEGER,
	"clientid"	TEXT(64),
	"accesstoken"	TEXT(64),
	"username"	TEXT(64),
	"passwd"	TEXT(64),
	"topic"	TEXT(128),
	"timezone"	INTEGER,
	"idx"	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE
);
INSERT INTO tbmqtt VALUES(1,'124.222.45.156',1883,'f0f51d70-4af6-11ee-9972-3dd738949819','hNUuYwF24O23HX4Byl6n','na','na','na',0,1);
CREATE TABLE IF NOT EXISTS "ctn" (
	"idx_in_ess"	INTEGER NOT NULL UNIQUE,
	"projId"	TEXT
);
INSERT INTO ctn VALUES(3,'3671d5a6c416418595495a3b145a8d4d');
COMMIT;
