Skip to content

Commit

Permalink
Fix: Added new error code to database with a migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres D. Molins committed Jan 16, 2025
1 parent 0ce7e0d commit 00534e0
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""add_new_error_code_on_db
Revision ID: 9e600f404aa1
Revises: 46f7e55ff55c
Create Date: 2025-01-16 13:51:36.699939
"""
from alembic import op


# revision identifiers, used by Alembic.
revision = '9e600f404aa1'
down_revision = '46f7e55ff55c'
branch_labels = None
depends_on = None


def upgrade() -> None:
op.execute(
"""
INSERT INTO error_codes(code, description) VALUES
(503, 'Cannot forget a used message')
"""
)


def downgrade() -> None:
op.execute("DELETE FROM error_codes WHERE code = 503")

0 comments on commit 00534e0

Please sign in to comment.