<gh_stars>1-10
# Generated by Django 3.2 on 2021-05-01 14:46

import django.contrib.postgres.operations
from django.db import migrations, models
import storages.backends.azure_storage


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        django.contrib.postgres.operations.TrigramExtension(
        ),
        migrations.RunSQL(
            sql="\nCREATE OR REPLACE FUNCTION _final_median(numeric[])\n   RETURNS numeric AS\n$$\n   SELECT AVG(val)\n   FROM (\n     SELECT val\n     FROM unnest($1) val\n     ORDER BY 1\n     LIMIT  2 - MOD(array_upper($1, 1), 2)\n     OFFSET CEIL(array_upper($1, 1) / 2.0) - 1\n   ) sub;\n$$\nLANGUAGE 'sql' IMMUTABLE;\n\nCREATE AGGREGATE median(numeric) (\n  SFUNC=array_append,\n  STYPE=numeric[],\n  FINALFUNC=_final_median,\n  INITCOND='{}'\n);\n",
            reverse_sql='DROP FUNCTION IF EXISTS _final_median(); DROP AGGREGATE IF EXISTS median();',
        ),
        migrations.CreateModel(
            name='ExportedFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True, verbose_name='Name')),
                ('description', models.TextField()),
                ('exported_file', models.FileField(storage=storages.backends.azure_storage.AzureStorage(azure_container='local-exports'), upload_to='')),
                ('last_updated', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]

# Generated by Django 3.2 on 2021-05-01 14:46

import django.contrib.postgres.operations
from django.db import migrations, models
import storages.backends.azure_storage


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        django.contrib.postgres.operations.TrigramExtension(
        ),
        migrations.RunSQL(
            sql="\nCREATE OR REPLACE FUNCTION _final_median(numeric[])\n   RETURNS numeric AS\n$$\n   SELECT AVG(val)\n   FROM (\n     SELECT val\n     FROM unnest($1) val\n     ORDER BY 1\n     LIMIT  2 - MOD(array_upper($1, 1), 2)\n     OFFSET CEIL(array_upper($1, 1) / 2.0) - 1\n   ) sub;\n$$\nLANGUAGE 'sql' IMMUTABLE;\n\nCREATE AGGREGATE median(numeric) (\n  SFUNC=array_append,\n  STYPE=numeric[],\n  FINALFUNC=_final_median,\n  INITCOND='{}'\n);\n",
            reverse_sql='DROP FUNCTION IF EXISTS _final_median(); DROP AGGREGATE IF EXISTS median();',
        ),
        migrations.CreateModel(
            name='ExportedFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True, verbose_name='Name')),
                ('description', models.TextField()),
                ('exported_file', models.FileField(storage=storages.backends.azure_storage.AzureStorage(azure_container='local-exports'), upload_to='')),
                ('last_updated', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
# Generated by Django 3.2 on 2021-05-01 14:46