Database

We support Oracle and Postgres databases.

DB scheme.

_images/backport3_db.png

Backport3 database models.

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.Account(**kwargs)[source]

Database table model for account.

account_id

account id.

Type:

uuid4

active

account status (blocked or not).

Type:

bool

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.AccountToken(**kwargs)[source]

Token table.

account_id

account id, token is linked to

Type:

uuid4

token

token

Type:

str

token_id

token id

Type:

uuid4

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.DescriptorsList(**kwargs)[source]

Database table model for descriptors lists.

account_id

account id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

create_descr_list_time_index = Index('create_descr_list_time_index', Column('account_id', String(length=36), ForeignKey('account.account_id'), table=<descriptors_list>, comment='uuid4: id of the account to which the list belongs'), Column('create_time', TIMESTAMP(), table=<descriptors_list>, nullable=False, comment='list: person create time'))

index for pagination by list

create_time

date and time of creating list

Type:

DateTime

list_id

list id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.Handler(**kwargs)[source]

Database table model for handlers.

account_id

account uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”, to which this handler belong

Type:

str

create_time

date and time of creating handler

Type:

DateTime

classmethod getColumnNames()[source]

Get all column name of table.

Returns:

list of column name in order as in db

Return type:

List[str]

handler_id

handler id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

last_update_time

date and time of creating face

Type:

DateTime

policies

json with policies

Type:

str

type

handler type (extractor - 0, identify - 1, verify - 2)

Type:

integer

version

handler version

Type:

int

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.ListPerson(**kwargs)[source]

Database table model for links between persons and lists.

list_id

list id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

person_id

person id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.Person(**kwargs)[source]

Database table model for persons.

account_id

descriptor id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

create_time

date and time of creating person

Type:

DateTime

external_id

external id of the person, if it has its own mapping in external system

Type:

str

person_id

person id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

user_data

client info about the face

Type:

str

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.PersonFace(**kwargs)[source]

Database table model for links between persons and faces.

face_id

face id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

person_id

person id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

class luna_backport3.db.backport3_db_tools.models.backport3_db_models.PersonsList(**kwargs)[source]

Database table model for person lists.

account_id

account id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str

create_persons_list_time_index = Index('create_persons_list_time_index', Column('account_id', String(length=36), ForeignKey('account.account_id'), table=<persons_list>, comment='uuid4: id of the account to which the list belongs'), Column('create_time', TIMESTAMP(), table=<persons_list>, nullable=False, comment='date: list create time'))

index for pagination by list

create_time

date and time of creating list

Type:

DateTime

list_id

list id, uuid4 in format “xxxxxxxx-xxxx-4xxx-{8-9}xx-xxxxxxxxxxxx”

Type:

str