Re: Removing all tasks from the database
Maybe we could add some foreign keys (I think MDB2 handles them) so
that it is easier to drop one task and all data related to it.
Pascal
Le 08/10/2010 12:06, Maciej Jaros a écrit :
> Hi. So I've found a way... Not ver nice but it works
.
>
> == Clearing all tasks data ==
> This should leave all your setting untouched. While removing
> everything(!) related to tasks. Note that removing all of this is a
> good idea only if your are making a copy of your Flyspray and starting
> a compteley new project based only on your current settings.
>
> === DELETE data from tables ===
> You could run DELETE instead of DROP and CREATE, but you will get high
> numbers of ids. This is not good for starting a seperate project.
>
> === DROP and reCREATE tables and their indexes ===
> DROP INDEX first and DROP TABLE after that and then appropraite CREATE
> TABLE and CREATE INDEX.
> You can get SQL for this from a backup. Postgres will show you this
> while browsing tables
> # flyspray_assigned
> # flyspray_attachments
> # flyspray_comments
> # flyspray_dependencies
> # flyspray_history
> # flyspray_notifications
> # flyspray_related
> # flyspray_reminders
> # flyspray_votes
>
> And finally drop and reacreate:
> # flyspray_tasks
>
> == Checking if your database contains any task data ==
>
> SELECT COUNT(*) as rows_count, 'flyspray_assigned' as table_name FROM
> flyspray_assigned
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_attachments' as table_name
> FROM flyspray_attachments
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_comments' as table_name FROM
> flyspray_comments
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_dependencies' as table_name
> FROM flyspray_dependencies
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_history' as table_name FROM
> flyspray_history
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_notifications' as table_name
> FROM flyspray_notifications
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_related' as table_name FROM
> flyspray_related
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_reminders' as table_name FROM
> flyspray_reminders
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_votes' as table_name FROM
> flyspray_votes
> UNION
> SELECT COUNT(*) as rows_count, 'flyspray_tasks' as table_name FROM
> flyspray_tasks
>
--
--
You received this message because you are subscribed to the Google Groups "flyspray" group.
To post to this group, send email to flyspray@...
To unsubscribe from this group, send email to flyspray-unsubscribe <at> googlegroups.com.
If you only wish to be informed about new flyspray releases, visit http://www.flyspray.org/download and
subscribe to the flyspray-announce list.
For more options, visit this group at http://groups.google.com/group/flyspray?hl=en