Skip to content

Commit

Permalink
Adding migration and updates to source file columns
Browse files Browse the repository at this point in the history
  • Loading branch information
mfixstsci committed Nov 12, 2024
1 parent 36a90f6 commit dafea36
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Generated by Django 5.1 on 2024-11-12 19:09

import django.contrib.postgres.fields
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('jwql', '0026_alter_fgsdarkdarkcurrent_amplifier_and_more'),
]

operations = [
migrations.AlterField(
model_name='fgsbadpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='fgsdarkdarkcurrent',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='fgsdarkpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='miribadpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='miridarkdarkcurrent',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='miridarkpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nircambadpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nircamdarkdarkcurrent',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nircamdarkpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirissbadpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirissdarkdarkcurrent',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirissdarkpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirspecbadpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirspecdarkdarkcurrent',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
migrations.AlterField(
model_name='nirspecdarkpixelstats',
name='source_files',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='source file names', max_length=1000), blank=True, null=True, size=None),
),
]
10 changes: 5 additions & 5 deletions jwql/website/apps/jwql/monitor_models/bad_pixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class FGSBadPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"), default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names", default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -96,7 +96,7 @@ class MIRIBadPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"), default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names", default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -134,7 +134,7 @@ class NIRCamBadPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"), default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names", default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -172,7 +172,7 @@ class NIRISSBadPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"), default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names", default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -210,7 +210,7 @@ class NIRSpecBadPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"), default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names", default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down
40 changes: 20 additions & 20 deletions jwql/website/apps/jwql/monitor_models/dark_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class FGSDarkDarkCurrent(models.Model):
readpattern = models.CharField(max_length=MAX_LEN_READPATTERN, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
mean = models.FloatField(default=0., blank=True, null=True)
stdev = models.FloatField(default=0., blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -80,8 +80,8 @@ class FGSDarkPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -117,8 +117,8 @@ class MIRIDarkDarkCurrent(models.Model):
readpattern = models.CharField(max_length=MAX_LEN_READPATTERN, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
mean = models.FloatField(default=0., blank=True, null=True)
stdev = models.FloatField(default=0., blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -149,8 +149,8 @@ class MIRIDarkPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -186,8 +186,8 @@ class NIRCamDarkDarkCurrent(models.Model):
readpattern = models.CharField(max_length=MAX_LEN_READPATTERN, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
mean = models.FloatField(default=0., blank=True, null=True)
stdev = models.FloatField(default=0., blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -218,8 +218,8 @@ class NIRCamDarkPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -255,8 +255,8 @@ class NIRISSDarkDarkCurrent(models.Model):
readpattern = models.CharField(max_length=MAX_LEN_READPATTERN, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
mean = models.FloatField(default=0., blank=True, null=True)
stdev = models.FloatField(default=0., blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -287,8 +287,8 @@ class NIRISSDarkPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -324,8 +324,8 @@ class NIRSpecDarkDarkCurrent(models.Model):
readpattern = models.CharField(max_length=MAX_LEN_READPATTERN, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
mean = models.FloatField(default=0., blank=True, null=True)
stdev = models.FloatField(default=0., blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down Expand Up @@ -356,8 +356,8 @@ class NIRSpecDarkPixelStats(models.Model):
x_coord = ArrayField(models.IntegerField())
y_coord = ArrayField(models.IntegerField())
type = models.CharField(max_length=MAX_LEN_TYPE, default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names"),
default=DEFAULT_MODEL_CHARFIELD, blank=True, null=True)
source_files = ArrayField(models.CharField(max_length=MAX_LEN_FILENAME, help_text="source file names",
default=DEFAULT_MODEL_CHARFIELD), blank=True, null=True)
obs_start_time = models.DateTimeField(blank=True, null=True)
obs_mid_time = models.DateTimeField(blank=True, null=True)
obs_end_time = models.DateTimeField(blank=True, null=True)
Expand Down

0 comments on commit dafea36

Please sign in to comment.