Skip to content

Commit

Permalink
Add column opsdb.overhead.macro_id
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 11, 2023
1 parent dc21dd3 commit f014269
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/sdssdb/peewee/sdss5db/opsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ class Overhead(OpsdbBase):
column_name='configuration_id',
field='configuration_id',
backref='overheads')
macro_id = IntegerField()
macro = TextField()
stage = TextField()
start_time = DateTimeTZField()
Expand Down
3 changes: 1 addition & 2 deletions python/sdssdb/sqlalchemy/sdss5db/opsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ class Quickred(Base):
class Overhead(Base):
__tablename__ = 'overhead'

pk = Column(Integer, primary_key=True, server_default=text("nextval('targetdb.overhead_pk_seq'::regclass)"))
configuration_id = Column(ForeignKey('targetdb.overhead.configuration_id', ondelete='CASCADE', onupdate='CASCADE', deferrable=True, initially='DEFERRED'), index=True)
macro_id = Column(Integer)
macro = Column(Text)
stage = Column(Text)
start_time = Column(DateTime)
Expand Down
1 change: 1 addition & 0 deletions schema/sdss5db/opsdb/opsdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ CREATE TABLE opsdb.priority_version(
CREATE TABLE opsdb.overhead(
pk SERIAL PRIMARY KEY NOT NULL,
configuration_id INTEGER,
macro_id INTEGER,
macro TEXT,
stage TEXT,
start_time TIMESTAMPTZ,
Expand Down

0 comments on commit f014269

Please sign in to comment.