"Fossies" - the Fresh Open Source Software Archive

Member "LinOTP-release-2.10.5.2/linotpd/src/upgrades/versions/d21455fbe5f_create_account_column_for_audit.py" (13 May 2019, 1862 Bytes) of package /linux/misc/LinOTP-release-2.10.5.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "d21455fbe5f_create_account_column_for_audit.py" see the Fossies "Dox" file reference documentation.

    1 # -*- coding: utf-8 -*-
    2 #
    3 #    LinOTP - the open source solution for two factor authentication
    4 #    Copyright (C) 2010 - 2019 KeyIdentity GmbH
    5 #
    6 #    This file is part of LinOTP server.
    7 #
    8 #    This program is free software: you can redistribute it and/or
    9 #    modify it under the terms of the GNU Affero General Public
   10 #    License, version 3, as published by the Free Software Foundation.
   11 #
   12 #    This program is distributed in the hope that it will be useful,
   13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15 #    GNU Affero General Public License for more details.
   16 #
   17 #    You should have received a copy of the
   18 #               GNU Affero General Public License
   19 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
   20 #
   21 #
   22 #    E-mail: linotp@keyidentity.com
   23 #    Contact: www.linotp.org
   24 #    Support: www.keyidentity.com
   25 #
   26 """extend Config Value column
   27 
   28 Revision ID: d21455fbe5f
   29 Revises: e834dd143cf
   30 Create Date: 2014-10-02 18:04:44.493146
   31 
   32 """
   33 
   34 # revision identifiers, used by Alembic.
   35 revision = 'd21455fbe5f'
   36 down_revision = 'e834dd143cf'
   37 
   38 from alembic import op
   39 import sqlalchemy as sa
   40 from sqlalchemy import MetaData
   41 
   42 
   43 def upgrade(engine_name):
   44     globals()["upgrade_%s" % engine_name]()
   45 
   46 
   47 def downgrade(engine_name):
   48     globals()["downgrade_%s" % engine_name]()
   49 
   50 def upgrade_linotp():
   51     op.alter_column(
   52         table_name='Config',
   53         column_name='Value',
   54         nullable=True,
   55         type_=sa.types.Unicode(length=3000),
   56     )
   57 
   58 def downgrade_linotp():
   59     op.alter_column(
   60         table_name='Config',
   61         column_name='Value',
   62         nullable=True,
   63         type_=sa.types.Unicode(length=2000),
   64     )
   65 
   66 
   67 def upgrade_audit():
   68     pass
   69 
   70 def downgrade_audit():
   71     pass
   72 
   73 def upgrade_openid():
   74     pass
   75 
   76 def downgrade_openid():
   77     pass
   78