diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-12-16 15:31:52 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-12-16 15:31:52 +0100 |
commit | 9174e85d23c795d30e7f6c72c3f90177d0e04bed (patch) | |
tree | 9e4daa057424bc0fa027cb7837256d726a821cad | |
parent | 19cf82871c56c3174233444eeb02a97f52cd3d1d (diff) | |
download | bin-9174e85d23c795d30e7f6c72c3f90177d0e04bed.zip bin-9174e85d23c795d30e7f6c72c3f90177d0e04bed.tar.gz |
dia2pg: fix --oids
-rwxr-xr-x | dia2pg.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |