docs: def upgrade():
      """Upgrade database."""
      op.create_table(
          'accounts_role',
          sa.Column('id', sa.Integer(), nullable=False),
          sa.Column('name', sa.String(length=80), nullable=True),
          sa.Column('description', sa.String(length=255), nullable=True),
          sa.PrimaryKeyConstraint('id'),
          sa.UniqueConstraint('name')
      )
      op.create_table(
          'accounts_user',
          sa.Column('id', sa.Integer(), nullable=False),
          sa.Column('email', sa.String(length=255), nullable=True),
          sa.Column('password', sa.String(length=255), nullable=True),
          sa.Column('active', sa.Boolean(name='active'), nullable=True),
          sa.Column('confirmed_at', sa.DateTime(), nullable=True),
          sa.Column('last_login_at', sa.DateTime(), nullable=True),
          sa.Column('current_login_at', sa.DateTime(), nullable=True),
          sa.Column('last_login_ip',
                    sqlalchemy_utils.types.ip_address.IPAddressType(),
                    nullable=True),
          sa.Column('current_login_ip',
                    sqlalchemy_utils.types.ip_address.IPAddressType(),
                    nullable=True),
          sa.Column('login_count', sa.Integer(), nullable=True),
          sa.PrimaryKeyConstraint('id'),
          sa.UniqueConstraint('email')
      )
      op.create_table(
          'accounts_user_session_activity',
          sa.Column('created', sa.DateTime(), nullable=False),
          sa.Column('updated', sa.DateTime(), nullable=False),
          sa.Column('sid_s', sa.String(length=255), nullable=False),
          sa.Column('user_id', sa.Integer(), nullable=True),
          sa.ForeignKeyConstraint(
              ['user_id'], [u'accounts_user.id'],
              name='fk_accounts_session_activity_user_id',
          ),
          sa.PrimaryKeyConstraint('sid_s')
      )
      op.create_table(
          'accounts_userrole',
          sa.Column('user_id', sa.Integer(), nullable=True),
          sa.Column('role_id', sa.Integer(), nullable=True),
          sa.ForeignKeyConstraint(
              ['role_id'], ['accounts_role.id'],
              name='fk_accounts_userrole_role_id',
          ),
          sa.ForeignKeyConstraint(
              ['user_id'], ['accounts_user.id'],
              name='fk_accounts_userrole_user_id',
          ),
      )
      with op.batch_alter_table('transaction') as batch_op:
          batch_op.add_column(sa.Column(
              'user_id',
              sa.Integer(),
              sa.ForeignKey('accounts_user.id'),
              nullable=True,
          ))
          batch_op.create_index(
              op.f('ix_transaction_user_id'), ['user_id'], unique=False
          )