|
@@ -1,9 +1,12 @@
|
|
|
-# Generated by Django 5.0.6 on 2024-05-13 10:58
|
|
|
|
|
|
|
+# Generated by Django 5.0.6 on 2024-06-03 01:52
|
|
|
|
|
|
|
|
|
|
+import abid_utils.models
|
|
|
import charidfield.fields
|
|
import charidfield.fields
|
|
|
|
|
+import django.db.models.deletion
|
|
|
import signal_webhooks.fields
|
|
import signal_webhooks.fields
|
|
|
import signal_webhooks.utils
|
|
import signal_webhooks.utils
|
|
|
import uuid
|
|
import uuid
|
|
|
|
|
+from django.conf import settings
|
|
|
from django.db import migrations, models
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
|
|
@@ -11,9 +14,35 @@ class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
dependencies = [
|
|
|
('api', '0002_alter_apitoken_options'),
|
|
('api', '0002_alter_apitoken_options'),
|
|
|
|
|
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
operations = [
|
|
|
|
|
+ migrations.RenameField(
|
|
|
|
|
+ model_name='apitoken',
|
|
|
|
|
+ old_name='user',
|
|
|
|
|
+ new_name='created_by',
|
|
|
|
|
+ ),
|
|
|
|
|
+ migrations.AddField(
|
|
|
|
|
+ model_name='apitoken',
|
|
|
|
|
+ name='abid',
|
|
|
|
|
+ field=charidfield.fields.CharIDField(blank=True, db_index=True, default=None, help_text='ABID-format identifier for this entity (e.g. snp_01BJQMF54D093DXEAWZ6JYRPAQ)', max_length=30, null=True, prefix='apt_', unique=True),
|
|
|
|
|
+ ),
|
|
|
|
|
+ migrations.AddField(
|
|
|
|
|
+ model_name='apitoken',
|
|
|
|
|
+ name='modified',
|
|
|
|
|
+ field=models.DateTimeField(auto_now=True),
|
|
|
|
|
+ ),
|
|
|
|
|
+ migrations.AddField(
|
|
|
|
|
+ model_name='apitoken',
|
|
|
|
|
+ name='uuid',
|
|
|
|
|
+ field=models.UUIDField(blank=True, null=True, unique=True),
|
|
|
|
|
+ ),
|
|
|
|
|
+ migrations.AlterField(
|
|
|
|
|
+ model_name='apitoken',
|
|
|
|
|
+ name='id',
|
|
|
|
|
+ field=models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False),
|
|
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
migrations.CreateModel(
|
|
|
name='OutboundWebhook',
|
|
name='OutboundWebhook',
|
|
|
fields=[
|
|
fields=[
|
|
@@ -25,34 +54,22 @@ class Migration(migrations.Migration):
|
|
|
('auth_token', signal_webhooks.fields.TokenField(blank=True, default='', help_text='Authentication token to use in an Authorization header.', max_length=8000, validators=[signal_webhooks.utils.decode_cipher_key], verbose_name='authentication token')),
|
|
('auth_token', signal_webhooks.fields.TokenField(blank=True, default='', help_text='Authentication token to use in an Authorization header.', max_length=8000, validators=[signal_webhooks.utils.decode_cipher_key], verbose_name='authentication token')),
|
|
|
('enabled', models.BooleanField(default=True, help_text='Is this webhook enabled?', verbose_name='enabled')),
|
|
('enabled', models.BooleanField(default=True, help_text='Is this webhook enabled?', verbose_name='enabled')),
|
|
|
('keep_last_response', models.BooleanField(default=False, help_text='Should the webhook keep a log of the latest response it got?', verbose_name='keep last response')),
|
|
('keep_last_response', models.BooleanField(default=False, help_text='Should the webhook keep a log of the latest response it got?', verbose_name='keep last response')),
|
|
|
- ('created', models.DateTimeField(auto_now_add=True, help_text='When the webhook was created.', verbose_name='created')),
|
|
|
|
|
('updated', models.DateTimeField(auto_now=True, help_text='When the webhook was last updated.', verbose_name='updated')),
|
|
('updated', models.DateTimeField(auto_now=True, help_text='When the webhook was last updated.', verbose_name='updated')),
|
|
|
('last_response', models.CharField(blank=True, default='', help_text='Latest response to this webhook.', max_length=8000, verbose_name='last response')),
|
|
('last_response', models.CharField(blank=True, default='', help_text='Latest response to this webhook.', max_length=8000, verbose_name='last response')),
|
|
|
('last_success', models.DateTimeField(default=None, help_text='When the webhook last succeeded.', null=True, verbose_name='last success')),
|
|
('last_success', models.DateTimeField(default=None, help_text='When the webhook last succeeded.', null=True, verbose_name='last success')),
|
|
|
('last_failure', models.DateTimeField(default=None, help_text='When the webhook last failed.', null=True, verbose_name='last failure')),
|
|
('last_failure', models.DateTimeField(default=None, help_text='When the webhook last failed.', null=True, verbose_name='last failure')),
|
|
|
|
|
+ ('created', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
+ ('modified', models.DateTimeField(auto_now=True)),
|
|
|
|
|
+ ('id', models.UUIDField(blank=True, null=True, unique=True)),
|
|
|
('uuid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
('uuid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
|
- ('abid', charidfield.fields.CharIDField(blank=True, db_index=True, default=None, help_text='ABID-format identifier for this entity (e.g. snp_01BJQMF54D093DXEAWZ6JYRPAQ)', max_length=30, null=True, prefix='whk', unique=True)),
|
|
|
|
|
|
|
+ ('abid', charidfield.fields.CharIDField(blank=True, db_index=True, default=None, help_text='ABID-format identifier for this entity (e.g. snp_01BJQMF54D093DXEAWZ6JYRPAQ)', max_length=30, null=True, prefix='whk_', unique=True)),
|
|
|
|
|
+ ('created_by', models.ForeignKey(default=abid_utils.models.get_or_create_system_user_pk, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
|
],
|
|
],
|
|
|
options={
|
|
options={
|
|
|
'verbose_name': 'API Outbound Webhook',
|
|
'verbose_name': 'API Outbound Webhook',
|
|
|
'abstract': False,
|
|
'abstract': False,
|
|
|
},
|
|
},
|
|
|
),
|
|
),
|
|
|
- migrations.AddField(
|
|
|
|
|
- model_name='apitoken',
|
|
|
|
|
- name='abid',
|
|
|
|
|
- field=charidfield.fields.CharIDField(blank=True, db_index=True, default=None, help_text='ABID-format identifier for this entity (e.g. snp_01BJQMF54D093DXEAWZ6JYRPAQ)', max_length=30, null=True, prefix='apt', unique=True),
|
|
|
|
|
- ),
|
|
|
|
|
- migrations.AddField(
|
|
|
|
|
- model_name='apitoken',
|
|
|
|
|
- name='uuid',
|
|
|
|
|
- field=models.UUIDField(blank=True, null=True, unique=True),
|
|
|
|
|
- ),
|
|
|
|
|
- migrations.AlterField(
|
|
|
|
|
- model_name='apitoken',
|
|
|
|
|
- name='id',
|
|
|
|
|
- field=models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False),
|
|
|
|
|
- ),
|
|
|
|
|
migrations.AddConstraint(
|
|
migrations.AddConstraint(
|
|
|
model_name='outboundwebhook',
|
|
model_name='outboundwebhook',
|
|
|
constraint=models.UniqueConstraint(fields=('ref', 'endpoint'), name='prevent_duplicate_hooks_api_outboundwebhook'),
|
|
constraint=models.UniqueConstraint(fields=('ref', 'endpoint'), name='prevent_duplicate_hooks_api_outboundwebhook'),
|