srg/genericsource/migrations/0001_initial.py
2024-04-26 12:43:00 +03:00

106 lines
5.1 KiB
Python

# Generated by Django 2.2.6 on 2020-05-01 14:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='GenericCatalog',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=21)),
('nsource', models.IntegerField(default=0)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('start', models.DateTimeField(blank=True)),
('stop', models.DateTimeField(blank=True)),
('mjd_start', models.FloatField(default=0.0)),
('mjd_stop', models.FloatField(default=0.0)),
('tfield', models.FloatField(default=0.0)),
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_genericsource.genericcatalog_set+', to='contenttypes.ContentType')),
],
options={
'abstract': False,
'base_manager_name': 'objects',
},
),
migrations.CreateModel(
name='GenericConnection',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('separation', models.FloatField(default=0.0)),
('probability', models.FloatField(default=1.0)),
],
),
migrations.CreateModel(
name='GenericSource',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('healpix', models.BigIntegerField(db_index=True, default=0)),
('healpix_plate', models.IntegerField(db_index=True, default=0)),
('ra', models.FloatField(default=0.0)),
('dec', models.FloatField(default=0.0)),
('lii', models.FloatField(default=0.0)),
('bii', models.FloatField(default=0.0)),
('error_radius', models.FloatField(default=0.0)),
('sxflux', models.FloatField(default=0.0)),
('mjdobs', models.FloatField(default=0.0)),
('name', models.CharField(blank=True, default='', max_length=50)),
('catalog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='genericsource.GenericCatalog')),
('connections', models.ManyToManyField(through='genericsource.GenericConnection', to='genericsource.GenericSource')),
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_genericsource.genericsource_set+', to='contenttypes.ContentType')),
],
options={
'abstract': False,
'base_manager_name': 'objects',
},
),
migrations.CreateModel(
name='SourceComment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(max_length=1000)),
('src', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='genericsource.GenericSource')),
],
),
migrations.AddField(
model_name='genericconnection',
name='connected',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connected', to='genericsource.GenericSource'),
),
migrations.AddField(
model_name='genericconnection',
name='connectto',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='connectto', to='genericsource.GenericSource'),
),
migrations.CreateModel(
name='ConnectionComment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(max_length=1000)),
('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='genericsource.GenericConnection')),
],
),
migrations.CreateModel(
name='CatalogComment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(max_length=10000)),
('catalog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='genericsource.GenericCatalog')),
],
),
migrations.AlterUniqueTogether(
name='genericconnection',
unique_together={('connectto', 'connected')},
),
]