LinuxMCE Forums
Archive => Archive => Pluto Main General Issues => Topic started by: archived on March 14, 2006, 04:08:05 am
-
When adding a new device I created a duplicate Manufacturer by error. How can I delete the duplicate entry?
-
You can delete it from database. Open a MySQL console or a MySQL client and run:
use pluto_main;
SELECT PK_Manufacturer, Description FROM Manufacturer WHERE Description LIKE '%your_name_here%';
This will return the primary key of the records from database. Then delete the duplicate records using:
DELETE FROM Manufacturer WHERE PK_Manufacturer=X;
with X the primary key returned by SELECT query.
Be aware that if that manufacturer is used as foreign key for a device template, for example, by deleting it you will have an invalid key which will cause sqlCVS, the tool who make database syncronization, to crash.
You can check this with a query like:
SELECT * FROM DeviceTemplate WHERE FK_Manufacturer=X;
-
Nice. It worked.