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

Remove job model and generate migrations #995

Merged
merged 5 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# Swap files
*.swp

# End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos,python,node,react,intellij,vscode

/bytes/bytes-data
Expand Down
4 changes: 4 additions & 0 deletions rocky/export_migrations/0070.tools.0029_delete_job.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--
-- Drop the job table
--
DROP TABLE "tools_job";
praseodym marked this conversation as resolved.
Show resolved Hide resolved
15 changes: 15 additions & 0 deletions rocky/tools/migrations/0038_delete_job.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by Django 3.2.19 on 2023-05-17 13:19

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("tools", "0037_alter_organization_options"),
]

operations = [
migrations.DeleteModel(
name="Job",
),
]
10 changes: 0 additions & 10 deletions rocky/tools/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import uuid
from functools import cached_property
from typing import Iterable, Set

Expand Down Expand Up @@ -309,12 +308,3 @@ def get_internet_description(self):

def __str__(self):
return self.id


class Job(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
organization = models.ForeignKey(Organization, on_delete=models.SET_NULL, null=True)
boefje_id = models.CharField(max_length=128)
input_ooi = models.TextField(null=True)
arguments = models.JSONField()
created = models.DateTimeField(auto_now_add=True)