use strict;
use DBI;
-use DBIx::DBSchema 0.21;
+use DBIx::DBSchema 0.20;
use DBIx::DBSchema::Table;
use DBIx::DBSchema::Column;
use DBIx::DBSchema::ColGroup::Unique;
#false laziness w/fs-setup
my @tables = scalar(@ARGV)
? @ARGV
- : grep { ! /^h_/ } $schema->tables;
+ : grep { ! /^(h|pg)_/ } $schema->tables;
foreach my $table ( @tables ) {
next if grep { /^h_$table/ } $schema->tables;
warn "creating history table for $table\n";
'default' => '',
'local' => '',
} ),
- map {
- my $column = $tableobj->column($_);
- $column->type('int')
- if $column->type eq 'serial';
- $column->default('')
- if $column->default =~ /^nextval\(/i;
- ( my $local = $column->local ) =~ s/AUTO_INCREMENT//i;
- $column->local($local);
- $column;
- } $tableobj->columns
+ map { $tableobj->column($_) } $tableobj->columns
],
} );
foreach my $statement ( $h_tableobj->sql_create_table($dbh) ) {