Skip to content

DB: Need to allow for longer network/station/location/channel codes #113

@megies

Description

@megies

Currently, the waveform database tables are fixed to a strict length of 2/5/2/3 for network/station/location/channel code, both for original and mapped codes (based on MSEED definitions).
We need to change this to allow for longer codes, since that is used in both some older data formats and also in some new data formats (MSEED v3).

Should be doable with a relatively simple DB migration (not sure if the table will have to be reindexed afterwards).

CC @jwassermann

class ContinuousTrace(models.Model):
file = models.ForeignKey(File, related_name='traces')
pos = models.IntegerField(default=0)
network = models.CharField(max_length=2, db_index=True, blank=True)
station = models.CharField(max_length=5, db_index=True, blank=True)
location = models.CharField(max_length=2, db_index=True, blank=True)
channel = models.CharField(max_length=3, db_index=True, blank=True)
# Original codes for mapped ids.
original_network = models.CharField(max_length=2, blank=True)
original_station = models.CharField(max_length=5, blank=True)
original_location = models.CharField(max_length=2, blank=True)
original_channel = models.CharField(max_length=3, blank=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions