Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7306469676 |
+1
-1
@@ -305,7 +305,7 @@ Copyright © 2026 [Stardream](https://git.stdm.moe/Stardream)。本项目采用
|
|||||||
|
|
||||||
<!-- LINK GROUP -->
|
<!-- LINK GROUP -->
|
||||||
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-black?style=flat-square
|
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-black?style=flat-square
|
||||||
[license-shield]: https://img.shields.io/badge/license-AGPL--3.0-white?labelColor=black&style=flat-square
|
[license-shield]: https://img.shields.io/badge/许可证-AGPL--3.0-white?labelColor=black&style=flat-square
|
||||||
[license-link]: ./LICENSE
|
[license-link]: ./LICENSE
|
||||||
[python-shield]: https://img.shields.io/badge/python-3.12-blue?labelColor=black&logo=python&logoColor=white&style=flat-square
|
[python-shield]: https://img.shields.io/badge/python-3.12-blue?labelColor=black&logo=python&logoColor=white&style=flat-square
|
||||||
[python-link]: https://www.python.org/
|
[python-link]: https://www.python.org/
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
"""convert_status_to_varchar
|
|
||||||
|
|
||||||
Revision ID: a1b2c3d4e5f6
|
|
||||||
Revises: 86cca6d7adcb
|
|
||||||
Create Date: 2026-06-02 12:00:00.000000
|
|
||||||
|
|
||||||
"""
|
|
||||||
from typing import Sequence, Union
|
|
||||||
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
revision: str = 'a1b2c3d4e5f6'
|
|
||||||
down_revision: Union[str, None] = '86cca6d7adcb'
|
|
||||||
branch_labels: Union[str, Sequence[str], None] = None
|
|
||||||
depends_on: Union[str, Sequence[str], None] = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.execute("ALTER TABLE lotteries ALTER COLUMN status TYPE VARCHAR(20) USING status::text")
|
|
||||||
op.execute("DROP TYPE IF EXISTS lotterystatus")
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
op.execute("CREATE TYPE lotterystatus AS ENUM ('draft', 'active', 'drawing', 'finished', 'cancelled')")
|
|
||||||
op.execute("ALTER TABLE lotteries ALTER COLUMN status TYPE lotterystatus USING status::lotterystatus")
|
|
||||||
Reference in New Issue
Block a user