Switch the registry and index to use real s3 and rds.
This commit is contained in:
parent
281785e612
commit
84adf680b9
5 changed files with 154 additions and 104 deletions
|
@ -1,12 +1,15 @@
|
|||
import string
|
||||
from random import SystemRandom
|
||||
|
||||
from random import SystemRandom
|
||||
from datetime import datetime
|
||||
from peewee import *
|
||||
from peewee import create_model_tables
|
||||
|
||||
from datetime import datetime
|
||||
from app import app
|
||||
|
||||
db = SqliteDatabase('test.db', threadlocals=True)
|
||||
|
||||
db = app.config['DB_DRIVER'](app.config['DB_NAME'],
|
||||
**app.config['DB_CONNECTION_ARGS'])
|
||||
|
||||
|
||||
class BaseModel(Model):
|
||||
|
@ -29,7 +32,7 @@ class Repository(BaseModel):
|
|||
namespace = CharField()
|
||||
name = CharField()
|
||||
visibility = ForeignKeyField(Visibility)
|
||||
description = CharField(null=True)
|
||||
description = BlobField(null=True)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
|
@ -86,11 +89,11 @@ class Image(BaseModel):
|
|||
image_id = CharField()
|
||||
checksum = CharField(null=True)
|
||||
created = DateTimeField(null=True)
|
||||
comment = CharField(null=True)
|
||||
comment = BlobField(null=True)
|
||||
repository = ForeignKeyField(Repository)
|
||||
|
||||
# '/' separated list of ancestory ids, e.g. /1/2/6/7/10/
|
||||
ancestors = CharField(index=True, default='/', max_length=65535)
|
||||
ancestors = CharField(index=True, default='/', max_length=64535)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
|
|
Reference in a new issue