Skip to content

Commit febbf16

Browse files
committed
Fix duplication of modules during db update run
The tag work changed primary key of Dist table and this made ->update_or_create fail to update existing stuff, since we're not passing it the primary key. So it dupes the modules during build, and at the end of the build the originals get assumed to be old, deleted dists and are tossed. Fix by using meta URL as primary column.
1 parent 099958e commit febbf16

File tree

1 file changed

+1
-2
lines changed
  • lib/ModulesPerl6/Model/Dists/Schema/Result

1 file changed

+1
-2
lines changed

lib/ModulesPerl6/Model/Dists/Schema/Result/Dist.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package ModulesPerl6::Model::Dists::Schema::Result::Dist;
22
use ModulesPerl6::Model::ResultClass;
33

4-
primary_column dist_id => { data_type => 'integer', auto_increment => 1};
5-
column meta_url => { data_type => 'text', };
4+
primary_column meta_url => { data_type => 'text', };
65
column name => { data_type => 'text' };
76
column author_id => { data_type => 'text', is_foreign_key => 1 };
87
column build_id => { data_type => 'text', is_foreign_key => 1 };

0 commit comments

Comments
 (0)