Added initialisation of Leaderboards to DH
This commit is contained in:
parent
f136b0baab
commit
60918800b3
1 changed files with 24 additions and 0 deletions
24
share/ddl/_common/deploy/_any/100-leaderboards.pl
Normal file
24
share/ddl/_common/deploy/_any/100-leaderboards.pl
Normal file
|
@ -0,0 +1,24 @@
|
|||
#! perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::ScriptHelpers
|
||||
'schema_from_schema_loader';
|
||||
|
||||
schema_from_schema_loader({ naming => 'v7' }, sub {
|
||||
my $schema = shift;
|
||||
|
||||
$schema->resultset('Leaderboard')->populate([
|
||||
[ qw/ name type / ],
|
||||
[ 'Daily Total', 'daily_total' ],
|
||||
[ 'Daily Count', 'daily_count' ],
|
||||
[ 'Weekly Total', 'weekly_total' ],
|
||||
[ 'Weekly Count', 'weekly_count' ],
|
||||
[ 'Monthly Total', 'monthly_total' ],
|
||||
[ 'Monthly Count', 'monthly_count' ],
|
||||
[ 'All Time Total', 'all_time_total' ],
|
||||
[ 'All Time Count', 'all_time_count' ],
|
||||
]);
|
||||
|
||||
});
|
Reference in a new issue