Strip down deploy db script to basics
This commit is contained in:
parent
e2a56227c8
commit
6940006b06
1 changed files with 0 additions and 35 deletions
|
@ -13,38 +13,3 @@ my @con = @ARGV;
|
||||||
my $schema = Pear::LocalLoop::Schema->connect(@con);
|
my $schema = Pear::LocalLoop::Schema->connect(@con);
|
||||||
|
|
||||||
$schema->deploy;
|
$schema->deploy;
|
||||||
|
|
||||||
$schema->resultset('AgeRange')->populate([
|
|
||||||
[ qw/ string / ],
|
|
||||||
[ '20-35' ],
|
|
||||||
[ '35-50' ],
|
|
||||||
[ '50+' ],
|
|
||||||
]);
|
|
||||||
|
|
||||||
$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' ],
|
|
||||||
]);
|
|
||||||
|
|
||||||
if (defined $ENV{MOJO_MODE} && $ENV{MOJO_MODE} eq 'development' ) {
|
|
||||||
|
|
||||||
$schema->resultset('User')->create({
|
|
||||||
email => 'test@example.com',
|
|
||||||
password => 'abc123',
|
|
||||||
customer => {
|
|
||||||
full_name => 'Test User',
|
|
||||||
display_name => 'Test User',
|
|
||||||
age_range_id => 1,
|
|
||||||
postcode => 'LA1 1AA',
|
|
||||||
},
|
|
||||||
administrator => {},
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Reference in a new issue