- Status Unconfirmed
- Percent Complete
- Task Type Information
- Category Database Queries
- Assigned To No-one
- Operating System All
- Severity Low
- Priority Very Low
- Reported Version 1.0 devel (github master)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2432 - Delete tasks from all projects (like factory reset)
Is there any “ready” SQL query file to delete all tasks and start again ? (without deleting projects, project settings, categories, task types, tags, task statuses etc...)
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Better title: Delete tasks from all projects (like factory reset)
I don't know about. What is the reason for doing that?
Flyspray tables are not connected by referential key constraints. ( ON DELETE CASCADE ).
Looking at the database diagram I did for Flyspray 1.0, most depending tables that 'references' the task_id can be emptied.
There are a few tables like flyspray_history that may contain rows that are not related to tasks.
Pseudo example (when the dbtable prefix is flyspray_ ) and MySQL is used:
(untested)
Some tables may contain not task related data like user registration, so keep that rows:
(untested)
If using databased task/comment caching, maybe table flyspray_cache needs to be cleared too.
And when deleting flyspray attachments, the folder attachments should be cleared too ..
Finally
(untested)
TRUNCATE flyspray_tasks;
Deleting with TRUNCATE should also reset the autoincrement back to 1, so the next new task gets again id 1.
https://raw.githubusercontent.com/Flyspray/flyspray.github.io/master/images/manual/flyspray1.0_datab