summaryrefslogtreecommitdiff
path: root/app/media/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'app/media/migrations')
-rw-r--r--app/media/migrations/0001_initial.py129
-rw-r--r--app/media/migrations/0002_auto_20201201_2122.py46
-rw-r--r--app/media/migrations/0003_auto_20201201_2125.py65
-rw-r--r--app/media/migrations/0004_auto_20201201_2139.py40
-rw-r--r--app/media/migrations/0005_auto_20201201_2141.py56
-rw-r--r--app/media/migrations/0006_auto_20201201_2145.py70
-rw-r--r--app/media/migrations/0007_luximage_sizes_cache.py18
-rw-r--r--app/media/migrations/0008_auto_20201202_1155.py18
-rw-r--r--app/media/migrations/__init__.py0
9 files changed, 442 insertions, 0 deletions
diff --git a/app/media/migrations/0001_initial.py b/app/media/migrations/0001_initial.py
new file mode 100644
index 0000000..4506248
--- /dev/null
+++ b/app/media/migrations/0001_initial.py
@@ -0,0 +1,129 @@
+# Generated by Django 3.1 on 2020-12-01 21:21
+
+import datetime
+import django.contrib.gis.db.models.fields
+from django.db import migrations, models
+import django.db.models.deletion
+import media.models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ('locations', '0028_auto_20200308_1152'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='LuxImageSize',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(blank=True, max_length=30, null=True)),
+ ('slug', models.SlugField(blank=True, null=True)),
+ ('width', models.IntegerField(blank=True, null=True)),
+ ('height', models.IntegerField(blank=True, null=True)),
+ ('quality', models.IntegerField()),
+ ],
+ options={
+ 'verbose_name_plural': 'Image Sizes',
+ 'ordering': ('-name', 'id'),
+ },
+ ),
+ migrations.CreateModel(
+ name='LuxVideo',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('video_mp4', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
+ ('video_webm', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
+ ('video_poster', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
+ ('title', models.CharField(blank=True, max_length=300, null=True)),
+ ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
+ ('youtube_url', models.CharField(blank=True, max_length=80, null=True)),
+ ('vimeo_url', models.CharField(blank=True, max_length=300, null=True)),
+ ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
+ ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.location')),
+ ],
+ options={
+ 'verbose_name': 'Video',
+ 'verbose_name_plural': 'Videos',
+ 'ordering': ('-pub_date', 'id'),
+ 'get_latest_by': 'pub_date',
+ },
+ ),
+ migrations.CreateModel(
+ name='LuxImage',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('image', models.FileField(blank=True, null=True, upload_to=media.models.get_upload_path)),
+ ('title', models.CharField(blank=True, max_length=300, null=True)),
+ ('alt', models.CharField(blank=True, max_length=300, null=True)),
+ ('photo_credit_source', models.CharField(blank=True, max_length=300, null=True)),
+ ('photo_credit_url', models.CharField(blank=True, max_length=300, null=True)),
+ ('caption', models.TextField(blank=True, null=True)),
+ ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
+ ('exif_raw', models.TextField(blank=True, null=True)),
+ ('exif_aperture', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_make', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_model', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_exposure', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_iso', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_focal_length', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_lens', models.CharField(blank=True, max_length=50, null=True)),
+ ('exif_date', models.DateTimeField(blank=True, null=True)),
+ ('height', models.CharField(blank=True, max_length=6, null=True)),
+ ('width', models.CharField(blank=True, max_length=6, null=True)),
+ ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
+ ('is_public', models.BooleanField(default=True)),
+ ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.location')),
+ ('sizes', models.ManyToManyField(blank=True, to='media.LuxImageSize')),
+ ],
+ options={
+ 'verbose_name_plural': 'Images',
+ 'ordering': ('-pub_date', 'id'),
+ 'get_latest_by': 'pub_date',
+ },
+ ),
+ migrations.CreateModel(
+ name='LuxGallery',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(blank=True, max_length=300)),
+ ('description', models.TextField(blank=True, null=True)),
+ ('slug', models.CharField(blank=True, max_length=300)),
+ ('pub_date', models.DateTimeField(null=True)),
+ ('is_public', models.BooleanField(default=True)),
+ ('caption_style', models.CharField(blank=True, max_length=400, null=True)),
+ ('images', models.ManyToManyField(to='media.LuxImage')),
+ ('thumb', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gallery_thumb', to='media.luximage')),
+ ],
+ options={
+ 'verbose_name_plural': 'Galleries',
+ 'ordering': ('-pub_date', 'id'),
+ 'get_latest_by': 'pub_date',
+ },
+ ),
+ migrations.CreateModel(
+ name='LuxAudio',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=200)),
+ ('subtitle', models.CharField(blank=True, max_length=200)),
+ ('slug', models.SlugField(blank=True, unique_for_date='pub_date')),
+ ('body_html', models.TextField(blank=True)),
+ ('body_markdown', models.TextField(blank=True)),
+ ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
+ ('mp3', models.FileField(blank=True, null=True, upload_to=media.models.get_audio_upload_path)),
+ ('ogg', models.FileField(blank=True, null=True, upload_to=media.models.get_audio_upload_path)),
+ ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
+ ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.location')),
+ ],
+ options={
+ 'verbose_name': 'Audio',
+ 'verbose_name_plural': 'Audio',
+ 'ordering': ('-pub_date',),
+ 'get_latest_by': 'pub_date',
+ },
+ ),
+ ]
diff --git a/app/media/migrations/0002_auto_20201201_2122.py b/app/media/migrations/0002_auto_20201201_2122.py
new file mode 100644
index 0000000..f9021b6
--- /dev/null
+++ b/app/media/migrations/0002_auto_20201201_2122.py
@@ -0,0 +1,46 @@
+# Generated by Django 3.1 on 2020-12-01 21:22
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.RunSQL("""
+ INSERT INTO media_luximagesize (
+ id,
+ name,
+ width,
+ height,
+ quality
+ )
+ SELECT
+ id,
+ name,
+ width,
+ height,
+ quality
+ FROM
+ photos_luximagesize;
+ """, reverse_sql="""
+ INSERT INTO photos_luximagesize (
+ id,
+ name,
+ width,
+ height,
+ quality
+ )
+ SELECT
+ id,
+ name,
+ width,
+ height,
+ quality
+ FROM
+ media_luximagesize;
+ """)
+ ]
diff --git a/app/media/migrations/0003_auto_20201201_2125.py b/app/media/migrations/0003_auto_20201201_2125.py
new file mode 100644
index 0000000..498232a
--- /dev/null
+++ b/app/media/migrations/0003_auto_20201201_2125.py
@@ -0,0 +1,65 @@
+# Generated by Django 3.1 on 2020-12-01 21:25
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0002_auto_20201201_2122'),
+ ]
+
+ operations = [
+ migrations.RunSQL("""
+ INSERT INTO media_luximage (
+ id,
+ image,
+ title,
+ alt,
+ photo_credit_source,
+ photo_credit_url,
+ caption,
+ pub_date,
+ exif_raw,
+ exif_aperture,
+ exif_make,
+ exif_model,
+ exif_exposure,
+ exif_iso,
+ exif_focal_length,
+ exif_lens,
+ exif_date,
+ height,
+ width,
+ point,
+ location_id,
+ is_public
+ )
+ SELECT
+ id,
+ image,
+ title,
+ alt,
+ photo_credit_source,
+ photo_credit_url,
+ caption,
+ pub_date,
+ exif_raw,
+ exif_aperture,
+ exif_make,
+ exif_model,
+ exif_exposure,
+ exif_iso,
+ exif_focal_length,
+ exif_lens,
+ exif_date,
+ height,
+ width,
+ point,
+ location_id,
+ is_public
+ FROM
+ photos_luximage;
+ """),
+ ]
+
diff --git a/app/media/migrations/0004_auto_20201201_2139.py b/app/media/migrations/0004_auto_20201201_2139.py
new file mode 100644
index 0000000..4847ece
--- /dev/null
+++ b/app/media/migrations/0004_auto_20201201_2139.py
@@ -0,0 +1,40 @@
+# Generated by Django 3.1 on 2020-12-01 21:39
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0003_auto_20201201_2125'),
+ ]
+
+ operations = [
+ migrations.RunSQL("""
+ INSERT INTO media_luximage_sizes (
+ id,
+ luximage_id,
+ luximagesize_id
+ )
+ SELECT
+ id,
+ luximage_id,
+ luximagesize_id
+ FROM
+ photos_luximage_sizes;
+ """, reverse_sql="""
+ INSERT INTO photos_luximage_sizes (
+ id,
+ luximage_id,
+ luximagesize_id
+ )
+ SELECT
+ id,
+ luximage_id,
+ luximagesize_id
+ FROM
+ media_luximage_sizes;
+ """)
+ ]
+
+
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;
+ """)
+ ]
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;
+ """)
+ ]
diff --git a/app/media/migrations/0007_luximage_sizes_cache.py b/app/media/migrations/0007_luximage_sizes_cache.py
new file mode 100644
index 0000000..944600f
--- /dev/null
+++ b/app/media/migrations/0007_luximage_sizes_cache.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.1 on 2020-12-02 08:14
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0006_auto_20201201_2145'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luximage',
+ name='sizes_cache',
+ field=models.CharField(blank=True, max_length=300, null=True),
+ ),
+ ]
diff --git a/app/media/migrations/0008_auto_20201202_1155.py b/app/media/migrations/0008_auto_20201202_1155.py
new file mode 100644
index 0000000..0e807d5
--- /dev/null
+++ b/app/media/migrations/0008_auto_20201202_1155.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.1 on 2020-12-02 11:55
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0007_luximage_sizes_cache'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='luximage',
+ name='sizes',
+ field=models.ManyToManyField(blank=True, related_name='sizes', to='media.LuxImageSize'),
+ ),
+ ]
diff --git a/app/media/migrations/__init__.py b/app/media/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/media/migrations/__init__.py