sub upgrade {
my $self = shift;
while ( my $version_list = $self->next_version_set ) {
- $self->_upgrade_single_step($version_list);
+ my ($ddl, $upgrade_sql) = @{$self->_upgrade_single_step($version_list)||[]};
$self->add_database_version({
version => $version_list->[-1],
- # ddl => $ddl,
- # upgrade_sql => $upgrade_sql,
+ ddl => $ddl,
+ upgrade_sql => $upgrade_sql,
});
}
}
method backup { $self->storage->backup($self->backup_directory) }
+method deploy_version_storage {
+ $self->
+}
+
__PACKAGE__->meta->make_immutable;
1;
\@version_set,
)};
+ my $upgrade_sql;
for my $upgrade_file (@upgrade_files) {
- $self->_filedata($self->_read_sql_file($upgrade_file)); # I don't like this --fREW 2010-02-22
+ my $up = $self->_read_sql_file($upgrade_file);
+ $upgrade_sql .= $up;
+ $self->_filedata($up); # I don't like this --fREW 2010-02-22
my $guard = $self->schema->txn_scope_guard if $self->txn_wrap;
$self->_do_upgrade;
$guard->commit if $self->txn_wrap;
}
+ return ['', $upgrade_sql];
}
method _do_upgrade { $self->_run_upgrade(qr/.*?/) }