/sbc.sql

https://github.com/flazcano/SBC · SQL · 280 lines · 164 code · 27 blank · 89 comment · 0 complexity · 6dd6fc2b6b8f85e7ccd09649593010a0 MD5 · raw file

  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : SBC
  4. Source Server Type : SQLite
  5. Source Server Version : 3007010
  6. Source Database : main
  7. Target Server Type : SQLite
  8. Target Server Version : 3007010
  9. File Encoding : utf-8
  10. Date: 09/19/2012 13:27:42 PM
  11. */
  12. PRAGMA foreign_keys = false;
  13. -- ----------------------------
  14. -- Table structure for "Web_alerta"
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS "Web_alerta";
  17. CREATE TABLE "Web_alerta" (
  18. "id" integer NOT NULL PRIMARY KEY,
  19. "operadorid_id" integer NOT NULL REFERENCES "Web_operador" ("id"),
  20. "tipo" varchar(30) NOT NULL,
  21. "nivel" varchar(30) NOT NULL,
  22. "mensaje" text NOT NULL,
  23. "enviado" date NOT NULL
  24. );
  25. -- ----------------------------
  26. -- Table structure for "Web_cargas"
  27. -- ----------------------------
  28. DROP TABLE IF EXISTS "Web_cargas";
  29. CREATE TABLE "Web_cargas" (
  30. "id" integer NOT NULL PRIMARY KEY,
  31. "servidorid_id" integer NOT NULL REFERENCES "Web_servidor" ("id"),
  32. "time_unix" varchar(30) NOT NULL,
  33. "cpu_total" real NOT NULL,
  34. "cpu_cores" varchar(30) NOT NULL,
  35. "mem_total" integer NOT NULL,
  36. "mem_used" integer NOT NULL,
  37. "mem_free" integer NOT NULL,
  38. "mem_percent" varchar(30) NOT NULL,
  39. "io_read_count" integer NOT NULL,
  40. "io_write_count" integer NOT NULL,
  41. "io_read_bytes" integer NOT NULL,
  42. "io_write_bytes" integer NOT NULL,
  43. "io_read_time" integer NOT NULL,
  44. "io_write_time" integer NOT NULL,
  45. "net_bytes_sent" integer NOT NULL,
  46. "net_bytes_recv" integer NOT NULL,
  47. "net_packets_sent" integer NOT NULL,
  48. "net_packets_recv" integer NOT NULL,
  49. "hdd_device" varchar(30) NOT NULL,
  50. "hdd_total" integer NOT NULL,
  51. "hdd_used" integer NOT NULL,
  52. "hdd_free" integer NOT NULL,
  53. "hdd_percent" varchar(30) NOT NULL
  54. );
  55. -- ----------------------------
  56. -- Table structure for "Web_configuracion"
  57. -- ----------------------------
  58. DROP TABLE IF EXISTS "Web_configuracion";
  59. CREATE TABLE "Web_configuracion" (
  60. "id" integer NOT NULL PRIMARY KEY,
  61. "agente" varchar(30) NOT NULL,
  62. "clave" varchar(30) NOT NULL,
  63. "valor" varchar(30) NOT NULL,
  64. "modificado" varchar(30) NOT NULL,
  65. "defvalor" varchar(30) NOT NULL,
  66. "prevalor" varchar(30) NOT NULL
  67. );
  68. -- ----------------------------
  69. -- Table structure for "Web_operador"
  70. -- ----------------------------
  71. DROP TABLE IF EXISTS "Web_operador";
  72. CREATE TABLE "Web_operador" (
  73. "id" integer NOT NULL PRIMARY KEY,
  74. "nombre" varchar(30) NOT NULL,
  75. "clave" varchar(10) NOT NULL,
  76. "correo" varchar(20) NOT NULL,
  77. "jid" varchar(20) NOT NULL
  78. );
  79. -- ----------------------------
  80. -- Table structure for "Web_servidor"
  81. -- ----------------------------
  82. DROP TABLE IF EXISTS "Web_servidor";
  83. CREATE TABLE "Web_servidor" (
  84. "id" integer NOT NULL PRIMARY KEY,
  85. "fqdn" varchar(30) NOT NULL,
  86. "puerto" integer NOT NULL,
  87. "activo" bool NOT NULL,
  88. "habilitado" bool NOT NULL,
  89. "modificado" varchar(30) NOT NULL,
  90. "intento" integer NOT NULL
  91. );
  92. -- ----------------------------
  93. -- Table structure for "auth_group"
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS "auth_group";
  96. CREATE TABLE "auth_group" (
  97. "id" integer NOT NULL PRIMARY KEY,
  98. "name" varchar(80) NOT NULL UNIQUE
  99. );
  100. -- ----------------------------
  101. -- Table structure for "auth_group_permissions"
  102. -- ----------------------------
  103. DROP TABLE IF EXISTS "auth_group_permissions";
  104. CREATE TABLE "auth_group_permissions" (
  105. "id" integer NOT NULL PRIMARY KEY,
  106. "group_id" integer NOT NULL,
  107. "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id"),
  108. UNIQUE ("group_id", "permission_id")
  109. );
  110. -- ----------------------------
  111. -- Table structure for "auth_message"
  112. -- ----------------------------
  113. DROP TABLE IF EXISTS "auth_message";
  114. CREATE TABLE "auth_message" (
  115. "id" integer NOT NULL PRIMARY KEY,
  116. "user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
  117. "message" text NOT NULL
  118. );
  119. -- ----------------------------
  120. -- Table structure for "auth_permission"
  121. -- ----------------------------
  122. DROP TABLE IF EXISTS "auth_permission";
  123. CREATE TABLE "auth_permission" (
  124. "id" integer NOT NULL PRIMARY KEY,
  125. "name" varchar(50) NOT NULL,
  126. "content_type_id" integer NOT NULL,
  127. "codename" varchar(100) NOT NULL,
  128. UNIQUE ("content_type_id", "codename")
  129. );
  130. -- ----------------------------
  131. -- Table structure for "auth_user"
  132. -- ----------------------------
  133. DROP TABLE IF EXISTS "auth_user";
  134. CREATE TABLE "auth_user" (
  135. "id" integer NOT NULL PRIMARY KEY,
  136. "username" varchar(30) NOT NULL UNIQUE,
  137. "first_name" varchar(30) NOT NULL,
  138. "last_name" varchar(30) NOT NULL,
  139. "email" varchar(75) NOT NULL,
  140. "password" varchar(128) NOT NULL,
  141. "is_staff" bool NOT NULL,
  142. "is_active" bool NOT NULL,
  143. "is_superuser" bool NOT NULL,
  144. "last_login" datetime NOT NULL,
  145. "date_joined" datetime NOT NULL
  146. );
  147. -- ----------------------------
  148. -- Table structure for "auth_user_groups"
  149. -- ----------------------------
  150. DROP TABLE IF EXISTS "auth_user_groups";
  151. CREATE TABLE "auth_user_groups" (
  152. "id" integer NOT NULL PRIMARY KEY,
  153. "user_id" integer NOT NULL,
  154. "group_id" integer NOT NULL REFERENCES "auth_group" ("id"),
  155. UNIQUE ("user_id", "group_id")
  156. );
  157. -- ----------------------------
  158. -- Table structure for "auth_user_user_permissions"
  159. -- ----------------------------
  160. DROP TABLE IF EXISTS "auth_user_user_permissions";
  161. CREATE TABLE "auth_user_user_permissions" (
  162. "id" integer NOT NULL PRIMARY KEY,
  163. "user_id" integer NOT NULL,
  164. "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id"),
  165. UNIQUE ("user_id", "permission_id")
  166. );
  167. -- ----------------------------
  168. -- Table structure for "django_admin_log"
  169. -- ----------------------------
  170. DROP TABLE IF EXISTS "django_admin_log";
  171. CREATE TABLE "django_admin_log" (
  172. "id" integer NOT NULL PRIMARY KEY,
  173. "action_time" datetime NOT NULL,
  174. "user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
  175. "content_type_id" integer REFERENCES "django_content_type" ("id"),
  176. "object_id" text,
  177. "object_repr" varchar(200) NOT NULL,
  178. "action_flag" smallint unsigned NOT NULL,
  179. "change_message" text NOT NULL
  180. );
  181. -- ----------------------------
  182. -- Table structure for "django_content_type"
  183. -- ----------------------------
  184. DROP TABLE IF EXISTS "django_content_type";
  185. CREATE TABLE "django_content_type" (
  186. "id" integer NOT NULL PRIMARY KEY,
  187. "name" varchar(100) NOT NULL,
  188. "app_label" varchar(100) NOT NULL,
  189. "model" varchar(100) NOT NULL,
  190. UNIQUE ("app_label", "model")
  191. );
  192. -- ----------------------------
  193. -- Table structure for "django_session"
  194. -- ----------------------------
  195. DROP TABLE IF EXISTS "django_session";
  196. CREATE TABLE "django_session" (
  197. "session_key" varchar(40) NOT NULL PRIMARY KEY,
  198. "session_data" text NOT NULL,
  199. "expire_date" datetime NOT NULL
  200. );
  201. -- ----------------------------
  202. -- Table structure for "django_site"
  203. -- ----------------------------
  204. DROP TABLE IF EXISTS "django_site";
  205. CREATE TABLE "django_site" (
  206. "id" integer NOT NULL PRIMARY KEY,
  207. "domain" varchar(100) NOT NULL,
  208. "name" varchar(50) NOT NULL
  209. );
  210. -- ----------------------------
  211. -- Indexes structure for table "Web_alerta"
  212. -- ----------------------------
  213. CREATE INDEX "Web_alerta_f252d6d1" ON "Web_alerta" ("operadorid_id");
  214. -- ----------------------------
  215. -- Indexes structure for table "Web_cargas"
  216. -- ----------------------------
  217. CREATE INDEX "Web_cargas_40aca237" ON "Web_cargas" ("servidorid_id");
  218. -- ----------------------------
  219. -- Indexes structure for table "auth_group_permissions"
  220. -- ----------------------------
  221. CREATE INDEX "auth_group_permissions_bda51c3c" ON "auth_group_permissions" ("group_id");
  222. CREATE INDEX "auth_group_permissions_1e014c8f" ON "auth_group_permissions" ("permission_id");
  223. -- ----------------------------
  224. -- Indexes structure for table "auth_message"
  225. -- ----------------------------
  226. CREATE INDEX "auth_message_fbfc09f1" ON "auth_message" ("user_id");
  227. -- ----------------------------
  228. -- Indexes structure for table "auth_permission"
  229. -- ----------------------------
  230. CREATE INDEX "auth_permission_e4470c6e" ON "auth_permission" ("content_type_id");
  231. -- ----------------------------
  232. -- Indexes structure for table "auth_user_groups"
  233. -- ----------------------------
  234. CREATE INDEX "auth_user_groups_fbfc09f1" ON "auth_user_groups" ("user_id");
  235. CREATE INDEX "auth_user_groups_bda51c3c" ON "auth_user_groups" ("group_id");
  236. -- ----------------------------
  237. -- Indexes structure for table "auth_user_user_permissions"
  238. -- ----------------------------
  239. CREATE INDEX "auth_user_user_permissions_fbfc09f1" ON "auth_user_user_permissions" ("user_id");
  240. CREATE INDEX "auth_user_user_permissions_1e014c8f" ON "auth_user_user_permissions" ("permission_id");
  241. -- ----------------------------
  242. -- Indexes structure for table "django_admin_log"
  243. -- ----------------------------
  244. CREATE INDEX "django_admin_log_fbfc09f1" ON "django_admin_log" ("user_id");
  245. CREATE INDEX "django_admin_log_e4470c6e" ON "django_admin_log" ("content_type_id");
  246. -- ----------------------------
  247. -- Indexes structure for table "django_session"
  248. -- ----------------------------
  249. CREATE INDEX "django_session_c25c2c28" ON "django_session" ("expire_date");
  250. PRAGMA foreign_keys = true;