mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 09:52:38 +02:00
🔀 Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
07f87a0f7d
2 changed files with 20 additions and 13 deletions
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- 🐛 — Fix method enum in tasks table (thx to Dryusdan)
|
||||||
|
|
||||||
## 0.7.3
|
## 0.7.3
|
||||||
|
|
||||||
Date: 2025-01-26
|
Date: 2025-01-26
|
||||||
|
|
||||||
🐛 — Fix bug in retry_before_notification logic when success
|
- 🐛 — Fix bug in retry_before_notification logic when success
|
||||||
|
|
||||||
## 0.7.2
|
## 0.7.2
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ Revises: c780864dc407
|
||||||
Create Date: 2024-11-26 14:40:27.510587
|
Create Date: 2024-11-26 14:40:27.510587
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from typing import Sequence, Union
|
from typing import Sequence, Union
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
|
@ -19,22 +20,25 @@ depends_on: Union[str, Sequence[str], None] = None
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
def upgrade() -> None:
|
||||||
|
enum = sa.Enum(
|
||||||
|
"GET",
|
||||||
|
"HEAD",
|
||||||
|
"POST",
|
||||||
|
"OPTIONS",
|
||||||
|
"CONNECT",
|
||||||
|
"TRACE",
|
||||||
|
"PUT",
|
||||||
|
"PATCH",
|
||||||
|
"DELETE",
|
||||||
|
name="method",
|
||||||
|
create_type=False,
|
||||||
|
)
|
||||||
|
enum.create(op.get_bind(), checkfirst=True)
|
||||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||||
batch_op.add_column(
|
batch_op.add_column(
|
||||||
sa.Column(
|
sa.Column(
|
||||||
"method",
|
"method",
|
||||||
sa.Enum(
|
enum,
|
||||||
"GET",
|
|
||||||
"HEAD",
|
|
||||||
"POST",
|
|
||||||
"OPTIONS",
|
|
||||||
"CONNECT",
|
|
||||||
"TRACE",
|
|
||||||
"PUT",
|
|
||||||
"PATCH",
|
|
||||||
"DELETE",
|
|
||||||
name="method",
|
|
||||||
),
|
|
||||||
nullable=False,
|
nullable=False,
|
||||||
server_default="GET",
|
server_default="GET",
|
||||||
)
|
)
|
||||||
|
@ -44,3 +48,4 @@ def upgrade() -> None:
|
||||||
def downgrade() -> None:
|
def downgrade() -> None:
|
||||||
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
with op.batch_alter_table("tasks", schema=None) as batch_op:
|
||||||
batch_op.drop_column("method")
|
batch_op.drop_column("method")
|
||||||
|
sa.Enum(name="method").drop(op.get_bind(), checkfirst=True)
|
||||||
|
|
Loading…
Reference in a new issue