Phase 3 of Appr migration
Deletes the old models and their code
This commit is contained in:
parent
223077ef53
commit
487edf0ba1
9 changed files with 218 additions and 167 deletions
15
initdb.py
15
initdb.py
|
@ -14,14 +14,14 @@ from uuid import UUID, uuid4
|
|||
from threading import Event
|
||||
|
||||
from email.utils import formatdate
|
||||
from data.database import (db, all_models, cnr_classes, Role, TeamRole, Visibility, LoginService,
|
||||
from data.database import (db, all_models, Role, TeamRole, Visibility, LoginService,
|
||||
BuildTriggerService, AccessTokenKind, LogEntryKind, ImageStorageLocation,
|
||||
ImageStorageTransformation, ImageStorageSignatureKind,
|
||||
ExternalNotificationEvent, ExternalNotificationMethod, NotificationKind,
|
||||
QuayRegion, QuayService, UserRegion, OAuthAuthorizationCode,
|
||||
ServiceKeyApprovalType, MediaType, LabelSourceType, UserPromptKind,
|
||||
RepositoryKind, TagKind, BlobPlacementLocation, User, DisableReason,
|
||||
DeletedNamespace, appr_classes, ApprTagKind, ApprBlobPlacementLocation)
|
||||
RepositoryKind, User, DisableReason, DeletedNamespace, appr_classes,
|
||||
ApprTagKind, ApprBlobPlacementLocation)
|
||||
from data import model
|
||||
from data.queue import WorkQueue
|
||||
from app import app, storage as store, tf
|
||||
|
@ -361,9 +361,6 @@ def initialize_database():
|
|||
ImageStorageLocation.create(name='local_eu')
|
||||
ImageStorageLocation.create(name='local_us')
|
||||
|
||||
BlobPlacementLocation.create(name='local_eu')
|
||||
BlobPlacementLocation.create(name='local_us')
|
||||
|
||||
ApprBlobPlacementLocation.create(name='local_eu')
|
||||
ApprBlobPlacementLocation.create(name='local_us')
|
||||
|
||||
|
@ -434,10 +431,6 @@ def initialize_database():
|
|||
RepositoryKind.create(name='image')
|
||||
RepositoryKind.create(name='application')
|
||||
|
||||
TagKind.create(name='tag')
|
||||
TagKind.create(name='release')
|
||||
TagKind.create(name='channel')
|
||||
|
||||
ApprTagKind.create(name='tag')
|
||||
ApprTagKind.create(name='release')
|
||||
ApprTagKind.create(name='channel')
|
||||
|
@ -913,7 +906,7 @@ def find_models_missing_data():
|
|||
# whitelisted.
|
||||
models_missing_data = set()
|
||||
for one_model in all_models:
|
||||
if one_model in cnr_classes or one_model in appr_classes:
|
||||
if one_model in appr_classes:
|
||||
continue
|
||||
|
||||
try:
|
||||
|
|
Reference in a new issue