Skip to content

Commit 02a5890

Browse files
committed
fix: create missing migrations for client credentials and setting
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
1 parent 23b8a50 commit 02a5890

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env python
2+
# Copyright 2025 NetBox Labs, Inc.
3+
"""Diode NetBox Plugin - Database migrations."""
4+
5+
from django.db import migrations, models
6+
7+
import netbox_diode_plugin.models
8+
9+
10+
class Migration(migrations.Migration):
11+
"""Create ClientCredentials model and alter Setting.diode_target field."""
12+
13+
dependencies = [
14+
("netbox_diode_plugin", "0001_squashed_0005"),
15+
]
16+
17+
operations = [
18+
migrations.CreateModel(
19+
name="ClientCredentials",
20+
fields=[
21+
(
22+
"id",
23+
models.BigAutoField(
24+
auto_created=True, primary_key=True, serialize=False
25+
),
26+
),
27+
],
28+
options={
29+
"permissions": (
30+
("view_clientcredentials", "Can view Client Credentials"),
31+
(
32+
"add_clientcredentials",
33+
"Can perform actions on Client Credentials",
34+
),
35+
),
36+
"managed": False,
37+
"default_permissions": (),
38+
},
39+
),
40+
migrations.AlterField(
41+
model_name="setting",
42+
name="diode_target",
43+
field=models.CharField(
44+
max_length=255,
45+
validators=[netbox_diode_plugin.models.diode_target_validator],
46+
),
47+
),
48+
]

0 commit comments

Comments
 (0)