From 9174e85d23c795d30e7f6c72c3f90177d0e04bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 16 Dec 2016 15:31:52 +0100 Subject: dia2pg: fix --oids --- dia2pg.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dia2pg.rb b/dia2pg.rb index cf02445..3937da4 100755 --- a/dia2pg.rb +++ b/dia2pg.rb @@ -42,7 +42,7 @@ options.verbose = false options.input = nil options.drop = false options.create = false -options.odids = false +options.oids = false options.user = 'postgres' options.tbl_prefix = nil # @@ -152,8 +152,8 @@ class Table uq.each do |k,v| r << " UNIQUE(#{v.join ','}),\n" unless v.empty? end r << " CONSTRAINT pk_#{name} PRIMARY KEY (#{pk.join ','})\n" if pk.length>0 r.sub!(/,\n$/,"\n") - r << ")\nWITH (\n OIDS=#{@opts.oids ? 'TRUE' : 'FALSE'}\n);\n" - r << "ALTER TABLE #{name} OWNER TO #{@opts.user};\n" + r << ") WITH ( OIDS='FALSE' " if @opts.oids + r << ");\nALTER TABLE #{name} OWNER TO #{@opts.user};\n" idx.each do |k,v| r << "CREATE INDEX ON #{name} (#{v.join ','});\n" end r end -- cgit v1.1-2-g2b99