-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from UW-GAC/feature/partner-upload-workspaces
Add partner upload workspaces
- Loading branch information
Showing
15 changed files
with
752 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
186 changes: 186 additions & 0 deletions
186
gregor_django/gregor_anvil/migrations/0018_partneruploadworkspace_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
# Generated by Django 4.2.8 on 2023-12-15 23:55 | ||
|
||
from django.conf import settings | ||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_extensions.db.fields | ||
import simple_history.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("anvil_consortium_manager", "0015_add_new_permissions"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("gregor_anvil", "0017_remove_releaseworkspace_upload_workspaces"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="PartnerUploadWorkspace", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created", | ||
django_extensions.db.fields.CreationDateTimeField( | ||
auto_now_add=True, verbose_name="created" | ||
), | ||
), | ||
( | ||
"modified", | ||
django_extensions.db.fields.ModificationDateTimeField( | ||
auto_now=True, verbose_name="modified" | ||
), | ||
), | ||
( | ||
"version", | ||
models.IntegerField( | ||
help_text="The version of this workspace for this PartnerGroup and ConsentGroup.", | ||
validators=[django.core.validators.MinValueValidator(1)], | ||
), | ||
), | ||
( | ||
"date_completed", | ||
models.DateField( | ||
blank=True, | ||
help_text="The date when uploads to this workspace and data validation were completed.", | ||
null=True, | ||
), | ||
), | ||
( | ||
"consent_group", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.PROTECT, | ||
to="gregor_anvil.consentgroup", | ||
), | ||
), | ||
( | ||
"partner_group", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.PROTECT, | ||
to="gregor_anvil.partnergroup", | ||
), | ||
), | ||
( | ||
"workspace", | ||
models.OneToOneField( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="anvil_consortium_manager.workspace", | ||
), | ||
), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="HistoricalPartnerUploadWorkspace", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigIntegerField( | ||
auto_created=True, blank=True, db_index=True, verbose_name="ID" | ||
), | ||
), | ||
( | ||
"created", | ||
django_extensions.db.fields.CreationDateTimeField( | ||
auto_now_add=True, verbose_name="created" | ||
), | ||
), | ||
( | ||
"modified", | ||
django_extensions.db.fields.ModificationDateTimeField( | ||
auto_now=True, verbose_name="modified" | ||
), | ||
), | ||
( | ||
"version", | ||
models.IntegerField( | ||
help_text="The version of this workspace for this PartnerGroup and ConsentGroup.", | ||
validators=[django.core.validators.MinValueValidator(1)], | ||
), | ||
), | ||
( | ||
"date_completed", | ||
models.DateField( | ||
blank=True, | ||
help_text="The date when uploads to this workspace and data validation were completed.", | ||
null=True, | ||
), | ||
), | ||
("history_id", models.AutoField(primary_key=True, serialize=False)), | ||
("history_date", models.DateTimeField(db_index=True)), | ||
("history_change_reason", models.CharField(max_length=100, null=True)), | ||
( | ||
"history_type", | ||
models.CharField( | ||
choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")], | ||
max_length=1, | ||
), | ||
), | ||
( | ||
"consent_group", | ||
models.ForeignKey( | ||
blank=True, | ||
db_constraint=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
related_name="+", | ||
to="gregor_anvil.consentgroup", | ||
), | ||
), | ||
( | ||
"history_user", | ||
models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="+", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
( | ||
"partner_group", | ||
models.ForeignKey( | ||
blank=True, | ||
db_constraint=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
related_name="+", | ||
to="gregor_anvil.partnergroup", | ||
), | ||
), | ||
( | ||
"workspace", | ||
models.ForeignKey( | ||
blank=True, | ||
db_constraint=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
related_name="+", | ||
to="anvil_consortium_manager.workspace", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "historical partner upload workspace", | ||
"verbose_name_plural": "historical partner upload workspaces", | ||
"ordering": ("-history_date", "-history_id"), | ||
"get_latest_by": ("history_date", "history_id"), | ||
}, | ||
bases=(simple_history.models.HistoricalChanges, models.Model), | ||
), | ||
migrations.AddConstraint( | ||
model_name="partneruploadworkspace", | ||
constraint=models.UniqueConstraint( | ||
fields=("partner_group", "consent_group", "version"), | ||
name="unique_partner_upload_workspace_data", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.