Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

poweradmin-sqlite-db-structure.sql 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. BEGIN TRANSACTION;
  2. CREATE TABLE users (
  3. id INTEGER PRIMARY KEY NOT NULL,
  4. username varchar(64) NOT NULL DEFAULT '',
  5. password varchar(128) NOT NULL DEFAULT '',
  6. fullname varchar(255) NOT NULL DEFAULT '',
  7. email varchar(255) NOT NULL DEFAULT '',
  8. description text NOT NULL,
  9. perm_templ tinyint(11) NOT NULL DEFAULT 0,
  10. active tinyint(1) NOT NULL DEFAULT 0,
  11. use_ldap tinyint(1) NOT NULL DEFAULT 0
  12. );
  13. INSERT INTO users VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3','Administrator','admin@example.net','Administrator with full rights.',1,1,0);
  14. CREATE TABLE perm_items (
  15. id INTEGER PRIMARY KEY NOT NULL,
  16. name varchar(64) NOT NULL,
  17. descr text NOT NULL
  18. );
  19. INSERT INTO perm_items VALUES (41,'zone_master_add','User is allowed to add new master zones.');
  20. INSERT INTO perm_items VALUES (42,'zone_slave_add','User is allowed to add new slave zones.');
  21. INSERT INTO perm_items VALUES (43,'zone_content_view_own','User is allowed to see the content and meta data of zones he owns.');
  22. INSERT INTO perm_items VALUES (44,'zone_content_edit_own','User is allowed to edit the content of zones he owns.');
  23. INSERT INTO perm_items VALUES (45,'zone_meta_edit_own','User is allowed to edit the meta data of zones he owns.');
  24. INSERT INTO perm_items VALUES (46,'zone_content_view_others','User is allowed to see the content and meta data of zones he does not own.');
  25. INSERT INTO perm_items VALUES (47,'zone_content_edit_others','User is allowed to edit the content of zones he does not own.');
  26. INSERT INTO perm_items VALUES (48,'zone_meta_edit_others','User is allowed to edit the meta data of zones he does not own.');
  27. INSERT INTO perm_items VALUES (49,'search','User is allowed to perform searches.');
  28. INSERT INTO perm_items VALUES (50,'supermaster_view','User is allowed to view supermasters.');
  29. INSERT INTO perm_items VALUES (51,'supermaster_add','User is allowed to add new supermasters.');
  30. INSERT INTO perm_items VALUES (52,'supermaster_edit','User is allowed to edit supermasters.');
  31. INSERT INTO perm_items VALUES (53,'user_is_ueberuser','User has full access. God-like. Redeemer.');
  32. INSERT INTO perm_items VALUES (54,'user_view_others','User is allowed to see other users and their details.');
  33. INSERT INTO perm_items VALUES (55,'user_add_new','User is allowed to add new users.');
  34. INSERT INTO perm_items VALUES (56,'user_edit_own','User is allowed to edit their own details.');
  35. INSERT INTO perm_items VALUES (57,'user_edit_others','User is allowed to edit other users.');
  36. INSERT INTO perm_items VALUES (58,'user_passwd_edit_others','User is allowed to edit the password of other users.');
  37. INSERT INTO perm_items VALUES (59,'user_edit_templ_perm','User is allowed to change the permission template that is assigned to a user.');
  38. INSERT INTO perm_items VALUES (60,'templ_perm_add','User is allowed to add new permission templates.');
  39. INSERT INTO perm_items VALUES (61,'templ_perm_edit','User is allowed to edit existing permission templates.');
  40. CREATE TABLE perm_templ (
  41. id INTEGER PRIMARY KEY NOT NULL,
  42. name varchar(128) NOT NULL,
  43. descr text NOT NULL
  44. );
  45. INSERT INTO perm_templ VALUES (1,'Administrator','Administrator template with full rights.');
  46. CREATE TABLE perm_templ_items (
  47. id INTEGER PRIMARY KEY NOT NULL,
  48. templ_id int(11) NOT NULL,
  49. perm_id int(11) NOT NULL
  50. );
  51. INSERT INTO perm_templ_items VALUES (1,1,53);
  52. CREATE TABLE zones (
  53. id INTEGER PRIMARY KEY NOT NULL,
  54. domain_id int(11) NOT NULL DEFAULT 0,
  55. owner int(11) NOT NULL DEFAULT 0,
  56. comment text,
  57. zone_templ_id INT(11) NOT NULL
  58. );
  59. CREATE INDEX owner ON zones (owner);
  60. CREATE TABLE zone_templ (
  61. id INTEGER PRIMARY KEY NOT NULL,
  62. name varchar(128) NOT NULL,
  63. descr text NOT NULL,
  64. owner int(11) NOT NULL
  65. );
  66. CREATE TABLE zone_templ_records (
  67. id INTEGER PRIMARY KEY NOT NULL,
  68. zone_templ_id int(11) NOT NULL,
  69. name varchar(255) NOT NULL,
  70. type varchar(6) NOT NULL,
  71. content varchar(255) NOT NULL,
  72. ttl int(11) NOT NULL,
  73. prio int(11) NOT NULL
  74. );
  75. CREATE TABLE records_zone_templ (
  76. domain_id int(11) NOT NULL,
  77. record_id int(11) NOT NULL,
  78. zone_templ_id int(11) NOT NULL
  79. );
  80. CREATE TABLE migrations (
  81. version varchar(255) NOT NULL,
  82. apply_time int(11) NOT NULL
  83. );
  84. COMMIT;