From 7a11161cd0ddc3e01d4e3dd219f2f73bf8c491b6 Mon Sep 17 00:00:00 2001 From: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Date: Fri, 3 Nov 2023 13:00:37 +0530 Subject: [PATCH] dev: migrations for 0.14 (#2630) * chore: migration files * dev: deleted the old migration --- ..._alter_analyticview_created_by_and_more.py | 21 +++++++++ .../migrations/0047_issue_mention_and_more.py | 45 ------------------- 2 files changed, 21 insertions(+), 45 deletions(-) delete mode 100644 apiserver/plane/db/migrations/0047_issue_mention_and_more.py diff --git a/apiserver/plane/db/migrations/0046_alter_analyticview_created_by_and_more.py b/apiserver/plane/db/migrations/0046_alter_analyticview_created_by_and_more.py index 51082d14c..ae5753e07 100644 --- a/apiserver/plane/db/migrations/0046_alter_analyticview_created_by_and_more.py +++ b/apiserver/plane/db/migrations/0046_alter_analyticview_created_by_and_more.py @@ -4,6 +4,7 @@ from django.conf import settings from django.db import migrations, models import django.db.models.deletion import plane.db.models.issue +import uuid class Migration(migrations.Migration): @@ -12,6 +13,26 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name="issue_mentions", + 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)), + ('mention', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='issue_mention', to=settings.AUTH_USER_MODEL)), + ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,related_name='issuemention_created_by', to=settings.AUTH_USER_MODEL, verbose_name='Created By')), + ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='issue_mention', to='db.issue')), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_issuemention', to='db.project')), + ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='issuemention_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')), + ('workspace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='workspace_issuemention', to='db.workspace')), + ], + options={ + 'verbose_name': 'IssueMention', + 'verbose_name_plural': 'IssueMentions', + 'db_table': 'issue_mentions', + 'ordering': ('-created_at',), + }, + ), migrations.AlterField( model_name='issueproperty', name='properties', diff --git a/apiserver/plane/db/migrations/0047_issue_mention_and_more.py b/apiserver/plane/db/migrations/0047_issue_mention_and_more.py deleted file mode 100644 index 4300f1eb3..000000000 --- a/apiserver/plane/db/migrations/0047_issue_mention_and_more.py +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by Django 4.2.5 on 2023-10-25 05:01 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - ('db', '0046_alter_analyticview_created_by_and_more'), - ] - - operations = [ - migrations.CreateModel( - name="issue_mentions", - 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)), - ('mention', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, - related_name='issue_mention', to=settings.AUTH_USER_MODEL)), - ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, - related_name='issuemention_created_by', to=settings.AUTH_USER_MODEL, verbose_name='Created By')), - ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, - related_name='issue_mention', to='db.issue')), - ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, - related_name='project_issuemention', to='db.project')), - ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, - related_name='issuemention_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')), - ('workspace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, - related_name='workspace_issuemention', to='db.workspace')), - ], - options={ - 'verbose_name': 'IssueMention', - 'verbose_name_plural': 'IssueMentions', - 'db_table': 'issue_mentions', - 'ordering': ('-created_at',), - }, - ) - ]