Changeset 15 in bookmarks for trunk/bookmarks.sql


Ignore:
Timestamp:
02/09/13 21:02:43 (12 years ago)
Author:
peter
Message:
  • Bookmarks uses Moose instead of Class::Accessor
  • if not dbh is specified in the Bookmarks constructor, it can use a dbname parameter to create a SQLite DBH
  • the SQLite DBH created form dbname has the foreign_keys pragma set
  • added foreign key constraints to the bookmarks.sql table definitions for bookmarks and tags
  • added a required --file option to bkmk to specify the database file to use
  • added a load command to bkmk that loads bookmarks dumped as YAML using bkmk list
  • Bookmarks::add() can take mtime and id parameters (useful for reconstructing a database from the YAML dump of bkmk list)
  • BookmarkApp and bkmk no longer use DBI directly; just pass a dbname to the Bookmarks constructor
  • changed the default database for BookmarkApp to fk.db (schema from this revision's updated bookmarks.sql, with foreign keys)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bookmarks.sql

    r2 r15  
    88create table bookmarks ( 
    99    id integer primary key, 
    10     uri varchar, 
     10    uri varchar references resources(uri) on update cascade, 
    1111    ctime integer, -- creation time of the bookmark 
    1212    mtime integer,  -- modification time of the bookmark 
     
    3434-- TODO: machine-tag style tags? e.g. format:video or creator:NASA; implicit tag prefix is "subject:" 
    3535create table tags ( 
    36     uri varchar, 
     36    uri varchar references resources(uri) on update cascade, 
    3737    tag varchar, 
    3838    constraint unique_tag primary key (uri, tag) 
Note: See TracChangeset for help on using the changeset viewer.