mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01:00
c71824c68e
* Add DailyMetric model * increment nb_new_web_non_proton_user * fix test * fix test
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
"""empty message
|
|
|
|
Revision ID: 2c2093c82bc0
|
|
Revises: bd95b2b4217f
|
|
Create Date: 2022-10-14 16:27:49.839887
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '2c2093c82bc0'
|
|
down_revision = 'bd95b2b4217f'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('daily_metric',
|
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
|
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
|
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
|
sa.Column('date', sa.Date(), nullable=False),
|
|
sa.Column('nb_new_web_non_proton_user', sa.Integer(), server_default='0', nullable=False),
|
|
sa.Column('nb_alias', sa.Integer(), server_default='0', nullable=False),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('date')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('daily_metric')
|
|
# ### end Alembic commands ###
|