Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
ea127100
Commit
ea127100
authored
Jul 26, 2021
by
Matheus Miranda
Browse files
Update video file migration
parent
3da4a828
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
+3
-22
courses/migrations/0030_videofile.py
courses/migrations/0030_videofile.py
+3
-3
courses/migrations/0031_auto_20210726_1523.py
courses/migrations/0031_auto_20210726_1523.py
+0
-19
No files found.
courses/migrations/0030_videofile.py
View file @
ea127100
# Generated by Django 2.2.24 on 2021-07-26 1
7
:2
7
# Generated by Django 2.2.24 on 2021-07-26 1
9
:2
2
import
courses.videos.models
from
django.db
import
migrations
,
models
...
...
@@ -16,9 +16,9 @@ class Migration(migrations.Migration):
name
=
'VideoFile'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
,
null
=
True
)),
(
'file'
,
models
.
FileField
(
default
=
None
,
null
=
True
,
upload_to
=
courses
.
videos
.
models
.
get_upload_path
)),
(
'video'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
)),
(
'video'
,
models
.
OneToOneField
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
)),
],
),
]
courses/migrations/0031_auto_20210726_1523.py
deleted
100644 → 0
View file @
3da4a828
# Generated by Django 2.2.24 on 2021-07-26 18:23
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0030_videofile'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'videofile'
,
name
=
'video'
,
field
=
models
.
OneToOneField
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
),
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment