summaryrefslogtreecommitdiffstats
path: root/dia2pg.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-01-17 13:51:33 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-01-17 13:51:33 +0100
commitb8221053ee727468d192ad87b1fbebbe6f1918a0 (patch)
tree5ea1509d46f92b9a2fc0a0df38842a4bf535ab33 /dia2pg.rb
parenta96b97f22b91f71725adaf4d8c6b262328db1bf2 (diff)
downloadbin-b8221053ee727468d192ad87b1fbebbe6f1918a0.zip
bin-b8221053ee727468d192ad87b1fbebbe6f1918a0.tar.gz
dia2pg.rb: fix no_rename
Diffstat (limited to 'dia2pg.rb')
-rwxr-xr-xdia2pg.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/dia2pg.rb b/dia2pg.rb
index cbb8a31..854d65c 100755
--- a/dia2pg.rb
+++ b/dia2pg.rb
@@ -190,7 +190,9 @@ class Attribute
end
#
def real_name
- if foreign? and not no_rename?
+ if no_rename?
+ @name
+ elsif foreign?
rl = RELATIONS.find { |r| r.tbl_to==@tbl and r.attr_to.name==@name }
if rl.nil?
$stderr << "MISSING RELATION FOR FOREIGN KEY table:#{@tbl.name} attribute:#{@name}\n"