wiki:jazz/08-03-28

Version 5 (modified by jazz, 17 years ago) (diff)

--

Week Report

  • 2008-03-24
    • [陽明生資] 取得實驗用主機
    • 如何使用 sqlite3 把 Trac Ticket 裡的廣告拿掉
      $ sudo apt-get install sqlite3
      $ sudo sqlite3 /forge/trac_pool/edublog/db/trac.db
      sqlite> select * from ticket_change where author="anonymous";
      
      1|1206200969|anonymous|comment|5|[http://hi.baidu.com/zlgdgzl baidu ] [http://zlgdgzl.blog.163.com/ 163] 
      .... Skiped ....
      
      sqlite> delete from ticket_change where time=1206200969;
      
    • 如何查 SQLite 資料庫定義
      • 參考: SQLite 簡介 (1)
        sqlite> .schema
        CREATE TABLE attachment (
            type text,
            id text,
            filename text,
            size integer,
            time integer,
            description text,
            author text,
            ipnr text,
            UNIQUE (type,id,filename)
        );
        CREATE TABLE auth_cookie (
            cookie text,
            name text,
            ipnr text,
            time integer,
            UNIQUE (cookie,ipnr,name)
        );
        CREATE TABLE component (
            name text PRIMARY KEY,
            owner text,
            description text
        );
        CREATE TABLE enum (
            type text,
            name text,
            value text,
            UNIQUE (type,name)
        );
        CREATE TABLE milestone (
            name text PRIMARY KEY,
            due integer,
            completed integer,
            description text
        );
        CREATE TABLE node_change (
            rev text,
            path text,
            node_type text,
            change_type text,
            base_path text,
            base_rev text,
            UNIQUE (rev,path,change_type)
        );
        CREATE TABLE permission (
            username text,
            action text,
            UNIQUE (username,action)
        );
        CREATE TABLE report (
            id integer PRIMARY KEY,
            author text,
            title text,
            query text,
            description text
        );
        CREATE TABLE revision (
            rev text PRIMARY KEY,
            time integer,
            author text,
            message text
        );
        CREATE TABLE session (
            sid text,
            authenticated integer,
            last_visit integer,
            UNIQUE (sid,authenticated)
        );
        CREATE TABLE session_attribute (
            sid text,
            authenticated integer,
            name text,
            value text,
            UNIQUE (sid,authenticated,name)
        );
        CREATE TABLE system (
            name text PRIMARY KEY,
            value text
        );
        CREATE TABLE ticket (
            id integer PRIMARY KEY,
            type text,
            time integer,
            changetime integer,
            component text,
            severity text,
            priority text,
            owner text,
            reporter text,
            cc text,
            version text,
            milestone text,
            status text,
            resolution text,
            summary text,
            description text,
            keywords text
        );
        CREATE TABLE ticket_change (
            ticket integer,
            time integer,
            author text,
            field text,
            oldvalue text,
            newvalue text,
            UNIQUE (ticket,time,field)
        );
        CREATE TABLE ticket_custom (
            ticket integer,
            name text,
            value text,
            UNIQUE (ticket,name)
        );
        CREATE TABLE version (
            name text PRIMARY KEY,
            time integer,
            description text
        );
        CREATE TABLE wiki (
            name text,
            version integer,
            time integer,
            author text,
            ipnr text,
            text text,
            comment text,
            readonly integer,
            UNIQUE (name,version)
        );
        CREATE INDEX node_change_rev_idx ON node_change (rev);
        CREATE INDEX revision_time_idx ON revision (time);
        CREATE INDEX session_authenticated_idx ON session (authenticated);
        CREATE INDEX session_last_visit_idx ON session (last_visit);
        CREATE INDEX ticket_change_ticket_idx ON ticket_change (ticket);
        CREATE INDEX ticket_change_time_idx ON ticket_change (time);
        CREATE INDEX ticket_status_idx ON ticket (status);
        CREATE INDEX ticket_time_idx ON ticket (time);
        CREATE INDEX wiki_time_idx ON wiki (time);
        sqlite> .tables
        attachment         node_change        session_attribute  version
        auth_cookie        permission         system             wiki
        component          report             ticket
        enum               revision           ticket_change
        milestone          session            ticket_custom
        sqlite>
        
  • 2008-03-25
  • 2008-03-26
  • 2008-03-27
  • 2008-03-28
    • 小組讀書會