Added Audit logs for everything

This commit is contained in:
Aaron Kimbre
2022-02-11 23:05:00 -06:00
parent 2e8ce8ea19
commit de698f86fa
9 changed files with 97 additions and 21 deletions

View File

@@ -0,0 +1,38 @@
"""fix nullables
Revision ID: 3132aaef7413
Revises: bd908969d8fe
Create Date: 2022-02-11 21:51:58.479066
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '3132aaef7413'
down_revision = 'bd908969d8fe'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('audit_logs', 'account_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.alter_column('audit_logs', 'action',
existing_type=mysql.TEXT(),
nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('audit_logs', 'action',
existing_type=mysql.TEXT(),
nullable=True)
op.alter_column('audit_logs', 'account_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
# ### end Alembic commands ###