mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-25 11:17:50 +01:00
5513be7731
* Upgraded Ruff linter * Formatted whole codebase with new ruff rules * Revert import removal * Fixed mypi issues or added ignores * Fixed schema formatting * Fixed hogvm failing tests * Remove duplicate key in list
60 lines
1.9 KiB
Python
60 lines
1.9 KiB
Python
# Generated by Django 3.0.6 on 2020-08-18 12:10
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
import posthog.models.utils
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("posthog", "0082_personalapikey"),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
("ee", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Hook",
|
|
fields=[
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
("updated", models.DateTimeField(auto_now=True)),
|
|
(
|
|
"event",
|
|
models.CharField(db_index=True, max_length=64, verbose_name="Event"),
|
|
),
|
|
("target", models.URLField(max_length=255, verbose_name="Target URL")),
|
|
(
|
|
"id",
|
|
models.CharField(
|
|
default=posthog.models.utils.generate_random_token,
|
|
max_length=50,
|
|
primary_key=True,
|
|
serialize=False,
|
|
),
|
|
),
|
|
("resource_id", models.IntegerField(blank=True, null=True)),
|
|
(
|
|
"team",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="rest_hooks",
|
|
to="posthog.Team",
|
|
),
|
|
),
|
|
(
|
|
"user",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="rest_hooks",
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"abstract": False,
|
|
},
|
|
),
|
|
]
|