8 my $self = { db
=> "/tmp/common-rdbo-helper.db" };
18 my $db = $self->{ db
};
21 warn 'Creating new db...';
23 my $dbh = DBI
->connect( "dbi:SQLite:$db" ) or die $DBI::errstr
;
27 `id` INTEGER PRIMARY KEY NOT NULL,
28 `addtime` INTEGER NOT NULL,
29 `title` VARCHAR(255) NOT NULL,
30 `content` VARCHAR(255) NOT NULL
35 CREATE TABLE `article` (
36 `id` INTEGER PRIMARY KEY NOT NULL,
37 `addtime` INTEGER NOT NULL,
38 `title` VARCHAR(255) NOT NULL,
39 `content` VARCHAR(255) NOT NULL
45 id INTEGER PRIMARY KEY NOT NULL,
46 name VARCHAR NOT NULL,
52 CREATE TABLE post_tag_map (
53 post_id INTEGER KEY NOT NULL,
54 tag_id INTEGER NOT NULL,
55 PRIMARY KEY(post_id, tag_id)
60 CREATE TABLE comment (
61 id INTEGER PRIMARY KEY NOT NULL,
62 master_id INTEGER NOT NULL,
65 `addtime` INTEGER NOT NULL,
75 id INTEGER PRIMARY KEY NOT NULL,
76 master_id INTEGER NOT NULL,
79 `addtime` INTEGER NOT NULL,
100 This library is free software, you can redistribute it and/or modify
101 it under the same terms as Perl itself.