mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Command stats
This commit is contained in:
parent
7517f844d8
commit
23edc51dbf
4 changed files with 141 additions and 29 deletions
37
alembic/versions/3c94051821f8_command_stats.py
Normal file
37
alembic/versions/3c94051821f8_command_stats.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"""Command stats
|
||||
|
||||
Revision ID: 3c94051821f8
|
||||
Revises: b84bb10fb8de
|
||||
Create Date: 2022-09-20 14:38:41.737628
|
||||
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "3c94051821f8"
|
||||
down_revision = "b84bb10fb8de"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"command_stats",
|
||||
sa.Column("command_stats_id", sa.Integer(), nullable=False),
|
||||
sa.Column("command", sa.Text(), nullable=False),
|
||||
sa.Column("timestamp", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column("user_id", sa.BigInteger(), nullable=False),
|
||||
sa.Column("slash", sa.Boolean(), nullable=False),
|
||||
sa.Column("context_menu", sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("command_stats_id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("command_stats")
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue