Asterisk - The Open Source Telephony Project GIT-master-545c459
Loading...
Searching...
No Matches
Functions | Variables
2b45fd748a4f_add_geolocation_tables Namespace Reference

Functions

 downgrade ()
 
 upgrade ()
 

Variables

str AST_BOOL_NAME = 'ast_bool_values'
 
list AST_BOOL_VALUES
 
str down_revision = '2285f2ace275'
 
str GEOLOC_LOCATION_FORMAT_NAME = 'geoloc_location_format_values'
 
list GEOLOC_LOCATION_FORMAT_VALUES = ['<none>','civicAddress','GML','URI']
 
str GEOLOC_PROFILE_PIDF_ELEMENT_NAME = 'geoloc_profile_pidf_element_values'
 
list GEOLOC_PROFILE_PIDF_ELEMENT_VALUES = ['<none>','tuple', 'device', 'person']
 
str GEOLOC_PROFILE_PRECEDENCE_NAME = 'geoloc_profile_precedence_values'
 
list GEOLOC_PROFILE_PRECEDENCE_VALUES = ['prefer_incoming', 'prefer_config', 'discard_incoming','discard_config']
 
str revision = '2b45fd748a4f'
 

Function Documentation

◆ downgrade()

downgrade ( )

Definition at line 69 of file 2b45fd748a4f_add_geolocation_tables.py.

69def downgrade():
70 op.drop_table('geoloc_location')
71 op.drop_table('geoloc_profile')
72 sa.Enum(*GEOLOC_LOCATION_FORMAT_VALUES, name=GEOLOC_LOCATION_FORMAT_NAME).drop(op.get_bind(), checkfirst=True)
73 sa.Enum(*GEOLOC_PROFILE_PIDF_ELEMENT_VALUES, name=GEOLOC_PROFILE_PIDF_ELEMENT_NAME).drop(op.get_bind(), checkfirst=True)
74 sa.Enum(*GEOLOC_PROFILE_PRECEDENCE_VALUES, name=GEOLOC_PROFILE_PRECEDENCE_NAME).drop(op.get_bind(), checkfirst=True)

◆ upgrade()

upgrade ( )

Definition at line 32 of file 2b45fd748a4f_add_geolocation_tables.py.

32def upgrade():
33 enum_format = ENUM(*GEOLOC_LOCATION_FORMAT_VALUES, name=GEOLOC_LOCATION_FORMAT_NAME, checkfirst=True)
34 enum_pidf_element = ENUM(*GEOLOC_PROFILE_PIDF_ELEMENT_VALUES, name=GEOLOC_PROFILE_PIDF_ELEMENT_NAME, checkfirst=True)
35 enum_precedence = ENUM(*GEOLOC_PROFILE_PRECEDENCE_VALUES, name=GEOLOC_PROFILE_PRECEDENCE_NAME, checkfirst=True)
36 ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)
37
38 op.create_table(
39 'geoloc_location',
40 sa.Column('id', sa.String(80), nullable=False, primary_key=True),
41 sa.Column('format', enum_format, nullable=True),
42 sa.Column('location_info', sa.String(2048), nullable=True),
43 sa.Column('location_source', sa.String(1024), nullable=True),
44 sa.Column('confidence', sa.String(2048), nullable=True),
45 sa.Column('method', sa.String(2048), nullable=True)
46 )
47
48 op.create_table(
49 'geoloc_profile',
50 sa.Column('id', sa.String(80), nullable=False, primary_key=True),
51 sa.Column('pidf_element', enum_pidf_element, nullable=True),
52 sa.Column('pidf_element_id', sa.String(80), nullable=True),
53 sa.Column('device_id', sa.String(1024), nullable=True),
54 sa.Column('location_reference', sa.String(80), nullable=True),
55 sa.Column('location_info_refinement', sa.String(2048), nullable=True),
56 sa.Column('location_variables', sa.String(2048), nullable=True),
57 sa.Column('usage_rules', sa.String(2048), nullable=True),
58 sa.Column('notes', sa.String(2048), nullable=True),
59 sa.Column('allow_routing_use', ast_bool_values),
60 sa.Column('suppress_empty_ca_elements', ast_bool_values),
61 sa.Column('profile_precedence', enum_precedence, nullable=True),
62 sa.Column('format', enum_format, nullable=True),
63 sa.Column('location_info', sa.String(2048), nullable=True),
64 sa.Column('location_source', sa.String(1024), nullable=True),
65 sa.Column('confidence', sa.String(2048), nullable=True),
66 sa.Column('method', sa.String(2048), nullable=True)
67 )
68

Variable Documentation

◆ AST_BOOL_NAME

str AST_BOOL_NAME = 'ast_bool_values'

Definition at line 17 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ AST_BOOL_VALUES

list AST_BOOL_VALUES
Initial value:
1= [ '0', '1',
2 'off', 'on',
3 'false', 'true',
4 'no', 'yes' ]

Definition at line 18 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ down_revision

str down_revision = '2285f2ace275'

Definition at line 11 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_LOCATION_FORMAT_NAME

str GEOLOC_LOCATION_FORMAT_NAME = 'geoloc_location_format_values'

Definition at line 23 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_LOCATION_FORMAT_VALUES

list GEOLOC_LOCATION_FORMAT_VALUES = ['<none>','civicAddress','GML','URI']

Definition at line 24 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_PROFILE_PIDF_ELEMENT_NAME

str GEOLOC_PROFILE_PIDF_ELEMENT_NAME = 'geoloc_profile_pidf_element_values'

Definition at line 26 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_PROFILE_PIDF_ELEMENT_VALUES

list GEOLOC_PROFILE_PIDF_ELEMENT_VALUES = ['<none>','tuple', 'device', 'person']

Definition at line 27 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_PROFILE_PRECEDENCE_NAME

str GEOLOC_PROFILE_PRECEDENCE_NAME = 'geoloc_profile_precedence_values'

Definition at line 29 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ GEOLOC_PROFILE_PRECEDENCE_VALUES

list GEOLOC_PROFILE_PRECEDENCE_VALUES = ['prefer_incoming', 'prefer_config', 'discard_incoming','discard_config']

Definition at line 30 of file 2b45fd748a4f_add_geolocation_tables.py.

◆ revision

str revision = '2b45fd748a4f'

Definition at line 10 of file 2b45fd748a4f_add_geolocation_tables.py.