From 35eb60a27f3f7b7ace781d9a85aad83b43d27865 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 9 Mar 2018 20:03:07 +0100 Subject: [PATCH] Remove now unused Lutim::DB::SQLite --- lib/Lutim/DB/SQLite.pm | 55 ------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 lib/Lutim/DB/SQLite.pm diff --git a/lib/Lutim/DB/SQLite.pm b/lib/Lutim/DB/SQLite.pm deleted file mode 100644 index f5e82ce..0000000 --- a/lib/Lutim/DB/SQLite.pm +++ /dev/null @@ -1,55 +0,0 @@ -# vim:set sw=4 ts=4 sts=4 ft=perl expandtab: -package Lutim::DB::SQLite; -use Mojolicious; -use Mojo::File; -use FindBin qw($Bin); - -BEGIN { - my $m = Mojolicious->new; - my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf'); - if (defined $ENV{MOJO_CONFIG}) { - $cfile = Mojo::File->new($ENV{MOJO_CONFIG}); - unless (-e $cfile->to_abs) { - $cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG}); - } - } - our $config = $m->plugin('Config' => - { - file => $cfile->to_abs->to_string, - default => { - db_path => 'lutim.db' - } - } - ); -} - -# Create database -use ORLite { - file => $config->{db_path}, - unicode => 1, - create => sub { - my $dbh = shift; - $dbh->do( - 'CREATE TABLE lutim ( - short TEXT PRIMARY KEY, - path TEXT, - footprint TEXT, - enabled INTEGER, - mediatype TEXT, - filename TEXT, - counter INTEGER, - delete_at_first_view INTEGER, - delete_at_day INTEGER, - created_at INTEGER, - created_by TEXT, - last_access_at INTEGER, - mod_token TEXT, - width INTEGER, - height INTEGER, - iv TEXT)' - ); - return 1; - } -}; - -1;