use drzb2013v2 database
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 7 Jan 2013 21:31:45 +0000 (22:31 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 7 Jan 2013 21:31:45 +0000 (22:31 +0100)
app/js/services.js
app/partials/list.html
migrate-db.pl

index 4cafe6c..04bc7db 100644 (file)
@@ -34,7 +34,7 @@ angular.module('myApp.services', [ 'ngResource' ]).
 
        }).
        factory('Registration', function($resource){
-               return $resource('/data/:database/registration/:registrationId', { database: 'drzb2013' }, {
+               return $resource('/data/:database/registration/:registrationId', { database: 'drzb2013v2' }, {
                        query: {method:'GET', params:{registraionId:'@id'}, isArray:true}
                });
        });
index 8fab4db..8afffec 100644 (file)
@@ -36,7 +36,7 @@ Search:
  <a href="#/registration/{{registration.id}}">edit</a>
  {{registration.user.registration_type}}
  <tt>{{registration._id}}</tt>
- <a href="http://10.60.0.92:5984/_utils/document.html?drzb2013/{{registration._id}}" target="drzb">db</a>
+ <a href="http://10.60.0.92:5984/_utils/document.html?drzb2013v2/{{registration._id}}" target="drzb">db</a>
 
        <p>
         {{registration.user.firstname}}
index a630d08..0ddd1eb 100755 (executable)
@@ -8,7 +8,7 @@ use Data::Dump qw(dump);
 my $ua = Mojo::UserAgent->new;
 
 my $from = 'http://10.60.0.95:5984/drzb2013';
-my $to   = 'http://10.60.0.92:5984/drzb2013';
+my $to   = 'http://10.60.0.92:5984/drzb2013v2';
 
 my $docs = $ua->get("$from/_all_docs?include_docs=true")->res->json;
 
@@ -66,7 +66,7 @@ foreach my $doc ( map { $_->{doc} } @{ $docs->{rows} } ) {
        my $id = $new->{_id} || die "no _id in new";
        my $result = $ua->put("$to/$id" => Mojo::JSON->new->encode( $new ))->res->json;
 
-       die "ERROR $id ",dump($result) unless $result->{ok};
+       die "ERROR $to/$id ",dump($result) unless $result->{ok};
 
        warn "SAVED $id into $to\n";