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.

01_init.sql 23KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. --
  2. -- PostgreSQL database dump
  3. --
  4. -- Dumped from database version 9.6.1
  5. -- Dumped by pg_dump version 9.6.1
  6. SET statement_timeout = 0;
  7. SET lock_timeout = 0;
  8. SET idle_in_transaction_session_timeout = 0;
  9. SET client_encoding = 'UTF8';
  10. SET standard_conforming_strings = on;
  11. SET check_function_bodies = false;
  12. SET client_min_messages = warning;
  13. SET row_security = off;
  14. --
  15. -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
  16. --
  17. CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
  18. --
  19. -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
  20. --
  21. COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
  22. SET search_path = public, pg_catalog;
  23. SET default_tablespace = '';
  24. SET default_with_oids = false;
  25. --
  26. -- Name: comments; Type: TABLE; Schema: public; Owner: -
  27. --
  28. CREATE TABLE comments (
  29. id integer NOT NULL,
  30. domain_id integer NOT NULL,
  31. name character varying(255) NOT NULL,
  32. type character varying(10) NOT NULL,
  33. modified_at integer NOT NULL,
  34. account character varying(40) DEFAULT NULL::character varying,
  35. comment character varying(65535) NOT NULL,
  36. CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
  37. );
  38. --
  39. -- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  40. --
  41. CREATE SEQUENCE comments_id_seq
  42. START WITH 1
  43. INCREMENT BY 1
  44. NO MINVALUE
  45. NO MAXVALUE
  46. CACHE 1;
  47. --
  48. -- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  49. --
  50. ALTER SEQUENCE comments_id_seq OWNED BY comments.id;
  51. --
  52. -- Name: cryptokeys; Type: TABLE; Schema: public; Owner: -
  53. --
  54. CREATE TABLE cryptokeys (
  55. id integer NOT NULL,
  56. domain_id integer,
  57. flags integer NOT NULL,
  58. active boolean,
  59. content text
  60. );
  61. --
  62. -- Name: cryptokeys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  63. --
  64. CREATE SEQUENCE cryptokeys_id_seq
  65. START WITH 1
  66. INCREMENT BY 1
  67. NO MINVALUE
  68. NO MAXVALUE
  69. CACHE 1;
  70. --
  71. -- Name: cryptokeys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  72. --
  73. ALTER SEQUENCE cryptokeys_id_seq OWNED BY cryptokeys.id;
  74. --
  75. -- Name: domainmetadata; Type: TABLE; Schema: public; Owner: -
  76. --
  77. CREATE TABLE domainmetadata (
  78. id integer NOT NULL,
  79. domain_id integer,
  80. kind character varying(32),
  81. content text
  82. );
  83. --
  84. -- Name: domainmetadata_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  85. --
  86. CREATE SEQUENCE domainmetadata_id_seq
  87. START WITH 1
  88. INCREMENT BY 1
  89. NO MINVALUE
  90. NO MAXVALUE
  91. CACHE 1;
  92. --
  93. -- Name: domainmetadata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  94. --
  95. ALTER SEQUENCE domainmetadata_id_seq OWNED BY domainmetadata.id;
  96. --
  97. -- Name: domains; Type: TABLE; Schema: public; Owner: -
  98. --
  99. CREATE TABLE domains (
  100. id integer NOT NULL,
  101. name character varying(255) NOT NULL,
  102. master character varying(128) DEFAULT NULL::character varying,
  103. last_check integer,
  104. type character varying(6) NOT NULL,
  105. notified_serial integer,
  106. account character varying(40) DEFAULT NULL::character varying,
  107. CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
  108. );
  109. --
  110. -- Name: domains_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  111. --
  112. CREATE SEQUENCE domains_id_seq
  113. START WITH 1
  114. INCREMENT BY 1
  115. NO MINVALUE
  116. NO MAXVALUE
  117. CACHE 1;
  118. --
  119. -- Name: domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  120. --
  121. ALTER SEQUENCE domains_id_seq OWNED BY domains.id;
  122. --
  123. -- Name: migrations; Type: TABLE; Schema: public; Owner: -
  124. --
  125. CREATE TABLE migrations (
  126. domain_id character varying(255),
  127. record_id integer
  128. );
  129. --
  130. -- Name: perm_items; Type: TABLE; Schema: public; Owner: -
  131. --
  132. CREATE TABLE perm_items (
  133. id integer NOT NULL,
  134. name character varying(64),
  135. descr character varying(1024)
  136. );
  137. --
  138. -- Name: perm_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  139. --
  140. CREATE SEQUENCE perm_items_id_seq
  141. START WITH 1
  142. INCREMENT BY 1
  143. NO MINVALUE
  144. NO MAXVALUE
  145. CACHE 1;
  146. --
  147. -- Name: perm_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  148. --
  149. ALTER SEQUENCE perm_items_id_seq OWNED BY perm_items.id;
  150. --
  151. -- Name: perm_templ; Type: TABLE; Schema: public; Owner: -
  152. --
  153. CREATE TABLE perm_templ (
  154. id integer NOT NULL,
  155. name character varying(128),
  156. descr character varying(1024)
  157. );
  158. --
  159. -- Name: perm_templ_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  160. --
  161. CREATE SEQUENCE perm_templ_id_seq
  162. START WITH 1
  163. INCREMENT BY 1
  164. NO MINVALUE
  165. NO MAXVALUE
  166. CACHE 1;
  167. --
  168. -- Name: perm_templ_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  169. --
  170. ALTER SEQUENCE perm_templ_id_seq OWNED BY perm_templ.id;
  171. --
  172. -- Name: perm_templ_items; Type: TABLE; Schema: public; Owner: -
  173. --
  174. CREATE TABLE perm_templ_items (
  175. id integer NOT NULL,
  176. templ_id integer,
  177. perm_id integer
  178. );
  179. --
  180. -- Name: perm_templ_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  181. --
  182. CREATE SEQUENCE perm_templ_items_id_seq
  183. START WITH 1
  184. INCREMENT BY 1
  185. NO MINVALUE
  186. NO MAXVALUE
  187. CACHE 1;
  188. --
  189. -- Name: perm_templ_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  190. --
  191. ALTER SEQUENCE perm_templ_items_id_seq OWNED BY perm_templ_items.id;
  192. --
  193. -- Name: records; Type: TABLE; Schema: public; Owner: -
  194. --
  195. CREATE TABLE records (
  196. id integer NOT NULL,
  197. domain_id integer,
  198. name character varying(255) DEFAULT NULL::character varying,
  199. type character varying(10) DEFAULT NULL::character varying,
  200. content character varying(65535) DEFAULT NULL::character varying,
  201. ttl integer,
  202. prio integer,
  203. change_date integer,
  204. disabled boolean DEFAULT false,
  205. ordername character varying(255),
  206. auth boolean DEFAULT true,
  207. CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
  208. );
  209. --
  210. -- Name: records_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  211. --
  212. CREATE SEQUENCE records_id_seq
  213. START WITH 1
  214. INCREMENT BY 1
  215. NO MINVALUE
  216. NO MAXVALUE
  217. CACHE 1;
  218. --
  219. -- Name: records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  220. --
  221. ALTER SEQUENCE records_id_seq OWNED BY records.id;
  222. --
  223. -- Name: records_zone_templ; Type: TABLE; Schema: public; Owner: -
  224. --
  225. CREATE TABLE records_zone_templ (
  226. domain_id integer,
  227. record_id integer,
  228. zone_templ_id integer
  229. );
  230. --
  231. -- Name: supermasters; Type: TABLE; Schema: public; Owner: -
  232. --
  233. CREATE TABLE supermasters (
  234. ip inet NOT NULL,
  235. nameserver character varying(255) NOT NULL,
  236. account character varying(40) NOT NULL
  237. );
  238. --
  239. -- Name: tsigkeys; Type: TABLE; Schema: public; Owner: -
  240. --
  241. CREATE TABLE tsigkeys (
  242. id integer NOT NULL,
  243. name character varying(255),
  244. algorithm character varying(50),
  245. secret character varying(255),
  246. CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
  247. );
  248. --
  249. -- Name: tsigkeys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  250. --
  251. CREATE SEQUENCE tsigkeys_id_seq
  252. START WITH 1
  253. INCREMENT BY 1
  254. NO MINVALUE
  255. NO MAXVALUE
  256. CACHE 1;
  257. --
  258. -- Name: tsigkeys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  259. --
  260. ALTER SEQUENCE tsigkeys_id_seq OWNED BY tsigkeys.id;
  261. --
  262. -- Name: users; Type: TABLE; Schema: public; Owner: -
  263. --
  264. CREATE TABLE users (
  265. id integer NOT NULL,
  266. username character varying(64),
  267. password character varying(128),
  268. fullname character varying(255),
  269. email character varying(255),
  270. description character varying(1024),
  271. perm_templ integer,
  272. active integer,
  273. use_ldap integer
  274. );
  275. --
  276. -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  277. --
  278. CREATE SEQUENCE users_id_seq
  279. START WITH 1
  280. INCREMENT BY 1
  281. NO MINVALUE
  282. NO MAXVALUE
  283. CACHE 1;
  284. --
  285. -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  286. --
  287. ALTER SEQUENCE users_id_seq OWNED BY users.id;
  288. --
  289. -- Name: zone_templ; Type: TABLE; Schema: public; Owner: -
  290. --
  291. CREATE TABLE zone_templ (
  292. id integer NOT NULL,
  293. name character varying(128),
  294. descr character varying(1024),
  295. owner integer
  296. );
  297. --
  298. -- Name: zone_templ_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  299. --
  300. CREATE SEQUENCE zone_templ_id_seq
  301. START WITH 1
  302. INCREMENT BY 1
  303. NO MINVALUE
  304. NO MAXVALUE
  305. CACHE 1;
  306. --
  307. -- Name: zone_templ_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  308. --
  309. ALTER SEQUENCE zone_templ_id_seq OWNED BY zone_templ.id;
  310. --
  311. -- Name: zone_templ_records; Type: TABLE; Schema: public; Owner: -
  312. --
  313. CREATE TABLE zone_templ_records (
  314. id integer NOT NULL,
  315. zone_templ_id integer,
  316. name character varying(255),
  317. type character varying(6),
  318. content character varying(255),
  319. ttl integer,
  320. prio integer
  321. );
  322. --
  323. -- Name: zone_templ_records_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  324. --
  325. CREATE SEQUENCE zone_templ_records_id_seq
  326. START WITH 1
  327. INCREMENT BY 1
  328. NO MINVALUE
  329. NO MAXVALUE
  330. CACHE 1;
  331. --
  332. -- Name: zone_templ_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  333. --
  334. ALTER SEQUENCE zone_templ_records_id_seq OWNED BY zone_templ_records.id;
  335. --
  336. -- Name: zones; Type: TABLE; Schema: public; Owner: -
  337. --
  338. CREATE TABLE zones (
  339. id integer NOT NULL,
  340. domain_id integer,
  341. owner integer,
  342. comment character varying(1024),
  343. zone_templ_id integer
  344. );
  345. --
  346. -- Name: zones_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  347. --
  348. CREATE SEQUENCE zones_id_seq
  349. START WITH 1
  350. INCREMENT BY 1
  351. NO MINVALUE
  352. NO MAXVALUE
  353. CACHE 1;
  354. --
  355. -- Name: zones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  356. --
  357. ALTER SEQUENCE zones_id_seq OWNED BY zones.id;
  358. --
  359. -- Name: comments id; Type: DEFAULT; Schema: public; Owner: -
  360. --
  361. ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass);
  362. --
  363. -- Name: cryptokeys id; Type: DEFAULT; Schema: public; Owner: -
  364. --
  365. ALTER TABLE ONLY cryptokeys ALTER COLUMN id SET DEFAULT nextval('cryptokeys_id_seq'::regclass);
  366. --
  367. -- Name: domainmetadata id; Type: DEFAULT; Schema: public; Owner: -
  368. --
  369. ALTER TABLE ONLY domainmetadata ALTER COLUMN id SET DEFAULT nextval('domainmetadata_id_seq'::regclass);
  370. --
  371. -- Name: domains id; Type: DEFAULT; Schema: public; Owner: -
  372. --
  373. ALTER TABLE ONLY domains ALTER COLUMN id SET DEFAULT nextval('domains_id_seq'::regclass);
  374. --
  375. -- Name: perm_items id; Type: DEFAULT; Schema: public; Owner: -
  376. --
  377. ALTER TABLE ONLY perm_items ALTER COLUMN id SET DEFAULT nextval('perm_items_id_seq'::regclass);
  378. --
  379. -- Name: perm_templ id; Type: DEFAULT; Schema: public; Owner: -
  380. --
  381. ALTER TABLE ONLY perm_templ ALTER COLUMN id SET DEFAULT nextval('perm_templ_id_seq'::regclass);
  382. --
  383. -- Name: perm_templ_items id; Type: DEFAULT; Schema: public; Owner: -
  384. --
  385. ALTER TABLE ONLY perm_templ_items ALTER COLUMN id SET DEFAULT nextval('perm_templ_items_id_seq'::regclass);
  386. --
  387. -- Name: records id; Type: DEFAULT; Schema: public; Owner: -
  388. --
  389. ALTER TABLE ONLY records ALTER COLUMN id SET DEFAULT nextval('records_id_seq'::regclass);
  390. --
  391. -- Name: tsigkeys id; Type: DEFAULT; Schema: public; Owner: -
  392. --
  393. ALTER TABLE ONLY tsigkeys ALTER COLUMN id SET DEFAULT nextval('tsigkeys_id_seq'::regclass);
  394. --
  395. -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
  396. --
  397. ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
  398. --
  399. -- Name: zone_templ id; Type: DEFAULT; Schema: public; Owner: -
  400. --
  401. ALTER TABLE ONLY zone_templ ALTER COLUMN id SET DEFAULT nextval('zone_templ_id_seq'::regclass);
  402. --
  403. -- Name: zone_templ_records id; Type: DEFAULT; Schema: public; Owner: -
  404. --
  405. ALTER TABLE ONLY zone_templ_records ALTER COLUMN id SET DEFAULT nextval('zone_templ_records_id_seq'::regclass);
  406. --
  407. -- Name: zones id; Type: DEFAULT; Schema: public; Owner: -
  408. --
  409. ALTER TABLE ONLY zones ALTER COLUMN id SET DEFAULT nextval('zones_id_seq'::regclass);
  410. --
  411. -- Data for Name: comments; Type: TABLE DATA; Schema: public; Owner: -
  412. --
  413. COPY comments (id, domain_id, name, type, modified_at, account, comment) FROM stdin;
  414. \.
  415. --
  416. -- Name: comments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  417. --
  418. SELECT pg_catalog.setval('comments_id_seq', 1, false);
  419. --
  420. -- Data for Name: cryptokeys; Type: TABLE DATA; Schema: public; Owner: -
  421. --
  422. COPY cryptokeys (id, domain_id, flags, active, content) FROM stdin;
  423. \.
  424. --
  425. -- Name: cryptokeys_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  426. --
  427. SELECT pg_catalog.setval('cryptokeys_id_seq', 1, false);
  428. --
  429. -- Data for Name: domainmetadata; Type: TABLE DATA; Schema: public; Owner: -
  430. --
  431. COPY domainmetadata (id, domain_id, kind, content) FROM stdin;
  432. \.
  433. --
  434. -- Name: domainmetadata_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  435. --
  436. SELECT pg_catalog.setval('domainmetadata_id_seq', 1, false);
  437. --
  438. -- Data for Name: domains; Type: TABLE DATA; Schema: public; Owner: -
  439. --
  440. COPY domains (id, name, master, last_check, type, notified_serial, account) FROM stdin;
  441. \.
  442. --
  443. -- Name: domains_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  444. --
  445. SELECT pg_catalog.setval('domains_id_seq', 1, false);
  446. --
  447. -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: -
  448. --
  449. COPY migrations (domain_id, record_id) FROM stdin;
  450. \.
  451. --
  452. -- Data for Name: perm_items; Type: TABLE DATA; Schema: public; Owner: -
  453. --
  454. COPY perm_items (id, name, descr) FROM stdin;
  455. 41 zone_master_add User is allowed to add new master zones.
  456. 42 zone_slave_add User is allowed to add new slave zones.
  457. 43 zone_content_view_own User is allowed to see the content and meta data of zones he owns.
  458. 44 zone_content_edit_own User is allowed to edit the content of zones he owns.
  459. 45 zone_meta_edit_own User is allowed to edit the meta data of zones he owns.
  460. 46 zone_content_view_others User is allowed to see the content and meta data of zones he does not own.
  461. 47 zone_content_edit_others User is allowed to edit the content of zones he does not own.
  462. 48 zone_meta_edit_others User is allowed to edit the meta data of zones he does not own.
  463. 49 search User is allowed to perform searches.
  464. 50 supermaster_view User is allowed to view supermasters.
  465. 51 supermaster_add User is allowed to add new supermasters.
  466. 52 supermaster_edit User is allowed to edit supermasters.
  467. 53 user_is_ueberuser User has full access. God-like. Redeemer.
  468. 54 user_view_others User is allowed to see other users and their details.
  469. 55 user_add_new User is allowed to add new users.
  470. 56 user_edit_own User is allowed to edit their own details.
  471. 57 user_edit_others User is allowed to edit other users.
  472. 58 user_passwd_edit_others User is allowed to edit the password of other users.
  473. 59 user_edit_templ_perm User is allowed to change the permission template that is assigned to a user.
  474. 60 templ_perm_add User is allowed to add new permission templates.
  475. 61 templ_perm_edit User is allowed to edit existing permission templates.
  476. \.
  477. --
  478. -- Name: perm_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  479. --
  480. SELECT pg_catalog.setval('perm_items_id_seq', 1, false);
  481. --
  482. -- Data for Name: perm_templ; Type: TABLE DATA; Schema: public; Owner: -
  483. --
  484. COPY perm_templ (id, name, descr) FROM stdin;
  485. 1 Administrator Administrator template with full rights.
  486. \.
  487. --
  488. -- Name: perm_templ_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  489. --
  490. SELECT pg_catalog.setval('perm_templ_id_seq', 1, true);
  491. --
  492. -- Data for Name: perm_templ_items; Type: TABLE DATA; Schema: public; Owner: -
  493. --
  494. COPY perm_templ_items (id, templ_id, perm_id) FROM stdin;
  495. 1 1 53
  496. \.
  497. --
  498. -- Name: perm_templ_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  499. --
  500. SELECT pg_catalog.setval('perm_templ_items_id_seq', 1, true);
  501. --
  502. -- Data for Name: records; Type: TABLE DATA; Schema: public; Owner: -
  503. --
  504. COPY records (id, domain_id, name, type, content, ttl, prio, change_date, disabled, ordername, auth) FROM stdin;
  505. \.
  506. --
  507. -- Name: records_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  508. --
  509. SELECT pg_catalog.setval('records_id_seq', 1, false);
  510. --
  511. -- Data for Name: records_zone_templ; Type: TABLE DATA; Schema: public; Owner: -
  512. --
  513. COPY records_zone_templ (domain_id, record_id, zone_templ_id) FROM stdin;
  514. \.
  515. --
  516. -- Data for Name: supermasters; Type: TABLE DATA; Schema: public; Owner: -
  517. --
  518. COPY supermasters (ip, nameserver, account) FROM stdin;
  519. \.
  520. --
  521. -- Data for Name: tsigkeys; Type: TABLE DATA; Schema: public; Owner: -
  522. --
  523. COPY tsigkeys (id, name, algorithm, secret) FROM stdin;
  524. \.
  525. --
  526. -- Name: tsigkeys_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  527. --
  528. SELECT pg_catalog.setval('tsigkeys_id_seq', 1, false);
  529. --
  530. -- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: -
  531. --
  532. COPY users (id, username, password, fullname, email, description, perm_templ, active, use_ldap) FROM stdin;
  533. 1 admin 53525674bdec5b712080dfcc760402bd Administrator admin@example.net Administrator with full rights. 1 1 0
  534. \.
  535. --
  536. -- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  537. --
  538. SELECT pg_catalog.setval('users_id_seq', 1, true);
  539. --
  540. -- Data for Name: zone_templ; Type: TABLE DATA; Schema: public; Owner: -
  541. --
  542. COPY zone_templ (id, name, descr, owner) FROM stdin;
  543. \.
  544. --
  545. -- Name: zone_templ_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  546. --
  547. SELECT pg_catalog.setval('zone_templ_id_seq', 1, false);
  548. --
  549. -- Data for Name: zone_templ_records; Type: TABLE DATA; Schema: public; Owner: -
  550. --
  551. COPY zone_templ_records (id, zone_templ_id, name, type, content, ttl, prio) FROM stdin;
  552. \.
  553. --
  554. -- Name: zone_templ_records_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  555. --
  556. SELECT pg_catalog.setval('zone_templ_records_id_seq', 1, false);
  557. --
  558. -- Data for Name: zones; Type: TABLE DATA; Schema: public; Owner: -
  559. --
  560. COPY zones (id, domain_id, owner, comment, zone_templ_id) FROM stdin;
  561. \.
  562. --
  563. -- Name: zones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
  564. --
  565. SELECT pg_catalog.setval('zones_id_seq', 1, false);
  566. --
  567. -- Name: comments comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  568. --
  569. ALTER TABLE ONLY comments
  570. ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
  571. --
  572. -- Name: cryptokeys cryptokeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  573. --
  574. ALTER TABLE ONLY cryptokeys
  575. ADD CONSTRAINT cryptokeys_pkey PRIMARY KEY (id);
  576. --
  577. -- Name: domainmetadata domainmetadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  578. --
  579. ALTER TABLE ONLY domainmetadata
  580. ADD CONSTRAINT domainmetadata_pkey PRIMARY KEY (id);
  581. --
  582. -- Name: domains domains_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  583. --
  584. ALTER TABLE ONLY domains
  585. ADD CONSTRAINT domains_pkey PRIMARY KEY (id);
  586. --
  587. -- Name: perm_items perm_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  588. --
  589. ALTER TABLE ONLY perm_items
  590. ADD CONSTRAINT perm_items_pkey PRIMARY KEY (id);
  591. --
  592. -- Name: perm_templ_items perm_templ_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  593. --
  594. ALTER TABLE ONLY perm_templ_items
  595. ADD CONSTRAINT perm_templ_items_pkey PRIMARY KEY (id);
  596. --
  597. -- Name: perm_templ perm_templ_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  598. --
  599. ALTER TABLE ONLY perm_templ
  600. ADD CONSTRAINT perm_templ_pkey PRIMARY KEY (id);
  601. --
  602. -- Name: records records_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  603. --
  604. ALTER TABLE ONLY records
  605. ADD CONSTRAINT records_pkey PRIMARY KEY (id);
  606. --
  607. -- Name: supermasters supermasters_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  608. --
  609. ALTER TABLE ONLY supermasters
  610. ADD CONSTRAINT supermasters_pkey PRIMARY KEY (ip, nameserver);
  611. --
  612. -- Name: tsigkeys tsigkeys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  613. --
  614. ALTER TABLE ONLY tsigkeys
  615. ADD CONSTRAINT tsigkeys_pkey PRIMARY KEY (id);
  616. --
  617. -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  618. --
  619. ALTER TABLE ONLY users
  620. ADD CONSTRAINT users_pkey PRIMARY KEY (id);
  621. --
  622. -- Name: zone_templ zone_templ_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  623. --
  624. ALTER TABLE ONLY zone_templ
  625. ADD CONSTRAINT zone_templ_pkey PRIMARY KEY (id);
  626. --
  627. -- Name: zone_templ_records zone_templ_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  628. --
  629. ALTER TABLE ONLY zone_templ_records
  630. ADD CONSTRAINT zone_templ_records_pkey PRIMARY KEY (id);
  631. --
  632. -- Name: zones zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  633. --
  634. ALTER TABLE ONLY zones
  635. ADD CONSTRAINT zones_pkey PRIMARY KEY (id);
  636. --
  637. -- Name: comments_domain_id_idx; Type: INDEX; Schema: public; Owner: -
  638. --
  639. CREATE INDEX comments_domain_id_idx ON comments USING btree (domain_id);
  640. --
  641. -- Name: comments_name_type_idx; Type: INDEX; Schema: public; Owner: -
  642. --
  643. CREATE INDEX comments_name_type_idx ON comments USING btree (name, type);
  644. --
  645. -- Name: comments_order_idx; Type: INDEX; Schema: public; Owner: -
  646. --
  647. CREATE INDEX comments_order_idx ON comments USING btree (domain_id, modified_at);
  648. --
  649. -- Name: domain_id; Type: INDEX; Schema: public; Owner: -
  650. --
  651. CREATE INDEX domain_id ON records USING btree (domain_id);
  652. --
  653. -- Name: domainidindex; Type: INDEX; Schema: public; Owner: -
  654. --
  655. CREATE INDEX domainidindex ON cryptokeys USING btree (domain_id);
  656. --
  657. -- Name: domainidmetaindex; Type: INDEX; Schema: public; Owner: -
  658. --
  659. CREATE INDEX domainidmetaindex ON domainmetadata USING btree (domain_id);
  660. --
  661. -- Name: name_index; Type: INDEX; Schema: public; Owner: -
  662. --
  663. CREATE UNIQUE INDEX name_index ON domains USING btree (name);
  664. --
  665. -- Name: namealgoindex; Type: INDEX; Schema: public; Owner: -
  666. --
  667. CREATE UNIQUE INDEX namealgoindex ON tsigkeys USING btree (name, algorithm);
  668. --
  669. -- Name: nametype_index; Type: INDEX; Schema: public; Owner: -
  670. --
  671. CREATE INDEX nametype_index ON records USING btree (name, type);
  672. --
  673. -- Name: rec_name_index; Type: INDEX; Schema: public; Owner: -
  674. --
  675. CREATE INDEX rec_name_index ON records USING btree (name);
  676. --
  677. -- Name: recordorder; Type: INDEX; Schema: public; Owner: -
  678. --
  679. CREATE INDEX recordorder ON records USING btree (domain_id, ordername text_pattern_ops);
  680. --
  681. -- Name: cryptokeys cryptokeys_domain_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  682. --
  683. ALTER TABLE ONLY cryptokeys
  684. ADD CONSTRAINT cryptokeys_domain_id_fkey FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
  685. --
  686. -- Name: records domain_exists; Type: FK CONSTRAINT; Schema: public; Owner: -
  687. --
  688. ALTER TABLE ONLY records
  689. ADD CONSTRAINT domain_exists FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
  690. --
  691. -- Name: comments domain_exists; Type: FK CONSTRAINT; Schema: public; Owner: -
  692. --
  693. ALTER TABLE ONLY comments
  694. ADD CONSTRAINT domain_exists FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
  695. --
  696. -- Name: domainmetadata domainmetadata_domain_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  697. --
  698. ALTER TABLE ONLY domainmetadata
  699. ADD CONSTRAINT domainmetadata_domain_id_fkey FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
  700. --
  701. -- PostgreSQL database dump complete
  702. --