-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
328 additions
and
627 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from .channel_errors import ChannelErrorDAO | ||
from .channels import ChannelDAO | ||
from .message_log import MessageLogDAO | ||
from .users import UserRepo | ||
|
||
__all__ = ["ChannelDAO", "ChannelErrorDAO", "MessageLogDAO", "UserRepo"] | ||
__all__ = ["ChannelDAO", "MessageLogDAO", "UserRepo"] |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from typing import Sequence | ||
from typing import Union | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "f78d1309ec45" | ||
down_revision: Union[str, None] = "da6a2af82a8b" | ||
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("ix_channel_errors_error", table_name="channel_errors") | ||
op.drop_table("channel_errors") | ||
op.drop_index("ix_users_is_admin", table_name="users") | ||
op.drop_column("users", "is_admin") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("users", sa.Column("is_admin", sa.BOOLEAN(), nullable=True)) | ||
op.create_index("ix_users_is_admin", "users", ["is_admin"], unique=False) | ||
op.create_table( | ||
"channel_errors", | ||
sa.Column("id", sa.INTEGER(), nullable=False), | ||
sa.Column("error", sa.VARCHAR(length=512), nullable=False), | ||
sa.Column("created_at", sa.TIMESTAMP(), nullable=False), | ||
sa.Column("updated_at", sa.TIMESTAMP(), nullable=False), | ||
sa.Column("channel_id", sa.INTEGER(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["channel_id"], ["channels.id"], onupdate="CASCADE", ondelete="CASCADE" | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index( | ||
"ix_channel_errors_error", "channel_errors", ["error"], 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 was deleted.
Oops, something went wrong.
Oops, something went wrong.