Add User.sender_format_updated_at column
This commit is contained in:
parent
01aa733fe8
commit
0354943ff4
|
@ -253,6 +253,9 @@ class User(db.Model, ModelMixin, UserMixin):
|
|||
sender_format = db.Column(
|
||||
db.Integer, default="0", nullable=False, server_default="0"
|
||||
)
|
||||
# to know whether user has explicitly chosen a sender format as opposed to those who use the default ones.
|
||||
# users who haven't chosen a sender format and are using 1 or 3 format, their sender format will be set to 0
|
||||
sender_format_updated_at = db.Column(ArrowType, default=None)
|
||||
|
||||
replace_reverse_alias = db.Column(
|
||||
db.Boolean, default=False, nullable=False, server_default="0"
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 85d0655d42c0
|
||||
Revises: 74906d31d994
|
||||
Create Date: 2021-01-26 20:09:13.949591
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '85d0655d42c0'
|
||||
down_revision = '74906d31d994'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('sender_format_updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('users', 'sender_format_updated_at')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue