2
 Followers
7
 Likes

DROP Indexes on DB when deleting a table

Backend
New

When an entity is deleted, through Service Studio, the platform should DROP (or inactivate) its indexes in the Database.

Sometimes this old table references another one via a Foreign key, and when we delete a record from this table, we get a constraint error regarding an index that shouldn't even exist anymore.

Created on 8 Nov 2018
Comments (4)
Merged this idea with 'Drop referential integrity for deleted tables when publishing between environments' (created on 09 Nov 2018 05:44:54 by John Williams)


Currently when publishing espaces between environments and an entity has been deleted it is flagged as deleted as expected however the foreign key constraints are not removed in the destination environment. This leads to situations where if you have data in the entity you have an SQL table that is not visible but still has data which triggers a reference violation when you delete the record in the parent table. Now because the table is marked as deleted you have no way of clearing the data from it so you end up with a permanent reference block unless you can go in with something like SQL management studio or possibly use an advanced query and manually delete the data


When an entity is marked as deleted during an environment deployment all constraints should be removed from that table





This comment was:
- originally posted on idea 'Drop referential integrity for deleted tables when publishing between environments' (created on 09 Nov 2018 by John Williams)
- merged to idea 'DROP Indexes on DB when deleting a table' on 12 Nov 2018 15:12:05 by Fernando Moitinho

Just noticed https://www.outsystems.com/ideas/5819/drop-indexes-on-db-when-deleting-a-table these can probably be merged



This comment was:
- originally posted on idea 'Drop referential integrity for deleted tables when publishing between environments' (created on 09 Nov 2018 by John Williams)
- merged to idea 'DROP Indexes on DB when deleting a table' on 12 Nov 2018 15:12:05 by Fernando Moitinho

Changed the category to Backend




This comment was:
- originally posted on idea 'Drop referential integrity for deleted tables when publishing between environments' (created on 09 Nov 2018 by John Williams)
- merged to idea 'DROP Indexes on DB when deleting a table' on 12 Nov 2018 15:12:05 by Fernando Moitinho
views
295
Followers
2