Skip to content

Commit

Permalink
DB schema changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jaewan7599 committed Dec 31, 2019
1 parent eaec812 commit 5a4cd46
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Django-3.0.1/django/bin/sample/app_sample/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
from .models import Marks
# Register your models here.


class MemberAdmin(admin.ModelAdmin):
list_display = []


admin.site.register(Members)
admin.site.register(Cases)
admin.site.register(Membercases)
Expand Down
26 changes: 15 additions & 11 deletions Django-3.0.1/django/bin/sample/app_sample/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ class Meta:
db_table = 'django_session'


class Marks(models.Model):
memberid = models.OneToOneField('Members', models.DO_NOTHING, db_column='memberid', primary_key=True)
caseid = models.ForeignKey('Videos', models.DO_NOTHING, db_column='caseid', related_name='Marks_caseid')
videoid = models.ForeignKey('Videos', models.DO_NOTHING, db_column='videoid', related_name='Marks_videoid')

class Meta:
managed = False
db_table = 'marks'
unique_together = (('memberid', 'caseid', 'videoid'),)


class Membercases(models.Model):
memberid = models.OneToOneField('Members', models.DO_NOTHING, db_column='memberid', primary_key=True)
caseid = models.ForeignKey(Cases, models.DO_NOTHING, db_column='caseid')
Expand All @@ -153,19 +164,12 @@ class Videos(models.Model):
caseid = models.OneToOneField(Cases, models.DO_NOTHING, db_column='caseid', primary_key=True)
videoid = models.IntegerField()
videolink = models.CharField(max_length=300)
metadata = models.CharField(max_length=300, blank=True, null=True)
thumbnaillink = models.CharField(max_length=300, blank=True, null=True)
videolength = models.IntegerField(blank=True, null=True)
timestamp = models.DateTimeField()

class Meta:
managed = False
db_table = 'videos'
unique_together = (('caseid', 'videoid'),)


class Marks(models.Model):
memberid = models.OneToOneField('Members', models.DO_NOTHING, db_column='memberid', primary_key=True)
caseid = models.ForeignKey('Videos', models.DO_NOTHING, db_column='caseid', related_name='markscaseid')
videoid = models.ForeignKey('Videos', models.DO_NOTHING, db_column='videoid', related_name='marksvideoid')

class Meta:
managed = False
db_table = 'marks'
unique_together = (('memberid', 'caseid', 'videoid'),)

0 comments on commit 5a4cd46

Please sign in to comment.