Merge "No need to use getattr func to get a value"
This commit is contained in:
commit
08f3813482
|
@ -21,8 +21,8 @@ def upgrade(migrate_engine):
|
|||
resource_routings = Table('resource_routings', meta, autoload=True)
|
||||
pods = Table('pods', meta, autoload=True)
|
||||
|
||||
col_pod_id_fkey = getattr(resource_routings.c, 'pod_id')
|
||||
col_pod_id_pkey = getattr(pods.c, 'pod_id')
|
||||
col_pod_id_fkey = resource_routings.c.pod_id
|
||||
col_pod_id_pkey = pods.c.pod_id
|
||||
|
||||
# In the migration script 002_resource.py, the pod_id string length in
|
||||
# resource_routings table is 64, but pod_id string length in pods table
|
||||
|
|
|
@ -21,8 +21,8 @@ def upgrade(migrate_engine):
|
|||
cached_endpoints = Table('cached_endpoints', meta, autoload=True)
|
||||
pods = Table('pods', meta, autoload=True)
|
||||
|
||||
col_pod_id_fkey = getattr(cached_endpoints.c, 'pod_id')
|
||||
col_pod_id_pkey = getattr(pods.c, 'pod_id')
|
||||
col_pod_id_fkey = cached_endpoints.c.pod_id
|
||||
col_pod_id_pkey = pods.c.pod_id
|
||||
|
||||
# In the migration script 001_init.py, the pod_id string length in
|
||||
# cached_endpoints table is 64, but pod_id string length in pods table
|
||||
|
|
|
@ -21,8 +21,8 @@ def upgrade(migrate_engine):
|
|||
shadow_agents = Table('shadow_agents', meta, autoload=True)
|
||||
pods = Table('pods', meta, autoload=True)
|
||||
|
||||
col_pod_id_fkey = getattr(shadow_agents.c, 'pod_id')
|
||||
col_pod_id_pkey = getattr(pods.c, 'pod_id')
|
||||
col_pod_id_fkey = shadow_agents.c.pod_id
|
||||
col_pod_id_pkey = pods.c.pod_id
|
||||
|
||||
# In the migration script 003_shadow_agent.py, the pod_id string length in
|
||||
# shadow_agents table is 64, but pod_id string length in pods table
|
||||
|
|
Loading…
Reference in New Issue