-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mindy/passages-separate-tables
- Loading branch information
Showing
22 changed files
with
235 additions
and
524 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
alembic/versions/4e88e702f85e_drop_api_tokens_table_in_oss.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 @@ | ||
"""Drop api tokens table in OSS | ||
Revision ID: 4e88e702f85e | ||
Revises: d05669b60ebe | ||
Create Date: 2024-12-13 17:19:55.796210 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "4e88e702f85e" | ||
down_revision: Union[str, None] = "d05669b60ebe" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("tokens_idx_key", table_name="tokens") | ||
op.drop_index("tokens_idx_user", table_name="tokens") | ||
op.drop_table("tokens") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"tokens", | ||
sa.Column("id", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
sa.Column("user_id", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
sa.Column("key", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
sa.Column("name", sa.VARCHAR(), autoincrement=False, nullable=True), | ||
sa.PrimaryKeyConstraint("id", name="tokens_pkey"), | ||
) | ||
op.create_index("tokens_idx_user", "tokens", ["user_id"], unique=False) | ||
op.create_index("tokens_idx_key", "tokens", ["key"], unique=False) | ||
# ### 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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.