mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Sort out all the non-nullable columns with empty values.
This commit is contained in:
parent
7b2743be75
commit
5b759feaa2
4 changed files with 5 additions and 8 deletions
|
@ -23,7 +23,7 @@ id,pocket_id,identifier
|
|||
22,8,plot-advancement
|
||||
23,8,unused
|
||||
24,1,loot
|
||||
25,6,
|
||||
25,6,all-mail
|
||||
26,2,vitamins
|
||||
27,2,healing
|
||||
28,2,pp-recovery
|
||||
|
@ -34,7 +34,7 @@ id,pocket_id,identifier
|
|||
34,3,standard-balls
|
||||
35,1,dex-completion
|
||||
36,1,scarves
|
||||
37,4,
|
||||
37,4,all-machines
|
||||
38,7,flutes
|
||||
39,3,apricorn-balls
|
||||
40,8,apricorn-box
|
||||
|
|
|
|
@ -23,7 +23,7 @@ item_category_id,local_language_id,name
|
|||
22,9,Plot advancement
|
||||
23,9,Unused
|
||||
24,9,Loot
|
||||
25,9,
|
||||
25,9,All mail
|
||||
26,9,Vitamins
|
||||
27,9,Healing
|
||||
28,9,PP recovery
|
||||
|
@ -34,7 +34,7 @@ item_category_id,local_language_id,name
|
|||
34,9,Standard balls
|
||||
35,9,Dex completion
|
||||
36,9,Scarves
|
||||
37,9,
|
||||
37,9,All machines
|
||||
38,9,Flutes
|
||||
39,9,Apricorn balls
|
||||
40,9,Apricorn Box
|
||||
|
|
|
|
@ -261,9 +261,6 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
|
|||
|
||||
for column_name, value in zip(column_names, csvs):
|
||||
column = table_obj.c[column_name]
|
||||
# Oracle treats empty strings as NULL
|
||||
if not column.nullable and value == '' and oranames:
|
||||
value = ' '
|
||||
if column.nullable and value == '':
|
||||
# Empty string in a nullable column really means NULL
|
||||
value = None
|
||||
|
|
|
@ -1062,7 +1062,7 @@ class LocationArea(TableBase):
|
|||
|
||||
create_translation_table('location_area_prose', LocationArea, 'prose',
|
||||
relation_lazy='joined',
|
||||
name = Column(Unicode(64), nullable=False, index=True,
|
||||
name = Column(Unicode(64), nullable=True, index=True,
|
||||
info=dict(description="The name", format='plaintext', official=False)),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue