Skip to content

Commit

Permalink
Add SQLite support with new creation script and Makefile.PL mention
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Stosberg committed Dec 16, 2005
1 parent dd26a98 commit ffcf1dc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -3,6 +3,7 @@ MANIFEST
Makefile.PL
create_uploader_table.Pg.sql
create_uploader_table.mysql.sql
create_uploader_table.SQLite.sql
lib/CGI/Uploader.pm
lib/CGI/Uploader/Cookbook.pod
lib/CGI/Uploader/Transform/ImageMagick.pm
Expand Down
8 changes: 5 additions & 3 deletions Makefile.PL
Expand Up @@ -8,9 +8,11 @@ use Data::Dumper ();
my $TESTDB = "test";

use vars qw($opt);
$opt =
{ "help" => \&Usage,
};
$opt = {
"help" => \&Usage ,
testdsn => 'dbi:SQLite:dbname=t/test.db',
};

Getopt::Long::GetOptions($opt, "help", "testdsn=s", "testuser=s","testpassword=s");
my $source = {};

Expand Down
12 changes: 12 additions & 0 deletions create_uploader_table.SQLite.sql
@@ -0,0 +1,12 @@
CREATE TABLE uploads (
-- Notice AUTOINCREMENT has no underscore like MySQL does.
upload_id INTEGER primary key AUTOINCREMENT NOT NULL,
file_name character varying(255),
mime_type character varying(64),
extension character varying(8), -- file extension
width integer,
height integer,

-- refer to the ID of the image used to create this thumbnail, if any
gen_from_id integer
)

0 comments on commit ffcf1dc

Please sign in to comment.