2023-11-23 04:21:19 +00:00
|
|
|
use Humming-Bird::Core;
|
|
|
|
use Humming-Bird::Middleware;
|
|
|
|
use Humming-Bird::Advice;
|
|
|
|
use DB::Migration::Simple;
|
|
|
|
use DBIish;
|
|
|
|
|
|
|
|
# Local libs
|
2023-12-03 04:55:36 +00:00
|
|
|
use Pastes-Bin::Controller::Paste;
|
2023-11-23 04:21:19 +00:00
|
|
|
|
|
|
|
# Logging
|
|
|
|
middleware &middleware-logger;
|
|
|
|
advice &advice-logger;
|
|
|
|
|
|
|
|
# Database stuff
|
2023-12-03 04:03:20 +00:00
|
|
|
my $*dbh = DBIish.connect:
|
2023-11-23 04:21:19 +00:00
|
|
|
'Pg',
|
|
|
|
:host<devbussy.swagg.net>,
|
|
|
|
:database<pastes_bin>,
|
|
|
|
:user<pastes_bin>,
|
|
|
|
password => prompt 'enter DB password: ';
|
|
|
|
|
|
|
|
my $m = DB::Migration::Simple.new:
|
2023-12-03 04:03:20 +00:00
|
|
|
:$*dbh,
|
2023-11-23 04:21:19 +00:00
|
|
|
:migration-file<migrations>,
|
|
|
|
:verbose;
|
|
|
|
|
|
|
|
$m.migrate: :version<1>;
|