[asterisk-commits] mjordan: trunk r402073 - in /trunk: ./ contrib/ast-db-manage/config/ contrib/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 26 21:39:36 CDT 2013


Author: mjordan
Date: Sat Oct 26 21:39:34 2013
New Revision: 402073

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402073
Log:
Update Alembic database scripts for external scripting and PostgreSQL, Oracle

This patch does the following:
1) The env scripts have been updated to be tolerant of a NULL configuration
   file. This occurs when configuration is provided by an external script,
   such that the actual config.ini file is not used.
2) Enum types have all been given names. This is needed for PostgreSQL script
   generation.
3) The identifier meetme_confno_starttime_endtime is greater than 30
   characters, and hence invalid for Oracle databases. This has been truncated
   down to meetme_confno_start_end.
........

Merged revisions 400383 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/contrib/ast-db-manage/config/env.py
    trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py
    trunk/contrib/ast-db-manage/voicemail/env.py

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/contrib/ast-db-manage/config/env.py
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/ast-db-manage/config/env.py?view=diff&rev=402073&r1=402072&r2=402073
==============================================================================
--- trunk/contrib/ast-db-manage/config/env.py (original)
+++ trunk/contrib/ast-db-manage/config/env.py Sat Oct 26 21:39:34 2013
@@ -9,7 +9,10 @@
 
 # Interpret the config file for Python logging.
 # This line sets up loggers basically.
-fileConfig(config.config_file_name)
+try:
+    fileConfig(config.config_file_name)
+except:
+    pass
 
 # add your model's MetaData object here
 # for 'autogenerate' support

Modified: trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py?view=diff&rev=402073&r1=402072&r2=402073
==============================================================================
--- trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py (original)
+++ trunk/contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py Sat Oct 26 21:39:34 2013
@@ -68,7 +68,7 @@
         sa.Column('useragent', sa.String(20)),
         sa.Column('lastms', sa.Integer),
         sa.Column('host', sa.String(40)),
-        sa.Column('type', sa.Enum(*TYPE_VALUES)),
+        sa.Column('type', sa.Enum(*TYPE_VALUES, name='type_values')),
         sa.Column('context', sa.String(40)),
         sa.Column('permit', sa.String(95)),
         sa.Column('deny', sa.String(95)),
@@ -138,10 +138,10 @@
                   name='yes_no_values')),
         sa.Column('contactpermit', sa.String(95)),
         sa.Column('contactdeny', sa.String(95)),
-        sa.Column('usereqphone', sa.Enum(*YESNO_VALUES)),
-        sa.Column('textsupport', sa.Enum(*YESNO_VALUES)),
-        sa.Column('faxdetect', sa.Enum(*YESNO_VALUES)),
-        sa.Column('buggymwi', sa.Enum(*YESNO_VALUES)),
+        sa.Column('usereqphone', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
+        sa.Column('textsupport', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
+        sa.Column('faxdetect', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
+        sa.Column('buggymwi', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('auth', sa.String(40)),
         sa.Column('fullname', sa.String(40)),
         sa.Column('trunkname', sa.String(40)),
@@ -156,7 +156,7 @@
         sa.Column('subscribemwi', sa.Enum(*YESNO_VALUES,
                   name='yes_no_values')),
         sa.Column('vmexten', sa.String(40)),
-        sa.Column('autoframing', sa.Enum(*YESNO_VALUES)),
+        sa.Column('autoframing', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('rtpkeepalive', sa.Integer),
         sa.Column('call-limit', sa.Integer),
         sa.Column('g726nonstandard', sa.Enum(*YESNO_VALUES,
@@ -167,7 +167,7 @@
                   name='yes_no_values')),
         sa.Column('dynamic', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('path', sa.String(256)),
-        sa.Column('supportpath', sa.Enum(*YESNO_VALUES))
+        sa.Column('supportpath', sa.Enum(*YESNO_VALUES, name='yes_no_values'))
     )
     op.create_index('sippeers_name', 'sippeers', ['name'])
     op.create_index('sippeers_name_host', 'sippeers', ['name', 'host'])
@@ -179,7 +179,7 @@
         sa.Column('id', sa.Integer, primary_key=True, nullable=False,
                   autoincrement=True),
         sa.Column('name', sa.String(40), nullable=False, unique=True),
-        sa.Column('type', sa.Enum(*TYPE_VALUES)),
+        sa.Column('type', sa.Enum(*TYPE_VALUES, name='type_values')),
         sa.Column('username', sa.String(40)),
         sa.Column('mailbox', sa.String(40)),
         sa.Column('secret', sa.String(40)),
@@ -202,9 +202,9 @@
         sa.Column('language', sa.String(10)),
         sa.Column('callerid', sa.String(100)),
         sa.Column('cid_number', sa.String(40)),
-        sa.Column('sendani', sa.Enum(*YESNO_VALUES)),
+        sa.Column('sendani', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('fullname', sa.String(40)),
-        sa.Column('trunk', sa.Enum(*YESNO_VALUES)),
+        sa.Column('trunk', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('auth', sa.String(20)),
         sa.Column('maxauthreq', sa.Integer),
         sa.Column('requirecalltoken', sa.Enum(*IAX_REQUIRECALLTOKEN_VALUES,
@@ -226,7 +226,7 @@
         sa.Column('qualifyfreqok', sa.String(10)),
         sa.Column('qualifyfreqnotok', sa.String(10)),
         sa.Column('timezone', sa.String(20)),
-        sa.Column('adsi', sa.Enum(*YESNO_VALUES)),
+        sa.Column('adsi', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('amaflags', sa.String(20)),
         sa.Column('setvar', sa.String(200))
     )
@@ -248,7 +248,7 @@
         sa.Column('alias', sa.String(80)),
         sa.Column('email', sa.String(80)),
         sa.Column('pager', sa.String(80)),
-        sa.Column('attach', sa.Enum(*YESNO_VALUES)),
+        sa.Column('attach', sa.Enum(*YESNO_VALUES, name='yes_no_values')),
         sa.Column('attachfmt', sa.String(10)),
         sa.Column('serveremail', sa.String(80)),
         sa.Column('language', sa.String(20)),
@@ -306,13 +306,13 @@
         sa.Column('maxusers', sa.Integer),
         sa.Column('members', sa.Integer, nullable=False, default=0)
     )
-    op.create_index('meetme_confno_starttime_endtime', 'meetme',
+    op.create_index('meetme_confno_start_end', 'meetme',
                     ['confno', 'starttime', 'endtime'])
 
     op.create_table(
         'musiconhold',
         sa.Column('name', sa.String(80), primary_key=True, nullable=False),
-        sa.Column('mode', sa.Enum(*MOH_MODE_VALUES)),
+        sa.Column('mode', sa.Enum(*MOH_MODE_VALUES, name='moh_mode_values')),
         sa.Column('directory', sa.String(255)),
         sa.Column('application', sa.String(255)),
         sa.Column('digit', sa.String(1)),

Modified: trunk/contrib/ast-db-manage/voicemail/env.py
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/ast-db-manage/voicemail/env.py?view=diff&rev=402073&r1=402072&r2=402073
==============================================================================
--- trunk/contrib/ast-db-manage/voicemail/env.py (original)
+++ trunk/contrib/ast-db-manage/voicemail/env.py Sat Oct 26 21:39:34 2013
@@ -9,7 +9,10 @@
 
 # Interpret the config file for Python logging.
 # This line sets up loggers basically.
-fileConfig(config.config_file_name)
+try:
+    fileConfig(config.config_file_name)
+except:
+    pass
 
 # add your model's MetaData object here
 # for 'autogenerate' support




More information about the asterisk-commits mailing list