blob: 7b3ee1c7a6dd78e6335885414bc83db5c3ce79e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
use strict; use warnings; use DBI; use FindBin; use Path::Class; my $DBHOME=dir($FindBin::Bin)->parent->file('bookmarks.db'); my $db=DBI->connect("dbi:SQLite:$DBHOME"); local $/=''; while (<DATA>) { my $rv=$db->do($_); warn 'Problemi: '.$db->errstr() unless $rv; } __DATA__ drop table links_tags; drop table links; drop table tags; create table links ( pk integer primary key autoincrement, url text unique, title text, descr text, icon text, add_date integer, last_access_date integer, access_count integer ); create table tags ( pk integer primary key autoincrement, name text unique, descr text ); create table links_tags ( link integer, tag integer );
|