[racktables-users] Re: Delete an object...
- From: killsystem <killsystem@xxxxxxxxxxxxxxxx>
- To: racktables-users@xxxxxxxxxxxxx
- Date: Mon, 03 Nov 2008 13:25:07 +0100
Hi,
I think I got it now.
I addded these two lines:
DELETE FROM Atom WHERE molecule_id IN (SELECT new_molecule_id FROM
MountOperation WHERE object_id = {ID});
DELETE FROM Molecule WHERE id IN (SELECT new_molecule_id FROM
MountOperation WHERE object_id = {ID});
They should do the job and delete all garbage left.
So these are all the sql statements. They must be executed in that order!
DELETE FROM AttributeValue WHERE object_id = {ID};
DELETE FROM IPLoadBalancer WHERE object_id = {ID};
DELETE FROM IPBonds WHERE object_id = {ID};
DELETE FROM Port WHERE object_id = {ID};
DELETE FROM PortForwarding WHERE object_id = {ID};
DELETE FROM RackSpace WHERE object_id = {ID};
DELETE FROM TagStorage WHERE target_realm = 'object' and target_id = {ID};
DELETE FROM Atom WHERE molecule_id IN (SELECT new_molecule_id FROM
MountOperation WHERE object_id = {ID});
DELETE FROM Molecule WHERE id IN (SELECT new_molecule_id FROM
MountOperation WHERE object_id = {ID});
DELETE FROM MountOperation WHERE object_id = {ID};
DELETE FROM RackObjectHistory WHERE id = {ID};
DELETE FROM RackObject WHERE id = {ID};
gretz Killsystem
On Wed, 22 Oct 2008 15:34:23 +0400, Denis Ovsienko <pilot@xxxxxxxxxx>
wrote:
>> @Denis: Did I missed something?
>
> Yeah, there's some stuff left behind, namely, records in the Molecule
> and Atom tables. They are used to record the rackspace allocation
> history for the object through MountOperation.
>
>
Other related posts: