initdb: add beta class data
This commit is contained in:
parent
d2a4c9d05a
commit
dae2cc8c3a
2 changed files with 21 additions and 1 deletions
22
initdb.py
22
initdb.py
|
@ -19,7 +19,8 @@ from data.database import (db, all_models, beta_classes, Role, TeamRole, Visibil
|
||||||
ImageStorageTransformation, ImageStorageSignatureKind,
|
ImageStorageTransformation, ImageStorageSignatureKind,
|
||||||
ExternalNotificationEvent, ExternalNotificationMethod, NotificationKind,
|
ExternalNotificationEvent, ExternalNotificationMethod, NotificationKind,
|
||||||
QuayRegion, QuayService, UserRegion, OAuthAuthorizationCode,
|
QuayRegion, QuayService, UserRegion, OAuthAuthorizationCode,
|
||||||
ServiceKeyApprovalType, MediaType, LabelSourceType, UserPromptKind)
|
ServiceKeyApprovalType, MediaType, LabelSourceType, UserPromptKind,
|
||||||
|
RepositoryKind, TagKind, BlobPlacementLocation)
|
||||||
from data import model
|
from data import model
|
||||||
from data.queue import WorkQueue
|
from data.queue import WorkQueue
|
||||||
from app import app, storage as store, tf
|
from app import app, storage as store, tf
|
||||||
|
@ -350,6 +351,9 @@ def initialize_database():
|
||||||
ImageStorageLocation.create(name='local_eu')
|
ImageStorageLocation.create(name='local_eu')
|
||||||
ImageStorageLocation.create(name='local_us')
|
ImageStorageLocation.create(name='local_us')
|
||||||
|
|
||||||
|
BlobPlacementLocation.create(name='local_eu')
|
||||||
|
BlobPlacementLocation.create(name='local_us')
|
||||||
|
|
||||||
ImageStorageTransformation.create(name='squash')
|
ImageStorageTransformation.create(name='squash')
|
||||||
ImageStorageTransformation.create(name='aci')
|
ImageStorageTransformation.create(name='aci')
|
||||||
|
|
||||||
|
@ -396,6 +400,15 @@ def initialize_database():
|
||||||
MediaType.create(name='text/plain')
|
MediaType.create(name='text/plain')
|
||||||
MediaType.create(name='application/json')
|
MediaType.create(name='application/json')
|
||||||
MediaType.create(name='text/markdown')
|
MediaType.create(name='text/markdown')
|
||||||
|
MediaType.create(name='application/vnd.cnr.blob.v0.tar+gzip')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package-manifest.helm.v0.json')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package-manifest.kpm.v0.json')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package-manifest.docker-compose.v0.json')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package.kpm.v0.tar+gzip')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package.helm.v0.tar+gzip')
|
||||||
|
MediaType.create(name='application/vnd.cnr.package.docker-compose.v0.tar+gzip')
|
||||||
|
MediaType.create(name='application/vnd.cnr.manifests.v0.json')
|
||||||
|
MediaType.create(name='application/vnd.cnr.manifest.list.v0.json')
|
||||||
|
|
||||||
LabelSourceType.create(name='manifest')
|
LabelSourceType.create(name='manifest')
|
||||||
LabelSourceType.create(name='api', mutable=True)
|
LabelSourceType.create(name='api', mutable=True)
|
||||||
|
@ -405,6 +418,13 @@ def initialize_database():
|
||||||
UserPromptKind.create(name='enter_name')
|
UserPromptKind.create(name='enter_name')
|
||||||
UserPromptKind.create(name='enter_company')
|
UserPromptKind.create(name='enter_company')
|
||||||
|
|
||||||
|
RepositoryKind.create(name='image')
|
||||||
|
RepositoryKind.create(name='application')
|
||||||
|
|
||||||
|
TagKind.create(name='tag')
|
||||||
|
TagKind.create(name='release')
|
||||||
|
TagKind.create(name='channel')
|
||||||
|
|
||||||
|
|
||||||
def wipe_database():
|
def wipe_database():
|
||||||
logger.debug('Wiping all data from the DB.')
|
logger.debug('Wiping all data from the DB.')
|
||||||
|
|
Binary file not shown.
Reference in a new issue