add basic migrations
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
@ -0,0 +1,44 @@
|
||||
# Generated by Django 5.1.11 on 2025-06-13 15:12
|
||||
|
||||
import uuid
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("authentik_core", "0048_delete_oldauthenticatedsession_content_type"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="File",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.UUIDField(
|
||||
default=uuid.uuid4, editable=False, primary_key=True, serialize=False
|
||||
),
|
||||
),
|
||||
("name", models.TextField()),
|
||||
("content", models.BinaryField()),
|
||||
("public", models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "Files",
|
||||
},
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name="application",
|
||||
old_name="meta_icon",
|
||||
new_name="meta_old_icon",
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="application",
|
||||
name="meta_icon",
|
||||
field=models.ForeignKey(
|
||||
null=True, on_delete=django.db.models.deletion.SET_NULL, to="authentik_core.file"
|
||||
),
|
||||
),
|
||||
]
|
||||
@ -533,12 +533,13 @@ class Application(SerializerModel, PolicyBindingModel):
|
||||
)
|
||||
|
||||
# For template applications, this can be set to /static/authentik/applications/*
|
||||
meta_icon = models.FileField(
|
||||
meta_old_icon = models.FileField(
|
||||
upload_to="application-icons/",
|
||||
default=None,
|
||||
null=True,
|
||||
max_length=500,
|
||||
)
|
||||
meta_icon = models.ForeignKey("File", null=True, on_delete=models.SET_NULL)
|
||||
meta_description = models.TextField(default="", blank=True)
|
||||
meta_publisher = models.TextField(default="", blank=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user