Advertisement
TBotNik

tb_rules.sql

Nov 7th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 3.4.10.1deb1
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Oct 30, 2012 at 12:08 PM
  7. -- Server version: 5.5.24
  8. -- PHP Version: 5.3.10-1ubuntu3.4
  9.  
  10. -- Notes:
  11. -- The existence of the XRef Table allow application of the rules accross
  12. -- multiple profiles.
  13. -- The existence of the `rul_pri` field in the Rules Table allows for assignment
  14. -- of priority (order of appearance/execution - in all old TBird Rules) but only
  15. -- order of execution, letting sorted order appear in the new rules interface
  16. -- The existence of the Actions Table allows for future capabilities where
  17. -- Multiple rule actions can be assigned to each rule and execution in priority
  18. -- order under that rule.
  19.  
  20. --
  21. -- Database: `TBird_Rules`
  22. --
  23. DROP DATABASE IF EXISTS `TBird_Rules`;
  24. CREATE DATABASE IF NOT EXISTS `TBird_Rules`;
  25. USE `TBird_Rules`;
  26.  
  27. -- Table structure for table `tb_prof`
  28. DROP TABLE IF EXISTS `tb_prof`;
  29. CREATE TABLE IF NOT EXISTS `tb_prof` (
  30. `prf_idx` int(11) NOT NULL auto_increment COMMENT 'Unique TBird Profile Record',
  31. `prf_cpu` varchar(32) NOT NULL COMMENT 'TBird Profile CPU/Machine',
  32. `prf_lnk` varchar(222) NOT NULL COMMENT 'TBird Profile CPU/IP Link or Network Folder',
  33. `prf_nam` varchar(16) NOT NULL COMMENT 'TBird Profile Name',
  34. `prf_eml` varchar(32) NOT NULL COMMENT 'TBird Profile Name',
  35. `prf_typ` varchar(12) NOT NULL COMMENT 'TBird Profile Name',
  36. `prf_pth` varchar(222) NOT NULL COMMENT 'TBird Profile Path',
  37. `prf_fil` varchar(32) NOT NULL COMMENT 'TBird Profile File',
  38. PRIMARY KEY (`prf_idx`)
  39. ) COMMENT 'TBird Rules Profile Table';
  40.  
  41. -- Dumping data for table `tb_prof`
  42.  
  43. -- End data dump
  44.  
  45. -- Table structure for table `tb_cat`
  46. DROP TABLE IF EXISTS `tb_cat`;
  47. CREATE TABLE IF NOT EXISTS `tb_cat` (
  48. `cat_idx` int(11) NOT NULL auto_increment COMMENT 'Unique TBird Categories Record',
  49. `cat_nam` varchar(22) NOT NULL COMMENT 'TBird Category Name',
  50. `cat_pri` int(3) NOT NULL COMMENT 'TBird Category Priority',
  51. `cat_src` varchar(222) NOT NULL COMMENT 'TBird Category Source Dir/Folder',
  52. PRIMARY KEY (`cat_idx`)
  53. ) COMMENT 'TBird Rules Category Table';
  54.  
  55. -- Dumping data for table `tb_cat`
  56.  
  57. -- End data dump
  58.  
  59. -- Table structure for table `tb_xref`
  60. DROP TABLE IF EXISTS `tb_xref`;
  61. CREATE TABLE IF NOT EXISTS `tb_xref` (
  62. `xrf_idx` int(11) NOT NULL auto_increment COMMENT 'Unique XRef Record',
  63. `xrf_cdx` int(11) NOT NULL COMMENT 'XRef to Profiles Table',
  64. `xrf_pdx` int(11) NOT NULL COMMENT 'XRef to Profiles Table',
  65. `xrf_rdx` int(11) NOT NULL COMMENT 'XRef to Rules Table',
  66. PRIMARY KEY (`xrf_idx`,`xrf_pdx`,`xrf_rdx`)
  67. ) COMMENT 'TBird Rules XRef Table';
  68.  
  69. -- Dumping data for table `tb_xref`
  70.  
  71. -- End data dump
  72.  
  73. -- Table structure for table `tb_rules`
  74. DROP TABLE IF EXISTS `tb_rules`;
  75. CREATE TABLE IF NOT EXISTS `tb_rules` (
  76. `rul_idx` int(11) NOT NULL auto_increment COMMENT 'Unique TBird Profile Record',
  77. `rul_pdx` int(11) NOT NULL COMMENT 'TBird Rule Parent ID',
  78. `rul_nam` varchar(30) NOT NULL DEFAULT '' COMMENT 'TBird Rule Name',
  79. `rul_enb` enum('Yes','No') NOT NULL DEFAULT 'Yes' COMMENT 'TBird Rule Enabled (Yes/No)',
  80. `rul_fld` varchar(35) NOT NULL DEFAULT '' COMMENT 'TBird Rule Dir/Folder Name',
  81. `rul_typ` int(2) NOT NULL DEFAULT 0 COMMENT 'TBird Rule Type (Number)',
  82. `rul_pri` varchar(12) NOT NULL DEFAULT '' COMMENT 'TBird Rule Priority',
  83. PRIMARY KEY (`rul_idx`)
  84. ) COMMENT 'TBird Rules Table';
  85.  
  86. -- Dumping data for table `tb_rules`
  87.  
  88. -- End data dump
  89.  
  90. -- Explanation:
  91. -- This table is designed for current and future TBird Rules capabilites
  92. -- Field Explanations:
  93. -- Title ==> Name,
  94. -- Value ==> Action taken or Dir/Folder to write, copy, move email to.
  95. -- Condition ==> The condition that triggers the action (The actual rule).
  96. -- Folder ==> Rules Folder - Works with the "Parent ID" in the rules
  97. -- table to allow rule directories and sub-directories.
  98. -- Priority ==> The subpriority that the action runs on when mulitple
  99. -- actions are being run on the same rule (from the rules table).
  100. -- Source ==> Source Dir/Folder, allows running against non-INBOX folders
  101. -- when rules run automatically.
  102. -- Table structure for table `tb_acts`
  103. DROP TABLE IF EXISTS `tb_acts`;
  104. CREATE TABLE IF NOT EXISTS `tb_acts` (
  105. `act_idx` int(11) NOT NULL auto_increment COMMENT 'Unique TBird Profile Record',
  106. `act_rdx` int(11) NOT NULL COMMENT 'XRef to Rules Table',
  107. `act_act` varchar(36) NOT NULL DEFAULT '' COMMENT 'TBird Action Title',
  108. `act_avl` varchar(255) NOT NULL DEFAULT '' COMMENT 'TBird Action Value',
  109. `act_cnd` varchar(255) NOT NULL DEFAULT '' COMMENT 'TBird Action Condition',
  110. `act_fld` varchar(35) NOT NULL DEFAULT '' COMMENT 'TBird Action Dir/Folder Name',
  111. `act_pri` varchar(12) NOT NULL DEFAULT '' COMMENT 'TBird Priority',
  112. `act_src` varchar(255) NOT NULL DEFAULT '' COMMENT 'TBird Action Source',
  113. PRIMARY KEY (`act_idx`)
  114. ) COMMENT 'TBird Rules Action Table';
  115.  
  116. -- Dumping data for table `tb_acts`
  117.  
  118. -- End data dump
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement