﻿--SELECT 'alert table ' || name || ' rename TO iot_IoT' || substr(name,5) FROM sqlite_master where name like 'iot_%' 
ALTER TABLE iot_Category RENAME TO iot_IoTProductCategory;
ALTER TABLE iot_Node RENAME TO iot_IoTGateway;
ALTER TABLE iot_Product RENAME TO iot_IoTProduct;
ALTER TABLE iot_Scene RENAME TO iot_IoTScene;
ALTER TABLE iot_Api RENAME TO iot_IoTApi;
ALTER TABLE iot_Device RENAME TO iot_IoTDevice;
ALTER TABLE iot_SceneTimer RENAME TO iot_IoTSceneTimer;
ALTER TABLE iot_Parameter RENAME TO iot_IoTParameter;
ALTER TABLE iot_Command RENAME TO iot_IoTCommand;
ALTER TABLE iot_Data RENAME TO iot_IoTData;
ALTER TABLE iot_SceneCommand RENAME TO iot_IoTSceneIoTCommand;
ALTER TABLE iot_SceneTigger RENAME TO iot_IoTSceneTigger;

----------------------------------------------------------------------