From 512b8c104d63527f2a525bdb79c12684cbd875f7 Mon Sep 17 00:00:00 2001 From: vamsi Date: Fri, 12 May 2023 17:02:34 +0530 Subject: [PATCH] dev: analytics migrations --- .../plane/db/migrations/0031_analyticview.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apiserver/plane/db/migrations/0031_analyticview.py diff --git a/apiserver/plane/db/migrations/0031_analyticview.py b/apiserver/plane/db/migrations/0031_analyticview.py new file mode 100644 index 000000000..7e02b78b2 --- /dev/null +++ b/apiserver/plane/db/migrations/0031_analyticview.py @@ -0,0 +1,37 @@ +# Generated by Django 3.2.18 on 2023-05-12 11:31 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ('db', '0030_alter_estimatepoint_unique_together'), + ] + + operations = [ + migrations.CreateModel( + name='AnalyticView', + fields=[ + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')), + ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Last Modified At')), + ('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), + ('name', models.CharField(max_length=255)), + ('description', models.TextField(blank=True)), + ('query', models.JSONField()), + ('query_dict', models.JSONField(default=dict)), + ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='analyticview_created_by', to=settings.AUTH_USER_MODEL, verbose_name='Created By')), + ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='analyticview_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')), + ('workspace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analytics', to='db.workspace')), + ], + options={ + 'verbose_name': 'Analytic', + 'verbose_name_plural': 'Analytics', + 'db_table': 'analytic_views', + 'ordering': ('-created_at',), + }, + ), + ]