use DBIx::DBSchema::Table;
use DBIx::DBSchema::Column;
use DBIx::DBSchema::Index;
+#can't use this yet, dependency bs #use FS::Conf;
@ISA = qw(Exporter);
@EXPORT_OK = qw( dbdef dbdef_dist reload_dbdef );
=cut
sub dbdef_dist {
- my $datasrc = @_ ? shift : '';
+ my $datasrc = @_ && !ref($_[0]) ? shift : '';
+ my $opt = @_ ? shift : {};
my $local_options = '';
if ( $datasrc =~ /^dbi:mysql/i ) {
grep { ! /^clientapi_session/
&& ! /^h_/
&& ! /^log(_context)?$/
+ && ( ! /^queue(_arg)?$/ || ! $opt->{'queue-no_history'} )
&& ! $tables_hashref_torrus->{$_}
}
$dbdef->tables
'index' => [ [ 'derivenum', ], ],
},
+ 'invoice_mode' => {
+ 'columns' => [
+ 'modenum', 'serial', '', '', '', '',
+ 'agentnum', 'int', 'NULL', '', '', '',
+ 'modename', 'varchar', '', 32, '', '',
+ ],
+ 'primary_key' => 'modenum',
+ 'unique' => [ ],
+ 'index' => [ ],
+ },
+
+ 'invoice_conf' => {
+ 'columns' => [
+ 'confnum', 'serial', '', '', '', '',
+ 'modenum', 'int', '', '', '', '',
+ 'locale', 'varchar', 'NULL', 16, '', '',
+ 'notice_name', 'varchar', 'NULL', 64, '', '',
+ 'subject', 'varchar', 'NULL', 64, '', '',
+ 'htmlnotes', 'text', 'NULL', '', '', '',
+ 'htmlfooter', 'text', 'NULL', '', '', '',
+ 'htmlsummary', 'text', 'NULL', '', '', '',
+ 'htmlreturnaddress', 'text', 'NULL', '', '', '',
+ 'latexnotes', 'text', 'NULL', '', '', '',
+ 'latexfooter', 'text', 'NULL', '', '', '',
+ 'latexsummary', 'text', 'NULL', '', '', '',
+ 'latexcoupon', 'text', 'NULL', '', '', '',
+ 'latexsmallfooter', 'text', 'NULL', '', '', '',
+ 'latexreturnaddress', 'text', 'NULL', '', '', '',
+ 'latextopmargin', 'varchar', 'NULL', 16, '', '',
+ 'latexheadsep', 'varchar', 'NULL', 16, '', '',
+ 'latexaddresssep', 'varchar', 'NULL', 16, '', '',
+ 'latextextheight', 'varchar', 'NULL', 16, '', '',
+ 'latexextracouponspace','varchar', 'NULL', 16, '', '',
+ 'latexcouponfootsep', 'varchar', 'NULL', 16, '', '',
+ 'latexcouponamountenclosedsep', 'varchar', 'NULL', 16, '', '',
+ 'latexcoupontoaddresssep', 'varchar', 'NULL', 16, '', '',
+ 'latexverticalreturnaddress', 'char', 'NULL', 1, '', '',
+ 'latexcouponaddcompanytoaddress', 'char', 'NULL', 1, '', '',
+ 'logo_png', 'blob', 'NULL', '', '', '',
+ 'logo_eps', 'blob', 'NULL', '', '', '',
+ 'lpr', 'varchar', 'NULL', $char_d, '', '',
+ ],
+ 'primary_key' => 'confnum',
+ 'unique' => [ [ 'modenum', 'locale' ] ],
+ 'index' => [ ],
+ },
# name type nullability length default local