git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
94e3e76
)
- modified fix_row(): skip records in person_keys table marked as deleted
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 31 Jan 2007 17:00:09 +0000
(17:00 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 31 Jan 2007 17:00:09 +0000
(17:00 +0000)
tools/upgrade-db.py
patch
|
blob
|
history
diff --git
a/tools/upgrade-db.py
b/tools/upgrade-db.py
index
7f6dade
..
70774dc
100755
(executable)
--- a/
tools/upgrade-db.py
+++ b/
tools/upgrade-db.py
@@
-145,6
+145,10
@@
def fix_row(row, table_name, table_fields):
elif row[bwlimit_index].find('kbit') > -1:
row[bwlimit_index] = int(row[bwlimit_index].split('kbit')[0]) \
* 1000
+ elif table_name in ['person_keys']:
+ deleted_index = table_fields.index('deleted')
+ if row[deleted_index] == True:
+ return None
elif table_name in ['slice_attribute']:
# modify some invalid foreign keys
attribute_type_index = table_fields.index('attribute_type_id')