From a41e88e461fad884b338a429e6d9b7a5bc8c97b4 Mon Sep 17 00:00:00 2001 From: NarayanBavisetti Date: Wed, 5 Jun 2024 16:44:38 +0530 Subject: [PATCH] chore: removed the migration file --- .../db/migrations/0067_auto_20240604_1155.py | 156 ------------------ 1 file changed, 156 deletions(-) delete mode 100644 apiserver/plane/db/migrations/0067_auto_20240604_1155.py diff --git a/apiserver/plane/db/migrations/0067_auto_20240604_1155.py b/apiserver/plane/db/migrations/0067_auto_20240604_1155.py deleted file mode 100644 index 95bbdcdf2..000000000 --- a/apiserver/plane/db/migrations/0067_auto_20240604_1155.py +++ /dev/null @@ -1,156 +0,0 @@ -# # Generated by Django 4.2.7 on 2024-05-24 09:47 -# Python imports -import uuid -from uuid import uuid4 -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models -import plane.db.models.deploy_board - - -def populate_deploy_board(apps, schema_editor): - DeployBoard = apps.get_model("db", "DeployBoard") - ProjectDeployBoard = apps.get_model("db", "ProjectDeployBoard") - - DeployBoard.objects.bulk_create( - [ - DeployBoard( - entity_identifier=deploy_board.project_id, - project_id=deploy_board.project_id, - entity_name="project", - anchor=uuid4().hex, - comments=deploy_board.comments, - reactions=deploy_board.reactions, - inbox=deploy_board.inbox, - votes=deploy_board.votes, - view_props=deploy_board.views, - workspace_id=deploy_board.workspace_id, - created_at=deploy_board.created_at, - updated_at=deploy_board.updated_at, - created_by_id=deploy_board.created_by_id, - updated_by_id=deploy_board.updated_by_id, - ) - for deploy_board in ProjectDeployBoard.objects.all() - ], - batch_size=100, - ) - - -class Migration(migrations.Migration): - - dependencies = [ - ("db", "0066_account_id_token_cycle_logo_props_module_logo_props"), - ] - - operations = [ - migrations.CreateModel( - name="DeployBoard", - 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, - ), - ), - ("entity_identifier", models.UUIDField(null=True)), - ( - "entity_name", - models.CharField( - choices=[ - ("project", "Project"), - ("issue", "Issue"), - ("module", "Module"), - ("cycle", "Task"), - ("page", "Page"), - ("view", "View"), - ], - max_length=30, - ), - ), - ( - "anchor", - models.CharField( - db_index=True, - default=plane.db.models.deploy_board.get_anchor, - max_length=255, - unique=True, - ), - ), - ("comments", models.BooleanField(default=False)), - ("reactions", models.BooleanField(default=False)), - ("votes", models.BooleanField(default=False)), - ("view_props", models.JSONField(default=dict)), - ( - "created_by", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="%(class)s_created_by", - to=settings.AUTH_USER_MODEL, - verbose_name="Created By", - ), - ), - ( - "inbox", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="board_inbox", - to="db.inbox", - ), - ), - ( - "project", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.CASCADE, - related_name="project_%(class)s", - to="db.project", - ), - ), - ( - "updated_by", - models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="%(class)s_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_%(class)s", - to="db.workspace", - ), - ), - ], - options={ - "verbose_name": "Deploy Board", - "verbose_name_plural": "Deploy Boards", - "db_table": "deploy_boards", - "ordering": ("-created_at",), - "unique_together": {("entity_name", "entity_identifier")}, - }, - ), - migrations.RunPython(populate_deploy_board), - ]