Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added chat modified, created, and title fields
- Loading branch information
Showing
6 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...e/server/alembic/versions/2023_03_12_1735-af8668441ff0_added_created_and_title_to_chat.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,32 @@ | ||
"""added created and title to chat | ||
Revision ID: af8668441ff0 | ||
Revises: 486fe9e7fb84 | ||
Create Date: 2023-03-12 17:35:27.837252 | ||
""" | ||
import sqlalchemy as sa | ||
import sqlmodel | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "af8668441ff0" | ||
down_revision = "486fe9e7fb84" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("chat", sa.Column("created_at", sa.DateTime(), nullable=False)) | ||
op.add_column("chat", sa.Column("title", sqlmodel.sql.sqltypes.AutoString(), nullable=True)) | ||
op.create_index(op.f("ix_chat_created_at"), "chat", ["created_at"], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("ix_chat_created_at"), table_name="chat") | ||
op.drop_column("chat", "title") | ||
op.drop_column("chat", "created_at") | ||
# ### end Alembic commands ### |
29 changes: 29 additions & 0 deletions
29
inference/server/alembic/versions/2023_03_12_1736-b247f202e522_added_modified_to_chat.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,29 @@ | ||
"""added modified to chat | ||
Revision ID: b247f202e522 | ||
Revises: af8668441ff0 | ||
Create Date: 2023-03-12 17:36:53.061631 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "b247f202e522" | ||
down_revision = "af8668441ff0" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("chat", sa.Column("modified_at", sa.DateTime(), nullable=False)) | ||
op.create_index(op.f("ix_chat_modified_at"), "chat", ["modified_at"], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("ix_chat_modified_at"), table_name="chat") | ||
op.drop_column("chat", "modified_at") | ||
# ### end Alembic commands ### |
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