-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new attributes for separate IPv4 and IPv6 addresses
- Loading branch information
1 parent
f060aa7
commit ed19964
Showing
5 changed files
with
171 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
serveradmin/serverdb/migrations/0017_new_ip_address_attributes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Generated by Django 3.2.20 on 2024-02-14 16:29 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import netfields.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('serverdb', '0016_optional_servertype_for_relation'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='attribute', | ||
name='type', | ||
field=models.CharField(choices=[('string', 'string'), ('boolean', 'boolean'), ('relation', 'relation'), ('reverse', 'reverse'), ('number', 'number'), ('inet', 'inet'), ('inet4', 'inet4'), ('inet6', 'inet6'), ('macaddr', 'macaddr'), ('date', 'date'), ('datetime', 'datetime'), ('supernet', 'supernet'), ('domain', 'domain')], max_length=32), | ||
), | ||
migrations.CreateModel( | ||
name='ServerInet6Attribute', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('value', netfields.fields.InetAddressField(max_length=39)), | ||
('attribute', models.ForeignKey(db_index=False, limit_choices_to={'type': 'inet6'}, on_delete=django.db.models.deletion.CASCADE, to='serverdb.attribute')), | ||
('server', models.ForeignKey(db_index=False, on_delete=django.db.models.deletion.CASCADE, to='serverdb.server')), | ||
], | ||
options={ | ||
'db_table': 'server_inet6_attribute', | ||
'unique_together': {('server', 'attribute', 'value')}, | ||
'index_together': {('attribute', 'value')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ServerInet4Attribute', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('value', netfields.fields.InetAddressField(max_length=39)), | ||
('attribute', models.ForeignKey(db_index=False, limit_choices_to={'type': 'inet4'}, on_delete=django.db.models.deletion.CASCADE, to='serverdb.attribute')), | ||
('server', models.ForeignKey(db_index=False, on_delete=django.db.models.deletion.CASCADE, to='serverdb.server')), | ||
], | ||
options={ | ||
'db_table': 'server_inet4_attribute', | ||
'unique_together': {('server', 'attribute', 'value')}, | ||
'index_together': {('attribute', 'value')}, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters