-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #953 from Capsize-Games/devastator
Devastator
- Loading branch information
Showing
21 changed files
with
681 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/airunner/alembic/versions/f403ff7468e8_move_bot_mood_from_chatbot_to_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Move bot_mood from Chatbot to Conversation | ||
Revision ID: f403ff7468e8 | ||
Revises: 536e18463461 | ||
Create Date: 2024-10-24 01:43:30.378281 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import sqlite | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'f403ff7468e8' | ||
down_revision: Union[str, None] = '536e18463461' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
def upgrade(): | ||
try: | ||
# Add bot_mood column to conversation table | ||
op.add_column('conversations', sa.Column('bot_mood', sa.Text(), nullable=True)) | ||
except sqlite.DatabaseError: | ||
pass | ||
|
||
try: | ||
# Remove bot_mood column from chatbot table | ||
op.drop_column('chatbots', 'bot_mood') | ||
except sqlite.DatabaseError: | ||
pass | ||
|
||
def downgrade(): | ||
try: | ||
op.add_column('chatbots', sa.Column('bot_mood', sa.Text(), nullable=True)) | ||
except sqlite.DatabaseError: | ||
pass | ||
|
||
try: | ||
op.drop_column('conversations', 'bot_mood') | ||
except sqlite.DatabaseError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.