зеркало из https://github.com/mozilla/treeherder.git
Bug 1387640 - Remove Exclusion Profiles models/tables
Removes all the models and tables for the ExclusionProfile and JobExclusion models and related.
This commit is contained in:
Родитель
46147d5296
Коммит
863f772a8b
|
@ -26,15 +26,12 @@ as of November 2016 (obviously you should replace `myuser` and
|
|||
GRANT SELECT ON treeherder.build_platform to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.classified_failure to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.commit to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.exclusion_profile to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.exclusion_profile_exclusions to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.failure_classification to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.failure_line to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.failure_match to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_detail to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_duration to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_exclusion to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_group to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_log to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.job_note to 'myuser' REQUIRE SSL;
|
||||
|
@ -64,7 +61,6 @@ as of November 2016 (obviously you should replace `myuser` and
|
|||
GRANT SELECT ON treeherder.text_log_step to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.text_log_summary to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.text_log_summary_line to 'myuser' REQUIRE SSL;
|
||||
GRANT SELECT ON treeherder.user_exclusion_profile to 'myuser' REQUIRE SSL;
|
||||
|
||||
If new tables are added, you can generate a new set of grant
|
||||
statements using the following SQL:
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.5 on 2017-09-13 23:39
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('model', '0016_remove_job_group_default'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='exclusionprofile',
|
||||
name='author',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='exclusionprofile',
|
||||
name='exclusions',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='jobexclusion',
|
||||
name='author',
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='userexclusionprofile',
|
||||
unique_together=set([]),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='userexclusionprofile',
|
||||
name='exclusion_profile',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='userexclusionprofile',
|
||||
name='user',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='ExclusionProfile',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='JobExclusion',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='UserExclusionProfile',
|
||||
),
|
||||
]
|
|
@ -21,7 +21,6 @@ from django.db.models import (Case,
|
|||
from django.forms import model_to_dict
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from jsonfield import JSONField
|
||||
|
||||
from .search import (TestFailureLine,
|
||||
es_connected)
|
||||
|
@ -336,57 +335,6 @@ class FailureClassification(NamedModel):
|
|||
db_table = 'failure_classification'
|
||||
|
||||
|
||||
# TODO: Remove these as final phase of Bug 1387640
|
||||
|
||||
class JobExclusion(models.Model):
|
||||
|
||||
"""
|
||||
A filter represents a collection of properties
|
||||
that you want to filter jobs on. These properties along with their values
|
||||
are kept in the info field in json format
|
||||
"""
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
description = models.TextField(blank=True)
|
||||
info = JSONField()
|
||||
author = models.ForeignKey(User)
|
||||
|
||||
class Meta:
|
||||
db_table = 'job_exclusion'
|
||||
|
||||
|
||||
class ExclusionProfile(models.Model):
|
||||
|
||||
"""
|
||||
An exclusion profile represents a list of job exclusions that can be associated with a user profile.
|
||||
"""
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
is_default = models.BooleanField(default=False, db_index=True)
|
||||
exclusions = models.ManyToManyField(JobExclusion, related_name="profiles")
|
||||
author = models.ForeignKey(User, related_name="exclusion_profiles_authored", db_index=True)
|
||||
modified = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'exclusion_profile'
|
||||
|
||||
|
||||
class UserExclusionProfile(models.Model):
|
||||
|
||||
"""
|
||||
An extension to the standard user model that keeps the exclusion
|
||||
profile relationship.
|
||||
"""
|
||||
|
||||
user = models.ForeignKey(User, related_name="exclusion_profiles")
|
||||
exclusion_profile = models.ForeignKey(ExclusionProfile, blank=True, null=True)
|
||||
is_default = models.BooleanField(default=True, db_index=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'user_exclusion_profile'
|
||||
unique_together = ('user', 'exclusion_profile')
|
||||
|
||||
# TODO: End of what to remove as final phase of Bug 1387640
|
||||
|
||||
|
||||
class ReferenceDataSignatures(models.Model):
|
||||
|
||||
"""
|
||||
|
|
Загрузка…
Ссылка в новой задаче