Skip to content

Commit

Permalink
add to plugin type enum
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverb123 committed Jul 18, 2024
1 parent 69771bf commit 13545fc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion latest_migrations.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name
ee: 0016_rolemembership_organization_member
otp_static: 0002_throttling
otp_totp: 0002_auto_20190420_0723
posthog: 0444_integration_unique_id
posthog: 0445_alter_plugin_plugin_type
sessions: 0001_initial
social_django: 0010_uid_db_index
two_factor: 0007_auto_20201201_1019
2 changes: 1 addition & 1 deletion plugin-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export interface Plugin {
id: number
organization_id: string
name: string
plugin_type: 'local' | 'respository' | 'custom' | 'source'
plugin_type: 'local' | 'respository' | 'custom' | 'source' | 'inline'
description?: string
is_global: boolean
is_preinstalled?: boolean
Expand Down
29 changes: 29 additions & 0 deletions posthog/migrations/0445_alter_plugin_plugin_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2.11 on 2024-07-03 13:28

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("posthog", "0433_dashboard_idx_dashboard_deleted_team_id"),
]

operations = [
migrations.AlterField(
model_name="plugin",
name="plugin_type",
field=models.CharField(
blank=True,
choices=[
("local", "local"),
("custom", "custom"),
("repository", "repository"),
("source", "source"),
("inline", "inline"),
],
default=None,
max_length=200,
null=True,
),
),
]
4 changes: 4 additions & 0 deletions posthog/models/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class PluginType(models.TextChoices):
"source",
"source",
) # coded inside the browser (versioned via plugin_source_version)
INLINE = (
"inline",
"inline",
) # Code checked into plugin_server, url starts with "inline:"

organization: models.ForeignKey = models.ForeignKey(
"posthog.Organization",
Expand Down

0 comments on commit 13545fc

Please sign in to comment.