diff options
author | luxagraf <sng@luxagraf.net> | 2020-12-02 12:07:25 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-12-02 12:07:25 -0500 |
commit | 550127b86684e65277aa27cdb068308c820d5abb (patch) | |
tree | e907f9e5e96fbd2d0746046cf5f7dd1ff9535719 /app/media/migrations/0005_auto_20201201_2141.py | |
parent | 50a852c09f35fa3ce655b7979c179617a323eb63 (diff) |
added media app and migrations to move photo data
Diffstat (limited to 'app/media/migrations/0005_auto_20201201_2141.py')
-rw-r--r-- | app/media/migrations/0005_auto_20201201_2141.py | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/app/media/migrations/0005_auto_20201201_2141.py b/app/media/migrations/0005_auto_20201201_2141.py new file mode 100644 index 0000000..e211ea2 --- /dev/null +++ b/app/media/migrations/0005_auto_20201201_2141.py @@ -0,0 +1,56 @@ +# Generated by Django 3.1 on 2020-12-01 21:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('media', '0004_auto_20201201_2139'), + ] + + operations = [ + migrations.RunSQL(""" + INSERT INTO media_luxvideo( + id, + video_mp4, + video_webm, + video_poster, + title, + pub_date, + youtube_url, + vimeo_url + ) + SELECT + id, + video_mp4, + video_webm, + video_poster, + title, + pub_date, + youtube_url, + vimeo_url + FROM + photos_luxvideo; + """, reverse_sql=""" + INSERT INTO photos_luxvideos( + video_mp4, + video_webm, + video_poster, + title, + pub_date, + youtube_url, + vimeo_url + ) + SELECT + video_mp4, + video_webm, + video_poster, + title, + pub_date, + youtube_url, + vimeo_url + FROM + media_luxvideo; + """) + ] |