-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: delete deprecated tables #5833
Changes from 3 commits
26b7e37
7cdfa5b
a6f1c65
c097a55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Generated by Django 4.2.16 on 2024-10-15 11:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("db", "0080_fileasset_draft_issue_alter_fileasset_entity_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterUniqueTogether( | ||
name="issueviewfavorite", | ||
unique_together=None, | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="created_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="project", | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="updated_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="user", | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="view", | ||
), | ||
migrations.RemoveField( | ||
model_name="issueviewfavorite", | ||
name="workspace", | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="modulefavorite", | ||
unique_together=None, | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="created_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="module", | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="project", | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="updated_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="user", | ||
), | ||
migrations.RemoveField( | ||
model_name="modulefavorite", | ||
name="workspace", | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="pagefavorite", | ||
unique_together=None, | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="created_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="page", | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="project", | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="updated_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="user", | ||
), | ||
migrations.RemoveField( | ||
model_name="pagefavorite", | ||
name="workspace", | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="projectfavorite", | ||
unique_together=None, | ||
), | ||
migrations.RemoveField( | ||
model_name="projectfavorite", | ||
name="created_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="projectfavorite", | ||
name="project", | ||
), | ||
migrations.RemoveField( | ||
model_name="projectfavorite", | ||
name="updated_by", | ||
), | ||
migrations.RemoveField( | ||
model_name="projectfavorite", | ||
name="user", | ||
), | ||
migrations.RemoveField( | ||
model_name="projectfavorite", | ||
name="workspace", | ||
), | ||
migrations.AddField( | ||
model_name="issuetype", | ||
name="external_id", | ||
field=models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="issuetype", | ||
name="external_source", | ||
field=models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
migrations.DeleteModel( | ||
name="CycleFavorite", | ||
), | ||
migrations.DeleteModel( | ||
name="IssueViewFavorite", | ||
), | ||
migrations.DeleteModel( | ||
name="ModuleFavorite", | ||
), | ||
migrations.DeleteModel( | ||
name="PageFavorite", | ||
), | ||
migrations.DeleteModel( | ||
name="ProjectFavorite", | ||
), | ||
] |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -2,7 +2,7 @@ | |||
from .api import APIActivityLog, APIToken | ||||
from .asset import FileAsset | ||||
from .base import BaseModel | ||||
from .cycle import Cycle, CycleFavorite, CycleIssue, CycleUserProperties | ||||
from .cycle import Cycle, CycleIssue, CycleUserProperties | ||||
from .dashboard import Dashboard, DashboardWidget, Widget | ||||
from .deploy_board import DeployBoard | ||||
from .draft import DraftIssue, DraftIssueAssignee, DraftIssueLabel, DraftIssueModule, DraftIssueCycle | ||||
|
@@ -39,7 +39,6 @@ | |||
) | ||||
from .module import ( | ||||
Module, | ||||
ModuleFavorite, | ||||
ModuleIssue, | ||||
ModuleLink, | ||||
ModuleMember, | ||||
|
@@ -52,7 +51,6 @@ | |||
) | ||||
from .page import ( | ||||
Page, | ||||
PageFavorite, | ||||
PageLabel, | ||||
PageLog, | ||||
ProjectPage, | ||||
|
@@ -61,7 +59,6 @@ | |||
from .project import ( | ||||
Project, | ||||
ProjectBaseModel, | ||||
ProjectFavorite, | ||||
ProjectIdentifier, | ||||
ProjectMember, | ||||
ProjectMemberInvite, | ||||
|
@@ -72,7 +69,7 @@ | |||
from .social_connection import SocialLoginConnection | ||||
from .state import State | ||||
from .user import Account, Profile, User | ||||
from .view import IssueView, IssueViewFavorite | ||||
from .view import IssueView | ||||
from .webhook import Webhook, WebhookLog | ||||
from .workspace import ( | ||||
Team, | ||||
|
@@ -87,7 +84,7 @@ | |||
|
||||
from .importer import Importer | ||||
|
||||
from .page import Page, PageLog, PageFavorite, PageLabel | ||||
from .page import Page, PageLog, PageLabel | ||||
Check notice on line 87 in apiserver/plane/db/models/__init__.py Codacy Production / Codacy Static Code Analysisapiserver/plane/db/models/__init__.py#L87
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove redundant page module imports The imports of To clean up the imports and avoid potential confusion, please remove this line entirely. Here's the suggested change: - from .page import Page, PageLog, PageLabel This will help maintain a cleaner and more organized import structure. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff
|
||||
|
||||
from .estimate import Estimate, EstimatePoint | ||||
|
||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential data loss from deleting models
Deleting models
CycleFavorite
,IssueViewFavorite
,ModuleFavorite
,PageFavorite
, andProjectFavorite
will permanently remove all associated data. If this data is still needed or valuable for analytics, user experience, or compliance purposes, consider performing a data migration to archive or transfer the data before deletion.Would you like assistance in creating a data migration to preserve the existing data before dropping these models?