7726bc7c41
I do not know how long these fields would be + there is not much of a performance difference from postgres point of view which is our preferred database
143 lines
4.5 KiB
Python
143 lines
4.5 KiB
Python
# 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
|
|
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
|
|
# * 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.
|
|
from django.db import models
|
|
|
|
|
|
class AlembicVersion(models.Model):
|
|
version_num = models.TextField()
|
|
|
|
class Meta:
|
|
managed = False
|
|
db_table = 'alembic_version'
|
|
|
|
|
|
class Field(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
name = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'field'
|
|
|
|
|
|
class FieldsPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey('Person', models.DO_NOTHING, blank=True, null=True)
|
|
field = models.ForeignKey(Field, models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'fields_people'
|
|
|
|
|
|
class Method(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
name = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'method'
|
|
|
|
|
|
class MethodsPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey('Person', models.DO_NOTHING, blank=True, null=True)
|
|
method = models.ForeignKey(Method, models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'methods_people'
|
|
|
|
|
|
class Person(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
source_id = models.IntegerField(blank=True, null=True)
|
|
title = models.TextField(blank=True, null=True)
|
|
first_name = models.TextField(blank=True, null=True)
|
|
last_name = models.TextField(blank=True, null=True)
|
|
organisation = models.TextField(blank=True, null=True)
|
|
position = models.TextField(blank=True, null=True)
|
|
country = models.TextField(blank=True, null=True)
|
|
contact_email = models.TextField(blank=True, null=True)
|
|
personal_url = models.TextField(blank=True, null=True)
|
|
biography = models.TextField(blank=True, null=True)
|
|
field_indexer = models.TextField(db_column='_indexer', blank=True, null=True) # Field renamed because it started with '_'.
|
|
|
|
class Meta:
|
|
db_table = 'person'
|
|
|
|
|
|
class Range(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
source_id = models.IntegerField(blank=True, null=True)
|
|
gmba_id = models.TextField(blank=True, null=True)
|
|
name = models.TextField(blank=True, null=True)
|
|
countries = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'range'
|
|
|
|
|
|
class RangesPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey(Person, models.DO_NOTHING, blank=True, null=True)
|
|
range = models.ForeignKey(Range, models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'ranges_people'
|
|
|
|
|
|
class Resource(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
source_id = models.IntegerField(blank=True, null=True)
|
|
title = models.TextField(blank=True, null=True)
|
|
url = models.TextField(blank=True, null=True)
|
|
citation = models.TextField(blank=True, null=True)
|
|
abstract = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'resource'
|
|
|
|
|
|
class ResourcesPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey(Person, models.DO_NOTHING, blank=True, null=True)
|
|
resource = models.ForeignKey(Resource, models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'resources_people'
|
|
|
|
|
|
class Scale(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
name = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'scale'
|
|
|
|
|
|
class ScalesPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey(Person, models.DO_NOTHING, blank=True, null=True)
|
|
scale = models.ForeignKey(Scale, models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'scales_people'
|
|
|
|
|
|
class TaxaPeople(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
person = models.ForeignKey(Person, models.DO_NOTHING, blank=True, null=True)
|
|
taxon = models.ForeignKey('Taxon', models.DO_NOTHING, blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'taxa_people'
|
|
|
|
|
|
class Taxon(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
name = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = 'taxon'
|