예제 #1
0
 class Meta:
     db_table = 'records'
     indexes = [
         models.Index(fields=[
             '_id',
         ]),
     ]
     constraints = [
         models.UniqueConstraint(fields=['tid', 'pubdate'],
                                 name='unique_tid_pubdate'),
     ]
예제 #2
0
 class Meta:
     db_table = 'tags'
     indexes = [
         models.Index(fields=[
             '_id',
         ]),
     ]
     constraints = [
         models.UniqueConstraint(fields=[
             'name',
         ], name='unique_name'),
     ]
예제 #3
0
 class Meta:
     db_table = 'tasks'
     indexes = [
         models.Index(fields=[
             '_id',
         ]),
         models.Index(fields=[
             'time_start',
         ]),
     ]
     constraints = [
         models.UniqueConstraint(fields=['task_id'], name='unique_task_id'),
     ]
예제 #4
0
 class Meta:
     db_table = 'video_tag'
     indexes = [
         models.Index(fields=[
             '_id',
         ]),
     ]
     constraints = [
         models.UniqueConstraint(fields=[
             'tid',
             'pubdate',
             'tag_id',
         ],
                                 name='unique_tid_pubdate_tagid')
     ]
예제 #5
0
 class Meta:
     db_table = 'videos'
     indexes = [
         models.Index(fields=[
             'tid',
             'pubdate',
         ]),
         models.Index(fields=[
             '_id',
         ]),
     ]
     constraints = [
         models.UniqueConstraint(fields=[
             'aid',
         ], name='unique_aid'),
     ]