communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / bin / generate-table-module
index b3204fa..16a23e5 100755 (executable)
@@ -31,10 +31,12 @@ while (my $line = <SRC>) {
   if ( $line =~ /^=item\s+field\s+-\s+description\s*$/ ) {
 
     foreach my $column ( $dbdef_table->columns ) {
-      print DEST "=item $column - ";
-      print DEST "primary key"
-        if $column eq $primary_key;
-      print DEST "\n\n";
+      print DEST "=item $column\n\n";
+      if ( $column eq $primary_key ) {
+        print DEST "primary key\n\n";
+      } else {
+        print DEST "$column\n\n";
+      }
     }
     next;
 
@@ -64,6 +66,17 @@ close SRC;
 close DEST;
 
 ###
+# add to FS/FS/Mason.pm
+###
+
+# it needs to be:
+# 1. disablable (have an option to turn it off)
+# 2. documented in the schema change docs
+#
+#my $magic = '# Sammath Naur';
+#system("perl -pi -e 's/$magic/use FS::$table;\n  $magic/' FS/FS/Mason.pm");
+
+###
 # add FS/t/table.t
 ###