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/0006_auto_20201201_2145.py | |
parent | 50a852c09f35fa3ce655b7979c179617a323eb63 (diff) |
added media app and migrations to move photo data
Diffstat (limited to 'app/media/migrations/0006_auto_20201201_2145.py')
-rw-r--r-- | app/media/migrations/0006_auto_20201201_2145.py | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/app/media/migrations/0006_auto_20201201_2145.py b/app/media/migrations/0006_auto_20201201_2145.py new file mode 100644 index 0000000..9827416 --- /dev/null +++ b/app/media/migrations/0006_auto_20201201_2145.py @@ -0,0 +1,70 @@ +# Generated by Django 3.1 on 2020-12-01 21:45 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('media', '0005_auto_20201201_2141'), + ] + + operations = [ + migrations.RunSQL(""" + INSERT INTO media_luxaudio ( + id, + title, + subtitle, + slug, + body_html, + body_markdown, + pub_date, + mp3, + ogg, + point, + location_id + ) + SELECT + id, + title, + subtitle, + slug, + body_html, + body_markdown, + pub_date, + mp3, + ogg, + point, + location_id + FROM + recordings_audio; + """, reverse_sql=""" + INSERT INTO recordings_audio ( + id, + title, + subtitle, + slug, + body_html, + body_markdown, + pub_date, + mp3, + ogg, + point, + location_id + ) + SELECT + id, + title, + subtitle, + slug, + body_html, + body_markdown, + pub_date, + mp3, + ogg, + point, + location_id + FROM + media_luxaudio; + """) + ] |