Skip to content

Commit

Permalink
fix(dp): Fix migration
Browse files Browse the repository at this point in the history
In latest migration json default was incorrectly formatted,
And although migration was generated it couldn't have been applied.

Signed-off-by: Kuba Marciniszyn <kuba@freedomfi.com>
  • Loading branch information
jkmar committed Mar 24, 2022
1 parent 8d04974 commit 49d30ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""empty message
Revision ID: db5d8e00ddd1
Revision ID: d5ba47fd26e9
Revises: d5f1e6f26fd4
Create Date: 2022-03-22 18:24:08.991313
Create Date: 2022-03-23 16:38:50.608758
"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = 'db5d8e00ddd1'
revision = 'd5ba47fd26e9'
down_revision = 'd5f1e6f26fd4'
branch_labels = None
depends_on = None
Expand All @@ -28,8 +28,8 @@ def upgrade():
)
op.add_column(
'cbsds', sa.Column(
'preferred_frequencies_mhz',
sa.JSON(), server_default='[]', nullable=False,
'preferred_frequencies_mhz', sa.JSON(
), server_default=sa.text("'[]'::json"), nullable=False,
),
)
# ### end Alembic commands ###
Expand Down
2 changes: 1 addition & 1 deletion dp/cloud/python/magma/db_service/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class DBCbsd(Base):
Integer, nullable=False, server_default='0',
)
preferred_frequencies_mhz = Column(
JSON, nullable=False, server_default='[]',
JSON, nullable=False, server_default=sa_text("'[]'::json"),
)
network_id = Column(String)
is_deleted = Column(Boolean, nullable=False, server_default='false')
Expand Down

0 comments on commit 49d30ef

Please sign in to comment.