Trac研究 (01) 表结构

sql 代码
  1. CREATE TABLE system (   
  2.     name text PRIMARY KEY,   
  3.     value text   
  4. )   
  5.   
  6. CREATE TABLE permission (   
  7.     username text,   
  8.     action text,   
  9.     UNIQUE (username,action)   
  10. )   
  11.   
  12. CREATE TABLE auth_cookie (   
  13.     cookie text,   
  14.     name text,   
  15.     ipnr text,   
  16.     time integer,   
  17.     UNIQUE (cookie,ipnr,name)   
  18. )   
  19.   
  20. CREATE TABLE session (   
  21.     sid text,   
  22.     authenticated integer,   
  23.     last_visit integer,   
  24.     UNIQUE (sid,authenticated)   
  25. )   
  26.   
  27. CREATE INDEX session_last_visit_idx ON session (last_visit)   
  28. CREATE INDEX session_authenticated_idx ON session (authenticated)   
  29. CREATE TABLE session_attribute (   
  30.     sid text,   
  31.     authenticated integer,   
  32.     name text,   
  33.     value text,   
  34.     UNIQUE (sid,authenticated,name)   
  35. )   
  36.   
  37. CREATE TABLE attachment (   
  38.     type text,   
  39.     id text,   
  40.     filename text,   
  41.     size integer,   
  42.     time integer,   
  43.     description text,   
  44.     author text,   
  45.     ipnr text,   
  46.     UNIQUE (type,id,filename)   
  47. )   
  48.   
  49. CREATE TABLE wiki (   
  50.     name text,   
  51.     version integer,   
  52.     time integer,   
  53.     author text,   
  54.     ipnr text,   
  55.     text text,   
  56.     comment text,   
  57.     readonly integer,   
  58.     UNIQUE (name,version)   
  59. )   
  60.   
  61. CREATE INDEX wiki_time_idx ON wiki (time)   
  62. CREATE TABLE revision (   
  63.     rev text PRIMARY KEY,   
  64.     time integer,   
  65.     author text,   
  66.     message text   
  67. )   
  68.   
  69. CREATE INDEX revision_time_idx ON revision (time)   
  70. CREATE TABLE node_change (   
  71.     rev text,   
  72.     path text,   
  73.     node_type text,   
  74.     change_type text,   
  75.     base_path text,   
  76.     base_rev text,   
  77.     UNIQUE (rev,path,change_type)   
  78. )   
  79.   
  80. CREATE INDEX node_change_rev_idx ON node_change (rev)   
  81. CREATE TABLE ticket (   
  82.     id integer PRIMARY KEY,   
  83.     type text,   
  84.     time integer,   
  85.     changetime integer,   
  86.     component text,   
  87.     severity text,   
  88.     priority text,   
  89.     owner text,   
  90.     reporter text,   
  91.     cc text,   
  92.     version text,   
  93.     milestone text,   
  94.     status text,   
  95.     resolution text,   
  96.     summary text,   
  97.     description text,   
  98.     keywords text   
  99. )   
  100. CREATE INDEX ticket_time_idx ON ticket (time)   
  101. CREATE INDEX ticket_status_idx ON ticket (status)   
  102. CREATE TABLE ticket_change (   
  103.     ticket integer,   
  104.     time integer,   
  105.     author text,   
  106.     field text,   
  107.     oldvalue text,   
  108.     newvalue text,   
  109.     UNIQUE (ticket,time,field)   
  110. )   
  111.   
  112. CREATE INDEX ticket_change_ticket_idx ON ticket_change (ticket)   
  113. CREATE INDEX ticket_change_time_idx ON ticket_change (time)   
  114. CREATE TABLE ticket_custom (   
  115.     ticket integer,   
  116.     name text,   
  117.     value text,   
  118.     UNIQUE (ticket,name)   
  119. )   
  120.   
  121. CREATE TABLE enum (   
  122.     type text,   
  123.     name text,   
  124.     value text,   
  125.     UNIQUE (type,name)   
  126. )   
  127.   
  128. CREATE TABLE component (   
  129.     name text PRIMARY KEY,   
  130.     owner text,   
  131.     description text   
  132. )   
  133.   
  134. CREATE TABLE milestone (   
  135.     name text PRIMARY KEY,   
  136.     due integer,   
  137.     completed integer,   
  138.     description text   
  139. )   
  140.   
  141. CREATE TABLE version (   
  142.     name text PRIMARY KEY,   
  143.     time integer,   
  144.     description text   
  145. )   
  146.   
  147. CREATE TABLE report (   
  148.     id integer PRIMARY KEY,   
  149.     author text,   
  150.     title text,   
  151.     query text,   
  152.     description text   
  153. )  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值