How do I delete multiple releases on TestPyPI? - pypi

I do see how to delete one release, but there are many old ones.
I am looking for a "mark many and delete"...

You could delete each one manually. I dont think there is a function for deleting separately.

Related

Remove entitles that never had parent - doctrine

I use orphan Removal to remove entities that are orphaned but I could not find a way to remove entities that never had a parent.
For example, I build a house that has rooms, I delete the house, and orphan Removal will delete the room entities, all works good.
Second scenery, I build a room first, and save it to use it in building the house later. I never used it, I did not build the house and orphan Removal will not delete this entity for me.
What can I do to remove this kind of entities on a regular basis?
I searched the internet for solutions but could not find any. I'm new to programming so I was thinking that maybe I don't search for the right thing. Any directions or tips would be amazing. Thank you
You could simply build a script that you execute everyday using cronjob on your server. If you use symfony, use console command as script to execute.
This script would retrieve orphan from database en delete it.
In local, just execute the command.

How to manually add a user in ibm cloudant?

I have a cloudant database with a lot of deleted docs. Since they can't be destroyed, I would like to make a filtered copy with the non deleted items to a temporary base, destroy the original one, and copy the temporary base to a fresh database with the same name as before.
The problem is when I destroy the base, the API keys generated are also destroyed...
So the front app calling the new base can't acces it !
I would like to manually create a user/password, so I can recreate the same user each time I destroy the database.
I don't know how to do it ?
Or is there another way to achieve my goal ??
To answer your actual question, you can't add "users" to a Cloudant account, only databases. You can, however, make API-keys that span multiple databases, which sounds like it could be what you want:
https://dx13.co.uk/articles/2016/04/11/using-a-cloudant-api-key-with-multiple-cloudant-databases-and-accounts/
But as was noted by bessbd above, if your data model relies on document deletion, you're working against the grain of Cloudant, and sooner or later you'll end up with problems.
And finally -- the doc links appear to work just fine.
Maybe some useful stuff here: https://blog.cloudant.com/2019/11/21/Best-and-Worst-Practices.html
[disclaimer, I wrote that]
Can you please expand a little further on your use case? Why do you want to get rid of the deleted docs? Is there a way to avoid deleting the docs? Also, have you already read https://cloud.ibm.com/docs/services/Cloudant?topic=cloudant-documents#tombstone-documents ?

CodeLens shows incoming changes from branches / folders deleted from TFS

We had deleted some old unused branches and now CodeLens shows incoming changes from those deleted branches above every single method in our solution.
incoming changes
We've tried to convert branch to folder and then delete it but with no luck.
Also I tried solution from this topic https://social.msdn.microsoft.com/Forums/vstudio/en-US/812e6977-7064-474b-b0e1-7f3ab6c53bfc/ , but still - no luck.
Any ideas?
You can use the CodeIndex command in TFSConfig to delete or rebuild the CodeLens data https://www.visualstudio.com/docs/setup-admin/command-line/tfsconfig-cmd#codeindex

Transactional File Operations in OSX

I'm trying to do the following:
Read a file's attributes
If the attributes match a certain condition,
delete the file
Right now I'm using NSFileManager to perform a attributesOfItemAtPath:error: followed by removeItemAtPath:error:. I'm worried something will happen in between the two operations that invalidates the initial check.
What's the best way to make these two operations atomic?
Edit
The answers so far suggest file locking, which I have tried looking into. The closest thing I could find was setting the NSFileImmutable flag. But it seems like any other program could come along, unset it, and modify the file.. Is there a better way to lock a file?
Edit 2
Someone asked for a use case. Let's say I'm trying to keep two folders in sync. Any changes made to the files in one folder are mirrored in the other, and vice versa. If I delete file 1 from folder A, I will also delete file 1 from folder B. But if file 1 in folder B changes right before I delete it; then instead of deleting it, I want to sync it back to folder A
You can use mandatory (kernel enforced) file locking to lock the file in question to prevent changes being done to the file when you are operating on it. I know Linux and Solaris support mandatory file locking but I have no clue if OS X / HFS+ does and if so how to use it. Hope this helps.
So you have more than one attribute query then? If so, why not just lock the file before starting the queries? Once done, unlock. Then if delete, delete.
There's a way to lock a file with Cocoa; I googled and worked that problem a few days back, but I already forgot the specific message; sorry..
I suggest to use a message in order to accept or delete the file with this method:
fileManager:shouldRemoveItemAtPath:
The prototype of your development is to call method delete the file and in the method shouldRemoveItemAtPath: you accept (returns YES) or you reject (returns NO) as the file attributes values.
Hope this help
It seems to me that you should just go ahead and delete the files that matched. There's no point to locking unless you are worried some other app will change the file such that it can't be deleted. Think about it; you found a file that matches your delete criteria. You want to delete it. Does it really matter if it changes in the meantime?

What is the database concept equivalent to "when deleting the user, delete all his posts"?

What is the database concept equivalent to "when deleting the user, delete all his posts"?
And is this a good thing?
Another example: if your website is a programming forum, you need to find and delete comments related to that topic before deleting the topic.
Should this be handled automatically in the database layer?
cascading deletes
I would hesitate to recommend real deletion - instead using a soft deletion which marks a record as deleted - in this case, you might use cascading updates (or not, since the original topic has already been marked as deleted).
Cascading updates, usually used in conjunction with foreign key references. Different DBMS offer varying levels of support.
In the specific case of a forum or similar web site, I'd suggest using "soft" deletion - flag the rows in the databases as being deleted, which will prevent them from being viewed or returned in lists or search results, but don't remove them completely. This facilitates undeletion, etc. to counter shoddy or biased moderation.
In addition, I'd suggest that automatically deleting a user's posts when you delete their user account may not be the best behaviour in all cases - certainly, when dealing with troll/spam accounts, you may want to remove junk posts, but you don't necessarily want to blast away all the information in other cases, particularly as it introduces issues with broken references (e.g. external references, cross-linking from other posts, etc.)
The answer to your question is cascading deletes. For the record, I hate user deletion as a forum feature. If people want to leave, great ... I want to see the history of what they did while they were there.
Not sure if this is what you wanted to find out, but in MySQL the type of thing (I think) you're asking about is called a trigger. It's basically an SQL statement that you associate with a table and an action on that table; for example, you can set a statement that will execute whenever a user's record is deleted which will delete all comments/posts/whatever associated with that user.
see http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html and links therein (that's for MySQL, of course... other DBs may differ)