Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
fa48f7aa
Commit
fa48f7aa
authored
Oct 31, 2020
by
Yaumi Alfadha
Browse files
Merge branch 'master' into '1706023031-67'
# Conflicts: # app/urls.py
parents
dafbc8c0
ba138b73
Pipeline
#60044
failed with stages
in 3 minutes and 31 seconds
Changes
66
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
administration/migrations/0001_initial.py
View file @
fa48f7aa
# Generated by Django 3.
0.3
on 2020-
05-08 14:42
# Generated by Django 3.
1
on 2020-
10-30 15:29
import
django.con
trib.postgres.fields.jsonb
from
django.con
f
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
...
...
@@ -9,28 +11,40 @@ class Migration(migrations.Migration):
initial
=
True
dependencies
=
[
(
'app'
,
'0001_initial'
),
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'VerificationSetting'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
250
)),
(
'description'
,
models
.
TextField
(
default
=
''
)),
(
'archived'
,
models
.
BooleanField
(
default
=
False
)),
(
'archived_by'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'VerificationReport'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'
report'
,
django
.
contrib
.
postgres
.
fields
.
jsonb
.
JSONField
(
)),
(
'
timestamp
'
,
models
.
Da
te
T
im
eField
(
auto_now_add
=
True
)),
(
'
status
'
,
models
.
CharField
(
choices
=
[(
'PENDING'
,
'Diproses'
),
(
'APPROVE'
,
'Diterima'
),
(
'DISAPPROVE'
,
'Ditolak'
),
(
'REVISION'
,
'Perbaikan'
)],
default
=
'PENDING'
,
max_length
=
30
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'report'
,
models
.
JSONField
(
)),
(
'
timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'
status
'
,
models
.
CharField
(
choices
=
[(
'PENDING'
,
'Diproses'
),
(
'APPROVE'
,
'Di
te
r
im
a'
),
(
'DISAPPROVE'
,
'Ditolak'
),
(
'REVISION'
,
'Perbaikan'
),
(
'BLOCKED'
,
'Diblokir'
)],
default
=
'PENDING'
,
max_length
=
30
)),
(
'
materi
'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.materi'
)),
(
'user'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'
VerificationSetting
'
,
name
=
'
DeletionHistory
'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'
tit
le'
,
models
.
CharField
(
max_length
=
2
50
)),
(
'
description
'
,
models
.
Text
Field
(
default
=
''
)),
(
'
archived'
,
models
.
BooleanField
(
default
=
False
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'deleted_user_name'
,
models
.
CharField
(
max_length
=
150
)),
(
'
deleted_user_ro
le'
,
models
.
CharField
(
max_length
=
1
50
)),
(
'
timestamp
'
,
models
.
DateTime
Field
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'
deletor_admin'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
]
administration/migrations/0002_verificationreport_materi.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-08 14:42
import
django.db.models.deletion
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
(
'app'
,
'0001_initial'
),
(
'administration'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'verificationreport'
,
name
=
'materi'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.Materi'
),
),
]
administration/migrations/0003_verificationreport_user.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-08 14:42
import
django.db.models.deletion
from
django.conf
import
settings
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'administration'
,
'0002_verificationreport_materi'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'verificationreport'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
),
),
]
administration/migrations/0004_auto_20200517_1713.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-17 10:13
from
django.db
import
migrations
,
models
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'administration'
,
'0003_verificationreport_user'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'verificationreport'
,
name
=
'timestamp'
,
field
=
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
),
),
]
administration/migrations/0005_deletionhistory.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-06-03 12:57
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'administration'
,
'0004_auto_20200517_1713'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'DeletionHistory'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'deleted_user_name'
,
models
.
CharField
(
max_length
=
150
)),
(
'deleted_user_role'
,
models
.
CharField
(
max_length
=
150
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'deletor_admin'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
]
administration/migrations/0005_verificationsetting_archived_by.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-06-04 00:09
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'administration'
,
'0004_auto_20200517_1713'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'verificationsetting'
,
name
=
'archived_by'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
),
),
]
administration/migrations/0006_merge_20200604_0718.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-06-04 00:18
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'administration'
,
'0005_deletionhistory'
),
(
'administration'
,
'0005_verificationsetting_archived_by'
),
]
operations
=
[
]
administration/migrations/0007_auto_20200929_1218.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.1 on 2020-09-29 05:18
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'administration'
,
'0006_merge_20200604_0718'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'verificationreport'
,
name
=
'report'
,
field
=
models
.
JSONField
(),
),
]
administration/migrations/0008_auto_20201009_1829.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.1 on 2020-10-09 11:29
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'administration'
,
'0007_auto_20200929_1218'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'verificationreport'
,
name
=
'status'
,
field
=
models
.
CharField
(
choices
=
[(
'PENDING'
,
'Diproses'
),
(
'APPROVE'
,
'Diterima'
),
(
'DISAPPROVE'
,
'Ditolak'
),
(
'REVISION'
,
'Perbaikan'
),
(
'BLOCKED'
,
'Diblokir'
)],
default
=
'PENDING'
,
max_length
=
30
),
),
]
app/migrations/0001_initial.py
View file @
fa48f7aa
# Generated by Django 3.
0.3
on 2020-
05-08 14:42
# Generated by Django 3.
1
on 2020-
10-30 15:28
import
app.models
from
django.conf
import
settings
import
django.contrib.postgres.search
import
django.core.validators
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
...
...
@@ -8,44 +14,215 @@ class Migration(migrations.Migration):
initial
=
True
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Category'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
20
)),
(
'description'
,
models
.
CharField
(
max_length
=
20
)),
(
'description'
,
models
.
TextField
(
default
=
''
)),
(
'archived'
,
models
.
BooleanField
(
default
=
False
)),
(
'archived_by'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'Comment'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'username'
,
models
.
CharField
(
max_length
=
100
)),
(
'profile'
,
models
.
CharField
(
default
=
'56acdf'
,
max_length
=
100
)),
(
'comment'
,
models
.
CharField
(
default
=
'comments'
,
max_length
=
150
)),
(
'profile'
,
models
.
CharField
(
default
=
app
.
models
.
getRandomColor
,
max_length
=
100
)),
(
'comment'
,
models
.
CharField
(
default
=
'comments'
,
max_length
=
240
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
],
),
migrations
.
CreateModel
(
name
=
'DownloadStatistics'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'downloader'
,
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
related_name
=
'riwayat_unduh'
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'Materi'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'deleted_at'
,
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)),
(
'cover'
,
models
.
ImageField
(
upload_to
=
''
)),
(
'content'
,
models
.
FileField
(
upload_to
=
''
)),
(
'title'
,
models
.
CharField
(
default
=
'title'
,
max_length
=
50
)),
(
'author'
,
models
.
CharField
(
default
=
'author'
,
max_length
=
30
)),
(
'publisher'
,
models
.
CharField
(
default
=
'publiser'
,
max_length
=
30
)),
(
'title'
,
models
.
CharField
(
default
=
'Judul'
,
max_length
=
50
)),
(
'author'
,
models
.
CharField
(
default
=
'Penyusun'
,
max_length
=
30
)),
(
'publisher'
,
models
.
CharField
(
default
=
'Penerbit'
,
max_length
=
30
)),
(
'release_year'
,
models
.
IntegerField
(
default
=
app
.
models
.
current_year
)),
(
'pages'
,
models
.
IntegerField
(
default
=
0
)),
(
'descriptions'
,
models
.
TextField
(
default
=
'descriptions'
)),
(
'status'
,
models
.
CharField
(
choices
=
[(
'PENDING'
,
'Diproses'
),
(
'APPROVE'
,
'Diterima'
),
(
'DISAPPROVE'
,
'Ditolak'
),
(
'REVISION'
,
'Perbaikan'
)],
default
=
'PENDING'
,
max_length
=
30
)),
(
'date_added'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'descriptions'
,
models
.
TextField
(
default
=
'Deskripsi'
)),
(
'status'
,
models
.
CharField
(
choices
=
[(
'PENDING'
,
'Diproses'
),
(
'APPROVE'
,
'Diterima'
),
(
'DISAPPROVE'
,
'Ditolak'
),
(
'REVISION'
,
'Perbaikan'
),
(
'BLOCKED'
,
'Diblokir'
)],
default
=
'PENDING'
,
max_length
=
30
)),
(
'date_created'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'date_modified'
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
'yt_video_id'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'_search_vector'
,
django
.
contrib
.
postgres
.
search
.
SearchVectorField
(
editable
=
False
,
null
=
True
)),
(
'categories'
,
models
.
ManyToManyField
(
to
=
'app.Category'
)),
(
'uploader'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
'abstract'
:
False
,
},
),
migrations
.
CreateModel
(
name
=
'ReqMaterial'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
100
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
],
),
migrations
.
CreateModel
(
name
=
'SubmitVisitor'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'user_id'
,
models
.
CharField
(
max_length
=
50
)),
(
'email'
,
models
.
CharField
(
max_length
=
50
)),
(
'msg'
,
models
.
CharField
(
max_length
=
100
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
],
),
migrations
.
CreateModel
(
name
=
'SubscribeModel'
,
fields
=
[
(
'sys_id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'email'
,
models
.
EmailField
(
blank
=
True
,
max_length
=
200
,
unique
=
True
)),
(
'status'
,
models
.
CharField
(
blank
=
True
,
max_length
=
64
)),
(
'created_date'
,
models
.
DateTimeField
(
blank
=
True
)),
(
'updated_date'
,
models
.
DateTimeField
(
blank
=
True
)),
],
options
=
{
'db_table'
:
'app_subscribe'
,
},
),
migrations
.
CreateModel
(
name
=
'ViewStatistics'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'materi'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
related_name
=
'baca'
,
to
=
'app.materi'
)),
],
),
migrations
.
CreateModel
(
name
=
'Review'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'username'
,
models
.
CharField
(
max_length
=
100
)),
(
'profile'
,
models
.
CharField
(
default
=
app
.
models
.
getRandomColor
,
max_length
=
100
)),
(
'review'
,
models
.
TextField
(
default
=
'review'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'materi'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.materi'
)),
(
'user'
,
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'RatingContributor'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
'score'
,
models
.
PositiveIntegerField
(
validators
=
[
django
.
core
.
validators
.
MinValueValidator
(
1
),
django
.
core
.
validators
.
MaxValueValidator
(
5
)])),
(
'user'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'LikeComment'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'session_id'
,
models
.
CharField
(
max_length
=
32
)),
(
'comment'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.comment'
)),
],
),
migrations
.
CreateModel
(
name
=
'Like'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'session_id'
,
models
.
CharField
(
max_length
=
32
)),
(
'materi'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.materi'
)),
],
),
migrations
.
CreateModel
(
name
=
'LaporanMateri'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'laporan'
,
models
.
TextField
(
default
=
''
,
validators
=
[
django
.
core
.
validators
.
MinValueValidator
(
30
),
django
.
core
.
validators
.
MaxValueValidator
(
120
)])),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'is_rejected'
,
models
.
BooleanField
(
default
=
False
)),
(
'materi'
,
models
.
ForeignKey
(
max_length
=
120
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.materi'
)),
(
'user'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
migrations
.
CreateModel
(
name
=
'DummyViewStatistics'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'item'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.viewstatistics'
)),
],
),
migrations
.
CreateModel
(
name
=
'DummyLike'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'item'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.like'
)),
],
),
migrations
.
CreateModel
(
name
=
'DummyDownloadStatistics'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'item'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.downloadstatistics'
)),
],
),
migrations
.
CreateModel
(
name
=
'DummyComment'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'item'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.comment'
)),
],
),
migrations
.
AddField
(
model_name
=
'downloadstatistics'
,
name
=
'materi'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
related_name
=
'unduh'
,
to
=
'app.materi'
),
),
migrations
.
CreateModel
(
name
=
'DislikeComment'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'session_id'
,
models
.
CharField
(
max_length
=
32
)),
(
'comment'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.comment'
)),
],
),
migrations
.
AddField
(
model_name
=
'comment'
,
name
=
'materi'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.materi'
),
),
migrations
.
AddField
(
model_name
=
'comment'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
),
),
migrations
.
CreateModel
(
name
=
'Rating'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
(
'score'
,
models
.
IntegerField
()),
(
'materi'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'app.materi'
)),
(
'user'
,
models
.
ForeignKey
(
blank
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
'unique_together'
:
{(
'materi'
,
'user'
)},
},
),
]
app/migrations/0002_auto_20200508_2142.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-08 14:42
import
django.db.models.deletion
from
django.conf
import
settings
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'app'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'materi'
,
name
=
'uploader'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
),
),
migrations
.
AddField
(
model_name
=
'comment'
,
name
=
'materi'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'app.Materi'
),
),
migrations
.
AddField
(
model_name
=
'comment'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
),
),
]
app/migrations/0003_auto_20200509_2108.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-09 14:08
import
app.models
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'app'
,
'0002_auto_20200508_2142'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'comment'
,
name
=
'profile'
,
field
=
models
.
CharField
(
default
=
app
.
models
.
getRandomColor
,
max_length
=
100
),
),
]
app/migrations/0004_like.py
deleted
100644 → 0
View file @
dafbc8c0
# Generated by Django 3.0.3 on 2020-05-12 08:34
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'app'
,
'0003_auto_20200509_2108'
),
]