mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Removed use of table.description, add a _original_name to it instead
This commit is contained in:
parent
591d3bb4dd
commit
0d9d44ca03
2 changed files with 5 additions and 5 deletions
|
@ -49,7 +49,7 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''):
|
||||||
# Easy solution : drop the vowels, differents words are unlikely to
|
# Easy solution : drop the vowels, differents words are unlikely to
|
||||||
# end up the same after the vowels are gone
|
# end up the same after the vowels are gone
|
||||||
for table in metadata.tables.values():
|
for table in metadata.tables.values():
|
||||||
table.description = table.name[:]
|
table._orginal_name = table.name[:]
|
||||||
if len(table.name) > 30:
|
if len(table.name) > 30:
|
||||||
for letter in ['a', 'e', 'i', 'o', 'u', 'y']:
|
for letter in ['a', 'e', 'i', 'o', 'u', 'y']:
|
||||||
table.name=table.name.replace(letter,'')
|
table.name=table.name.replace(letter,'')
|
||||||
|
|
|
@ -147,12 +147,12 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
|
||||||
|
|
||||||
# Shorten table names, Oracle limits table and column names to 30 chars
|
# Shorten table names, Oracle limits table and column names to 30 chars
|
||||||
for table in table_objs:
|
for table in table_objs:
|
||||||
tname = table.name[:]
|
table._orginal_name = table.name[:]
|
||||||
oradict[tname]=table.description
|
oradict[table.name]=table._orginal_name
|
||||||
if len(tname) > 30:
|
if len(table._orginal_name) > 30:
|
||||||
for letter in ['a', 'e', 'i', 'o', 'u', 'y']:
|
for letter in ['a', 'e', 'i', 'o', 'u', 'y']:
|
||||||
table.name=table.name.replace(letter,'')
|
table.name=table.name.replace(letter,'')
|
||||||
oradict[tname]=table.description
|
oradict[table.name]=table._orginal_name
|
||||||
|
|
||||||
if recursive:
|
if recursive:
|
||||||
table_objs.extend(find_dependent_tables(table_objs))
|
table_objs.extend(find_dependent_tables(table_objs))
|
||||||
|
|
Loading…
Reference in a new issue