Skip to content

Commit

Permalink
Merge pull request quattor#81 in AQUILON_AQD/aqd from ~AQBLD/aqd:for_…
Browse files Browse the repository at this point in the history
…merge/master/by_topic/fix_build_db_on_oracle to master

* commit '47e5cf308978a2d0fbf93f7c9151eb164ef4e1e6':
  Fix EMAQ constraint naming in build_db on Oracle
  • Loading branch information
Fred Barnes authored and Fred Barnes committed Oct 30, 2019
2 parents 6e28985 + 47e5cf3 commit eb504c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/aquilon/aqdb/utils/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
'cluster_id': 'clstr',
'personality_id': 'pers',
'archetype_id': 'arch',
'user_type_id': 'usrtype',
}


Expand All @@ -111,7 +112,6 @@ def ref_constraint_name(local_table, remote_table=None, column=None, suffix=None
# - Abbreviate from right to left. In this case, it means trying to
# abbreviate the column name first, if that's not enough then the remote
# table, if even that's not enough then the local table name.

local_abbrev = _table_abbrev.get(local_table, local_table)

if remote_table:
Expand All @@ -136,7 +136,6 @@ def ref_constraint_name(local_table, remote_table=None, column=None, suffix=None
name = "_".join(items)
if len(name) <= 30:
return name

raise AquilonError("Cannot abbreviate (%s, %s, %s)" %
(local_table, remote_table, column))

Expand Down Expand Up @@ -176,7 +175,6 @@ def multi_col_constraint_name(table_name, columns, suffix):
"_".join(col_names), suffix)
if len(name) <= 30:
return name

raise AquilonError("Cannot abbreviate (%s, %s)" %
(table_name, ", ".join(list(columns.keys()))))

Expand Down

0 comments on commit eb504c8

Please sign in to comment.