X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FVersioned.pm;h=95adc66b0daf2138187c2dabd1c80a457e8b67ed;hb=77c3a5dca478801246ff728f80a0c5013e57f4a2;hp=424c9eec481460ff406fff26256a33d077210775;hpb=0c11ad0ee5c8407f6b87d6e15c62a1b445076dc0;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 424c9ee..95adc66 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -109,7 +109,7 @@ Downgrades in addition to upgrades =item * -Multiple sql files files per upgrade/downgrade/install +Multiple sql files per upgrade/downgrade/install =item * @@ -298,7 +298,7 @@ sub create_upgrade_path { =over 4 -=item Returns: a list of version numbers, ordered from lowest to highest +=item Return Value: a list of version numbers, ordered from lowest to highest =back @@ -603,7 +603,7 @@ sub _on_connect my $vtable_compat = DBIx::Class::VersionCompat->connect(@$conn_info)->resultset('TableCompat'); if ($self->_source_exists($vtable_compat)) { $self->{vschema}->deploy; - map { $vtable->create({ installed => $_->Installed, version => $_->Version }) } $vtable_compat->all; + map { $vtable->new_result({ installed => $_->Installed, version => $_->Version })->insert } $vtable_compat->all; $self->storage->_get_dbh->do("DROP TABLE " . $vtable_compat->result_source->from); } } @@ -710,7 +710,7 @@ sub _set_db_version { # formatted by this new function will sort _after_ any existing 200... strings. my @tm = gettimeofday(); my @dt = gmtime ($tm[0]); - my $o = $vtable->create({ + my $o = $vtable->new_result({ version => $version, installed => sprintf("v%04d%02d%02d_%02d%02d%02d.%03.0f", $dt[5] + 1900, @@ -721,7 +721,7 @@ sub _set_db_version { $dt[0], int($tm[1] / 1000), # convert to millisecs ), - }); + })->insert; } sub _read_sql_file {