Merge "Increase account code maximum length to 80."

This commit is contained in:
Matt Jordan 2015-11-11 08:09:18 -06:00 committed by Gerrit Code Review
commit 21ee2f029c
3 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,26 @@
"""expand accountcode to 80
Revision ID: 54cde9847798
Revises: 210693f3123d
Create Date: 2015-11-05 09:54:06.815364
"""
# revision identifiers, used by Alembic.
revision = '54cde9847798'
down_revision = '210693f3123d'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('cdr', 'accountcode', type_=sa.String(80))
op.alter_column('cdr', 'peeraccount', type_=sa.String(80))
pass
def downgrade():
op.alter_column('cdr', 'accountcode', type_=sa.String(20))
op.alter_column('cdr', 'peeraccount', type_=sa.String(20))
pass

View File

@ -0,0 +1,28 @@
"""expand accountcode to 80
Revision ID: 339a3bdf53fc
Revises: 28ce1e718f05
Create Date: 2015-11-05 10:10:27.465794
"""
# revision identifiers, used by Alembic.
revision = '339a3bdf53fc'
down_revision = '28ce1e718f05'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('ps_endpoints', 'accountcode', type_=sa.String(80))
op.alter_column('sippeers', 'accountcode', type_=sa.String(80))
op.alter_column('iaxfriends', 'accountcode', type_=sa.String(80))
pass
def downgrade():
op.alter_column('ps_endpoints', 'accountcode', type_=sa.String(20))
op.alter_column('sippeers', 'accountcode', type_=sa.String(40))
op.alter_column('iaxfriends', 'accountcode', type_=sa.String(20))
pass

View File

@ -158,7 +158,7 @@ extern "C" {
*/
#define AST_MAX_UNIQUEID (AST_MAX_PUBLIC_UNIQUEID + 2 + 1)
#define AST_MAX_ACCOUNT_CODE 20 /*!< Max length of an account code */
#define AST_MAX_ACCOUNT_CODE 80 /*!< Max length of an account code */
#define AST_CHANNEL_NAME 80 /*!< Max length of an ast_channel name */
#define MAX_LANGUAGE 40 /*!< Max length of the language setting */
#define MAX_MUSICCLASS 80 /*!< Max length of the music class setting */