Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

poweradmin-oracle-db-structure.sql 4.5KB

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