[SILO-171] Models and migration to support oauth flow in integrations #3056

This commit is contained in:
Saurabh Kumar
2025-04-29 14:37:57 +05:30
committed by GitHub
parent 6689493516
commit e92a810245
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# Generated by Django 4.2.20 on 2025-04-25 12:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ee', '0028_initiativecomment_edited_at_projectcomment_edited_at_and_more'),
]
operations = [
migrations.AddField(
model_name='workspacecredential',
name='source_authorization_type',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AddField(
model_name='workspacecredential',
name='source_identifier',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AddField(
model_name='workspacecredential',
name='target_authorization_type',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AddField(
model_name='workspacecredential',
name='target_identifier',
field=models.CharField(blank=True, max_length=255, null=True),
),
]

View File

@@ -113,11 +113,15 @@ class WorkspaceCredential(BaseModel):
"db.User", on_delete=models.CASCADE, related_name="credentials"
)
# Source being the type of importer where issues are imported example: jira
source_identifier = models.CharField(max_length=255, null=True, blank=True)
source_authorization_type = models.CharField(max_length=255, null=True, blank=True)
source_auth_email = models.EmailField(null=True, blank=True)
source_access_token = models.TextField(null=True, blank=True)
source_refresh_token = models.TextField(null=True, blank=True)
source_hostname = models.TextField(null=True, blank=True)
# Target being Plane where issues are imported to.
target_identifier = models.CharField(max_length=255, null=True, blank=True)
target_authorization_type = models.CharField(max_length=255, null=True, blank=True)
target_access_token = models.TextField(null=True, blank=True)
target_refresh_token = models.TextField(null=True, blank=True)
target_hostname = models.TextField(null=True, blank=True)