Skip to content

Instantly share code, notes, and snippets.

@arnobroekhof
Created May 3, 2015 20:12
Show Gist options
  • Save arnobroekhof/b539ab7f35873ddfa876 to your computer and use it in GitHub Desktop.
Save arnobroekhof/b539ab7f35873ddfa876 to your computer and use it in GitHub Desktop.
PowerDNS Djano Model
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to insert the output of 'django-admin sqlcustom [app_label]'
# into your database.
from __future__ import unicode_literals
from django.db import models
class Comments(models.Model):
domain = models.ForeignKey('Domains')
name = models.CharField(max_length=255)
type = models.CharField(max_length=10)
modified_at = models.IntegerField()
account = models.CharField(max_length=40, blank=True, null=True)
comment = models.CharField(max_length=65535)
class Meta:
managed = False
db_table = 'comments'
class Cryptokeys(models.Model):
domain = models.ForeignKey('Domains', blank=True, null=True)
flags = models.IntegerField()
active = models.NullBooleanField()
content = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'cryptokeys'
class Domainmetadata(models.Model):
domain = models.ForeignKey('Domains', blank=True, null=True)
kind = models.CharField(max_length=32, blank=True, null=True)
content = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'domainmetadata'
class Domains(models.Model):
name = models.CharField(unique=True, max_length=255)
master = models.CharField(max_length=128, blank=True, null=True)
last_check = models.IntegerField(blank=True, null=True)
type = models.CharField(max_length=6)
notified_serial = models.IntegerField(blank=True, null=True)
account = models.CharField(max_length=40, blank=True, null=True)
class Meta:
managed = False
db_table = 'domains'
class Records(models.Model):
domain = models.ForeignKey(Domains, blank=True, null=True)
name = models.CharField(max_length=255, blank=True, null=True)
type = models.CharField(max_length=10, blank=True, null=True)
content = models.CharField(max_length=65535, blank=True, null=True)
ttl = models.IntegerField(blank=True, null=True)
prio = models.IntegerField(blank=True, null=True)
change_date = models.IntegerField(blank=True, null=True)
disabled = models.NullBooleanField()
ordername = models.CharField(max_length=255, blank=True, null=True)
auth = models.NullBooleanField()
class Meta:
managed = False
db_table = 'records'
class Supermasters(models.Model):
ip = models.GenericIPAddressField()
nameserver = models.CharField(max_length=255)
account = models.CharField(max_length=40)
class Meta:
managed = False
db_table = 'supermasters'
unique_together = (('ip', 'nameserver'),)
class Tsigkeys(models.Model):
name = models.CharField(max_length=255, blank=True, null=True)
algorithm = models.CharField(max_length=50, blank=True, null=True)
secret = models.CharField(max_length=255, blank=True, null=True)
class Meta:
managed = False
db_table = 'tsigkeys'
unique_together = (('name', 'algorithm'),)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment