Skip to content

Commit

Permalink
feat: add raw_data_source FK to table (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdahis authored May 13, 2024
1 parent f1d6721 commit 5652fc0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bd_api/apps/api/v1/migrations/0031_table_raw_data_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.10 on 2024-05-10 15:09

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("v1", "0030_remove_table_one_big_table_query"),
]

operations = [
migrations.AddField(
model_name="table",
name="raw_data_source",
field=models.ManyToManyField(
blank=True, related_name="tables", to="v1.rawdatasource"
),
),
]
5 changes: 5 additions & 0 deletions bd_api/apps/api/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,11 @@ class Table(BaseModel, OrderedModel):
name = models.CharField(max_length=255)
description = models.TextField(blank=True, null=True)
dataset = models.ForeignKey("Dataset", on_delete=models.CASCADE, related_name="tables")
raw_data_source = models.ManyToManyField(
"RawDataSource",
related_name="tables",
blank=True,
)
version = models.IntegerField(null=True, blank=True)
status = models.ForeignKey(
"Status", on_delete=models.PROTECT, related_name="tables", null=True, blank=True
Expand Down

0 comments on commit 5652fc0

Please sign in to comment.