Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New management commands to shrink big tables #2046

Merged
merged 5 commits into from
Dec 8, 2018
Merged

New management commands to shrink big tables #2046

merged 5 commits into from
Dec 8, 2018

Conversation

noliveleger
Copy link
Contributor

Based on reversion.deleterevisions management commands. I've added two commands:

  • delete_asset_snapshots
  • delete_import_tasks

4 options can customized:

  • days: Records older than days will be deleted
  • chunks: Number of records per deletion.
  • vacuum: Vacuum after deletion
  • vacuum-full: Full Vacuum after deletion

@noliveleger noliveleger requested a review from jnm October 30, 2018 17:48
Copy link
Member

@jnm jnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a gif

kpi/management/commands/delete_base_command.py Outdated Show resolved Hide resolved
kpi/management/commands/delete_base_command.py Outdated Show resolved Hide resolved
kpi/management/commands/delete_base_command.py Outdated Show resolved Hide resolved
@jnm jnm merged commit 3653099 into master Dec 8, 2018
@jnm jnm deleted the auto_shrink_db branch December 8, 2018 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants