Skip to content

Commit

Permalink
Replace all migrations by new initial migrations
Browse files Browse the repository at this point in the history
Remove PcType model
  • Loading branch information
153957 committed Mar 29, 2024
1 parent 7070991 commit 103b12f
Show file tree
Hide file tree
Showing 62 changed files with 389 additions and 2,635 deletions.
79 changes: 44 additions & 35 deletions publicdb/analysissessions/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Generated by Django 3.2.15 on 2024-03-29 19:27

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
('coincidences', '0001_initial'),
('inforecords', '0001_initial'),
Expand All @@ -12,76 +17,80 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='AnalysisSession',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(unique=True, max_length=40)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255, unique=True)),
('slug', models.SlugField(unique=True)),
('hash', models.CharField(max_length=32)),
('pin', models.CharField(max_length=4)),
('starts', models.DateTimeField()),
('ends', models.DateTimeField()),
],
options={
'verbose_name': 'Analysis session',
'verbose_name_plural': 'Analysis sessions',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='AnalyzedCoincidence',
name='Student',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('is_analyzed', models.BooleanField(default=False)),
('core_position_x', models.FloatField(null=True, blank=True)),
('core_position_y', models.FloatField(null=True, blank=True)),
('log_energy', models.FloatField(null=True, blank=True)),
('theta', models.FloatField(null=True, blank=True)),
('phi', models.FloatField(null=True, blank=True)),
('error_estimate', models.FloatField(null=True, blank=True)),
('coincidence', models.ForeignKey(on_delete=models.CASCADE, to='coincidences.Coincidence')),
('session', models.ForeignKey(on_delete=models.CASCADE, to='analysissessions.AnalysisSession')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='students', to='analysissessions.analysissession')),
],
options={
'ordering': ('coincidence',),
'verbose_name': 'Student',
'verbose_name_plural': 'Students',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='SessionRequest',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('first_name', models.CharField(max_length=50)),
('sur_name', models.CharField(max_length=50)),
('email', models.EmailField(max_length=75)),
('school', models.CharField(max_length=50)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(max_length=255)),
('sur_name', models.CharField(max_length=255)),
('email', models.EmailField(max_length=254)),
('school', models.CharField(max_length=255)),
('events_to_create', models.IntegerField()),
('events_created', models.IntegerField()),
('start_date', models.DateField()),
('mail_send', models.BooleanField(default=False)),
('session_confirmed', models.BooleanField(default=False)),
('session_created', models.BooleanField(default=False)),
('session_pending', models.BooleanField(default=False)),
('session_created', models.BooleanField(default=False)),
('url', models.CharField(max_length=20)),
('sid', models.CharField(max_length=50, null=True, blank=True)),
('pin', models.IntegerField(null=True, blank=True)),
('cluster', models.ForeignKey(on_delete=models.CASCADE, to='inforecords.Cluster')),
('sid', models.CharField(blank=True, max_length=255, null=True)),
('pin', models.IntegerField(blank=True, null=True)),
('cluster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='session_requests', to='inforecords.cluster')),
],
options={
'verbose_name': 'Session request',
'verbose_name_plural': 'Session requests',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Student',
name='AnalyzedCoincidence',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=40)),
('session', models.ForeignKey(on_delete=models.CASCADE, to='analysissessions.AnalysisSession')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_analyzed', models.BooleanField(default=False)),
('core_position_x', models.FloatField(blank=True, null=True)),
('core_position_y', models.FloatField(blank=True, null=True)),
('log_energy', models.FloatField(blank=True, null=True)),
('theta', models.FloatField(blank=True, null=True)),
('phi', models.FloatField(blank=True, null=True)),
('error_estimate', models.FloatField(blank=True, null=True)),
('coincidence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analyzed_coincidences', to='coincidences.coincidence')),
('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analyzed_coincidences', to='analysissessions.analysissession')),
('student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='analyzed_coincidences', to='analysissessions.student')),
],
options={
'verbose_name': 'Analyzed coincidence',
'verbose_name_plural': 'Analyzed coincidences',
'ordering': ['coincidence'],
},
bases=(models.Model,),
),
migrations.AddField(
model_name='analyzedcoincidence',
name='student',
field=models.ForeignKey(on_delete=models.CASCADE, blank=True, to='analysissessions.Student', null=True),
preserve_default=True,
model_name='analysissession',
name='session_request',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='analysissessions.sessionrequest'),
),
]

This file was deleted.

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions publicdb/analysissessions/migrations/0005_meta.py

This file was deleted.

40 changes: 0 additions & 40 deletions publicdb/analysissessions/migrations/0006_related_names.py

This file was deleted.

43 changes: 0 additions & 43 deletions publicdb/analysissessions/migrations/0007_longer_charfields.py

This file was deleted.

37 changes: 19 additions & 18 deletions publicdb/coincidences/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from django.db import migrations, models
# Generated by Django 3.2.15 on 2024-03-29 19:27

import publicdb.coincidences.models
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
('inforecords', '0001_initial'),
]
Expand All @@ -13,37 +17,34 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Coincidence',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('time', models.TimeField()),
('nanoseconds', models.IntegerField()),
],
options={
'ordering': ('date', 'time', 'nanoseconds'),
'verbose_name': 'Coincidence',
'verbose_name_plural': 'Coincidences',
'ordering': ['date', 'time', 'nanoseconds'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('time', models.TimeField()),
('nanoseconds', models.IntegerField()),
('pulseheights', publicdb.coincidences.models.SerializedDataField()),
('integrals', publicdb.coincidences.models.SerializedDataField()),
('traces', publicdb.coincidences.models.SerializedDataField()),
('station', models.ForeignKey(on_delete=models.CASCADE, to='inforecords.Station')),
('pulseheights', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=4)),
('integrals', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=4)),
('traces', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None), size=4)),
('coincidence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='coincidences.coincidence')),
('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='inforecords.station')),
],
options={
'ordering': ('date', 'time', 'nanoseconds', 'station'),
'verbose_name': 'Event',
'verbose_name_plural': 'Events',
'ordering': ['date', 'time', 'nanoseconds', 'station'],
},
bases=(models.Model,),
),
migrations.AddField(
model_name='coincidence',
name='events',
field=models.ManyToManyField(to='coincidences.Event'),
preserve_default=True,
),
]
Loading

0 comments on commit 103b12f

Please sign in to comment.