diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-06-17 16:19:38 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-06-17 16:19:38 +0200 |
commit | c6e74ef695f8b1c567275f175e31be39a456e536 (patch) | |
tree | 7fa35556db8a6e4b0f8d8e66f0a12b8263155828 /dia2pg.rb | |
parent | 7d03636e06c8c10f7bd313a28bb09836299d9d1c (diff) | |
download | bin-c6e74ef695f8b1c567275f175e31be39a456e536.zip bin-c6e74ef695f8b1c567275f175e31be39a456e536.tar.gz |
dia2pg : support field comment tag default=_expr_
Diffstat (limited to 'dia2pg.rb')
-rwxr-xr-x | dia2pg.rb | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -189,6 +189,13 @@ class Attribute @comment=~/no_export=1/ end # + def default + return '' if @comment.nil? + @comment=~/default=(.*)$/ + return '' if $1.nil? + return " DEFAULT "+$1.to_s + end + # def real_name if not no_rename? and foreign? rl = RELATIONS.find { |r| r.tbl_to==@tbl and r.attr_to.name==@name } @@ -227,6 +234,7 @@ class Attribute else r << "#{type} NOT NULL" end + r << default r << ",\n" end # |