schema_68.sql 140 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236
  1. --
  2. -- PostgreSQL database dump
  3. --
  4. SET statement_timeout = 0;
  5. SET client_encoding = 'SQL_ASCII';
  6. SET standard_conforming_strings = off;
  7. SET check_function_bodies = false;
  8. SET client_min_messages = warning;
  9. SET escape_string_warning = off;
  10. --
  11. -- Name: audit; Type: SCHEMA; Schema: -; Owner: dak
  12. --
  13. CREATE SCHEMA audit;
  14. ALTER SCHEMA audit OWNER TO dak;
  15. SET search_path = public, pg_catalog;
  16. --
  17. -- Name: bin_associations_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  18. --
  19. CREATE FUNCTION bin_associations_id_max() RETURNS integer
  20. LANGUAGE sql
  21. AS $$SELECT max(id) FROM bin_associations$$;
  22. ALTER FUNCTION public.bin_associations_id_max() OWNER TO dak;
  23. --
  24. -- Name: binaries_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  25. --
  26. CREATE FUNCTION binaries_id_max() RETURNS integer
  27. LANGUAGE sql
  28. AS $$SELECT max(id) FROM binaries$$;
  29. ALTER FUNCTION public.binaries_id_max() OWNER TO dak;
  30. --
  31. -- Name: dsc_files_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  32. --
  33. CREATE FUNCTION dsc_files_id_max() RETURNS integer
  34. LANGUAGE sql
  35. AS $$SELECT max(id) FROM dsc_files$$;
  36. ALTER FUNCTION public.dsc_files_id_max() OWNER TO dak;
  37. --
  38. -- Name: files_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  39. --
  40. CREATE FUNCTION files_id_max() RETURNS integer
  41. LANGUAGE sql
  42. AS $$SELECT max(id) FROM files$$;
  43. ALTER FUNCTION public.files_id_max() OWNER TO dak;
  44. --
  45. -- Name: override_type_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  46. --
  47. CREATE FUNCTION override_type_id_max() RETURNS integer
  48. LANGUAGE sql
  49. AS $$SELECT max(id) FROM override_type$$;
  50. ALTER FUNCTION public.override_type_id_max() OWNER TO dak;
  51. --
  52. -- Name: priority_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  53. --
  54. CREATE FUNCTION priority_id_max() RETURNS integer
  55. LANGUAGE sql
  56. AS $$SELECT max(id) FROM priority$$;
  57. ALTER FUNCTION public.priority_id_max() OWNER TO dak;
  58. --
  59. -- Name: section_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  60. --
  61. CREATE FUNCTION section_id_max() RETURNS integer
  62. LANGUAGE sql
  63. AS $$SELECT max(id) FROM section$$;
  64. ALTER FUNCTION public.section_id_max() OWNER TO dak;
  65. --
  66. -- Name: source_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  67. --
  68. CREATE FUNCTION source_id_max() RETURNS integer
  69. LANGUAGE sql
  70. AS $$SELECT max(id) FROM source$$;
  71. ALTER FUNCTION public.source_id_max() OWNER TO dak;
  72. --
  73. -- Name: space_concat(text, text); Type: FUNCTION; Schema: public; Owner: dak
  74. --
  75. CREATE FUNCTION space_concat(text, text) RETURNS text
  76. LANGUAGE sql
  77. AS $_$select case
  78. WHEN $2 is null or $2 = '' THEN $1
  79. WHEN $1 is null or $1 = '' THEN $2
  80. ELSE $1 || ' ' || $2
  81. END$_$;
  82. ALTER FUNCTION public.space_concat(text, text) OWNER TO dak;
  83. --
  84. -- Name: src_associations_id_max(); Type: FUNCTION; Schema: public; Owner: dak
  85. --
  86. CREATE FUNCTION src_associations_id_max() RETURNS integer
  87. LANGUAGE sql
  88. AS $$SELECT max(id) FROM src_associations$$;
  89. ALTER FUNCTION public.src_associations_id_max() OWNER TO dak;
  90. --
  91. -- Name: tfunc_set_modified(); Type: FUNCTION; Schema: public; Owner: dak
  92. --
  93. CREATE FUNCTION tfunc_set_modified() RETURNS trigger
  94. LANGUAGE plpgsql
  95. AS $$
  96. BEGIN NEW.modified = now(); return NEW; END;
  97. $$;
  98. ALTER FUNCTION public.tfunc_set_modified() OWNER TO dak;
  99. --
  100. -- Name: trigger_binsrc_assoc_update(); Type: FUNCTION; Schema: public; Owner: dak
  101. --
  102. CREATE FUNCTION trigger_binsrc_assoc_update() RETURNS trigger
  103. LANGUAGE plpgsql SECURITY DEFINER
  104. SET search_path TO public, pg_temp
  105. AS $$
  106. DECLARE
  107. v_data RECORD;
  108. v_package audit.package_changes.package%TYPE;
  109. v_version audit.package_changes.version%TYPE;
  110. v_architecture audit.package_changes.architecture%TYPE;
  111. v_suite audit.package_changes.suite%TYPE;
  112. v_event audit.package_changes.event%TYPE;
  113. v_priority audit.package_changes.priority%TYPE;
  114. v_component audit.package_changes.component%TYPE;
  115. v_section audit.package_changes.section%TYPE;
  116. BEGIN
  117. CASE TG_OP
  118. WHEN 'INSERT' THEN v_event := 'I'; v_data := NEW;
  119. WHEN 'DELETE' THEN v_event := 'D'; v_data := OLD;
  120. ELSE RAISE EXCEPTION 'trigger called for invalid operation (%)', TG_OP;
  121. END CASE;
  122. SELECT suite_name INTO STRICT v_suite FROM suite WHERE id = v_data.suite;
  123. CASE TG_TABLE_NAME
  124. WHEN 'bin_associations' THEN
  125. SELECT package, version, arch_string
  126. INTO STRICT v_package, v_version, v_architecture
  127. FROM binaries LEFT JOIN architecture ON (architecture.id = binaries.architecture)
  128. WHERE binaries.id = v_data.bin;
  129. SELECT component.name, priority.priority, section.section
  130. INTO v_component, v_priority, v_section
  131. FROM override
  132. JOIN override_type ON (override.type = override_type.id)
  133. JOIN priority ON (priority.id = override.priority)
  134. JOIN section ON (section.id = override.section)
  135. JOIN component ON (override.component = component.id)
  136. JOIN suite ON (suite.id = override.suite)
  137. WHERE override_type.type != 'dsc'
  138. AND override.package = v_package AND suite.id = v_data.suite;
  139. WHEN 'src_associations' THEN
  140. SELECT source, version
  141. INTO STRICT v_package, v_version
  142. FROM source WHERE source.id = v_data.source;
  143. v_architecture := 'source';
  144. SELECT component.name, priority.priority, section.section
  145. INTO v_component, v_priority, v_section
  146. FROM override
  147. JOIN override_type ON (override.type = override_type.id)
  148. JOIN priority ON (priority.id = override.priority)
  149. JOIN section ON (section.id = override.section)
  150. JOIN component ON (override.component = component.id)
  151. JOIN suite ON (suite.id = override.suite)
  152. WHERE override_type.type = 'dsc'
  153. AND override.package = v_package AND suite.id = v_data.suite;
  154. ELSE RAISE EXCEPTION 'trigger called for invalid table (%)', TG_TABLE_NAME;
  155. END CASE;
  156. INSERT INTO audit.package_changes
  157. (package, version, architecture, suite, event, priority, component, section)
  158. VALUES (v_package, v_version, v_architecture, v_suite, v_event, v_priority, v_component, v_section);
  159. RETURN NEW;
  160. END;
  161. $$;
  162. ALTER FUNCTION public.trigger_binsrc_assoc_update() OWNER TO dak;
  163. --
  164. -- Name: trigger_override_update(); Type: FUNCTION; Schema: public; Owner: dak
  165. --
  166. CREATE FUNCTION trigger_override_update() RETURNS trigger
  167. LANGUAGE plpgsql SECURITY DEFINER
  168. SET search_path TO public, pg_temp
  169. AS $$
  170. DECLARE
  171. v_src_override_id override_type.id%TYPE;
  172. v_priority audit.package_changes.priority%TYPE := NULL;
  173. v_component audit.package_changes.component%TYPE := NULL;
  174. v_section audit.package_changes.section%TYPE := NULL;
  175. BEGIN
  176. IF TG_TABLE_NAME != 'override' THEN
  177. RAISE EXCEPTION 'trigger called for invalid table (%)', TG_TABLE_NAME;
  178. END IF;
  179. IF TG_OP != 'UPDATE' THEN
  180. RAISE EXCEPTION 'trigger called for invalid event (%)', TG_OP;
  181. END IF;
  182. IF OLD.package != NEW.package OR OLD.type != NEW.type OR OLD.suite != NEW.suite THEN
  183. RETURN NEW;
  184. END IF;
  185. IF OLD.priority != NEW.priority THEN
  186. SELECT priority INTO STRICT v_priority FROM priority WHERE id = NEW.priority;
  187. END IF;
  188. IF OLD.component != NEW.component THEN
  189. SELECT name INTO STRICT v_component FROM component WHERE id = NEW.component;
  190. END IF;
  191. IF OLD.section != NEW.section THEN
  192. SELECT section INTO STRICT v_section FROM section WHERE id = NEW.section;
  193. END IF;
  194. -- Find out if we're doing src or binary overrides
  195. SELECT id INTO STRICT v_src_override_id FROM override_type WHERE type = 'dsc';
  196. IF OLD.type = v_src_override_id THEN
  197. -- Doing a src_association link
  198. INSERT INTO audit.package_changes
  199. (package, version, architecture, suite, event, priority, component, section)
  200. SELECT NEW.package, source.version, 'source', suite.suite_name, 'U', v_priority, v_component, v_section
  201. FROM source
  202. JOIN src_associations ON (source.id = src_associations.source)
  203. JOIN suite ON (suite.id = src_associations.suite)
  204. WHERE source.source = NEW.package AND src_associations.suite = NEW.suite;
  205. ELSE
  206. -- Doing a bin_association link
  207. INSERT INTO audit.package_changes
  208. (package, version, architecture, suite, event, priority, component, section)
  209. SELECT NEW.package, binaries.version, architecture.arch_string, suite.suite_name, 'U', v_priority, v_component, v_section
  210. FROM binaries
  211. JOIN bin_associations ON (binaries.id = bin_associations.bin)
  212. JOIN architecture ON (architecture.id = binaries.architecture)
  213. JOIN suite ON (suite.id = bin_associations.suite)
  214. WHERE binaries.package = NEW.package AND bin_associations.suite = NEW.suite;
  215. END IF;
  216. RETURN NEW;
  217. END;
  218. $$;
  219. ALTER FUNCTION public.trigger_override_update() OWNER TO dak;
  220. SET search_path = audit, pg_catalog;
  221. SET default_tablespace = '';
  222. SET default_with_oids = false;
  223. --
  224. -- Name: package_changes; Type: TABLE; Schema: audit; Owner: dak; Tablespace:
  225. --
  226. CREATE TABLE package_changes (
  227. changedate timestamp without time zone DEFAULT now() NOT NULL,
  228. package text NOT NULL,
  229. version public.debversion NOT NULL,
  230. architecture text NOT NULL,
  231. suite text NOT NULL,
  232. event text NOT NULL,
  233. priority text,
  234. component text,
  235. section text
  236. );
  237. ALTER TABLE audit.package_changes OWNER TO dak;
  238. SET search_path = public, pg_catalog;
  239. --
  240. -- Name: bin_associations_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  241. --
  242. CREATE SEQUENCE bin_associations_id_seq
  243. START WITH 1
  244. INCREMENT BY 1
  245. NO MINVALUE
  246. MAXVALUE 2147483647
  247. CACHE 1;
  248. ALTER TABLE public.bin_associations_id_seq OWNER TO dak;
  249. --
  250. -- Name: bin_associations; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  251. --
  252. CREATE TABLE bin_associations (
  253. id integer DEFAULT nextval('bin_associations_id_seq'::regclass) NOT NULL,
  254. suite integer NOT NULL,
  255. bin integer NOT NULL,
  256. created timestamp with time zone DEFAULT now() NOT NULL,
  257. modified timestamp with time zone DEFAULT now() NOT NULL
  258. );
  259. ALTER TABLE public.bin_associations OWNER TO dak;
  260. --
  261. -- Name: binaries_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  262. --
  263. CREATE SEQUENCE binaries_id_seq
  264. START WITH 1
  265. INCREMENT BY 1
  266. NO MINVALUE
  267. MAXVALUE 2147483647
  268. CACHE 1;
  269. ALTER TABLE public.binaries_id_seq OWNER TO dak;
  270. --
  271. -- Name: binaries; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  272. --
  273. CREATE TABLE binaries (
  274. id integer DEFAULT nextval('binaries_id_seq'::regclass) NOT NULL,
  275. package text NOT NULL,
  276. version debversion NOT NULL,
  277. maintainer integer NOT NULL,
  278. source integer NOT NULL,
  279. architecture integer NOT NULL,
  280. file integer NOT NULL,
  281. type text NOT NULL,
  282. sig_fpr integer,
  283. install_date timestamp with time zone DEFAULT now(),
  284. created timestamp with time zone DEFAULT now() NOT NULL,
  285. modified timestamp with time zone DEFAULT now() NOT NULL,
  286. stanza text
  287. );
  288. ALTER TABLE public.binaries OWNER TO dak;
  289. --
  290. -- Name: bin_associations_binaries; Type: VIEW; Schema: public; Owner: dak
  291. --
  292. CREATE VIEW bin_associations_binaries AS
  293. SELECT bin_associations.id, bin_associations.bin, binaries.package, binaries.version, bin_associations.suite, binaries.architecture, binaries.source FROM (bin_associations JOIN binaries ON ((bin_associations.bin = binaries.id)));
  294. ALTER TABLE public.bin_associations_binaries OWNER TO dak;
  295. --
  296. -- Name: source_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  297. --
  298. CREATE SEQUENCE source_id_seq
  299. START WITH 1
  300. INCREMENT BY 1
  301. NO MINVALUE
  302. MAXVALUE 2147483647
  303. CACHE 1;
  304. ALTER TABLE public.source_id_seq OWNER TO dak;
  305. --
  306. -- Name: source; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  307. --
  308. CREATE TABLE source (
  309. id integer DEFAULT nextval('source_id_seq'::regclass) NOT NULL,
  310. source text NOT NULL,
  311. version debversion NOT NULL,
  312. maintainer integer NOT NULL,
  313. file integer NOT NULL,
  314. sig_fpr integer,
  315. install_date timestamp with time zone NOT NULL,
  316. changedby integer NOT NULL,
  317. dm_upload_allowed boolean DEFAULT false NOT NULL,
  318. created timestamp with time zone DEFAULT now() NOT NULL,
  319. modified timestamp with time zone DEFAULT now() NOT NULL,
  320. stanza text
  321. );
  322. ALTER TABLE public.source OWNER TO dak;
  323. --
  324. -- Name: src_associations_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  325. --
  326. CREATE SEQUENCE src_associations_id_seq
  327. START WITH 1
  328. INCREMENT BY 1
  329. NO MINVALUE
  330. MAXVALUE 2147483647
  331. CACHE 1;
  332. ALTER TABLE public.src_associations_id_seq OWNER TO dak;
  333. --
  334. -- Name: src_associations; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  335. --
  336. CREATE TABLE src_associations (
  337. id integer DEFAULT nextval('src_associations_id_seq'::regclass) NOT NULL,
  338. suite integer NOT NULL,
  339. source integer NOT NULL,
  340. created timestamp with time zone DEFAULT now() NOT NULL,
  341. modified timestamp with time zone DEFAULT now() NOT NULL
  342. );
  343. ALTER TABLE public.src_associations OWNER TO dak;
  344. --
  345. -- Name: src_associations_bin; Type: VIEW; Schema: public; Owner: dak
  346. --
  347. CREATE VIEW src_associations_bin AS
  348. SELECT src_associations.id, src_associations.source, src_associations.suite, binaries.id AS bin, binaries.architecture FROM ((src_associations JOIN source ON ((src_associations.source = source.id))) JOIN binaries ON ((source.id = binaries.source)));
  349. ALTER TABLE public.src_associations_bin OWNER TO dak;
  350. --
  351. -- Name: almost_obsolete_all_associations; Type: VIEW; Schema: public; Owner: dak
  352. --
  353. CREATE VIEW almost_obsolete_all_associations AS
  354. SELECT bin_associations_binaries.id, bin_associations_binaries.bin, bin_associations_binaries.package, bin_associations_binaries.version, bin_associations_binaries.suite FROM (bin_associations_binaries LEFT JOIN src_associations_bin USING (bin, suite, architecture)) WHERE ((src_associations_bin.source IS NULL) AND (bin_associations_binaries.architecture = 2));
  355. ALTER TABLE public.almost_obsolete_all_associations OWNER TO dak;
  356. --
  357. -- Name: any_associations_source; Type: VIEW; Schema: public; Owner: dak
  358. --
  359. CREATE VIEW any_associations_source AS
  360. SELECT bin_associations.id, bin_associations.suite, binaries.id AS bin, binaries.package, binaries.version AS binver, binaries.architecture, source.id AS src, source.source, source.version AS srcver FROM ((bin_associations JOIN binaries ON (((bin_associations.bin = binaries.id) AND (binaries.architecture <> 2)))) JOIN source ON ((binaries.source = source.id)));
  361. ALTER TABLE public.any_associations_source OWNER TO dak;
  362. --
  363. -- Name: src_associations_src; Type: VIEW; Schema: public; Owner: dak
  364. --
  365. CREATE VIEW src_associations_src AS
  366. SELECT src_associations.id, src_associations.suite, source.id AS src, source.source, source.version FROM (src_associations JOIN source ON ((src_associations.source = source.id)));
  367. ALTER TABLE public.src_associations_src OWNER TO dak;
  368. --
  369. -- Name: almost_obsolete_src_associations; Type: VIEW; Schema: public; Owner: dak
  370. --
  371. CREATE VIEW almost_obsolete_src_associations AS
  372. SELECT src_associations_src.id, src_associations_src.src, src_associations_src.source, src_associations_src.version, src_associations_src.suite FROM (src_associations_src LEFT JOIN any_associations_source USING (src, suite)) WHERE (any_associations_source.bin IS NULL);
  373. ALTER TABLE public.almost_obsolete_src_associations OWNER TO dak;
  374. --
  375. -- Name: architecture_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  376. --
  377. CREATE SEQUENCE architecture_id_seq
  378. START WITH 1
  379. INCREMENT BY 1
  380. NO MINVALUE
  381. MAXVALUE 2147483647
  382. CACHE 1;
  383. ALTER TABLE public.architecture_id_seq OWNER TO dak;
  384. --
  385. -- Name: architecture; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  386. --
  387. CREATE TABLE architecture (
  388. id integer DEFAULT nextval('architecture_id_seq'::regclass) NOT NULL,
  389. arch_string text NOT NULL,
  390. description text,
  391. created timestamp with time zone DEFAULT now() NOT NULL,
  392. modified timestamp with time zone DEFAULT now() NOT NULL
  393. );
  394. ALTER TABLE public.architecture OWNER TO dak;
  395. --
  396. -- Name: archive_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  397. --
  398. CREATE SEQUENCE archive_id_seq
  399. START WITH 1
  400. INCREMENT BY 1
  401. NO MINVALUE
  402. MAXVALUE 2147483647
  403. CACHE 1;
  404. ALTER TABLE public.archive_id_seq OWNER TO dak;
  405. --
  406. -- Name: archive; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  407. --
  408. CREATE TABLE archive (
  409. id integer DEFAULT nextval('archive_id_seq'::regclass) NOT NULL,
  410. name text NOT NULL,
  411. origin_server text,
  412. description text,
  413. created timestamp with time zone DEFAULT now() NOT NULL,
  414. modified timestamp with time zone DEFAULT now() NOT NULL,
  415. primary_mirror text
  416. );
  417. ALTER TABLE public.archive OWNER TO dak;
  418. --
  419. -- Name: bin_contents; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  420. --
  421. CREATE TABLE bin_contents (
  422. file text NOT NULL,
  423. binary_id integer NOT NULL,
  424. created timestamp with time zone DEFAULT now() NOT NULL,
  425. modified timestamp with time zone DEFAULT now() NOT NULL
  426. );
  427. ALTER TABLE public.bin_contents OWNER TO dak;
  428. --
  429. -- Name: binaries_metadata; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  430. --
  431. CREATE TABLE binaries_metadata (
  432. bin_id integer NOT NULL,
  433. key_id integer NOT NULL,
  434. value text NOT NULL
  435. );
  436. ALTER TABLE public.binaries_metadata OWNER TO dak;
  437. --
  438. -- Name: suite_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  439. --
  440. CREATE SEQUENCE suite_id_seq
  441. START WITH 1
  442. INCREMENT BY 1
  443. NO MINVALUE
  444. MAXVALUE 2147483647
  445. CACHE 1;
  446. ALTER TABLE public.suite_id_seq OWNER TO dak;
  447. --
  448. -- Name: suite; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  449. --
  450. CREATE TABLE suite (
  451. id integer DEFAULT nextval('suite_id_seq'::regclass) NOT NULL,
  452. suite_name text NOT NULL,
  453. version text,
  454. origin text,
  455. label text,
  456. description text,
  457. untouchable boolean DEFAULT false NOT NULL,
  458. codename text,
  459. overridecodename text,
  460. validtime integer DEFAULT 604800 NOT NULL,
  461. priority integer DEFAULT 0 NOT NULL,
  462. notautomatic boolean DEFAULT false NOT NULL,
  463. copychanges text,
  464. overridesuite text,
  465. policy_queue_id integer,
  466. created timestamp with time zone DEFAULT now() NOT NULL,
  467. modified timestamp with time zone DEFAULT now() NOT NULL,
  468. changelog text,
  469. butautomaticupgrades boolean DEFAULT false NOT NULL,
  470. signingkeys text[],
  471. announce text[],
  472. CONSTRAINT bau_needs_na_set CHECK (((NOT butautomaticupgrades) OR notautomatic))
  473. );
  474. ALTER TABLE public.suite OWNER TO dak;
  475. --
  476. -- Name: binaries_suite_arch; Type: VIEW; Schema: public; Owner: dak
  477. --
  478. CREATE VIEW binaries_suite_arch AS
  479. SELECT bin_associations.id, binaries.id AS bin, binaries.package, binaries.version, binaries.source, bin_associations.suite, suite.suite_name, binaries.architecture, architecture.arch_string FROM (((binaries JOIN bin_associations ON ((binaries.id = bin_associations.bin))) JOIN suite ON ((suite.id = bin_associations.suite))) JOIN architecture ON ((binaries.architecture = architecture.id)));
  480. ALTER TABLE public.binaries_suite_arch OWNER TO dak;
  481. --
  482. -- Name: binary_acl; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  483. --
  484. CREATE TABLE binary_acl (
  485. id integer NOT NULL,
  486. access_level text NOT NULL,
  487. created timestamp with time zone DEFAULT now() NOT NULL,
  488. modified timestamp with time zone DEFAULT now() NOT NULL
  489. );
  490. ALTER TABLE public.binary_acl OWNER TO dak;
  491. --
  492. -- Name: binary_acl_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  493. --
  494. CREATE SEQUENCE binary_acl_id_seq
  495. START WITH 1
  496. INCREMENT BY 1
  497. NO MINVALUE
  498. NO MAXVALUE
  499. CACHE 1;
  500. ALTER TABLE public.binary_acl_id_seq OWNER TO dak;
  501. --
  502. -- Name: binary_acl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  503. --
  504. ALTER SEQUENCE binary_acl_id_seq OWNED BY binary_acl.id;
  505. --
  506. -- Name: binary_acl_map; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  507. --
  508. CREATE TABLE binary_acl_map (
  509. id integer NOT NULL,
  510. fingerprint_id integer NOT NULL,
  511. architecture_id integer NOT NULL,
  512. created timestamp with time zone DEFAULT now() NOT NULL,
  513. modified timestamp with time zone DEFAULT now() NOT NULL
  514. );
  515. ALTER TABLE public.binary_acl_map OWNER TO dak;
  516. --
  517. -- Name: binary_acl_map_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  518. --
  519. CREATE SEQUENCE binary_acl_map_id_seq
  520. START WITH 1
  521. INCREMENT BY 1
  522. NO MINVALUE
  523. NO MAXVALUE
  524. CACHE 1;
  525. ALTER TABLE public.binary_acl_map_id_seq OWNER TO dak;
  526. --
  527. -- Name: binary_acl_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  528. --
  529. ALTER SEQUENCE binary_acl_map_id_seq OWNED BY binary_acl_map.id;
  530. --
  531. -- Name: files_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  532. --
  533. CREATE SEQUENCE files_id_seq
  534. START WITH 1
  535. INCREMENT BY 1
  536. NO MINVALUE
  537. MAXVALUE 2147483647
  538. CACHE 1;
  539. ALTER TABLE public.files_id_seq OWNER TO dak;
  540. --
  541. -- Name: files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  542. --
  543. CREATE TABLE files (
  544. id integer DEFAULT nextval('files_id_seq'::regclass) NOT NULL,
  545. filename text NOT NULL,
  546. size bigint NOT NULL,
  547. md5sum text NOT NULL,
  548. location integer NOT NULL,
  549. last_used timestamp with time zone,
  550. sha1sum text,
  551. sha256sum text,
  552. created timestamp with time zone DEFAULT now() NOT NULL,
  553. modified timestamp with time zone DEFAULT now() NOT NULL
  554. );
  555. ALTER TABLE public.files OWNER TO dak;
  556. --
  557. -- Name: location_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  558. --
  559. CREATE SEQUENCE location_id_seq
  560. START WITH 1
  561. INCREMENT BY 1
  562. NO MINVALUE
  563. MAXVALUE 2147483647
  564. CACHE 1;
  565. ALTER TABLE public.location_id_seq OWNER TO dak;
  566. --
  567. -- Name: location; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  568. --
  569. CREATE TABLE location (
  570. id integer DEFAULT nextval('location_id_seq'::regclass) NOT NULL,
  571. path text NOT NULL,
  572. component integer,
  573. archive integer,
  574. type text NOT NULL,
  575. created timestamp with time zone DEFAULT now() NOT NULL,
  576. modified timestamp with time zone DEFAULT now() NOT NULL
  577. );
  578. ALTER TABLE public.location OWNER TO dak;
  579. --
  580. -- Name: binfiles_suite_component_arch; Type: VIEW; Schema: public; Owner: dak
  581. --
  582. CREATE VIEW binfiles_suite_component_arch AS
  583. SELECT files.filename, binaries.type, location.path, location.component, bin_associations.suite, binaries.architecture FROM (((binaries JOIN bin_associations ON ((binaries.id = bin_associations.bin))) JOIN files ON ((binaries.file = files.id))) JOIN location ON ((files.location = location.id)));
  584. ALTER TABLE public.binfiles_suite_component_arch OWNER TO dak;
  585. --
  586. -- Name: build_queue; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  587. --
  588. CREATE TABLE build_queue (
  589. id integer NOT NULL,
  590. queue_name text NOT NULL,
  591. path text NOT NULL,
  592. copy_files boolean DEFAULT false NOT NULL,
  593. generate_metadata boolean DEFAULT false NOT NULL,
  594. origin text,
  595. label text,
  596. releasedescription text,
  597. signingkey text,
  598. stay_of_execution integer DEFAULT 86400 NOT NULL,
  599. created timestamp with time zone DEFAULT now() NOT NULL,
  600. modified timestamp with time zone DEFAULT now() NOT NULL,
  601. notautomatic boolean DEFAULT false NOT NULL,
  602. CONSTRAINT build_queue_meta_sanity_check CHECK (((generate_metadata IS FALSE) OR (((origin IS NOT NULL) AND (label IS NOT NULL)) AND (releasedescription IS NOT NULL)))),
  603. CONSTRAINT build_queue_stay_of_execution_check CHECK ((stay_of_execution >= 0))
  604. );
  605. ALTER TABLE public.build_queue OWNER TO dak;
  606. --
  607. -- Name: build_queue_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  608. --
  609. CREATE TABLE build_queue_files (
  610. id integer NOT NULL,
  611. build_queue_id integer NOT NULL,
  612. insertdate timestamp without time zone DEFAULT now() NOT NULL,
  613. lastused timestamp without time zone,
  614. filename text NOT NULL,
  615. fileid integer,
  616. created timestamp with time zone DEFAULT now() NOT NULL,
  617. modified timestamp with time zone DEFAULT now() NOT NULL
  618. );
  619. ALTER TABLE public.build_queue_files OWNER TO dak;
  620. --
  621. -- Name: build_queue_files_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  622. --
  623. CREATE SEQUENCE build_queue_files_id_seq
  624. START WITH 1
  625. INCREMENT BY 1
  626. NO MINVALUE
  627. NO MAXVALUE
  628. CACHE 1;
  629. ALTER TABLE public.build_queue_files_id_seq OWNER TO dak;
  630. --
  631. -- Name: build_queue_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  632. --
  633. ALTER SEQUENCE build_queue_files_id_seq OWNED BY build_queue_files.id;
  634. --
  635. -- Name: build_queue_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  636. --
  637. CREATE SEQUENCE build_queue_id_seq
  638. START WITH 1
  639. INCREMENT BY 1
  640. NO MINVALUE
  641. NO MAXVALUE
  642. CACHE 1;
  643. ALTER TABLE public.build_queue_id_seq OWNER TO dak;
  644. --
  645. -- Name: build_queue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  646. --
  647. ALTER SEQUENCE build_queue_id_seq OWNED BY build_queue.id;
  648. --
  649. -- Name: build_queue_policy_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  650. --
  651. CREATE TABLE build_queue_policy_files (
  652. build_queue_id integer NOT NULL,
  653. file_id integer NOT NULL,
  654. filename text NOT NULL,
  655. created timestamp with time zone DEFAULT now() NOT NULL,
  656. lastused timestamp without time zone
  657. );
  658. ALTER TABLE public.build_queue_policy_files OWNER TO dak;
  659. --
  660. -- Name: changelogs_text; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  661. --
  662. CREATE TABLE changelogs_text (
  663. id integer NOT NULL,
  664. changelog text
  665. );
  666. ALTER TABLE public.changelogs_text OWNER TO dak;
  667. --
  668. -- Name: changes; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  669. --
  670. CREATE TABLE changes (
  671. id integer NOT NULL,
  672. changesname text NOT NULL,
  673. seen timestamp with time zone DEFAULT now() NOT NULL,
  674. source text NOT NULL,
  675. binaries text NOT NULL,
  676. architecture text NOT NULL,
  677. version text NOT NULL,
  678. distribution text NOT NULL,
  679. urgency text NOT NULL,
  680. maintainer text NOT NULL,
  681. fingerprint text NOT NULL,
  682. changedby text NOT NULL,
  683. date text NOT NULL,
  684. in_queue integer,
  685. approved_for integer,
  686. created timestamp with time zone DEFAULT now() NOT NULL,
  687. modified timestamp with time zone DEFAULT now() NOT NULL,
  688. changelog_id integer
  689. );
  690. ALTER TABLE public.changes OWNER TO dak;
  691. --
  692. -- Name: changelogs; Type: VIEW; Schema: public; Owner: dak
  693. --
  694. CREATE VIEW changelogs AS
  695. SELECT cl.id, c.source, (c.version)::debversion AS version, c.architecture, cl.changelog, c.distribution FROM (changes c JOIN changelogs_text cl ON ((cl.id = c.changelog_id)));
  696. ALTER TABLE public.changelogs OWNER TO dak;
  697. --
  698. -- Name: changelogs_text_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  699. --
  700. CREATE SEQUENCE changelogs_text_id_seq
  701. START WITH 1
  702. INCREMENT BY 1
  703. NO MINVALUE
  704. NO MAXVALUE
  705. CACHE 1;
  706. ALTER TABLE public.changelogs_text_id_seq OWNER TO dak;
  707. --
  708. -- Name: changelogs_text_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  709. --
  710. ALTER SEQUENCE changelogs_text_id_seq OWNED BY changelogs_text.id;
  711. --
  712. -- Name: changes_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  713. --
  714. CREATE SEQUENCE changes_id_seq
  715. START WITH 1
  716. INCREMENT BY 1
  717. NO MINVALUE
  718. NO MAXVALUE
  719. CACHE 1;
  720. ALTER TABLE public.changes_id_seq OWNER TO dak;
  721. --
  722. -- Name: changes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  723. --
  724. ALTER SEQUENCE changes_id_seq OWNED BY changes.id;
  725. --
  726. -- Name: changes_pending_binaries; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  727. --
  728. CREATE TABLE changes_pending_binaries (
  729. id integer NOT NULL,
  730. change_id integer NOT NULL,
  731. package text NOT NULL,
  732. version debversion NOT NULL,
  733. architecture_id integer NOT NULL,
  734. source_id integer,
  735. pending_source_id integer,
  736. pending_file_id integer,
  737. created timestamp with time zone DEFAULT now() NOT NULL,
  738. modified timestamp with time zone DEFAULT now() NOT NULL,
  739. CONSTRAINT changes_pending_binaries_check CHECK (((source_id IS NOT NULL) OR (pending_source_id IS NOT NULL)))
  740. );
  741. ALTER TABLE public.changes_pending_binaries OWNER TO dak;
  742. --
  743. -- Name: changes_pending_binaries_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  744. --
  745. CREATE SEQUENCE changes_pending_binaries_id_seq
  746. START WITH 1
  747. INCREMENT BY 1
  748. NO MINVALUE
  749. NO MAXVALUE
  750. CACHE 1;
  751. ALTER TABLE public.changes_pending_binaries_id_seq OWNER TO dak;
  752. --
  753. -- Name: changes_pending_binaries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  754. --
  755. ALTER SEQUENCE changes_pending_binaries_id_seq OWNED BY changes_pending_binaries.id;
  756. --
  757. -- Name: changes_pending_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  758. --
  759. CREATE TABLE changes_pending_files (
  760. id integer NOT NULL,
  761. filename text NOT NULL,
  762. size bigint NOT NULL,
  763. md5sum text NOT NULL,
  764. sha1sum text NOT NULL,
  765. sha256sum text NOT NULL,
  766. created timestamp with time zone DEFAULT now() NOT NULL,
  767. modified timestamp with time zone DEFAULT now() NOT NULL,
  768. processed boolean DEFAULT false
  769. );
  770. ALTER TABLE public.changes_pending_files OWNER TO dak;
  771. --
  772. -- Name: changes_pending_files_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  773. --
  774. CREATE SEQUENCE changes_pending_files_id_seq
  775. START WITH 1
  776. INCREMENT BY 1
  777. NO MINVALUE
  778. NO MAXVALUE
  779. CACHE 1;
  780. ALTER TABLE public.changes_pending_files_id_seq OWNER TO dak;
  781. --
  782. -- Name: changes_pending_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  783. --
  784. ALTER SEQUENCE changes_pending_files_id_seq OWNED BY changes_pending_files.id;
  785. --
  786. -- Name: changes_pending_files_map; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  787. --
  788. CREATE TABLE changes_pending_files_map (
  789. file_id integer NOT NULL,
  790. change_id integer NOT NULL,
  791. created timestamp with time zone DEFAULT now() NOT NULL,
  792. modified timestamp with time zone DEFAULT now() NOT NULL
  793. );
  794. ALTER TABLE public.changes_pending_files_map OWNER TO dak;
  795. --
  796. -- Name: changes_pending_source; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  797. --
  798. CREATE TABLE changes_pending_source (
  799. id integer NOT NULL,
  800. change_id integer NOT NULL,
  801. source text NOT NULL,
  802. version debversion NOT NULL,
  803. maintainer_id integer NOT NULL,
  804. changedby_id integer NOT NULL,
  805. sig_fpr integer NOT NULL,
  806. dm_upload_allowed boolean DEFAULT false NOT NULL,
  807. created timestamp with time zone DEFAULT now() NOT NULL,
  808. modified timestamp with time zone DEFAULT now() NOT NULL
  809. );
  810. ALTER TABLE public.changes_pending_source OWNER TO dak;
  811. --
  812. -- Name: changes_pending_source_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  813. --
  814. CREATE TABLE changes_pending_source_files (
  815. pending_source_id integer NOT NULL,
  816. pending_file_id integer NOT NULL,
  817. created timestamp with time zone DEFAULT now() NOT NULL,
  818. modified timestamp with time zone DEFAULT now() NOT NULL
  819. );
  820. ALTER TABLE public.changes_pending_source_files OWNER TO dak;
  821. --
  822. -- Name: changes_pending_source_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  823. --
  824. CREATE SEQUENCE changes_pending_source_id_seq
  825. START WITH 1
  826. INCREMENT BY 1
  827. NO MINVALUE
  828. NO MAXVALUE
  829. CACHE 1;
  830. ALTER TABLE public.changes_pending_source_id_seq OWNER TO dak;
  831. --
  832. -- Name: changes_pending_source_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  833. --
  834. ALTER SEQUENCE changes_pending_source_id_seq OWNED BY changes_pending_source.id;
  835. --
  836. -- Name: changes_pool_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  837. --
  838. CREATE TABLE changes_pool_files (
  839. changeid integer NOT NULL,
  840. fileid integer NOT NULL,
  841. created timestamp with time zone DEFAULT now() NOT NULL,
  842. modified timestamp with time zone DEFAULT now() NOT NULL
  843. );
  844. ALTER TABLE public.changes_pool_files OWNER TO dak;
  845. --
  846. -- Name: component_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  847. --
  848. CREATE SEQUENCE component_id_seq
  849. START WITH 1
  850. INCREMENT BY 1
  851. NO MINVALUE
  852. MAXVALUE 2147483647
  853. CACHE 1;
  854. ALTER TABLE public.component_id_seq OWNER TO dak;
  855. --
  856. -- Name: component; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  857. --
  858. CREATE TABLE component (
  859. id integer DEFAULT nextval('component_id_seq'::regclass) NOT NULL,
  860. name text NOT NULL,
  861. description text,
  862. meets_dfsg boolean,
  863. created timestamp with time zone DEFAULT now() NOT NULL,
  864. modified timestamp with time zone DEFAULT now() NOT NULL
  865. );
  866. ALTER TABLE public.component OWNER TO dak;
  867. --
  868. -- Name: config; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  869. --
  870. CREATE TABLE config (
  871. id integer NOT NULL,
  872. name text NOT NULL,
  873. value text,
  874. created timestamp with time zone DEFAULT now() NOT NULL,
  875. modified timestamp with time zone DEFAULT now() NOT NULL
  876. );
  877. ALTER TABLE public.config OWNER TO dak;
  878. --
  879. -- Name: config_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  880. --
  881. CREATE SEQUENCE config_id_seq
  882. START WITH 1
  883. INCREMENT BY 1
  884. NO MINVALUE
  885. NO MAXVALUE
  886. CACHE 1;
  887. ALTER TABLE public.config_id_seq OWNER TO dak;
  888. --
  889. -- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  890. --
  891. ALTER SEQUENCE config_id_seq OWNED BY config.id;
  892. --
  893. -- Name: dsc_files_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  894. --
  895. CREATE SEQUENCE dsc_files_id_seq
  896. START WITH 1
  897. INCREMENT BY 1
  898. NO MINVALUE
  899. MAXVALUE 2147483647
  900. CACHE 1;
  901. ALTER TABLE public.dsc_files_id_seq OWNER TO dak;
  902. --
  903. -- Name: dsc_files; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  904. --
  905. CREATE TABLE dsc_files (
  906. id integer DEFAULT nextval('dsc_files_id_seq'::regclass) NOT NULL,
  907. source integer NOT NULL,
  908. file integer NOT NULL,
  909. created timestamp with time zone DEFAULT now() NOT NULL,
  910. modified timestamp with time zone DEFAULT now() NOT NULL
  911. );
  912. ALTER TABLE public.dsc_files OWNER TO dak;
  913. --
  914. -- Name: external_overrides; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  915. --
  916. CREATE TABLE external_overrides (
  917. package text NOT NULL,
  918. key text NOT NULL,
  919. value text NOT NULL,
  920. suite integer NOT NULL,
  921. component integer NOT NULL
  922. );
  923. ALTER TABLE public.external_overrides OWNER TO dak;
  924. --
  925. -- Name: extra_src_references; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  926. --
  927. CREATE TABLE extra_src_references (
  928. bin_id integer NOT NULL,
  929. src_id integer NOT NULL
  930. );
  931. ALTER TABLE public.extra_src_references OWNER TO dak;
  932. --
  933. -- Name: file_arch_suite; Type: VIEW; Schema: public; Owner: dak
  934. --
  935. CREATE VIEW file_arch_suite AS
  936. SELECT f.id AS file, f.size, b.architecture, s.id AS suite FROM files f, binaries b, bin_associations ba, suite s WHERE (((f.id = b.file) AND (b.id = ba.bin)) AND (ba.suite = s.id));
  937. ALTER TABLE public.file_arch_suite OWNER TO dak;
  938. --
  939. -- Name: fingerprint_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  940. --
  941. CREATE SEQUENCE fingerprint_id_seq
  942. START WITH 1
  943. INCREMENT BY 1
  944. NO MINVALUE
  945. MAXVALUE 2147483647
  946. CACHE 1;
  947. ALTER TABLE public.fingerprint_id_seq OWNER TO dak;
  948. --
  949. -- Name: fingerprint; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  950. --
  951. CREATE TABLE fingerprint (
  952. id integer DEFAULT nextval('fingerprint_id_seq'::regclass) NOT NULL,
  953. fingerprint text NOT NULL,
  954. uid integer,
  955. keyring integer,
  956. source_acl_id integer,
  957. binary_acl_id integer,
  958. binary_reject boolean DEFAULT true NOT NULL,
  959. created timestamp with time zone DEFAULT now() NOT NULL,
  960. modified timestamp with time zone DEFAULT now() NOT NULL
  961. );
  962. ALTER TABLE public.fingerprint OWNER TO dak;
  963. --
  964. -- Name: keyring_acl_map; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  965. --
  966. CREATE TABLE keyring_acl_map (
  967. id integer NOT NULL,
  968. keyring_id integer NOT NULL,
  969. architecture_id integer NOT NULL,
  970. created timestamp with time zone DEFAULT now() NOT NULL,
  971. modified timestamp with time zone DEFAULT now() NOT NULL
  972. );
  973. ALTER TABLE public.keyring_acl_map OWNER TO dak;
  974. --
  975. -- Name: keyring_acl_map_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  976. --
  977. CREATE SEQUENCE keyring_acl_map_id_seq
  978. START WITH 1
  979. INCREMENT BY 1
  980. NO MINVALUE
  981. NO MAXVALUE
  982. CACHE 1;
  983. ALTER TABLE public.keyring_acl_map_id_seq OWNER TO dak;
  984. --
  985. -- Name: keyring_acl_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  986. --
  987. ALTER SEQUENCE keyring_acl_map_id_seq OWNED BY keyring_acl_map.id;
  988. --
  989. -- Name: keyrings; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  990. --
  991. CREATE TABLE keyrings (
  992. id integer NOT NULL,
  993. name text NOT NULL,
  994. default_source_acl_id integer,
  995. default_binary_acl_id integer,
  996. default_binary_reject boolean DEFAULT true NOT NULL,
  997. priority integer DEFAULT 100 NOT NULL,
  998. created timestamp with time zone DEFAULT now() NOT NULL,
  999. modified timestamp with time zone DEFAULT now() NOT NULL,
  1000. active boolean DEFAULT true
  1001. );
  1002. ALTER TABLE public.keyrings OWNER TO dak;
  1003. --
  1004. -- Name: keyrings_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1005. --
  1006. CREATE SEQUENCE keyrings_id_seq
  1007. START WITH 1
  1008. INCREMENT BY 1
  1009. NO MINVALUE
  1010. NO MAXVALUE
  1011. CACHE 1;
  1012. ALTER TABLE public.keyrings_id_seq OWNER TO dak;
  1013. --
  1014. -- Name: keyrings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1015. --
  1016. ALTER SEQUENCE keyrings_id_seq OWNED BY keyrings.id;
  1017. --
  1018. -- Name: maintainer_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1019. --
  1020. CREATE SEQUENCE maintainer_id_seq
  1021. START WITH 1
  1022. INCREMENT BY 1
  1023. NO MINVALUE
  1024. MAXVALUE 2147483647
  1025. CACHE 1;
  1026. ALTER TABLE public.maintainer_id_seq OWNER TO dak;
  1027. --
  1028. -- Name: maintainer; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1029. --
  1030. CREATE TABLE maintainer (
  1031. id integer DEFAULT nextval('maintainer_id_seq'::regclass) NOT NULL,
  1032. name text NOT NULL,
  1033. created timestamp with time zone DEFAULT now() NOT NULL,
  1034. modified timestamp with time zone DEFAULT now() NOT NULL
  1035. );
  1036. ALTER TABLE public.maintainer OWNER TO dak;
  1037. --
  1038. -- Name: metadata_keys; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1039. --
  1040. CREATE TABLE metadata_keys (
  1041. key_id integer NOT NULL,
  1042. key text NOT NULL,
  1043. ordering integer DEFAULT 0 NOT NULL
  1044. );
  1045. ALTER TABLE public.metadata_keys OWNER TO dak;
  1046. --
  1047. -- Name: metadata_keys_key_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1048. --
  1049. CREATE SEQUENCE metadata_keys_key_id_seq
  1050. START WITH 1
  1051. INCREMENT BY 1
  1052. NO MINVALUE
  1053. NO MAXVALUE
  1054. CACHE 1;
  1055. ALTER TABLE public.metadata_keys_key_id_seq OWNER TO dak;
  1056. --
  1057. -- Name: metadata_keys_key_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1058. --
  1059. ALTER SEQUENCE metadata_keys_key_id_seq OWNED BY metadata_keys.key_id;
  1060. --
  1061. -- Name: new_comments; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1062. --
  1063. CREATE TABLE new_comments (
  1064. id integer NOT NULL,
  1065. package text NOT NULL,
  1066. version text NOT NULL,
  1067. comment text NOT NULL,
  1068. author text NOT NULL,
  1069. notedate timestamp with time zone DEFAULT now() NOT NULL,
  1070. trainee boolean DEFAULT false NOT NULL,
  1071. created timestamp with time zone DEFAULT now() NOT NULL,
  1072. modified timestamp with time zone DEFAULT now() NOT NULL
  1073. );
  1074. ALTER TABLE public.new_comments OWNER TO dak;
  1075. --
  1076. -- Name: new_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1077. --
  1078. CREATE SEQUENCE new_comments_id_seq
  1079. START WITH 1
  1080. INCREMENT BY 1
  1081. NO MINVALUE
  1082. NO MAXVALUE
  1083. CACHE 1;
  1084. ALTER TABLE public.new_comments_id_seq OWNER TO dak;
  1085. --
  1086. -- Name: new_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1087. --
  1088. ALTER SEQUENCE new_comments_id_seq OWNED BY new_comments.id;
  1089. --
  1090. -- Name: newest_all_associations; Type: VIEW; Schema: public; Owner: dak
  1091. --
  1092. CREATE VIEW newest_all_associations AS
  1093. SELECT binaries_suite_arch.package, max(binaries_suite_arch.version) AS version, binaries_suite_arch.suite, binaries_suite_arch.architecture FROM binaries_suite_arch WHERE (binaries_suite_arch.architecture = 2) GROUP BY binaries_suite_arch.package, binaries_suite_arch.suite, binaries_suite_arch.architecture;
  1094. ALTER TABLE public.newest_all_associations OWNER TO dak;
  1095. --
  1096. -- Name: newest_any_associations; Type: VIEW; Schema: public; Owner: dak
  1097. --
  1098. CREATE VIEW newest_any_associations AS
  1099. SELECT binaries_suite_arch.package, max(binaries_suite_arch.version) AS version, binaries_suite_arch.suite, binaries_suite_arch.architecture FROM binaries_suite_arch WHERE (binaries_suite_arch.architecture > 2) GROUP BY binaries_suite_arch.package, binaries_suite_arch.suite, binaries_suite_arch.architecture;
  1100. ALTER TABLE public.newest_any_associations OWNER TO dak;
  1101. --
  1102. -- Name: source_suite; Type: VIEW; Schema: public; Owner: dak
  1103. --
  1104. CREATE VIEW source_suite AS
  1105. SELECT src_associations.id, source.id AS src, source.source, source.version, src_associations.suite, suite.suite_name, source.install_date FROM ((source JOIN src_associations ON ((source.id = src_associations.source))) JOIN suite ON ((suite.id = src_associations.suite)));
  1106. ALTER TABLE public.source_suite OWNER TO dak;
  1107. --
  1108. -- Name: newest_source; Type: VIEW; Schema: public; Owner: dak
  1109. --
  1110. CREATE VIEW newest_source AS
  1111. SELECT source_suite.source, max(source_suite.version) AS version, source_suite.suite FROM source_suite GROUP BY source_suite.source, source_suite.suite;
  1112. ALTER TABLE public.newest_source OWNER TO dak;
  1113. --
  1114. -- Name: newest_src_association; Type: VIEW; Schema: public; Owner: dak
  1115. --
  1116. CREATE VIEW newest_src_association AS
  1117. SELECT source_suite.id, source_suite.src, source_suite.source, source_suite.version, source_suite.suite FROM (source_suite JOIN newest_source USING (source, version, suite));
  1118. ALTER TABLE public.newest_src_association OWNER TO dak;
  1119. --
  1120. -- Name: obsolete_all_associations; Type: VIEW; Schema: public; Owner: dak
  1121. --
  1122. CREATE VIEW obsolete_all_associations AS
  1123. SELECT almost.id, almost.bin, almost.package, almost.version, almost.suite FROM (almost_obsolete_all_associations almost JOIN newest_all_associations newest ON ((((almost.package = newest.package) AND (almost.version < newest.version)) AND (almost.suite = newest.suite))));
  1124. ALTER TABLE public.obsolete_all_associations OWNER TO dak;
  1125. --
  1126. -- Name: obsolete_any_associations; Type: VIEW; Schema: public; Owner: dak
  1127. --
  1128. CREATE VIEW obsolete_any_associations AS
  1129. SELECT binaries_suite_arch.id, binaries_suite_arch.architecture, binaries_suite_arch.version, binaries_suite_arch.package, binaries_suite_arch.suite FROM (binaries_suite_arch JOIN newest_any_associations ON (((((binaries_suite_arch.architecture = newest_any_associations.architecture) AND (binaries_suite_arch.package = newest_any_associations.package)) AND (binaries_suite_arch.suite = newest_any_associations.suite)) AND (binaries_suite_arch.version <> newest_any_associations.version))));
  1130. ALTER TABLE public.obsolete_any_associations OWNER TO dak;
  1131. --
  1132. -- Name: obsolete_any_by_all_associations; Type: VIEW; Schema: public; Owner: dak
  1133. --
  1134. CREATE VIEW obsolete_any_by_all_associations AS
  1135. SELECT binaries_suite_arch.id, binaries_suite_arch.package, binaries_suite_arch.version, binaries_suite_arch.suite, binaries_suite_arch.architecture FROM (binaries_suite_arch JOIN newest_all_associations ON (((((binaries_suite_arch.package = newest_all_associations.package) AND (binaries_suite_arch.version < newest_all_associations.version)) AND (binaries_suite_arch.suite = newest_all_associations.suite)) AND (binaries_suite_arch.architecture > 2))));
  1136. ALTER TABLE public.obsolete_any_by_all_associations OWNER TO dak;
  1137. --
  1138. -- Name: obsolete_src_associations; Type: VIEW; Schema: public; Owner: dak
  1139. --
  1140. CREATE VIEW obsolete_src_associations AS
  1141. SELECT almost.id, almost.src, almost.source, almost.version, almost.suite FROM (almost_obsolete_src_associations almost JOIN newest_src_association newest ON ((((almost.source = newest.source) AND (almost.version < newest.version)) AND (almost.suite = newest.suite))));
  1142. ALTER TABLE public.obsolete_src_associations OWNER TO dak;
  1143. --
  1144. -- Name: override; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1145. --
  1146. CREATE TABLE override (
  1147. package text NOT NULL,
  1148. suite integer NOT NULL,
  1149. component integer NOT NULL,
  1150. priority integer,
  1151. section integer NOT NULL,
  1152. type integer NOT NULL,
  1153. maintainer text,
  1154. created timestamp with time zone DEFAULT now() NOT NULL,
  1155. modified timestamp with time zone DEFAULT now() NOT NULL
  1156. );
  1157. ALTER TABLE public.override OWNER TO dak;
  1158. --
  1159. -- Name: override_type_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1160. --
  1161. CREATE SEQUENCE override_type_id_seq
  1162. START WITH 1
  1163. INCREMENT BY 1
  1164. NO MINVALUE
  1165. MAXVALUE 2147483647
  1166. CACHE 1;
  1167. ALTER TABLE public.override_type_id_seq OWNER TO dak;
  1168. --
  1169. -- Name: override_type; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1170. --
  1171. CREATE TABLE override_type (
  1172. id integer DEFAULT nextval('override_type_id_seq'::regclass) NOT NULL,
  1173. type text NOT NULL,
  1174. created timestamp with time zone DEFAULT now() NOT NULL,
  1175. modified timestamp with time zone DEFAULT now() NOT NULL
  1176. );
  1177. ALTER TABLE public.override_type OWNER TO dak;
  1178. --
  1179. -- Name: policy_queue; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1180. --
  1181. CREATE TABLE policy_queue (
  1182. id integer NOT NULL,
  1183. queue_name text NOT NULL,
  1184. path text NOT NULL,
  1185. perms character(4) DEFAULT '0660'::bpchar NOT NULL,
  1186. change_perms character(4) DEFAULT '0660'::bpchar NOT NULL,
  1187. generate_metadata boolean DEFAULT false NOT NULL,
  1188. origin text,
  1189. label text,
  1190. releasedescription text,
  1191. signingkey text,
  1192. stay_of_execution integer DEFAULT 86400 NOT NULL,
  1193. created timestamp with time zone DEFAULT now() NOT NULL,
  1194. modified timestamp with time zone DEFAULT now() NOT NULL,
  1195. send_to_build_queues boolean DEFAULT false NOT NULL,
  1196. CONSTRAINT policy_queue_change_perms_check CHECK ((change_perms ~ similar_escape('[0-7][0-7][0-7][0-7]'::text, NULL::text))),
  1197. CONSTRAINT policy_queue_meta_sanity_check CHECK (((generate_metadata IS FALSE) OR (((origin IS NOT NULL) AND (label IS NOT NULL)) AND (releasedescription IS NOT NULL)))),
  1198. CONSTRAINT policy_queue_perms_check CHECK ((perms ~ similar_escape('[0-7][0-7][0-7][0-7]'::text, NULL::text))),
  1199. CONSTRAINT policy_queue_stay_of_execution_check CHECK ((stay_of_execution >= 0))
  1200. );
  1201. ALTER TABLE public.policy_queue OWNER TO dak;
  1202. --
  1203. -- Name: policy_queue_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1204. --
  1205. CREATE SEQUENCE policy_queue_id_seq
  1206. START WITH 1
  1207. INCREMENT BY 1
  1208. NO MINVALUE
  1209. NO MAXVALUE
  1210. CACHE 1;
  1211. ALTER TABLE public.policy_queue_id_seq OWNER TO dak;
  1212. --
  1213. -- Name: policy_queue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1214. --
  1215. ALTER SEQUENCE policy_queue_id_seq OWNED BY policy_queue.id;
  1216. --
  1217. -- Name: priority_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1218. --
  1219. CREATE SEQUENCE priority_id_seq
  1220. START WITH 1
  1221. INCREMENT BY 1
  1222. NO MINVALUE
  1223. MAXVALUE 2147483647
  1224. CACHE 1;
  1225. ALTER TABLE public.priority_id_seq OWNER TO dak;
  1226. --
  1227. -- Name: priority; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1228. --
  1229. CREATE TABLE priority (
  1230. id integer DEFAULT nextval('priority_id_seq'::regclass) NOT NULL,
  1231. priority text NOT NULL,
  1232. level integer NOT NULL,
  1233. created timestamp with time zone DEFAULT now() NOT NULL,
  1234. modified timestamp with time zone DEFAULT now() NOT NULL
  1235. );
  1236. ALTER TABLE public.priority OWNER TO dak;
  1237. --
  1238. -- Name: section_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1239. --
  1240. CREATE SEQUENCE section_id_seq
  1241. START WITH 1
  1242. INCREMENT BY 1
  1243. NO MINVALUE
  1244. MAXVALUE 2147483647
  1245. CACHE 1;
  1246. ALTER TABLE public.section_id_seq OWNER TO dak;
  1247. --
  1248. -- Name: section; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1249. --
  1250. CREATE TABLE section (
  1251. id integer DEFAULT nextval('section_id_seq'::regclass) NOT NULL,
  1252. section text NOT NULL,
  1253. created timestamp with time zone DEFAULT now() NOT NULL,
  1254. modified timestamp with time zone DEFAULT now() NOT NULL
  1255. );
  1256. ALTER TABLE public.section OWNER TO dak;
  1257. --
  1258. -- Name: source_acl; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1259. --
  1260. CREATE TABLE source_acl (
  1261. id integer NOT NULL,
  1262. access_level text NOT NULL,
  1263. created timestamp with time zone DEFAULT now() NOT NULL,
  1264. modified timestamp with time zone DEFAULT now() NOT NULL
  1265. );
  1266. ALTER TABLE public.source_acl OWNER TO dak;
  1267. --
  1268. -- Name: source_acl_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1269. --
  1270. CREATE SEQUENCE source_acl_id_seq
  1271. START WITH 1
  1272. INCREMENT BY 1
  1273. NO MINVALUE
  1274. NO MAXVALUE
  1275. CACHE 1;
  1276. ALTER TABLE public.source_acl_id_seq OWNER TO dak;
  1277. --
  1278. -- Name: source_acl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1279. --
  1280. ALTER SEQUENCE source_acl_id_seq OWNED BY source_acl.id;
  1281. --
  1282. -- Name: source_metadata; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1283. --
  1284. CREATE TABLE source_metadata (
  1285. src_id integer NOT NULL,
  1286. key_id integer NOT NULL,
  1287. value text NOT NULL
  1288. );
  1289. ALTER TABLE public.source_metadata OWNER TO dak;
  1290. --
  1291. -- Name: src_contents; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1292. --
  1293. CREATE TABLE src_contents (
  1294. file text NOT NULL,
  1295. source_id integer NOT NULL,
  1296. created timestamp with time zone DEFAULT now() NOT NULL,
  1297. modified timestamp with time zone DEFAULT now() NOT NULL
  1298. );
  1299. ALTER TABLE public.src_contents OWNER TO dak;
  1300. --
  1301. -- Name: src_format; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1302. --
  1303. CREATE TABLE src_format (
  1304. id integer NOT NULL,
  1305. format_name text NOT NULL,
  1306. created timestamp with time zone DEFAULT now() NOT NULL,
  1307. modified timestamp with time zone DEFAULT now() NOT NULL
  1308. );
  1309. ALTER TABLE public.src_format OWNER TO dak;
  1310. --
  1311. -- Name: src_format_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1312. --
  1313. CREATE SEQUENCE src_format_id_seq
  1314. START WITH 1
  1315. INCREMENT BY 1
  1316. NO MINVALUE
  1317. NO MAXVALUE
  1318. CACHE 1;
  1319. ALTER TABLE public.src_format_id_seq OWNER TO dak;
  1320. --
  1321. -- Name: src_format_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1322. --
  1323. ALTER SEQUENCE src_format_id_seq OWNED BY src_format.id;
  1324. --
  1325. -- Name: src_uploaders; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1326. --
  1327. CREATE TABLE src_uploaders (
  1328. id integer NOT NULL,
  1329. source integer NOT NULL,
  1330. maintainer integer NOT NULL,
  1331. created timestamp with time zone DEFAULT now() NOT NULL,
  1332. modified timestamp with time zone DEFAULT now() NOT NULL
  1333. );
  1334. ALTER TABLE public.src_uploaders OWNER TO dak;
  1335. --
  1336. -- Name: src_uploaders_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1337. --
  1338. CREATE SEQUENCE src_uploaders_id_seq
  1339. START WITH 1
  1340. INCREMENT BY 1
  1341. NO MINVALUE
  1342. NO MAXVALUE
  1343. CACHE 1;
  1344. ALTER TABLE public.src_uploaders_id_seq OWNER TO dak;
  1345. --
  1346. -- Name: src_uploaders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1347. --
  1348. ALTER SEQUENCE src_uploaders_id_seq OWNED BY src_uploaders.id;
  1349. --
  1350. -- Name: suite_architectures; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1351. --
  1352. CREATE TABLE suite_architectures (
  1353. suite integer NOT NULL,
  1354. architecture integer NOT NULL,
  1355. created timestamp with time zone DEFAULT now() NOT NULL,
  1356. modified timestamp with time zone DEFAULT now() NOT NULL
  1357. );
  1358. ALTER TABLE public.suite_architectures OWNER TO dak;
  1359. --
  1360. -- Name: suite_arch_by_name; Type: VIEW; Schema: public; Owner: dak
  1361. --
  1362. CREATE VIEW suite_arch_by_name AS
  1363. SELECT suite.suite_name AS suite, a.arch_string AS arch FROM ((suite_architectures sa JOIN architecture a ON ((sa.architecture = a.id))) JOIN suite ON ((sa.suite = suite.id))) WHERE (a.arch_string <> ALL (ARRAY['all'::text, 'source'::text]));
  1364. ALTER TABLE public.suite_arch_by_name OWNER TO dak;
  1365. --
  1366. -- Name: suite_build_queue_copy; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1367. --
  1368. CREATE TABLE suite_build_queue_copy (
  1369. suite integer NOT NULL,
  1370. build_queue_id integer NOT NULL,
  1371. created timestamp with time zone DEFAULT now() NOT NULL,
  1372. modified timestamp with time zone DEFAULT now() NOT NULL
  1373. );
  1374. ALTER TABLE public.suite_build_queue_copy OWNER TO dak;
  1375. --
  1376. -- Name: suite_src_formats; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1377. --
  1378. CREATE TABLE suite_src_formats (
  1379. suite integer NOT NULL,
  1380. src_format integer NOT NULL,
  1381. created timestamp with time zone DEFAULT now() NOT NULL,
  1382. modified timestamp with time zone DEFAULT now() NOT NULL
  1383. );
  1384. ALTER TABLE public.suite_src_formats OWNER TO dak;
  1385. --
  1386. -- Name: uid_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1387. --
  1388. CREATE SEQUENCE uid_id_seq
  1389. START WITH 1
  1390. INCREMENT BY 1
  1391. NO MINVALUE
  1392. NO MAXVALUE
  1393. CACHE 1;
  1394. ALTER TABLE public.uid_id_seq OWNER TO dak;
  1395. --
  1396. -- Name: uid; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1397. --
  1398. CREATE TABLE uid (
  1399. id integer DEFAULT nextval('uid_id_seq'::regclass) NOT NULL,
  1400. uid text NOT NULL,
  1401. name text,
  1402. created timestamp with time zone DEFAULT now() NOT NULL,
  1403. modified timestamp with time zone DEFAULT now() NOT NULL
  1404. );
  1405. ALTER TABLE public.uid OWNER TO dak;
  1406. --
  1407. -- Name: upload_blocks; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1408. --
  1409. CREATE TABLE upload_blocks (
  1410. id integer NOT NULL,
  1411. source text NOT NULL,
  1412. version debversion,
  1413. fingerprint_id integer,
  1414. uid_id integer,
  1415. reason text NOT NULL,
  1416. created timestamp with time zone DEFAULT now() NOT NULL,
  1417. modified timestamp with time zone DEFAULT now() NOT NULL,
  1418. CONSTRAINT upload_blocks_check CHECK (((fingerprint_id IS NOT NULL) OR (uid_id IS NOT NULL)))
  1419. );
  1420. ALTER TABLE public.upload_blocks OWNER TO dak;
  1421. --
  1422. -- Name: upload_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: dak
  1423. --
  1424. CREATE SEQUENCE upload_blocks_id_seq
  1425. START WITH 1
  1426. INCREMENT BY 1
  1427. NO MINVALUE
  1428. NO MAXVALUE
  1429. CACHE 1;
  1430. ALTER TABLE public.upload_blocks_id_seq OWNER TO dak;
  1431. --
  1432. -- Name: upload_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dak
  1433. --
  1434. ALTER SEQUENCE upload_blocks_id_seq OWNED BY upload_blocks.id;
  1435. --
  1436. -- Name: version_check; Type: TABLE; Schema: public; Owner: dak; Tablespace:
  1437. --
  1438. CREATE TABLE version_check (
  1439. suite integer NOT NULL,
  1440. "check" text NOT NULL,
  1441. reference integer NOT NULL,
  1442. CONSTRAINT version_check_check_check CHECK (("check" = ANY (ARRAY['Enhances'::text, 'MustBeNewerThan'::text, 'MustBeOlderThan'::text])))
  1443. );
  1444. ALTER TABLE public.version_check OWNER TO dak;
  1445. --
  1446. -- Name: version_checks; Type: VIEW; Schema: public; Owner: dak
  1447. --
  1448. CREATE VIEW version_checks AS
  1449. SELECT s.suite_name AS source_suite, v."check" AS condition, t.suite_name AS target_suite FROM ((suite s JOIN version_check v ON ((s.id = v.suite))) JOIN suite t ON ((v.reference = t.id))) ORDER BY s.suite_name, v."check", t.suite_name;
  1450. ALTER TABLE public.version_checks OWNER TO dak;
  1451. --
  1452. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1453. --
  1454. ALTER TABLE binary_acl ALTER COLUMN id SET DEFAULT nextval('binary_acl_id_seq'::regclass);
  1455. --
  1456. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1457. --
  1458. ALTER TABLE binary_acl_map ALTER COLUMN id SET DEFAULT nextval('binary_acl_map_id_seq'::regclass);
  1459. --
  1460. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1461. --
  1462. ALTER TABLE build_queue ALTER COLUMN id SET DEFAULT nextval('build_queue_id_seq'::regclass);
  1463. --
  1464. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1465. --
  1466. ALTER TABLE build_queue_files ALTER COLUMN id SET DEFAULT nextval('build_queue_files_id_seq'::regclass);
  1467. --
  1468. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1469. --
  1470. ALTER TABLE changelogs_text ALTER COLUMN id SET DEFAULT nextval('changelogs_text_id_seq'::regclass);
  1471. --
  1472. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1473. --
  1474. ALTER TABLE changes ALTER COLUMN id SET DEFAULT nextval('changes_id_seq'::regclass);
  1475. --
  1476. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1477. --
  1478. ALTER TABLE changes_pending_binaries ALTER COLUMN id SET DEFAULT nextval('changes_pending_binaries_id_seq'::regclass);
  1479. --
  1480. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1481. --
  1482. ALTER TABLE changes_pending_files ALTER COLUMN id SET DEFAULT nextval('changes_pending_files_id_seq'::regclass);
  1483. --
  1484. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1485. --
  1486. ALTER TABLE changes_pending_source ALTER COLUMN id SET DEFAULT nextval('changes_pending_source_id_seq'::regclass);
  1487. --
  1488. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1489. --
  1490. ALTER TABLE config ALTER COLUMN id SET DEFAULT nextval('config_id_seq'::regclass);
  1491. --
  1492. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1493. --
  1494. ALTER TABLE keyring_acl_map ALTER COLUMN id SET DEFAULT nextval('keyring_acl_map_id_seq'::regclass);
  1495. --
  1496. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1497. --
  1498. ALTER TABLE keyrings ALTER COLUMN id SET DEFAULT nextval('keyrings_id_seq'::regclass);
  1499. --
  1500. -- Name: key_id; Type: DEFAULT; Schema: public; Owner: dak
  1501. --
  1502. ALTER TABLE metadata_keys ALTER COLUMN key_id SET DEFAULT nextval('metadata_keys_key_id_seq'::regclass);
  1503. --
  1504. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1505. --
  1506. ALTER TABLE new_comments ALTER COLUMN id SET DEFAULT nextval('new_comments_id_seq'::regclass);
  1507. --
  1508. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1509. --
  1510. ALTER TABLE policy_queue ALTER COLUMN id SET DEFAULT nextval('policy_queue_id_seq'::regclass);
  1511. --
  1512. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1513. --
  1514. ALTER TABLE source_acl ALTER COLUMN id SET DEFAULT nextval('source_acl_id_seq'::regclass);
  1515. --
  1516. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1517. --
  1518. ALTER TABLE src_format ALTER COLUMN id SET DEFAULT nextval('src_format_id_seq'::regclass);
  1519. --
  1520. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1521. --
  1522. ALTER TABLE src_uploaders ALTER COLUMN id SET DEFAULT nextval('src_uploaders_id_seq'::regclass);
  1523. --
  1524. -- Name: id; Type: DEFAULT; Schema: public; Owner: dak
  1525. --
  1526. ALTER TABLE upload_blocks ALTER COLUMN id SET DEFAULT nextval('upload_blocks_id_seq'::regclass);
  1527. --
  1528. -- Name: architecture_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1529. --
  1530. ALTER TABLE ONLY architecture
  1531. ADD CONSTRAINT architecture_pkey PRIMARY KEY (id);
  1532. --
  1533. -- Name: archive_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1534. --
  1535. ALTER TABLE ONLY archive
  1536. ADD CONSTRAINT archive_pkey PRIMARY KEY (id);
  1537. --
  1538. -- Name: bin_associations_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1539. --
  1540. ALTER TABLE ONLY bin_associations
  1541. ADD CONSTRAINT bin_associations_pkey PRIMARY KEY (id);
  1542. --
  1543. -- Name: bin_contents_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1544. --
  1545. ALTER TABLE ONLY bin_contents
  1546. ADD CONSTRAINT bin_contents_pkey PRIMARY KEY (file, binary_id);
  1547. --
  1548. -- Name: binaries_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1549. --
  1550. ALTER TABLE ONLY binaries_metadata
  1551. ADD CONSTRAINT binaries_metadata_pkey PRIMARY KEY (bin_id, key_id);
  1552. --
  1553. -- Name: binaries_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1554. --
  1555. ALTER TABLE ONLY binaries
  1556. ADD CONSTRAINT binaries_pkey PRIMARY KEY (id);
  1557. --
  1558. -- Name: binary_acl_access_level_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1559. --
  1560. ALTER TABLE ONLY binary_acl
  1561. ADD CONSTRAINT binary_acl_access_level_key UNIQUE (access_level);
  1562. --
  1563. -- Name: binary_acl_map_fingerprint_id_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1564. --
  1565. ALTER TABLE ONLY binary_acl_map
  1566. ADD CONSTRAINT binary_acl_map_fingerprint_id_key UNIQUE (fingerprint_id, architecture_id);
  1567. --
  1568. -- Name: binary_acl_map_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1569. --
  1570. ALTER TABLE ONLY binary_acl_map
  1571. ADD CONSTRAINT binary_acl_map_pkey PRIMARY KEY (id);
  1572. --
  1573. -- Name: binary_acl_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1574. --
  1575. ALTER TABLE ONLY binary_acl
  1576. ADD CONSTRAINT binary_acl_pkey PRIMARY KEY (id);
  1577. --
  1578. -- Name: build_queue_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1579. --
  1580. ALTER TABLE ONLY build_queue
  1581. ADD CONSTRAINT build_queue_pkey PRIMARY KEY (id);
  1582. --
  1583. -- Name: build_queue_policy_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1584. --
  1585. ALTER TABLE ONLY build_queue_policy_files
  1586. ADD CONSTRAINT build_queue_policy_files_pkey PRIMARY KEY (build_queue_id, file_id);
  1587. --
  1588. -- Name: build_queue_queue_name_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1589. --
  1590. ALTER TABLE ONLY build_queue
  1591. ADD CONSTRAINT build_queue_queue_name_key UNIQUE (queue_name);
  1592. --
  1593. -- Name: changelogs_text_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1594. --
  1595. ALTER TABLE ONLY changelogs_text
  1596. ADD CONSTRAINT changelogs_text_pkey PRIMARY KEY (id);
  1597. --
  1598. -- Name: changes_pending_binaries_package_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1599. --
  1600. ALTER TABLE ONLY changes_pending_binaries
  1601. ADD CONSTRAINT changes_pending_binaries_package_key UNIQUE (package, version, architecture_id);
  1602. --
  1603. -- Name: changes_pending_binaries_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1604. --
  1605. ALTER TABLE ONLY changes_pending_binaries
  1606. ADD CONSTRAINT changes_pending_binaries_pkey PRIMARY KEY (id);
  1607. --
  1608. -- Name: changes_pending_files_filename_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1609. --
  1610. ALTER TABLE ONLY changes_pending_files
  1611. ADD CONSTRAINT changes_pending_files_filename_key UNIQUE (filename);
  1612. --
  1613. -- Name: changes_pending_files_map_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1614. --
  1615. ALTER TABLE ONLY changes_pending_files_map
  1616. ADD CONSTRAINT changes_pending_files_map_pkey PRIMARY KEY (file_id, change_id);
  1617. --
  1618. -- Name: changes_pending_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1619. --
  1620. ALTER TABLE ONLY changes_pending_files
  1621. ADD CONSTRAINT changes_pending_files_pkey PRIMARY KEY (id);
  1622. --
  1623. -- Name: changes_pending_source_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1624. --
  1625. ALTER TABLE ONLY changes_pending_source_files
  1626. ADD CONSTRAINT changes_pending_source_files_pkey PRIMARY KEY (pending_source_id, pending_file_id);
  1627. --
  1628. -- Name: changes_pending_source_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1629. --
  1630. ALTER TABLE ONLY changes_pending_source
  1631. ADD CONSTRAINT changes_pending_source_pkey PRIMARY KEY (id);
  1632. --
  1633. -- Name: changes_pool_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1634. --
  1635. ALTER TABLE ONLY changes_pool_files
  1636. ADD CONSTRAINT changes_pool_files_pkey PRIMARY KEY (changeid, fileid);
  1637. --
  1638. -- Name: component_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1639. --
  1640. ALTER TABLE ONLY component
  1641. ADD CONSTRAINT component_pkey PRIMARY KEY (id);
  1642. --
  1643. -- Name: config_name_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1644. --
  1645. ALTER TABLE ONLY config
  1646. ADD CONSTRAINT config_name_key UNIQUE (name);
  1647. --
  1648. -- Name: config_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1649. --
  1650. ALTER TABLE ONLY config
  1651. ADD CONSTRAINT config_pkey PRIMARY KEY (id);
  1652. --
  1653. -- Name: dsc_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1654. --
  1655. ALTER TABLE ONLY dsc_files
  1656. ADD CONSTRAINT dsc_files_pkey PRIMARY KEY (id);
  1657. --
  1658. -- Name: external_overrides_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1659. --
  1660. ALTER TABLE ONLY external_overrides
  1661. ADD CONSTRAINT external_overrides_pkey PRIMARY KEY (suite, component, package, key);
  1662. --
  1663. -- Name: extra_src_references_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1664. --
  1665. ALTER TABLE ONLY extra_src_references
  1666. ADD CONSTRAINT extra_src_references_pkey PRIMARY KEY (bin_id, src_id);
  1667. --
  1668. -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1669. --
  1670. ALTER TABLE ONLY files
  1671. ADD CONSTRAINT files_pkey PRIMARY KEY (id);
  1672. --
  1673. -- Name: fingerprint_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1674. --
  1675. ALTER TABLE ONLY fingerprint
  1676. ADD CONSTRAINT fingerprint_pkey PRIMARY KEY (id);
  1677. --
  1678. -- Name: keyring_acl_map_keyring_id_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1679. --
  1680. ALTER TABLE ONLY keyring_acl_map
  1681. ADD CONSTRAINT keyring_acl_map_keyring_id_key UNIQUE (keyring_id, architecture_id);
  1682. --
  1683. -- Name: keyring_acl_map_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1684. --
  1685. ALTER TABLE ONLY keyring_acl_map
  1686. ADD CONSTRAINT keyring_acl_map_pkey PRIMARY KEY (id);
  1687. --
  1688. -- Name: keyrings_name_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1689. --
  1690. ALTER TABLE ONLY keyrings
  1691. ADD CONSTRAINT keyrings_name_key UNIQUE (name);
  1692. --
  1693. -- Name: keyrings_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1694. --
  1695. ALTER TABLE ONLY keyrings
  1696. ADD CONSTRAINT keyrings_pkey PRIMARY KEY (id);
  1697. --
  1698. -- Name: known_changes_changesname_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1699. --
  1700. ALTER TABLE ONLY changes
  1701. ADD CONSTRAINT known_changes_changesname_key UNIQUE (changesname);
  1702. --
  1703. -- Name: known_changes_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1704. --
  1705. ALTER TABLE ONLY changes
  1706. ADD CONSTRAINT known_changes_pkey PRIMARY KEY (id);
  1707. --
  1708. -- Name: location_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1709. --
  1710. ALTER TABLE ONLY location
  1711. ADD CONSTRAINT location_pkey PRIMARY KEY (id);
  1712. --
  1713. -- Name: maintainer_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1714. --
  1715. ALTER TABLE ONLY maintainer
  1716. ADD CONSTRAINT maintainer_pkey PRIMARY KEY (id);
  1717. --
  1718. -- Name: metadata_keys_key_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1719. --
  1720. ALTER TABLE ONLY metadata_keys
  1721. ADD CONSTRAINT metadata_keys_key_key UNIQUE (key);
  1722. --
  1723. -- Name: metadata_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1724. --
  1725. ALTER TABLE ONLY metadata_keys
  1726. ADD CONSTRAINT metadata_keys_pkey PRIMARY KEY (key_id);
  1727. --
  1728. -- Name: new_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1729. --
  1730. ALTER TABLE ONLY new_comments
  1731. ADD CONSTRAINT new_comments_pkey PRIMARY KEY (id);
  1732. --
  1733. -- Name: override_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1734. --
  1735. ALTER TABLE ONLY override
  1736. ADD CONSTRAINT override_pkey PRIMARY KEY (suite, component, package, type);
  1737. --
  1738. -- Name: override_type_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1739. --
  1740. ALTER TABLE ONLY override_type
  1741. ADD CONSTRAINT override_type_pkey PRIMARY KEY (id);
  1742. --
  1743. -- Name: policy_queue_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1744. --
  1745. ALTER TABLE ONLY policy_queue
  1746. ADD CONSTRAINT policy_queue_pkey PRIMARY KEY (id);
  1747. --
  1748. -- Name: policy_queue_queue_name_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1749. --
  1750. ALTER TABLE ONLY policy_queue
  1751. ADD CONSTRAINT policy_queue_queue_name_key UNIQUE (queue_name);
  1752. --
  1753. -- Name: priority_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1754. --
  1755. ALTER TABLE ONLY priority
  1756. ADD CONSTRAINT priority_pkey PRIMARY KEY (id);
  1757. --
  1758. -- Name: queue_files_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1759. --
  1760. ALTER TABLE ONLY build_queue_files
  1761. ADD CONSTRAINT queue_files_pkey PRIMARY KEY (id);
  1762. --
  1763. -- Name: section_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1764. --
  1765. ALTER TABLE ONLY section
  1766. ADD CONSTRAINT section_pkey PRIMARY KEY (id);
  1767. --
  1768. -- Name: source_acl_access_level_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1769. --
  1770. ALTER TABLE ONLY source_acl
  1771. ADD CONSTRAINT source_acl_access_level_key UNIQUE (access_level);
  1772. --
  1773. -- Name: source_acl_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1774. --
  1775. ALTER TABLE ONLY source_acl
  1776. ADD CONSTRAINT source_acl_pkey PRIMARY KEY (id);
  1777. --
  1778. -- Name: source_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1779. --
  1780. ALTER TABLE ONLY source_metadata
  1781. ADD CONSTRAINT source_metadata_pkey PRIMARY KEY (src_id, key_id);
  1782. --
  1783. -- Name: source_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1784. --
  1785. ALTER TABLE ONLY source
  1786. ADD CONSTRAINT source_pkey PRIMARY KEY (id);
  1787. --
  1788. -- Name: src_associations_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1789. --
  1790. ALTER TABLE ONLY src_associations
  1791. ADD CONSTRAINT src_associations_pkey PRIMARY KEY (id);
  1792. --
  1793. -- Name: src_contents_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1794. --
  1795. ALTER TABLE ONLY src_contents
  1796. ADD CONSTRAINT src_contents_pkey PRIMARY KEY (file, source_id);
  1797. --
  1798. -- Name: src_format_format_name_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1799. --
  1800. ALTER TABLE ONLY src_format
  1801. ADD CONSTRAINT src_format_format_name_key UNIQUE (format_name);
  1802. --
  1803. -- Name: src_format_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1804. --
  1805. ALTER TABLE ONLY src_format
  1806. ADD CONSTRAINT src_format_pkey PRIMARY KEY (id);
  1807. --
  1808. -- Name: src_uploaders_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1809. --
  1810. ALTER TABLE ONLY src_uploaders
  1811. ADD CONSTRAINT src_uploaders_pkey PRIMARY KEY (id);
  1812. --
  1813. -- Name: src_uploaders_source_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1814. --
  1815. ALTER TABLE ONLY src_uploaders
  1816. ADD CONSTRAINT src_uploaders_source_key UNIQUE (source, maintainer);
  1817. --
  1818. -- Name: suite_architectures_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1819. --
  1820. ALTER TABLE ONLY suite_architectures
  1821. ADD CONSTRAINT suite_architectures_pkey PRIMARY KEY (suite, architecture);
  1822. --
  1823. -- Name: suite_name_unique; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1824. --
  1825. ALTER TABLE ONLY suite
  1826. ADD CONSTRAINT suite_name_unique UNIQUE (suite_name);
  1827. --
  1828. -- Name: suite_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1829. --
  1830. ALTER TABLE ONLY suite
  1831. ADD CONSTRAINT suite_pkey PRIMARY KEY (id);
  1832. --
  1833. -- Name: suite_queue_copy_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1834. --
  1835. ALTER TABLE ONLY suite_build_queue_copy
  1836. ADD CONSTRAINT suite_queue_copy_pkey PRIMARY KEY (suite, build_queue_id);
  1837. --
  1838. -- Name: suite_src_formats_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1839. --
  1840. ALTER TABLE ONLY suite_src_formats
  1841. ADD CONSTRAINT suite_src_formats_pkey PRIMARY KEY (suite, src_format);
  1842. --
  1843. -- Name: suite_src_formats_suite_key; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1844. --
  1845. ALTER TABLE ONLY suite_src_formats
  1846. ADD CONSTRAINT suite_src_formats_suite_key UNIQUE (suite, src_format);
  1847. --
  1848. -- Name: uid_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1849. --
  1850. ALTER TABLE ONLY uid
  1851. ADD CONSTRAINT uid_pkey PRIMARY KEY (id);
  1852. --
  1853. -- Name: upload_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1854. --
  1855. ALTER TABLE ONLY upload_blocks
  1856. ADD CONSTRAINT upload_blocks_pkey PRIMARY KEY (id);
  1857. --
  1858. -- Name: version_check_pkey; Type: CONSTRAINT; Schema: public; Owner: dak; Tablespace:
  1859. --
  1860. ALTER TABLE ONLY version_check
  1861. ADD CONSTRAINT version_check_pkey PRIMARY KEY (suite, "check", reference);
  1862. --
  1863. -- Name: architecture_arch_string_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1864. --
  1865. CREATE UNIQUE INDEX architecture_arch_string_key ON architecture USING btree (arch_string);
  1866. --
  1867. -- Name: archive_name_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1868. --
  1869. CREATE UNIQUE INDEX archive_name_key ON archive USING btree (name);
  1870. --
  1871. -- Name: bin_associations_bin; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1872. --
  1873. CREATE INDEX bin_associations_bin ON bin_associations USING btree (bin);
  1874. --
  1875. -- Name: bin_associations_suite_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1876. --
  1877. CREATE UNIQUE INDEX bin_associations_suite_key ON bin_associations USING btree (suite, bin);
  1878. --
  1879. -- Name: binaries_architecture_idx; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1880. --
  1881. CREATE INDEX binaries_architecture_idx ON binaries USING btree (architecture);
  1882. --
  1883. -- Name: binaries_by_package; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1884. --
  1885. CREATE INDEX binaries_by_package ON binaries USING btree (id, package);
  1886. --
  1887. -- Name: binaries_file_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1888. --
  1889. CREATE UNIQUE INDEX binaries_file_key ON binaries USING btree (file);
  1890. --
  1891. -- Name: binaries_files; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1892. --
  1893. CREATE INDEX binaries_files ON binaries USING btree (file);
  1894. --
  1895. -- Name: binaries_fingerprint; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1896. --
  1897. CREATE INDEX binaries_fingerprint ON binaries USING btree (sig_fpr);
  1898. --
  1899. -- Name: binaries_id; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1900. --
  1901. CREATE UNIQUE INDEX binaries_id ON binaries USING btree (id);
  1902. --
  1903. -- Name: binaries_maintainer; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1904. --
  1905. CREATE INDEX binaries_maintainer ON binaries USING btree (maintainer);
  1906. --
  1907. -- Name: binaries_metadata_depends; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1908. --
  1909. CREATE INDEX binaries_metadata_depends ON binaries_metadata USING btree (bin_id) WHERE (key_id = 44);
  1910. --
  1911. -- Name: binaries_metadata_provides; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1912. --
  1913. CREATE INDEX binaries_metadata_provides ON binaries_metadata USING btree (bin_id) WHERE (key_id = 51);
  1914. --
  1915. -- Name: binaries_package_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1916. --
  1917. CREATE UNIQUE INDEX binaries_package_key ON binaries USING btree (package, version, architecture);
  1918. --
  1919. -- Name: changesapproved_for; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1920. --
  1921. CREATE INDEX changesapproved_for ON changes USING btree (approved_for);
  1922. --
  1923. -- Name: changesdistribution_ind; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1924. --
  1925. CREATE INDEX changesdistribution_ind ON changes USING btree (distribution);
  1926. --
  1927. -- Name: changesin_queue; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1928. --
  1929. CREATE INDEX changesin_queue ON changes USING btree (in_queue);
  1930. --
  1931. -- Name: changesin_queue_approved_for; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1932. --
  1933. CREATE INDEX changesin_queue_approved_for ON changes USING btree (in_queue, approved_for);
  1934. --
  1935. -- Name: changesname_ind; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1936. --
  1937. CREATE INDEX changesname_ind ON changes USING btree (changesname);
  1938. --
  1939. -- Name: changessource_ind; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1940. --
  1941. CREATE INDEX changessource_ind ON changes USING btree (source);
  1942. --
  1943. -- Name: changestimestamp_ind; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1944. --
  1945. CREATE INDEX changestimestamp_ind ON changes USING btree (seen);
  1946. --
  1947. -- Name: changesurgency_ind; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1948. --
  1949. CREATE INDEX changesurgency_ind ON changes USING btree (urgency);
  1950. --
  1951. -- Name: component_name_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1952. --
  1953. CREATE UNIQUE INDEX component_name_key ON component USING btree (name);
  1954. --
  1955. -- Name: dsc_files_file; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1956. --
  1957. CREATE INDEX dsc_files_file ON dsc_files USING btree (file);
  1958. --
  1959. -- Name: dsc_files_source_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1960. --
  1961. CREATE UNIQUE INDEX dsc_files_source_key ON dsc_files USING btree (source, file);
  1962. --
  1963. -- Name: files_filename_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1964. --
  1965. CREATE UNIQUE INDEX files_filename_key ON files USING btree (filename, location);
  1966. --
  1967. -- Name: files_last_used; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1968. --
  1969. CREATE INDEX files_last_used ON files USING btree (last_used);
  1970. --
  1971. -- Name: fingerprint_fingerprint_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1972. --
  1973. CREATE UNIQUE INDEX fingerprint_fingerprint_key ON fingerprint USING btree (fingerprint);
  1974. --
  1975. -- Name: ind_bin_contents_binary; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1976. --
  1977. CREATE INDEX ind_bin_contents_binary ON bin_contents USING btree (binary_id);
  1978. --
  1979. -- Name: jjt; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1980. --
  1981. CREATE INDEX jjt ON files USING btree (id);
  1982. --
  1983. -- Name: jjt2; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1984. --
  1985. CREATE INDEX jjt2 ON files USING btree (location);
  1986. --
  1987. -- Name: jjt3; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1988. --
  1989. CREATE INDEX jjt3 ON files USING btree (id, location);
  1990. --
  1991. -- Name: jjt4; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1992. --
  1993. CREATE INDEX jjt4 ON binaries USING btree (source);
  1994. --
  1995. -- Name: jjt5; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  1996. --
  1997. CREATE INDEX jjt5 ON binaries USING btree (id, source);
  1998. --
  1999. -- Name: jjt_override_type_idx; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2000. --
  2001. CREATE INDEX jjt_override_type_idx ON override USING btree (type);
  2002. --
  2003. -- Name: maintainer_name_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2004. --
  2005. CREATE UNIQUE INDEX maintainer_name_key ON maintainer USING btree (name);
  2006. --
  2007. -- Name: override_by_package; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2008. --
  2009. CREATE INDEX override_by_package ON override USING btree (package);
  2010. --
  2011. -- Name: override_suite_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2012. --
  2013. CREATE UNIQUE INDEX override_suite_key ON override USING btree (suite, component, package, type);
  2014. --
  2015. -- Name: override_type_type_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2016. --
  2017. CREATE UNIQUE INDEX override_type_type_key ON override_type USING btree (type);
  2018. --
  2019. -- Name: priority_level_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2020. --
  2021. CREATE UNIQUE INDEX priority_level_key ON priority USING btree (level);
  2022. --
  2023. -- Name: priority_priority_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2024. --
  2025. CREATE UNIQUE INDEX priority_priority_key ON priority USING btree (priority);
  2026. --
  2027. -- Name: section_section_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2028. --
  2029. CREATE UNIQUE INDEX section_section_key ON section USING btree (section);
  2030. --
  2031. -- Name: source_file_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2032. --
  2033. CREATE UNIQUE INDEX source_file_key ON source USING btree (file);
  2034. --
  2035. -- Name: source_fingerprint; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2036. --
  2037. CREATE INDEX source_fingerprint ON source USING btree (sig_fpr);
  2038. --
  2039. -- Name: source_maintainer; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2040. --
  2041. CREATE INDEX source_maintainer ON source USING btree (maintainer);
  2042. --
  2043. -- Name: source_source_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2044. --
  2045. CREATE UNIQUE INDEX source_source_key ON source USING btree (source, version);
  2046. --
  2047. -- Name: src_associations_source; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2048. --
  2049. CREATE INDEX src_associations_source ON src_associations USING btree (source);
  2050. --
  2051. -- Name: src_associations_suite_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2052. --
  2053. CREATE UNIQUE INDEX src_associations_suite_key ON src_associations USING btree (suite, source);
  2054. --
  2055. -- Name: src_contents_source_id_idx; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2056. --
  2057. CREATE INDEX src_contents_source_id_idx ON src_contents USING btree (source_id);
  2058. --
  2059. -- Name: suite_architectures_suite_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2060. --
  2061. CREATE UNIQUE INDEX suite_architectures_suite_key ON suite_architectures USING btree (suite, architecture);
  2062. --
  2063. -- Name: suite_hash; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2064. --
  2065. CREATE INDEX suite_hash ON suite USING hash (suite_name);
  2066. --
  2067. -- Name: uid_uid_key; Type: INDEX; Schema: public; Owner: dak; Tablespace:
  2068. --
  2069. CREATE UNIQUE INDEX uid_uid_key ON uid USING btree (uid);
  2070. --
  2071. -- Name: modified_architecture; Type: TRIGGER; Schema: public; Owner: dak
  2072. --
  2073. CREATE TRIGGER modified_architecture BEFORE UPDATE ON architecture FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2074. --
  2075. -- Name: modified_archive; Type: TRIGGER; Schema: public; Owner: dak
  2076. --
  2077. CREATE TRIGGER modified_archive BEFORE UPDATE ON archive FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2078. --
  2079. -- Name: modified_bin_associations; Type: TRIGGER; Schema: public; Owner: dak
  2080. --
  2081. CREATE TRIGGER modified_bin_associations BEFORE UPDATE ON bin_associations FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2082. --
  2083. -- Name: modified_bin_contents; Type: TRIGGER; Schema: public; Owner: dak
  2084. --
  2085. CREATE TRIGGER modified_bin_contents BEFORE UPDATE ON bin_contents FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2086. --
  2087. -- Name: modified_binaries; Type: TRIGGER; Schema: public; Owner: dak
  2088. --
  2089. CREATE TRIGGER modified_binaries BEFORE UPDATE ON binaries FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2090. --
  2091. -- Name: modified_binary_acl; Type: TRIGGER; Schema: public; Owner: dak
  2092. --
  2093. CREATE TRIGGER modified_binary_acl BEFORE UPDATE ON binary_acl FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2094. --
  2095. -- Name: modified_binary_acl_map; Type: TRIGGER; Schema: public; Owner: dak
  2096. --
  2097. CREATE TRIGGER modified_binary_acl_map BEFORE UPDATE ON binary_acl_map FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2098. --
  2099. -- Name: modified_build_queue; Type: TRIGGER; Schema: public; Owner: dak
  2100. --
  2101. CREATE TRIGGER modified_build_queue BEFORE UPDATE ON build_queue FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2102. --
  2103. -- Name: modified_build_queue_files; Type: TRIGGER; Schema: public; Owner: dak
  2104. --
  2105. CREATE TRIGGER modified_build_queue_files BEFORE UPDATE ON build_queue_files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2106. --
  2107. -- Name: modified_changes; Type: TRIGGER; Schema: public; Owner: dak
  2108. --
  2109. CREATE TRIGGER modified_changes BEFORE UPDATE ON changes FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2110. --
  2111. -- Name: modified_changes_pending_binaries; Type: TRIGGER; Schema: public; Owner: dak
  2112. --
  2113. CREATE TRIGGER modified_changes_pending_binaries BEFORE UPDATE ON changes_pending_binaries FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2114. --
  2115. -- Name: modified_changes_pending_files; Type: TRIGGER; Schema: public; Owner: dak
  2116. --
  2117. CREATE TRIGGER modified_changes_pending_files BEFORE UPDATE ON changes_pending_files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2118. --
  2119. -- Name: modified_changes_pending_files_map; Type: TRIGGER; Schema: public; Owner: dak
  2120. --
  2121. CREATE TRIGGER modified_changes_pending_files_map BEFORE UPDATE ON changes_pending_files_map FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2122. --
  2123. -- Name: modified_changes_pending_source; Type: TRIGGER; Schema: public; Owner: dak
  2124. --
  2125. CREATE TRIGGER modified_changes_pending_source BEFORE UPDATE ON changes_pending_source FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2126. --
  2127. -- Name: modified_changes_pending_source_files; Type: TRIGGER; Schema: public; Owner: dak
  2128. --
  2129. CREATE TRIGGER modified_changes_pending_source_files BEFORE UPDATE ON changes_pending_source_files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2130. --
  2131. -- Name: modified_changes_pool_files; Type: TRIGGER; Schema: public; Owner: dak
  2132. --
  2133. CREATE TRIGGER modified_changes_pool_files BEFORE UPDATE ON changes_pool_files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2134. --
  2135. -- Name: modified_component; Type: TRIGGER; Schema: public; Owner: dak
  2136. --
  2137. CREATE TRIGGER modified_component BEFORE UPDATE ON component FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2138. --
  2139. -- Name: modified_config; Type: TRIGGER; Schema: public; Owner: dak
  2140. --
  2141. CREATE TRIGGER modified_config BEFORE UPDATE ON config FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2142. --
  2143. -- Name: modified_dsc_files; Type: TRIGGER; Schema: public; Owner: dak
  2144. --
  2145. CREATE TRIGGER modified_dsc_files BEFORE UPDATE ON dsc_files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2146. --
  2147. -- Name: modified_files; Type: TRIGGER; Schema: public; Owner: dak
  2148. --
  2149. CREATE TRIGGER modified_files BEFORE UPDATE ON files FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2150. --
  2151. -- Name: modified_fingerprint; Type: TRIGGER; Schema: public; Owner: dak
  2152. --
  2153. CREATE TRIGGER modified_fingerprint BEFORE UPDATE ON fingerprint FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2154. --
  2155. -- Name: modified_keyring_acl_map; Type: TRIGGER; Schema: public; Owner: dak
  2156. --
  2157. CREATE TRIGGER modified_keyring_acl_map BEFORE UPDATE ON keyring_acl_map FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2158. --
  2159. -- Name: modified_keyrings; Type: TRIGGER; Schema: public; Owner: dak
  2160. --
  2161. CREATE TRIGGER modified_keyrings BEFORE UPDATE ON keyrings FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2162. --
  2163. -- Name: modified_location; Type: TRIGGER; Schema: public; Owner: dak
  2164. --
  2165. CREATE TRIGGER modified_location BEFORE UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2166. --
  2167. -- Name: modified_maintainer; Type: TRIGGER; Schema: public; Owner: dak
  2168. --
  2169. CREATE TRIGGER modified_maintainer BEFORE UPDATE ON maintainer FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2170. --
  2171. -- Name: modified_new_comments; Type: TRIGGER; Schema: public; Owner: dak
  2172. --
  2173. CREATE TRIGGER modified_new_comments BEFORE UPDATE ON new_comments FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2174. --
  2175. -- Name: modified_override; Type: TRIGGER; Schema: public; Owner: dak
  2176. --
  2177. CREATE TRIGGER modified_override BEFORE UPDATE ON override FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2178. --
  2179. -- Name: modified_override_type; Type: TRIGGER; Schema: public; Owner: dak
  2180. --
  2181. CREATE TRIGGER modified_override_type BEFORE UPDATE ON override_type FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2182. --
  2183. -- Name: modified_policy_queue; Type: TRIGGER; Schema: public; Owner: dak
  2184. --
  2185. CREATE TRIGGER modified_policy_queue BEFORE UPDATE ON policy_queue FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2186. --
  2187. -- Name: modified_priority; Type: TRIGGER; Schema: public; Owner: dak
  2188. --
  2189. CREATE TRIGGER modified_priority BEFORE UPDATE ON priority FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2190. --
  2191. -- Name: modified_section; Type: TRIGGER; Schema: public; Owner: dak
  2192. --
  2193. CREATE TRIGGER modified_section BEFORE UPDATE ON section FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2194. --
  2195. -- Name: modified_source; Type: TRIGGER; Schema: public; Owner: dak
  2196. --
  2197. CREATE TRIGGER modified_source BEFORE UPDATE ON source FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2198. --
  2199. -- Name: modified_source_acl; Type: TRIGGER; Schema: public; Owner: dak
  2200. --
  2201. CREATE TRIGGER modified_source_acl BEFORE UPDATE ON source_acl FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2202. --
  2203. -- Name: modified_src_associations; Type: TRIGGER; Schema: public; Owner: dak
  2204. --
  2205. CREATE TRIGGER modified_src_associations BEFORE UPDATE ON src_associations FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2206. --
  2207. -- Name: modified_src_contents; Type: TRIGGER; Schema: public; Owner: dak
  2208. --
  2209. CREATE TRIGGER modified_src_contents BEFORE UPDATE ON src_contents FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2210. --
  2211. -- Name: modified_src_format; Type: TRIGGER; Schema: public; Owner: dak
  2212. --
  2213. CREATE TRIGGER modified_src_format BEFORE UPDATE ON src_format FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2214. --
  2215. -- Name: modified_src_uploaders; Type: TRIGGER; Schema: public; Owner: dak
  2216. --
  2217. CREATE TRIGGER modified_src_uploaders BEFORE UPDATE ON src_uploaders FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2218. --
  2219. -- Name: modified_suite; Type: TRIGGER; Schema: public; Owner: dak
  2220. --
  2221. CREATE TRIGGER modified_suite BEFORE UPDATE ON suite FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2222. --
  2223. -- Name: modified_suite_architectures; Type: TRIGGER; Schema: public; Owner: dak
  2224. --
  2225. CREATE TRIGGER modified_suite_architectures BEFORE UPDATE ON suite_architectures FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2226. --
  2227. -- Name: modified_suite_build_queue_copy; Type: TRIGGER; Schema: public; Owner: dak
  2228. --
  2229. CREATE TRIGGER modified_suite_build_queue_copy BEFORE UPDATE ON suite_build_queue_copy FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2230. --
  2231. -- Name: modified_suite_src_formats; Type: TRIGGER; Schema: public; Owner: dak
  2232. --
  2233. CREATE TRIGGER modified_suite_src_formats BEFORE UPDATE ON suite_src_formats FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2234. --
  2235. -- Name: modified_uid; Type: TRIGGER; Schema: public; Owner: dak
  2236. --
  2237. CREATE TRIGGER modified_uid BEFORE UPDATE ON uid FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2238. --
  2239. -- Name: modified_upload_blocks; Type: TRIGGER; Schema: public; Owner: dak
  2240. --
  2241. CREATE TRIGGER modified_upload_blocks BEFORE UPDATE ON upload_blocks FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified();
  2242. --
  2243. -- Name: trigger_bin_associations_audit; Type: TRIGGER; Schema: public; Owner: dak
  2244. --
  2245. CREATE TRIGGER trigger_bin_associations_audit AFTER INSERT OR DELETE ON bin_associations FOR EACH ROW EXECUTE PROCEDURE trigger_binsrc_assoc_update();
  2246. --
  2247. -- Name: trigger_override_audit; Type: TRIGGER; Schema: public; Owner: dak
  2248. --
  2249. CREATE TRIGGER trigger_override_audit AFTER UPDATE ON override FOR EACH ROW EXECUTE PROCEDURE trigger_override_update();
  2250. --
  2251. -- Name: trigger_src_associations_audit; Type: TRIGGER; Schema: public; Owner: dak
  2252. --
  2253. CREATE TRIGGER trigger_src_associations_audit AFTER INSERT OR DELETE ON src_associations FOR EACH ROW EXECUTE PROCEDURE trigger_binsrc_assoc_update();
  2254. --
  2255. -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2256. --
  2257. ALTER TABLE ONLY fingerprint
  2258. ADD CONSTRAINT "$1" FOREIGN KEY (keyring) REFERENCES keyrings(id);
  2259. --
  2260. -- Name: bin_associations_bin; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2261. --
  2262. ALTER TABLE ONLY bin_associations
  2263. ADD CONSTRAINT bin_associations_bin FOREIGN KEY (bin) REFERENCES binaries(id) MATCH FULL;
  2264. --
  2265. -- Name: bin_associations_suite; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2266. --
  2267. ALTER TABLE ONLY bin_associations
  2268. ADD CONSTRAINT bin_associations_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
  2269. --
  2270. -- Name: bin_contents_bin_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2271. --
  2272. ALTER TABLE ONLY bin_contents
  2273. ADD CONSTRAINT bin_contents_bin_fkey FOREIGN KEY (binary_id) REFERENCES binaries(id) ON DELETE CASCADE;
  2274. --
  2275. -- Name: binaries_architecture; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2276. --
  2277. ALTER TABLE ONLY binaries
  2278. ADD CONSTRAINT binaries_architecture FOREIGN KEY (architecture) REFERENCES architecture(id) MATCH FULL;
  2279. --
  2280. -- Name: binaries_file; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2281. --
  2282. ALTER TABLE ONLY binaries
  2283. ADD CONSTRAINT binaries_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL;
  2284. --
  2285. -- Name: binaries_maintainer; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2286. --
  2287. ALTER TABLE ONLY binaries
  2288. ADD CONSTRAINT binaries_maintainer FOREIGN KEY (maintainer) REFERENCES maintainer(id) MATCH FULL;
  2289. --
  2290. -- Name: binaries_metadata_bin_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2291. --
  2292. ALTER TABLE ONLY binaries_metadata
  2293. ADD CONSTRAINT binaries_metadata_bin_id_fkey FOREIGN KEY (bin_id) REFERENCES binaries(id) ON DELETE CASCADE;
  2294. --
  2295. -- Name: binaries_metadata_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2296. --
  2297. ALTER TABLE ONLY binaries_metadata
  2298. ADD CONSTRAINT binaries_metadata_key_id_fkey FOREIGN KEY (key_id) REFERENCES metadata_keys(key_id);
  2299. --
  2300. -- Name: binaries_sig_fpr; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2301. --
  2302. ALTER TABLE ONLY binaries
  2303. ADD CONSTRAINT binaries_sig_fpr FOREIGN KEY (sig_fpr) REFERENCES fingerprint(id) MATCH FULL;
  2304. --
  2305. -- Name: binaries_source; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2306. --
  2307. ALTER TABLE ONLY binaries
  2308. ADD CONSTRAINT binaries_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL;
  2309. --
  2310. -- Name: binary_acl_map_architecture_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2311. --
  2312. ALTER TABLE ONLY binary_acl_map
  2313. ADD CONSTRAINT binary_acl_map_architecture_id_fkey FOREIGN KEY (architecture_id) REFERENCES architecture(id);
  2314. --
  2315. -- Name: binary_acl_map_fingerprint_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2316. --
  2317. ALTER TABLE ONLY binary_acl_map
  2318. ADD CONSTRAINT binary_acl_map_fingerprint_id_fkey FOREIGN KEY (fingerprint_id) REFERENCES fingerprint(id);
  2319. --
  2320. -- Name: build_queue_files_build_queue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2321. --
  2322. ALTER TABLE ONLY build_queue_files
  2323. ADD CONSTRAINT build_queue_files_build_queue_id_fkey FOREIGN KEY (build_queue_id) REFERENCES build_queue(id) ON DELETE CASCADE;
  2324. --
  2325. -- Name: build_queue_policy_files_build_queue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2326. --
  2327. ALTER TABLE ONLY build_queue_policy_files
  2328. ADD CONSTRAINT build_queue_policy_files_build_queue_id_fkey FOREIGN KEY (build_queue_id) REFERENCES build_queue(id) ON DELETE CASCADE;
  2329. --
  2330. -- Name: build_queue_policy_files_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2331. --
  2332. ALTER TABLE ONLY build_queue_policy_files
  2333. ADD CONSTRAINT build_queue_policy_files_file_id_fkey FOREIGN KEY (file_id) REFERENCES changes_pending_files(id) ON DELETE CASCADE;
  2334. --
  2335. -- Name: changes_pending_binaries_architecture_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2336. --
  2337. ALTER TABLE ONLY changes_pending_binaries
  2338. ADD CONSTRAINT changes_pending_binaries_architecture_id_fkey FOREIGN KEY (architecture_id) REFERENCES architecture(id);
  2339. --
  2340. -- Name: changes_pending_binaries_change_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2341. --
  2342. ALTER TABLE ONLY changes_pending_binaries
  2343. ADD CONSTRAINT changes_pending_binaries_change_id_fkey FOREIGN KEY (change_id) REFERENCES changes(id);
  2344. --
  2345. -- Name: changes_pending_binaries_pending_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2346. --
  2347. ALTER TABLE ONLY changes_pending_binaries
  2348. ADD CONSTRAINT changes_pending_binaries_pending_file_id_fkey FOREIGN KEY (pending_file_id) REFERENCES changes_pending_files(id);
  2349. --
  2350. -- Name: changes_pending_binaries_pending_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2351. --
  2352. ALTER TABLE ONLY changes_pending_binaries
  2353. ADD CONSTRAINT changes_pending_binaries_pending_source_id_fkey FOREIGN KEY (pending_source_id) REFERENCES changes_pending_source(id);
  2354. --
  2355. -- Name: changes_pending_binaries_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2356. --
  2357. ALTER TABLE ONLY changes_pending_binaries
  2358. ADD CONSTRAINT changes_pending_binaries_source_id_fkey FOREIGN KEY (source_id) REFERENCES source(id);
  2359. --
  2360. -- Name: changes_pending_files_map_change_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2361. --
  2362. ALTER TABLE ONLY changes_pending_files_map
  2363. ADD CONSTRAINT changes_pending_files_map_change_id_fkey FOREIGN KEY (change_id) REFERENCES changes(id);
  2364. --
  2365. -- Name: changes_pending_files_map_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2366. --
  2367. ALTER TABLE ONLY changes_pending_files_map
  2368. ADD CONSTRAINT changes_pending_files_map_file_id_fkey FOREIGN KEY (file_id) REFERENCES changes_pending_files(id);
  2369. --
  2370. -- Name: changes_pending_source_change_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2371. --
  2372. ALTER TABLE ONLY changes_pending_source
  2373. ADD CONSTRAINT changes_pending_source_change_id_fkey FOREIGN KEY (change_id) REFERENCES changes(id);
  2374. --
  2375. -- Name: changes_pending_source_changedby_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2376. --
  2377. ALTER TABLE ONLY changes_pending_source
  2378. ADD CONSTRAINT changes_pending_source_changedby_id_fkey FOREIGN KEY (changedby_id) REFERENCES maintainer(id);
  2379. --
  2380. -- Name: changes_pending_source_files_pending_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2381. --
  2382. ALTER TABLE ONLY changes_pending_source_files
  2383. ADD CONSTRAINT changes_pending_source_files_pending_file_id_fkey FOREIGN KEY (pending_file_id) REFERENCES changes_pending_files(id);
  2384. --
  2385. -- Name: changes_pending_source_files_pending_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2386. --
  2387. ALTER TABLE ONLY changes_pending_source_files
  2388. ADD CONSTRAINT changes_pending_source_files_pending_source_id_fkey FOREIGN KEY (pending_source_id) REFERENCES changes_pending_source(id);
  2389. --
  2390. -- Name: changes_pending_source_maintainer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2391. --
  2392. ALTER TABLE ONLY changes_pending_source
  2393. ADD CONSTRAINT changes_pending_source_maintainer_id_fkey FOREIGN KEY (maintainer_id) REFERENCES maintainer(id);
  2394. --
  2395. -- Name: changes_pending_source_sig_fpr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2396. --
  2397. ALTER TABLE ONLY changes_pending_source
  2398. ADD CONSTRAINT changes_pending_source_sig_fpr_fkey FOREIGN KEY (sig_fpr) REFERENCES fingerprint(id);
  2399. --
  2400. -- Name: changes_pool_files_changeid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2401. --
  2402. ALTER TABLE ONLY changes_pool_files
  2403. ADD CONSTRAINT changes_pool_files_changeid_fkey FOREIGN KEY (changeid) REFERENCES changes(id) ON DELETE CASCADE;
  2404. --
  2405. -- Name: changes_pool_files_fileid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2406. --
  2407. ALTER TABLE ONLY changes_pool_files
  2408. ADD CONSTRAINT changes_pool_files_fileid_fkey FOREIGN KEY (fileid) REFERENCES files(id) ON DELETE RESTRICT;
  2409. --
  2410. -- Name: dsc_files_file; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2411. --
  2412. ALTER TABLE ONLY dsc_files
  2413. ADD CONSTRAINT dsc_files_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL;
  2414. --
  2415. -- Name: dsc_files_source; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2416. --
  2417. ALTER TABLE ONLY dsc_files
  2418. ADD CONSTRAINT dsc_files_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL;
  2419. --
  2420. -- Name: external_overrides_component_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2421. --
  2422. ALTER TABLE ONLY external_overrides
  2423. ADD CONSTRAINT external_overrides_component_fkey FOREIGN KEY (component) REFERENCES component(id);
  2424. --
  2425. -- Name: external_overrides_suite_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2426. --
  2427. ALTER TABLE ONLY external_overrides
  2428. ADD CONSTRAINT external_overrides_suite_fkey FOREIGN KEY (suite) REFERENCES suite(id);
  2429. --
  2430. -- Name: extra_src_references_bin_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2431. --
  2432. ALTER TABLE ONLY extra_src_references
  2433. ADD CONSTRAINT extra_src_references_bin_id_fkey FOREIGN KEY (bin_id) REFERENCES binaries(id) ON DELETE CASCADE;
  2434. --
  2435. -- Name: extra_src_references_src_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2436. --
  2437. ALTER TABLE ONLY extra_src_references
  2438. ADD CONSTRAINT extra_src_references_src_id_fkey FOREIGN KEY (src_id) REFERENCES source(id) ON DELETE RESTRICT;
  2439. --
  2440. -- Name: files_location; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2441. --
  2442. ALTER TABLE ONLY files
  2443. ADD CONSTRAINT files_location FOREIGN KEY (location) REFERENCES location(id) MATCH FULL;
  2444. --
  2445. -- Name: fingerprint_binary_acl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2446. --
  2447. ALTER TABLE ONLY fingerprint
  2448. ADD CONSTRAINT fingerprint_binary_acl_id_fkey FOREIGN KEY (binary_acl_id) REFERENCES binary_acl(id);
  2449. --
  2450. -- Name: fingerprint_source_acl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2451. --
  2452. ALTER TABLE ONLY fingerprint
  2453. ADD CONSTRAINT fingerprint_source_acl_id_fkey FOREIGN KEY (source_acl_id) REFERENCES source_acl(id);
  2454. --
  2455. -- Name: fingerprint_uid; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2456. --
  2457. ALTER TABLE ONLY fingerprint
  2458. ADD CONSTRAINT fingerprint_uid FOREIGN KEY (uid) REFERENCES uid(id) MATCH FULL;
  2459. --
  2460. -- Name: keyring_acl_map_architecture_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2461. --
  2462. ALTER TABLE ONLY keyring_acl_map
  2463. ADD CONSTRAINT keyring_acl_map_architecture_id_fkey FOREIGN KEY (architecture_id) REFERENCES architecture(id);
  2464. --
  2465. -- Name: keyring_acl_map_keyring_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2466. --
  2467. ALTER TABLE ONLY keyring_acl_map
  2468. ADD CONSTRAINT keyring_acl_map_keyring_id_fkey FOREIGN KEY (keyring_id) REFERENCES keyrings(id);
  2469. --
  2470. -- Name: keyrings_default_binary_acl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2471. --
  2472. ALTER TABLE ONLY keyrings
  2473. ADD CONSTRAINT keyrings_default_binary_acl_id_fkey FOREIGN KEY (default_binary_acl_id) REFERENCES binary_acl(id);
  2474. --
  2475. -- Name: keyrings_default_source_acl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2476. --
  2477. ALTER TABLE ONLY keyrings
  2478. ADD CONSTRAINT keyrings_default_source_acl_id_fkey FOREIGN KEY (default_source_acl_id) REFERENCES source_acl(id);
  2479. --
  2480. -- Name: known_changes_approved_for_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2481. --
  2482. ALTER TABLE ONLY changes
  2483. ADD CONSTRAINT known_changes_approved_for_fkey FOREIGN KEY (in_queue) REFERENCES policy_queue(id) ON DELETE RESTRICT;
  2484. --
  2485. -- Name: known_changes_in_queue_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2486. --
  2487. ALTER TABLE ONLY changes
  2488. ADD CONSTRAINT known_changes_in_queue_fkey FOREIGN KEY (in_queue) REFERENCES policy_queue(id) ON DELETE RESTRICT;
  2489. --
  2490. -- Name: location_archive_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2491. --
  2492. ALTER TABLE ONLY location
  2493. ADD CONSTRAINT location_archive_fkey FOREIGN KEY (archive) REFERENCES archive(id);
  2494. --
  2495. -- Name: location_component_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2496. --
  2497. ALTER TABLE ONLY location
  2498. ADD CONSTRAINT location_component_fkey FOREIGN KEY (component) REFERENCES component(id);
  2499. --
  2500. -- Name: override_component; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2501. --
  2502. ALTER TABLE ONLY override
  2503. ADD CONSTRAINT override_component FOREIGN KEY (component) REFERENCES component(id) MATCH FULL;
  2504. --
  2505. -- Name: override_priority; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2506. --
  2507. ALTER TABLE ONLY override
  2508. ADD CONSTRAINT override_priority FOREIGN KEY (priority) REFERENCES priority(id) MATCH FULL;
  2509. --
  2510. -- Name: override_section; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2511. --
  2512. ALTER TABLE ONLY override
  2513. ADD CONSTRAINT override_section FOREIGN KEY (section) REFERENCES section(id) MATCH FULL;
  2514. --
  2515. -- Name: override_suite; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2516. --
  2517. ALTER TABLE ONLY override
  2518. ADD CONSTRAINT override_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
  2519. --
  2520. -- Name: override_type; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2521. --
  2522. ALTER TABLE ONLY override
  2523. ADD CONSTRAINT override_type FOREIGN KEY (type) REFERENCES override_type(id) MATCH FULL;
  2524. --
  2525. -- Name: queue_files_fileid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2526. --
  2527. ALTER TABLE ONLY build_queue_files
  2528. ADD CONSTRAINT queue_files_fileid_fkey FOREIGN KEY (fileid) REFERENCES files(id) ON DELETE CASCADE;
  2529. --
  2530. -- Name: source_changedby; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2531. --
  2532. ALTER TABLE ONLY source
  2533. ADD CONSTRAINT source_changedby FOREIGN KEY (changedby) REFERENCES maintainer(id) MATCH FULL;
  2534. --
  2535. -- Name: source_file; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2536. --
  2537. ALTER TABLE ONLY source
  2538. ADD CONSTRAINT source_file FOREIGN KEY (file) REFERENCES files(id) MATCH FULL;
  2539. --
  2540. -- Name: source_maintainer; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2541. --
  2542. ALTER TABLE ONLY source
  2543. ADD CONSTRAINT source_maintainer FOREIGN KEY (maintainer) REFERENCES maintainer(id) MATCH FULL;
  2544. --
  2545. -- Name: source_metadata_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2546. --
  2547. ALTER TABLE ONLY source_metadata
  2548. ADD CONSTRAINT source_metadata_key_id_fkey FOREIGN KEY (key_id) REFERENCES metadata_keys(key_id);
  2549. --
  2550. -- Name: source_metadata_src_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2551. --
  2552. ALTER TABLE ONLY source_metadata
  2553. ADD CONSTRAINT source_metadata_src_id_fkey FOREIGN KEY (src_id) REFERENCES source(id) ON DELETE CASCADE;
  2554. --
  2555. -- Name: source_sig_fpr; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2556. --
  2557. ALTER TABLE ONLY source
  2558. ADD CONSTRAINT source_sig_fpr FOREIGN KEY (sig_fpr) REFERENCES fingerprint(id) MATCH FULL;
  2559. --
  2560. -- Name: src_associations_source; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2561. --
  2562. ALTER TABLE ONLY src_associations
  2563. ADD CONSTRAINT src_associations_source FOREIGN KEY (source) REFERENCES source(id) MATCH FULL;
  2564. --
  2565. -- Name: src_associations_suite; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2566. --
  2567. ALTER TABLE ONLY src_associations
  2568. ADD CONSTRAINT src_associations_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
  2569. --
  2570. -- Name: src_contents_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2571. --
  2572. ALTER TABLE ONLY src_contents
  2573. ADD CONSTRAINT src_contents_source_id_fkey FOREIGN KEY (source_id) REFERENCES source(id) ON DELETE CASCADE;
  2574. --
  2575. -- Name: src_format_key; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2576. --
  2577. ALTER TABLE ONLY suite_src_formats
  2578. ADD CONSTRAINT src_format_key FOREIGN KEY (src_format) REFERENCES src_format(id);
  2579. --
  2580. -- Name: src_uploaders_maintainer; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2581. --
  2582. ALTER TABLE ONLY src_uploaders
  2583. ADD CONSTRAINT src_uploaders_maintainer FOREIGN KEY (maintainer) REFERENCES maintainer(id) ON DELETE CASCADE;
  2584. --
  2585. -- Name: src_uploaders_source; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2586. --
  2587. ALTER TABLE ONLY src_uploaders
  2588. ADD CONSTRAINT src_uploaders_source FOREIGN KEY (source) REFERENCES source(id) ON DELETE CASCADE;
  2589. --
  2590. -- Name: suite_architectures_architectur; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2591. --
  2592. ALTER TABLE ONLY suite_architectures
  2593. ADD CONSTRAINT suite_architectures_architectur FOREIGN KEY (architecture) REFERENCES architecture(id) MATCH FULL;
  2594. --
  2595. -- Name: suite_architectures_suite; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2596. --
  2597. ALTER TABLE ONLY suite_architectures
  2598. ADD CONSTRAINT suite_architectures_suite FOREIGN KEY (suite) REFERENCES suite(id) MATCH FULL;
  2599. --
  2600. -- Name: suite_build_queue_copy_build_queue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2601. --
  2602. ALTER TABLE ONLY suite_build_queue_copy
  2603. ADD CONSTRAINT suite_build_queue_copy_build_queue_id_fkey FOREIGN KEY (build_queue_id) REFERENCES build_queue(id) ON DELETE RESTRICT;
  2604. --
  2605. -- Name: suite_key; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2606. --
  2607. ALTER TABLE ONLY suite_src_formats
  2608. ADD CONSTRAINT suite_key FOREIGN KEY (suite) REFERENCES suite(id);
  2609. --
  2610. -- Name: suite_policy_queue_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2611. --
  2612. ALTER TABLE ONLY suite
  2613. ADD CONSTRAINT suite_policy_queue_fkey FOREIGN KEY (policy_queue_id) REFERENCES policy_queue(id) ON DELETE RESTRICT;
  2614. --
  2615. -- Name: suite_queue_copy_suite_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2616. --
  2617. ALTER TABLE ONLY suite_build_queue_copy
  2618. ADD CONSTRAINT suite_queue_copy_suite_fkey FOREIGN KEY (suite) REFERENCES suite(id);
  2619. --
  2620. -- Name: upload_blocks_fingerprint_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2621. --
  2622. ALTER TABLE ONLY upload_blocks
  2623. ADD CONSTRAINT upload_blocks_fingerprint_id_fkey FOREIGN KEY (fingerprint_id) REFERENCES fingerprint(id);
  2624. --
  2625. -- Name: upload_blocks_uid_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2626. --
  2627. ALTER TABLE ONLY upload_blocks
  2628. ADD CONSTRAINT upload_blocks_uid_id_fkey FOREIGN KEY (uid_id) REFERENCES uid(id);
  2629. --
  2630. -- Name: version_check_reference_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2631. --
  2632. ALTER TABLE ONLY version_check
  2633. ADD CONSTRAINT version_check_reference_fkey FOREIGN KEY (reference) REFERENCES suite(id);
  2634. --
  2635. -- Name: version_check_suite_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dak
  2636. --
  2637. ALTER TABLE ONLY version_check
  2638. ADD CONSTRAINT version_check_suite_fkey FOREIGN KEY (suite) REFERENCES suite(id);
  2639. --
  2640. -- Name: audit; Type: ACL; Schema: -; Owner: dak
  2641. --
  2642. REVOKE ALL ON SCHEMA audit FROM PUBLIC;
  2643. REVOKE ALL ON SCHEMA audit FROM dak;
  2644. GRANT ALL ON SCHEMA audit TO dak;
  2645. GRANT USAGE ON SCHEMA audit TO PUBLIC;
  2646. GRANT USAGE ON SCHEMA audit TO ftpteam;
  2647. GRANT USAGE ON SCHEMA audit TO ftpmaster;
  2648. --
  2649. -- Name: public; Type: ACL; Schema: -; Owner: postgres
  2650. --
  2651. REVOKE ALL ON SCHEMA public FROM PUBLIC;
  2652. REVOKE ALL ON SCHEMA public FROM postgres;
  2653. GRANT ALL ON SCHEMA public TO postgres;
  2654. GRANT ALL ON SCHEMA public TO PUBLIC;
  2655. SET search_path = audit, pg_catalog;
  2656. --
  2657. -- Name: package_changes; Type: ACL; Schema: audit; Owner: dak
  2658. --
  2659. REVOKE ALL ON TABLE package_changes FROM PUBLIC;
  2660. REVOKE ALL ON TABLE package_changes FROM dak;
  2661. GRANT ALL ON TABLE package_changes TO dak;
  2662. GRANT SELECT ON TABLE package_changes TO PUBLIC;
  2663. SET search_path = public, pg_catalog;
  2664. --
  2665. -- Name: bin_associations_id_seq; Type: ACL; Schema: public; Owner: dak
  2666. --
  2667. REVOKE ALL ON SEQUENCE bin_associations_id_seq FROM PUBLIC;
  2668. REVOKE ALL ON SEQUENCE bin_associations_id_seq FROM dak;
  2669. GRANT ALL ON SEQUENCE bin_associations_id_seq TO dak;
  2670. GRANT SELECT ON SEQUENCE bin_associations_id_seq TO PUBLIC;
  2671. GRANT ALL ON SEQUENCE bin_associations_id_seq TO ftpmaster;
  2672. --
  2673. -- Name: bin_associations; Type: ACL; Schema: public; Owner: dak
  2674. --
  2675. REVOKE ALL ON TABLE bin_associations FROM PUBLIC;
  2676. REVOKE ALL ON TABLE bin_associations FROM dak;
  2677. GRANT ALL ON TABLE bin_associations TO dak;
  2678. GRANT SELECT ON TABLE bin_associations TO PUBLIC;
  2679. GRANT ALL ON TABLE bin_associations TO ftpmaster;
  2680. GRANT DELETE ON TABLE bin_associations TO ftpteam;
  2681. --
  2682. -- Name: binaries_id_seq; Type: ACL; Schema: public; Owner: dak
  2683. --
  2684. REVOKE ALL ON SEQUENCE binaries_id_seq FROM PUBLIC;
  2685. REVOKE ALL ON SEQUENCE binaries_id_seq FROM dak;
  2686. GRANT ALL ON SEQUENCE binaries_id_seq TO dak;
  2687. GRANT SELECT ON SEQUENCE binaries_id_seq TO PUBLIC;
  2688. GRANT ALL ON SEQUENCE binaries_id_seq TO ftpmaster;
  2689. --
  2690. -- Name: binaries; Type: ACL; Schema: public; Owner: dak
  2691. --
  2692. REVOKE ALL ON TABLE binaries FROM PUBLIC;
  2693. REVOKE ALL ON TABLE binaries FROM dak;
  2694. GRANT ALL ON TABLE binaries TO dak;
  2695. GRANT SELECT ON TABLE binaries TO PUBLIC;
  2696. GRANT ALL ON TABLE binaries TO ftpmaster;
  2697. --
  2698. -- Name: bin_associations_binaries; Type: ACL; Schema: public; Owner: dak
  2699. --
  2700. REVOKE ALL ON TABLE bin_associations_binaries FROM PUBLIC;
  2701. REVOKE ALL ON TABLE bin_associations_binaries FROM dak;
  2702. GRANT ALL ON TABLE bin_associations_binaries TO dak;
  2703. GRANT SELECT ON TABLE bin_associations_binaries TO ftpmaster;
  2704. GRANT SELECT ON TABLE bin_associations_binaries TO PUBLIC;
  2705. --
  2706. -- Name: source_id_seq; Type: ACL; Schema: public; Owner: dak
  2707. --
  2708. REVOKE ALL ON SEQUENCE source_id_seq FROM PUBLIC;
  2709. REVOKE ALL ON SEQUENCE source_id_seq FROM dak;
  2710. GRANT ALL ON SEQUENCE source_id_seq TO dak;
  2711. GRANT SELECT ON SEQUENCE source_id_seq TO PUBLIC;
  2712. GRANT ALL ON SEQUENCE source_id_seq TO ftpmaster;
  2713. --
  2714. -- Name: source; Type: ACL; Schema: public; Owner: dak
  2715. --
  2716. REVOKE ALL ON TABLE source FROM PUBLIC;
  2717. REVOKE ALL ON TABLE source FROM dak;
  2718. GRANT ALL ON TABLE source TO dak;
  2719. GRANT SELECT ON TABLE source TO PUBLIC;
  2720. GRANT ALL ON TABLE source TO ftpmaster;
  2721. --
  2722. -- Name: src_associations_id_seq; Type: ACL; Schema: public; Owner: dak
  2723. --
  2724. REVOKE ALL ON SEQUENCE src_associations_id_seq FROM PUBLIC;
  2725. REVOKE ALL ON SEQUENCE src_associations_id_seq FROM dak;
  2726. GRANT ALL ON SEQUENCE src_associations_id_seq TO dak;
  2727. GRANT SELECT ON SEQUENCE src_associations_id_seq TO PUBLIC;
  2728. GRANT ALL ON SEQUENCE src_associations_id_seq TO ftpmaster;
  2729. --
  2730. -- Name: src_associations; Type: ACL; Schema: public; Owner: dak
  2731. --
  2732. REVOKE ALL ON TABLE src_associations FROM PUBLIC;
  2733. REVOKE ALL ON TABLE src_associations FROM dak;
  2734. GRANT ALL ON TABLE src_associations TO dak;
  2735. GRANT SELECT ON TABLE src_associations TO PUBLIC;
  2736. GRANT ALL ON TABLE src_associations TO ftpmaster;
  2737. GRANT DELETE ON TABLE src_associations TO ftpteam;
  2738. --
  2739. -- Name: src_associations_bin; Type: ACL; Schema: public; Owner: dak
  2740. --
  2741. REVOKE ALL ON TABLE src_associations_bin FROM PUBLIC;
  2742. REVOKE ALL ON TABLE src_associations_bin FROM dak;
  2743. GRANT ALL ON TABLE src_associations_bin TO dak;
  2744. GRANT SELECT ON TABLE src_associations_bin TO ftpmaster;
  2745. GRANT SELECT ON TABLE src_associations_bin TO PUBLIC;
  2746. --
  2747. -- Name: almost_obsolete_all_associations; Type: ACL; Schema: public; Owner: dak
  2748. --
  2749. REVOKE ALL ON TABLE almost_obsolete_all_associations FROM PUBLIC;
  2750. REVOKE ALL ON TABLE almost_obsolete_all_associations FROM dak;
  2751. GRANT ALL ON TABLE almost_obsolete_all_associations TO dak;
  2752. GRANT SELECT ON TABLE almost_obsolete_all_associations TO ftpmaster;
  2753. GRANT SELECT ON TABLE almost_obsolete_all_associations TO PUBLIC;
  2754. --
  2755. -- Name: any_associations_source; Type: ACL; Schema: public; Owner: dak
  2756. --
  2757. REVOKE ALL ON TABLE any_associations_source FROM PUBLIC;
  2758. REVOKE ALL ON TABLE any_associations_source FROM dak;
  2759. GRANT ALL ON TABLE any_associations_source TO dak;
  2760. GRANT SELECT ON TABLE any_associations_source TO ftpmaster;
  2761. GRANT SELECT ON TABLE any_associations_source TO PUBLIC;
  2762. --
  2763. -- Name: src_associations_src; Type: ACL; Schema: public; Owner: dak
  2764. --
  2765. REVOKE ALL ON TABLE src_associations_src FROM PUBLIC;
  2766. REVOKE ALL ON TABLE src_associations_src FROM dak;
  2767. GRANT ALL ON TABLE src_associations_src TO dak;
  2768. GRANT SELECT ON TABLE src_associations_src TO ftpmaster;
  2769. GRANT SELECT ON TABLE src_associations_src TO PUBLIC;
  2770. --
  2771. -- Name: almost_obsolete_src_associations; Type: ACL; Schema: public; Owner: dak
  2772. --
  2773. REVOKE ALL ON TABLE almost_obsolete_src_associations FROM PUBLIC;
  2774. REVOKE ALL ON TABLE almost_obsolete_src_associations FROM dak;
  2775. GRANT ALL ON TABLE almost_obsolete_src_associations TO dak;
  2776. GRANT SELECT ON TABLE almost_obsolete_src_associations TO ftpmaster;
  2777. GRANT SELECT ON TABLE almost_obsolete_src_associations TO PUBLIC;
  2778. --
  2779. -- Name: architecture_id_seq; Type: ACL; Schema: public; Owner: dak
  2780. --
  2781. REVOKE ALL ON SEQUENCE architecture_id_seq FROM PUBLIC;
  2782. REVOKE ALL ON SEQUENCE architecture_id_seq FROM dak;
  2783. GRANT ALL ON SEQUENCE architecture_id_seq TO dak;
  2784. GRANT SELECT ON SEQUENCE architecture_id_seq TO PUBLIC;
  2785. GRANT ALL ON SEQUENCE architecture_id_seq TO ftpmaster;
  2786. --
  2787. -- Name: architecture; Type: ACL; Schema: public; Owner: dak
  2788. --
  2789. REVOKE ALL ON TABLE architecture FROM PUBLIC;
  2790. REVOKE ALL ON TABLE architecture FROM dak;
  2791. GRANT ALL ON TABLE architecture TO dak;
  2792. GRANT SELECT ON TABLE architecture TO PUBLIC;
  2793. GRANT ALL ON TABLE architecture TO ftpmaster;
  2794. --
  2795. -- Name: archive_id_seq; Type: ACL; Schema: public; Owner: dak
  2796. --
  2797. REVOKE ALL ON SEQUENCE archive_id_seq FROM PUBLIC;
  2798. REVOKE ALL ON SEQUENCE archive_id_seq FROM dak;
  2799. GRANT ALL ON SEQUENCE archive_id_seq TO dak;
  2800. GRANT SELECT ON SEQUENCE archive_id_seq TO PUBLIC;
  2801. GRANT ALL ON SEQUENCE archive_id_seq TO ftpmaster;
  2802. --
  2803. -- Name: archive; Type: ACL; Schema: public; Owner: dak
  2804. --
  2805. REVOKE ALL ON TABLE archive FROM PUBLIC;
  2806. REVOKE ALL ON TABLE archive FROM dak;
  2807. GRANT ALL ON TABLE archive TO dak;
  2808. GRANT SELECT ON TABLE archive TO PUBLIC;
  2809. GRANT ALL ON TABLE archive TO ftpmaster;
  2810. --
  2811. -- Name: bin_contents; Type: ACL; Schema: public; Owner: dak
  2812. --
  2813. REVOKE ALL ON TABLE bin_contents FROM PUBLIC;
  2814. REVOKE ALL ON TABLE bin_contents FROM dak;
  2815. GRANT ALL ON TABLE bin_contents TO dak;
  2816. GRANT SELECT ON TABLE bin_contents TO PUBLIC;
  2817. GRANT ALL ON TABLE bin_contents TO ftpmaster;
  2818. --
  2819. -- Name: binaries_metadata; Type: ACL; Schema: public; Owner: dak
  2820. --
  2821. REVOKE ALL ON TABLE binaries_metadata FROM PUBLIC;
  2822. REVOKE ALL ON TABLE binaries_metadata FROM dak;
  2823. GRANT ALL ON TABLE binaries_metadata TO dak;
  2824. GRANT SELECT,INSERT,UPDATE ON TABLE binaries_metadata TO ftpmaster;
  2825. GRANT SELECT ON TABLE binaries_metadata TO PUBLIC;
  2826. --
  2827. -- Name: suite_id_seq; Type: ACL; Schema: public; Owner: dak
  2828. --
  2829. REVOKE ALL ON SEQUENCE suite_id_seq FROM PUBLIC;
  2830. REVOKE ALL ON SEQUENCE suite_id_seq FROM dak;
  2831. GRANT ALL ON SEQUENCE suite_id_seq TO dak;
  2832. GRANT SELECT ON SEQUENCE suite_id_seq TO PUBLIC;
  2833. GRANT ALL ON SEQUENCE suite_id_seq TO ftpmaster;
  2834. --
  2835. -- Name: suite; Type: ACL; Schema: public; Owner: dak
  2836. --
  2837. REVOKE ALL ON TABLE suite FROM PUBLIC;
  2838. REVOKE ALL ON TABLE suite FROM dak;
  2839. GRANT ALL ON TABLE suite TO dak;
  2840. GRANT SELECT ON TABLE suite TO PUBLIC;
  2841. GRANT ALL ON TABLE suite TO ftpmaster;
  2842. --
  2843. -- Name: binaries_suite_arch; Type: ACL; Schema: public; Owner: dak
  2844. --
  2845. REVOKE ALL ON TABLE binaries_suite_arch FROM PUBLIC;
  2846. REVOKE ALL ON TABLE binaries_suite_arch FROM dak;
  2847. GRANT ALL ON TABLE binaries_suite_arch TO dak;
  2848. GRANT SELECT ON TABLE binaries_suite_arch TO ftpmaster;
  2849. GRANT SELECT ON TABLE binaries_suite_arch TO PUBLIC;
  2850. --
  2851. -- Name: binary_acl; Type: ACL; Schema: public; Owner: dak
  2852. --
  2853. REVOKE ALL ON TABLE binary_acl FROM PUBLIC;
  2854. REVOKE ALL ON TABLE binary_acl FROM dak;
  2855. GRANT ALL ON TABLE binary_acl TO dak;
  2856. GRANT SELECT ON TABLE binary_acl TO PUBLIC;
  2857. GRANT ALL ON TABLE binary_acl TO ftpmaster;
  2858. --
  2859. -- Name: binary_acl_id_seq; Type: ACL; Schema: public; Owner: dak
  2860. --
  2861. REVOKE ALL ON SEQUENCE binary_acl_id_seq FROM PUBLIC;
  2862. REVOKE ALL ON SEQUENCE binary_acl_id_seq FROM dak;
  2863. GRANT ALL ON SEQUENCE binary_acl_id_seq TO dak;
  2864. GRANT ALL ON SEQUENCE binary_acl_id_seq TO ftpmaster;
  2865. GRANT SELECT ON SEQUENCE binary_acl_id_seq TO PUBLIC;
  2866. --
  2867. -- Name: binary_acl_map; Type: ACL; Schema: public; Owner: dak
  2868. --
  2869. REVOKE ALL ON TABLE binary_acl_map FROM PUBLIC;
  2870. REVOKE ALL ON TABLE binary_acl_map FROM dak;
  2871. GRANT ALL ON TABLE binary_acl_map TO dak;
  2872. GRANT SELECT ON TABLE binary_acl_map TO PUBLIC;
  2873. GRANT ALL ON TABLE binary_acl_map TO ftpmaster;
  2874. --
  2875. -- Name: binary_acl_map_id_seq; Type: ACL; Schema: public; Owner: dak
  2876. --
  2877. REVOKE ALL ON SEQUENCE binary_acl_map_id_seq FROM PUBLIC;
  2878. REVOKE ALL ON SEQUENCE binary_acl_map_id_seq FROM dak;
  2879. GRANT ALL ON SEQUENCE binary_acl_map_id_seq TO dak;
  2880. GRANT ALL ON SEQUENCE binary_acl_map_id_seq TO ftpmaster;
  2881. GRANT SELECT ON SEQUENCE binary_acl_map_id_seq TO PUBLIC;
  2882. --
  2883. -- Name: files_id_seq; Type: ACL; Schema: public; Owner: dak
  2884. --
  2885. REVOKE ALL ON SEQUENCE files_id_seq FROM PUBLIC;
  2886. REVOKE ALL ON SEQUENCE files_id_seq FROM dak;
  2887. GRANT ALL ON SEQUENCE files_id_seq TO dak;
  2888. GRANT SELECT ON SEQUENCE files_id_seq TO PUBLIC;
  2889. GRANT ALL ON SEQUENCE files_id_seq TO ftpmaster;
  2890. --
  2891. -- Name: files; Type: ACL; Schema: public; Owner: dak
  2892. --
  2893. REVOKE ALL ON TABLE files FROM PUBLIC;
  2894. REVOKE ALL ON TABLE files FROM dak;
  2895. GRANT ALL ON TABLE files TO dak;
  2896. GRANT SELECT ON TABLE files TO PUBLIC;
  2897. GRANT ALL ON TABLE files TO ftpmaster;
  2898. --
  2899. -- Name: location_id_seq; Type: ACL; Schema: public; Owner: dak
  2900. --
  2901. REVOKE ALL ON SEQUENCE location_id_seq FROM PUBLIC;
  2902. REVOKE ALL ON SEQUENCE location_id_seq FROM dak;
  2903. GRANT ALL ON SEQUENCE location_id_seq TO dak;
  2904. GRANT SELECT ON SEQUENCE location_id_seq TO PUBLIC;
  2905. GRANT ALL ON SEQUENCE location_id_seq TO ftpmaster;
  2906. --
  2907. -- Name: location; Type: ACL; Schema: public; Owner: dak
  2908. --
  2909. REVOKE ALL ON TABLE location FROM PUBLIC;
  2910. REVOKE ALL ON TABLE location FROM dak;
  2911. GRANT ALL ON TABLE location TO dak;
  2912. GRANT SELECT ON TABLE location TO PUBLIC;
  2913. GRANT ALL ON TABLE location TO ftpmaster;
  2914. --
  2915. -- Name: binfiles_suite_component_arch; Type: ACL; Schema: public; Owner: dak
  2916. --
  2917. REVOKE ALL ON TABLE binfiles_suite_component_arch FROM PUBLIC;
  2918. REVOKE ALL ON TABLE binfiles_suite_component_arch FROM dak;
  2919. GRANT ALL ON TABLE binfiles_suite_component_arch TO dak;
  2920. GRANT SELECT ON TABLE binfiles_suite_component_arch TO ftpmaster;
  2921. GRANT SELECT ON TABLE binfiles_suite_component_arch TO PUBLIC;
  2922. --
  2923. -- Name: build_queue; Type: ACL; Schema: public; Owner: dak
  2924. --
  2925. REVOKE ALL ON TABLE build_queue FROM PUBLIC;
  2926. REVOKE ALL ON TABLE build_queue FROM dak;
  2927. GRANT ALL ON TABLE build_queue TO dak;
  2928. GRANT SELECT ON TABLE build_queue TO PUBLIC;
  2929. GRANT ALL ON TABLE build_queue TO ftpmaster;
  2930. --
  2931. -- Name: build_queue_files; Type: ACL; Schema: public; Owner: dak
  2932. --
  2933. REVOKE ALL ON TABLE build_queue_files FROM PUBLIC;
  2934. REVOKE ALL ON TABLE build_queue_files FROM dak;
  2935. GRANT ALL ON TABLE build_queue_files TO dak;
  2936. GRANT SELECT ON TABLE build_queue_files TO PUBLIC;
  2937. GRANT ALL ON TABLE build_queue_files TO ftpmaster;
  2938. --
  2939. -- Name: build_queue_files_id_seq; Type: ACL; Schema: public; Owner: dak
  2940. --
  2941. REVOKE ALL ON SEQUENCE build_queue_files_id_seq FROM PUBLIC;
  2942. REVOKE ALL ON SEQUENCE build_queue_files_id_seq FROM dak;
  2943. GRANT ALL ON SEQUENCE build_queue_files_id_seq TO dak;
  2944. GRANT ALL ON SEQUENCE build_queue_files_id_seq TO ftpmaster;
  2945. GRANT SELECT ON SEQUENCE build_queue_files_id_seq TO PUBLIC;
  2946. --
  2947. -- Name: build_queue_id_seq; Type: ACL; Schema: public; Owner: dak
  2948. --
  2949. REVOKE ALL ON SEQUENCE build_queue_id_seq FROM PUBLIC;
  2950. REVOKE ALL ON SEQUENCE build_queue_id_seq FROM dak;
  2951. GRANT ALL ON SEQUENCE build_queue_id_seq TO dak;
  2952. GRANT ALL ON SEQUENCE build_queue_id_seq TO ftpmaster;
  2953. GRANT SELECT ON SEQUENCE build_queue_id_seq TO PUBLIC;
  2954. --
  2955. -- Name: build_queue_policy_files; Type: ACL; Schema: public; Owner: dak
  2956. --
  2957. REVOKE ALL ON TABLE build_queue_policy_files FROM PUBLIC;
  2958. REVOKE ALL ON TABLE build_queue_policy_files FROM dak;
  2959. GRANT ALL ON TABLE build_queue_policy_files TO dak;
  2960. GRANT SELECT,INSERT,UPDATE ON TABLE build_queue_policy_files TO ftpmaster;
  2961. GRANT SELECT ON TABLE build_queue_policy_files TO PUBLIC;
  2962. --
  2963. -- Name: changelogs_text; Type: ACL; Schema: public; Owner: dak
  2964. --
  2965. REVOKE ALL ON TABLE changelogs_text FROM PUBLIC;
  2966. REVOKE ALL ON TABLE changelogs_text FROM dak;
  2967. GRANT ALL ON TABLE changelogs_text TO dak;
  2968. GRANT SELECT ON TABLE changelogs_text TO PUBLIC;
  2969. GRANT ALL ON TABLE changelogs_text TO ftpmaster;
  2970. --
  2971. -- Name: changes; Type: ACL; Schema: public; Owner: dak
  2972. --
  2973. REVOKE ALL ON TABLE changes FROM PUBLIC;
  2974. REVOKE ALL ON TABLE changes FROM dak;
  2975. GRANT ALL ON TABLE changes TO dak;
  2976. GRANT ALL ON TABLE changes TO ftpmaster;
  2977. GRANT SELECT ON TABLE changes TO PUBLIC;
  2978. GRANT DELETE,UPDATE ON TABLE changes TO ftpteam;
  2979. --
  2980. -- Name: changelogs; Type: ACL; Schema: public; Owner: dak
  2981. --
  2982. REVOKE ALL ON TABLE changelogs FROM PUBLIC;
  2983. REVOKE ALL ON TABLE changelogs FROM dak;
  2984. GRANT ALL ON TABLE changelogs TO dak;
  2985. GRANT SELECT ON TABLE changelogs TO PUBLIC;
  2986. GRANT ALL ON TABLE changelogs TO ftpmaster;
  2987. --
  2988. -- Name: changelogs_text_id_seq; Type: ACL; Schema: public; Owner: dak
  2989. --
  2990. REVOKE ALL ON SEQUENCE changelogs_text_id_seq FROM PUBLIC;
  2991. REVOKE ALL ON SEQUENCE changelogs_text_id_seq FROM dak;
  2992. GRANT ALL ON SEQUENCE changelogs_text_id_seq TO dak;
  2993. GRANT ALL ON SEQUENCE changelogs_text_id_seq TO ftpmaster;
  2994. GRANT SELECT ON SEQUENCE changelogs_text_id_seq TO PUBLIC;
  2995. --
  2996. -- Name: changes_id_seq; Type: ACL; Schema: public; Owner: dak
  2997. --
  2998. REVOKE ALL ON SEQUENCE changes_id_seq FROM PUBLIC;
  2999. REVOKE ALL ON SEQUENCE changes_id_seq FROM dak;
  3000. GRANT ALL ON SEQUENCE changes_id_seq TO dak;
  3001. GRANT ALL ON SEQUENCE changes_id_seq TO ftpmaster;
  3002. GRANT SELECT ON SEQUENCE changes_id_seq TO PUBLIC;
  3003. --
  3004. -- Name: changes_pending_binaries; Type: ACL; Schema: public; Owner: dak
  3005. --
  3006. REVOKE ALL ON TABLE changes_pending_binaries FROM PUBLIC;
  3007. REVOKE ALL ON TABLE changes_pending_binaries FROM dak;
  3008. GRANT ALL ON TABLE changes_pending_binaries TO dak;
  3009. GRANT SELECT ON TABLE changes_pending_binaries TO PUBLIC;
  3010. GRANT ALL ON TABLE changes_pending_binaries TO ftpmaster;
  3011. --
  3012. -- Name: changes_pending_binaries_id_seq; Type: ACL; Schema: public; Owner: dak
  3013. --
  3014. REVOKE ALL ON SEQUENCE changes_pending_binaries_id_seq FROM PUBLIC;
  3015. REVOKE ALL ON SEQUENCE changes_pending_binaries_id_seq FROM dak;
  3016. GRANT ALL ON SEQUENCE changes_pending_binaries_id_seq TO dak;
  3017. GRANT ALL ON SEQUENCE changes_pending_binaries_id_seq TO ftpmaster;
  3018. GRANT SELECT ON SEQUENCE changes_pending_binaries_id_seq TO PUBLIC;
  3019. --
  3020. -- Name: changes_pending_files; Type: ACL; Schema: public; Owner: dak
  3021. --
  3022. REVOKE ALL ON TABLE changes_pending_files FROM PUBLIC;
  3023. REVOKE ALL ON TABLE changes_pending_files FROM dak;
  3024. GRANT ALL ON TABLE changes_pending_files TO dak;
  3025. GRANT SELECT ON TABLE changes_pending_files TO PUBLIC;
  3026. GRANT ALL ON TABLE changes_pending_files TO ftpmaster;
  3027. GRANT DELETE ON TABLE changes_pending_files TO ftpteam;
  3028. --
  3029. -- Name: changes_pending_files_id_seq; Type: ACL; Schema: public; Owner: dak
  3030. --
  3031. REVOKE ALL ON SEQUENCE changes_pending_files_id_seq FROM PUBLIC;
  3032. REVOKE ALL ON SEQUENCE changes_pending_files_id_seq FROM dak;
  3033. GRANT ALL ON SEQUENCE changes_pending_files_id_seq TO dak;
  3034. GRANT ALL ON SEQUENCE changes_pending_files_id_seq TO ftpmaster;
  3035. GRANT SELECT ON SEQUENCE changes_pending_files_id_seq TO PUBLIC;
  3036. GRANT USAGE ON SEQUENCE changes_pending_files_id_seq TO ftpteam;
  3037. --
  3038. -- Name: changes_pending_files_map; Type: ACL; Schema: public; Owner: dak
  3039. --
  3040. REVOKE ALL ON TABLE changes_pending_files_map FROM PUBLIC;
  3041. REVOKE ALL ON TABLE changes_pending_files_map FROM dak;
  3042. GRANT ALL ON TABLE changes_pending_files_map TO dak;
  3043. GRANT SELECT,INSERT,DELETE ON TABLE changes_pending_files_map TO ftpteam;
  3044. GRANT SELECT ON TABLE changes_pending_files_map TO PUBLIC;
  3045. --
  3046. -- Name: changes_pending_source; Type: ACL; Schema: public; Owner: dak
  3047. --
  3048. REVOKE ALL ON TABLE changes_pending_source FROM PUBLIC;
  3049. REVOKE ALL ON TABLE changes_pending_source FROM dak;
  3050. GRANT ALL ON TABLE changes_pending_source TO dak;
  3051. GRANT SELECT ON TABLE changes_pending_source TO PUBLIC;
  3052. GRANT ALL ON TABLE changes_pending_source TO ftpmaster;
  3053. --
  3054. -- Name: changes_pending_source_files; Type: ACL; Schema: public; Owner: dak
  3055. --
  3056. REVOKE ALL ON TABLE changes_pending_source_files FROM PUBLIC;
  3057. REVOKE ALL ON TABLE changes_pending_source_files FROM dak;
  3058. GRANT ALL ON TABLE changes_pending_source_files TO dak;
  3059. GRANT SELECT ON TABLE changes_pending_source_files TO PUBLIC;
  3060. GRANT ALL ON TABLE changes_pending_source_files TO ftpmaster;
  3061. --
  3062. -- Name: changes_pending_source_id_seq; Type: ACL; Schema: public; Owner: dak
  3063. --
  3064. REVOKE ALL ON SEQUENCE changes_pending_source_id_seq FROM PUBLIC;
  3065. REVOKE ALL ON SEQUENCE changes_pending_source_id_seq FROM dak;
  3066. GRANT ALL ON SEQUENCE changes_pending_source_id_seq TO dak;
  3067. GRANT ALL ON SEQUENCE changes_pending_source_id_seq TO ftpmaster;
  3068. GRANT SELECT ON SEQUENCE changes_pending_source_id_seq TO PUBLIC;
  3069. --
  3070. -- Name: changes_pool_files; Type: ACL; Schema: public; Owner: dak
  3071. --
  3072. REVOKE ALL ON TABLE changes_pool_files FROM PUBLIC;
  3073. REVOKE ALL ON TABLE changes_pool_files FROM dak;
  3074. GRANT ALL ON TABLE changes_pool_files TO dak;
  3075. GRANT SELECT ON TABLE changes_pool_files TO PUBLIC;
  3076. GRANT ALL ON TABLE changes_pool_files TO ftpmaster;
  3077. GRANT DELETE ON TABLE changes_pool_files TO ftpteam;
  3078. --
  3079. -- Name: component_id_seq; Type: ACL; Schema: public; Owner: dak
  3080. --
  3081. REVOKE ALL ON SEQUENCE component_id_seq FROM PUBLIC;
  3082. REVOKE ALL ON SEQUENCE component_id_seq FROM dak;
  3083. GRANT ALL ON SEQUENCE component_id_seq TO dak;
  3084. GRANT SELECT ON SEQUENCE component_id_seq TO PUBLIC;
  3085. GRANT ALL ON SEQUENCE component_id_seq TO ftpmaster;
  3086. --
  3087. -- Name: component; Type: ACL; Schema: public; Owner: dak
  3088. --
  3089. REVOKE ALL ON TABLE component FROM PUBLIC;
  3090. REVOKE ALL ON TABLE component FROM dak;
  3091. GRANT ALL ON TABLE component TO dak;
  3092. GRANT SELECT ON TABLE component TO PUBLIC;
  3093. GRANT ALL ON TABLE component TO ftpmaster;
  3094. --
  3095. -- Name: config; Type: ACL; Schema: public; Owner: dak
  3096. --
  3097. REVOKE ALL ON TABLE config FROM PUBLIC;
  3098. REVOKE ALL ON TABLE config FROM dak;
  3099. GRANT ALL ON TABLE config TO dak;
  3100. GRANT ALL ON TABLE config TO ftpmaster;
  3101. GRANT SELECT ON TABLE config TO ftpteam;
  3102. GRANT SELECT ON TABLE config TO PUBLIC;
  3103. --
  3104. -- Name: config_id_seq; Type: ACL; Schema: public; Owner: dak
  3105. --
  3106. REVOKE ALL ON SEQUENCE config_id_seq FROM PUBLIC;
  3107. REVOKE ALL ON SEQUENCE config_id_seq FROM dak;
  3108. GRANT ALL ON SEQUENCE config_id_seq TO dak;
  3109. GRANT ALL ON SEQUENCE config_id_seq TO ftpmaster;
  3110. GRANT SELECT ON SEQUENCE config_id_seq TO PUBLIC;
  3111. --
  3112. -- Name: dsc_files_id_seq; Type: ACL; Schema: public; Owner: dak
  3113. --
  3114. REVOKE ALL ON SEQUENCE dsc_files_id_seq FROM PUBLIC;
  3115. REVOKE ALL ON SEQUENCE dsc_files_id_seq FROM dak;
  3116. GRANT ALL ON SEQUENCE dsc_files_id_seq TO dak;
  3117. GRANT SELECT ON SEQUENCE dsc_files_id_seq TO PUBLIC;
  3118. GRANT ALL ON SEQUENCE dsc_files_id_seq TO ftpmaster;
  3119. --
  3120. -- Name: dsc_files; Type: ACL; Schema: public; Owner: dak
  3121. --
  3122. REVOKE ALL ON TABLE dsc_files FROM PUBLIC;
  3123. REVOKE ALL ON TABLE dsc_files FROM dak;
  3124. GRANT ALL ON TABLE dsc_files TO dak;
  3125. GRANT SELECT ON TABLE dsc_files TO PUBLIC;
  3126. GRANT ALL ON TABLE dsc_files TO ftpmaster;
  3127. --
  3128. -- Name: external_overrides; Type: ACL; Schema: public; Owner: dak
  3129. --
  3130. REVOKE ALL ON TABLE external_overrides FROM PUBLIC;
  3131. REVOKE ALL ON TABLE external_overrides FROM dak;
  3132. GRANT ALL ON TABLE external_overrides TO dak;
  3133. GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE external_overrides TO ftpmaster;
  3134. GRANT SELECT ON TABLE external_overrides TO PUBLIC;
  3135. --
  3136. -- Name: extra_src_references; Type: ACL; Schema: public; Owner: dak
  3137. --
  3138. REVOKE ALL ON TABLE extra_src_references FROM PUBLIC;
  3139. REVOKE ALL ON TABLE extra_src_references FROM dak;
  3140. GRANT ALL ON TABLE extra_src_references TO dak;
  3141. GRANT SELECT,INSERT,UPDATE ON TABLE extra_src_references TO ftpmaster;
  3142. GRANT SELECT ON TABLE extra_src_references TO PUBLIC;
  3143. --
  3144. -- Name: file_arch_suite; Type: ACL; Schema: public; Owner: dak
  3145. --
  3146. REVOKE ALL ON TABLE file_arch_suite FROM PUBLIC;
  3147. REVOKE ALL ON TABLE file_arch_suite FROM dak;
  3148. GRANT ALL ON TABLE file_arch_suite TO dak;
  3149. GRANT ALL ON TABLE file_arch_suite TO ftpmaster;
  3150. GRANT SELECT ON TABLE file_arch_suite TO PUBLIC;
  3151. --
  3152. -- Name: fingerprint_id_seq; Type: ACL; Schema: public; Owner: dak
  3153. --
  3154. REVOKE ALL ON SEQUENCE fingerprint_id_seq FROM PUBLIC;
  3155. REVOKE ALL ON SEQUENCE fingerprint_id_seq FROM dak;
  3156. GRANT ALL ON SEQUENCE fingerprint_id_seq TO dak;
  3157. GRANT SELECT ON SEQUENCE fingerprint_id_seq TO PUBLIC;
  3158. GRANT ALL ON SEQUENCE fingerprint_id_seq TO ftpmaster;
  3159. --
  3160. -- Name: fingerprint; Type: ACL; Schema: public; Owner: dak
  3161. --
  3162. REVOKE ALL ON TABLE fingerprint FROM PUBLIC;
  3163. REVOKE ALL ON TABLE fingerprint FROM dak;
  3164. GRANT ALL ON TABLE fingerprint TO dak;
  3165. GRANT SELECT ON TABLE fingerprint TO PUBLIC;
  3166. GRANT ALL ON TABLE fingerprint TO ftpmaster;
  3167. --
  3168. -- Name: keyring_acl_map; Type: ACL; Schema: public; Owner: dak
  3169. --
  3170. REVOKE ALL ON TABLE keyring_acl_map FROM PUBLIC;
  3171. REVOKE ALL ON TABLE keyring_acl_map FROM dak;
  3172. GRANT ALL ON TABLE keyring_acl_map TO dak;
  3173. GRANT SELECT ON TABLE keyring_acl_map TO PUBLIC;
  3174. GRANT ALL ON TABLE keyring_acl_map TO ftpmaster;
  3175. --
  3176. -- Name: keyring_acl_map_id_seq; Type: ACL; Schema: public; Owner: dak
  3177. --
  3178. REVOKE ALL ON SEQUENCE keyring_acl_map_id_seq FROM PUBLIC;
  3179. REVOKE ALL ON SEQUENCE keyring_acl_map_id_seq FROM dak;
  3180. GRANT ALL ON SEQUENCE keyring_acl_map_id_seq TO dak;
  3181. GRANT ALL ON SEQUENCE keyring_acl_map_id_seq TO ftpmaster;
  3182. GRANT SELECT ON SEQUENCE keyring_acl_map_id_seq TO PUBLIC;
  3183. --
  3184. -- Name: keyrings; Type: ACL; Schema: public; Owner: dak
  3185. --
  3186. REVOKE ALL ON TABLE keyrings FROM PUBLIC;
  3187. REVOKE ALL ON TABLE keyrings FROM dak;
  3188. GRANT ALL ON TABLE keyrings TO dak;
  3189. GRANT SELECT ON TABLE keyrings TO PUBLIC;
  3190. GRANT ALL ON TABLE keyrings TO ftpmaster;
  3191. --
  3192. -- Name: keyrings_id_seq; Type: ACL; Schema: public; Owner: dak
  3193. --
  3194. REVOKE ALL ON SEQUENCE keyrings_id_seq FROM PUBLIC;
  3195. REVOKE ALL ON SEQUENCE keyrings_id_seq FROM dak;
  3196. GRANT ALL ON SEQUENCE keyrings_id_seq TO dak;
  3197. GRANT SELECT ON SEQUENCE keyrings_id_seq TO PUBLIC;
  3198. GRANT ALL ON SEQUENCE keyrings_id_seq TO ftpmaster;
  3199. --
  3200. -- Name: maintainer_id_seq; Type: ACL; Schema: public; Owner: dak
  3201. --
  3202. REVOKE ALL ON SEQUENCE maintainer_id_seq FROM PUBLIC;
  3203. REVOKE ALL ON SEQUENCE maintainer_id_seq FROM dak;
  3204. GRANT ALL ON SEQUENCE maintainer_id_seq TO dak;
  3205. GRANT SELECT ON SEQUENCE maintainer_id_seq TO PUBLIC;
  3206. GRANT ALL ON SEQUENCE maintainer_id_seq TO ftpmaster;
  3207. --
  3208. -- Name: maintainer; Type: ACL; Schema: public; Owner: dak
  3209. --
  3210. REVOKE ALL ON TABLE maintainer FROM PUBLIC;
  3211. REVOKE ALL ON TABLE maintainer FROM dak;
  3212. GRANT ALL ON TABLE maintainer TO dak;
  3213. GRANT SELECT ON TABLE maintainer TO PUBLIC;
  3214. GRANT ALL ON TABLE maintainer TO ftpmaster;
  3215. --
  3216. -- Name: metadata_keys; Type: ACL; Schema: public; Owner: dak
  3217. --
  3218. REVOKE ALL ON TABLE metadata_keys FROM PUBLIC;
  3219. REVOKE ALL ON TABLE metadata_keys FROM dak;
  3220. GRANT ALL ON TABLE metadata_keys TO dak;
  3221. GRANT SELECT,INSERT,UPDATE ON TABLE metadata_keys TO ftpmaster;
  3222. GRANT SELECT ON TABLE metadata_keys TO PUBLIC;
  3223. --
  3224. -- Name: metadata_keys_key_id_seq; Type: ACL; Schema: public; Owner: dak
  3225. --
  3226. REVOKE ALL ON SEQUENCE metadata_keys_key_id_seq FROM PUBLIC;
  3227. REVOKE ALL ON SEQUENCE metadata_keys_key_id_seq FROM dak;
  3228. GRANT ALL ON SEQUENCE metadata_keys_key_id_seq TO dak;
  3229. GRANT ALL ON SEQUENCE metadata_keys_key_id_seq TO ftpmaster;
  3230. GRANT SELECT ON SEQUENCE metadata_keys_key_id_seq TO PUBLIC;
  3231. --
  3232. -- Name: new_comments; Type: ACL; Schema: public; Owner: dak
  3233. --
  3234. REVOKE ALL ON TABLE new_comments FROM PUBLIC;
  3235. REVOKE ALL ON TABLE new_comments FROM dak;
  3236. GRANT ALL ON TABLE new_comments TO dak;
  3237. GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE new_comments TO ftptrainee;
  3238. GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE new_comments TO ftpteam;
  3239. GRANT ALL ON TABLE new_comments TO ftpmaster;
  3240. --
  3241. -- Name: new_comments_id_seq; Type: ACL; Schema: public; Owner: dak
  3242. --
  3243. REVOKE ALL ON SEQUENCE new_comments_id_seq FROM PUBLIC;
  3244. REVOKE ALL ON SEQUENCE new_comments_id_seq FROM dak;
  3245. GRANT ALL ON SEQUENCE new_comments_id_seq TO dak;
  3246. GRANT SELECT,UPDATE ON SEQUENCE new_comments_id_seq TO ftptrainee;
  3247. GRANT SELECT,UPDATE ON SEQUENCE new_comments_id_seq TO ftpteam;
  3248. GRANT ALL ON SEQUENCE new_comments_id_seq TO ftpmaster;
  3249. GRANT SELECT ON SEQUENCE new_comments_id_seq TO PUBLIC;
  3250. --
  3251. -- Name: newest_all_associations; Type: ACL; Schema: public; Owner: dak
  3252. --
  3253. REVOKE ALL ON TABLE newest_all_associations FROM PUBLIC;
  3254. REVOKE ALL ON TABLE newest_all_associations FROM dak;
  3255. GRANT ALL ON TABLE newest_all_associations TO dak;
  3256. GRANT SELECT ON TABLE newest_all_associations TO ftpmaster;
  3257. GRANT SELECT ON TABLE newest_all_associations TO PUBLIC;
  3258. --
  3259. -- Name: newest_any_associations; Type: ACL; Schema: public; Owner: dak
  3260. --
  3261. REVOKE ALL ON TABLE newest_any_associations FROM PUBLIC;
  3262. REVOKE ALL ON TABLE newest_any_associations FROM dak;
  3263. GRANT ALL ON TABLE newest_any_associations TO dak;
  3264. GRANT SELECT ON TABLE newest_any_associations TO ftpmaster;
  3265. GRANT SELECT ON TABLE newest_any_associations TO PUBLIC;
  3266. --
  3267. -- Name: source_suite; Type: ACL; Schema: public; Owner: dak
  3268. --
  3269. REVOKE ALL ON TABLE source_suite FROM PUBLIC;
  3270. REVOKE ALL ON TABLE source_suite FROM dak;
  3271. GRANT ALL ON TABLE source_suite TO dak;
  3272. GRANT SELECT ON TABLE source_suite TO ftpmaster;
  3273. GRANT SELECT ON TABLE source_suite TO PUBLIC;
  3274. --
  3275. -- Name: newest_source; Type: ACL; Schema: public; Owner: dak
  3276. --
  3277. REVOKE ALL ON TABLE newest_source FROM PUBLIC;
  3278. REVOKE ALL ON TABLE newest_source FROM dak;
  3279. GRANT ALL ON TABLE newest_source TO dak;
  3280. GRANT SELECT ON TABLE newest_source TO ftpmaster;
  3281. GRANT SELECT ON TABLE newest_source TO PUBLIC;
  3282. --
  3283. -- Name: newest_src_association; Type: ACL; Schema: public; Owner: dak
  3284. --
  3285. REVOKE ALL ON TABLE newest_src_association FROM PUBLIC;
  3286. REVOKE ALL ON TABLE newest_src_association FROM dak;
  3287. GRANT ALL ON TABLE newest_src_association TO dak;
  3288. GRANT SELECT ON TABLE newest_src_association TO ftpmaster;
  3289. GRANT SELECT ON TABLE newest_src_association TO PUBLIC;
  3290. --
  3291. -- Name: obsolete_all_associations; Type: ACL; Schema: public; Owner: dak
  3292. --
  3293. REVOKE ALL ON TABLE obsolete_all_associations FROM PUBLIC;
  3294. REVOKE ALL ON TABLE obsolete_all_associations FROM dak;
  3295. GRANT ALL ON TABLE obsolete_all_associations TO dak;
  3296. GRANT SELECT ON TABLE obsolete_all_associations TO ftpmaster;
  3297. GRANT SELECT ON TABLE obsolete_all_associations TO PUBLIC;
  3298. --
  3299. -- Name: obsolete_any_associations; Type: ACL; Schema: public; Owner: dak
  3300. --
  3301. REVOKE ALL ON TABLE obsolete_any_associations FROM PUBLIC;
  3302. REVOKE ALL ON TABLE obsolete_any_associations FROM dak;
  3303. GRANT ALL ON TABLE obsolete_any_associations TO dak;
  3304. GRANT SELECT ON TABLE obsolete_any_associations TO ftpmaster;
  3305. GRANT SELECT ON TABLE obsolete_any_associations TO PUBLIC;
  3306. --
  3307. -- Name: obsolete_any_by_all_associations; Type: ACL; Schema: public; Owner: dak
  3308. --
  3309. REVOKE ALL ON TABLE obsolete_any_by_all_associations FROM PUBLIC;
  3310. REVOKE ALL ON TABLE obsolete_any_by_all_associations FROM dak;
  3311. GRANT ALL ON TABLE obsolete_any_by_all_associations TO dak;
  3312. GRANT SELECT ON TABLE obsolete_any_by_all_associations TO ftpmaster;
  3313. GRANT SELECT ON TABLE obsolete_any_by_all_associations TO PUBLIC;
  3314. --
  3315. -- Name: obsolete_src_associations; Type: ACL; Schema: public; Owner: dak
  3316. --
  3317. REVOKE ALL ON TABLE obsolete_src_associations FROM PUBLIC;
  3318. REVOKE ALL ON TABLE obsolete_src_associations FROM dak;
  3319. GRANT ALL ON TABLE obsolete_src_associations TO dak;
  3320. GRANT SELECT ON TABLE obsolete_src_associations TO ftpmaster;
  3321. GRANT SELECT ON TABLE obsolete_src_associations TO PUBLIC;
  3322. --
  3323. -- Name: override; Type: ACL; Schema: public; Owner: dak
  3324. --
  3325. REVOKE ALL ON TABLE override FROM PUBLIC;
  3326. REVOKE ALL ON TABLE override FROM dak;
  3327. GRANT ALL ON TABLE override TO dak;
  3328. GRANT SELECT ON TABLE override TO PUBLIC;
  3329. GRANT ALL ON TABLE override TO ftpmaster;
  3330. GRANT INSERT,DELETE,UPDATE ON TABLE override TO ftpteam;
  3331. --
  3332. -- Name: override_type_id_seq; Type: ACL; Schema: public; Owner: dak
  3333. --
  3334. REVOKE ALL ON SEQUENCE override_type_id_seq FROM PUBLIC;
  3335. REVOKE ALL ON SEQUENCE override_type_id_seq FROM dak;
  3336. GRANT ALL ON SEQUENCE override_type_id_seq TO dak;
  3337. GRANT SELECT ON SEQUENCE override_type_id_seq TO PUBLIC;
  3338. GRANT ALL ON SEQUENCE override_type_id_seq TO ftpmaster;
  3339. --
  3340. -- Name: override_type; Type: ACL; Schema: public; Owner: dak
  3341. --
  3342. REVOKE ALL ON TABLE override_type FROM PUBLIC;
  3343. REVOKE ALL ON TABLE override_type FROM dak;
  3344. GRANT ALL ON TABLE override_type TO dak;
  3345. GRANT SELECT ON TABLE override_type TO PUBLIC;
  3346. GRANT ALL ON TABLE override_type TO ftpmaster;
  3347. --
  3348. -- Name: policy_queue; Type: ACL; Schema: public; Owner: dak
  3349. --
  3350. REVOKE ALL ON TABLE policy_queue FROM PUBLIC;
  3351. REVOKE ALL ON TABLE policy_queue FROM dak;
  3352. GRANT ALL ON TABLE policy_queue TO dak;
  3353. GRANT SELECT ON TABLE policy_queue TO PUBLIC;
  3354. GRANT ALL ON TABLE policy_queue TO ftpmaster;
  3355. --
  3356. -- Name: policy_queue_id_seq; Type: ACL; Schema: public; Owner: dak
  3357. --
  3358. REVOKE ALL ON SEQUENCE policy_queue_id_seq FROM PUBLIC;
  3359. REVOKE ALL ON SEQUENCE policy_queue_id_seq FROM dak;
  3360. GRANT ALL ON SEQUENCE policy_queue_id_seq TO dak;
  3361. GRANT ALL ON SEQUENCE policy_queue_id_seq TO ftpmaster;
  3362. GRANT SELECT ON SEQUENCE policy_queue_id_seq TO PUBLIC;
  3363. --
  3364. -- Name: priority_id_seq; Type: ACL; Schema: public; Owner: dak
  3365. --
  3366. REVOKE ALL ON SEQUENCE priority_id_seq FROM PUBLIC;
  3367. REVOKE ALL ON SEQUENCE priority_id_seq FROM dak;
  3368. GRANT ALL ON SEQUENCE priority_id_seq TO dak;
  3369. GRANT SELECT ON SEQUENCE priority_id_seq TO PUBLIC;
  3370. GRANT ALL ON SEQUENCE priority_id_seq TO ftpmaster;
  3371. --
  3372. -- Name: priority; Type: ACL; Schema: public; Owner: dak
  3373. --
  3374. REVOKE ALL ON TABLE priority FROM PUBLIC;
  3375. REVOKE ALL ON TABLE priority FROM dak;
  3376. GRANT ALL ON TABLE priority TO dak;
  3377. GRANT SELECT ON TABLE priority TO PUBLIC;
  3378. GRANT ALL ON TABLE priority TO ftpmaster;
  3379. --
  3380. -- Name: section_id_seq; Type: ACL; Schema: public; Owner: dak
  3381. --
  3382. REVOKE ALL ON SEQUENCE section_id_seq FROM PUBLIC;
  3383. REVOKE ALL ON SEQUENCE section_id_seq FROM dak;
  3384. GRANT ALL ON SEQUENCE section_id_seq TO dak;
  3385. GRANT SELECT ON SEQUENCE section_id_seq TO PUBLIC;
  3386. GRANT ALL ON SEQUENCE section_id_seq TO ftpmaster;
  3387. --
  3388. -- Name: section; Type: ACL; Schema: public; Owner: dak
  3389. --
  3390. REVOKE ALL ON TABLE section FROM PUBLIC;
  3391. REVOKE ALL ON TABLE section FROM dak;
  3392. GRANT ALL ON TABLE section TO dak;
  3393. GRANT SELECT ON TABLE section TO PUBLIC;
  3394. GRANT ALL ON TABLE section TO ftpmaster;
  3395. --
  3396. -- Name: source_acl; Type: ACL; Schema: public; Owner: dak
  3397. --
  3398. REVOKE ALL ON TABLE source_acl FROM PUBLIC;
  3399. REVOKE ALL ON TABLE source_acl FROM dak;
  3400. GRANT ALL ON TABLE source_acl TO dak;
  3401. GRANT SELECT ON TABLE source_acl TO PUBLIC;
  3402. GRANT ALL ON TABLE source_acl TO ftpmaster;
  3403. --
  3404. -- Name: source_acl_id_seq; Type: ACL; Schema: public; Owner: dak
  3405. --
  3406. REVOKE ALL ON SEQUENCE source_acl_id_seq FROM PUBLIC;
  3407. REVOKE ALL ON SEQUENCE source_acl_id_seq FROM dak;
  3408. GRANT ALL ON SEQUENCE source_acl_id_seq TO dak;
  3409. GRANT ALL ON SEQUENCE source_acl_id_seq TO ftpmaster;
  3410. GRANT SELECT ON SEQUENCE source_acl_id_seq TO PUBLIC;
  3411. --
  3412. -- Name: source_metadata; Type: ACL; Schema: public; Owner: dak
  3413. --
  3414. REVOKE ALL ON TABLE source_metadata FROM PUBLIC;
  3415. REVOKE ALL ON TABLE source_metadata FROM dak;
  3416. GRANT ALL ON TABLE source_metadata TO dak;
  3417. GRANT SELECT,INSERT,UPDATE ON TABLE source_metadata TO ftpmaster;
  3418. GRANT SELECT ON TABLE source_metadata TO PUBLIC;
  3419. --
  3420. -- Name: src_contents; Type: ACL; Schema: public; Owner: dak
  3421. --
  3422. REVOKE ALL ON TABLE src_contents FROM PUBLIC;
  3423. REVOKE ALL ON TABLE src_contents FROM dak;
  3424. GRANT ALL ON TABLE src_contents TO dak;
  3425. GRANT SELECT,INSERT,UPDATE ON TABLE src_contents TO ftpmaster;
  3426. GRANT SELECT ON TABLE src_contents TO PUBLIC;
  3427. --
  3428. -- Name: src_format; Type: ACL; Schema: public; Owner: dak
  3429. --
  3430. REVOKE ALL ON TABLE src_format FROM PUBLIC;
  3431. REVOKE ALL ON TABLE src_format FROM dak;
  3432. GRANT ALL ON TABLE src_format TO dak;
  3433. GRANT SELECT ON TABLE src_format TO PUBLIC;
  3434. GRANT ALL ON TABLE src_format TO ftpmaster;
  3435. --
  3436. -- Name: src_format_id_seq; Type: ACL; Schema: public; Owner: dak
  3437. --
  3438. REVOKE ALL ON SEQUENCE src_format_id_seq FROM PUBLIC;
  3439. REVOKE ALL ON SEQUENCE src_format_id_seq FROM dak;
  3440. GRANT ALL ON SEQUENCE src_format_id_seq TO dak;
  3441. GRANT ALL ON SEQUENCE src_format_id_seq TO ftpmaster;
  3442. GRANT SELECT ON SEQUENCE src_format_id_seq TO PUBLIC;
  3443. --
  3444. -- Name: src_uploaders; Type: ACL; Schema: public; Owner: dak
  3445. --
  3446. REVOKE ALL ON TABLE src_uploaders FROM PUBLIC;
  3447. REVOKE ALL ON TABLE src_uploaders FROM dak;
  3448. GRANT ALL ON TABLE src_uploaders TO dak;
  3449. GRANT SELECT ON TABLE src_uploaders TO PUBLIC;
  3450. GRANT ALL ON TABLE src_uploaders TO ftpmaster;
  3451. --
  3452. -- Name: src_uploaders_id_seq; Type: ACL; Schema: public; Owner: dak
  3453. --
  3454. REVOKE ALL ON SEQUENCE src_uploaders_id_seq FROM PUBLIC;
  3455. REVOKE ALL ON SEQUENCE src_uploaders_id_seq FROM dak;
  3456. GRANT ALL ON SEQUENCE src_uploaders_id_seq TO dak;
  3457. GRANT SELECT ON SEQUENCE src_uploaders_id_seq TO PUBLIC;
  3458. GRANT ALL ON SEQUENCE src_uploaders_id_seq TO ftpmaster;
  3459. --
  3460. -- Name: suite_architectures; Type: ACL; Schema: public; Owner: dak
  3461. --
  3462. REVOKE ALL ON TABLE suite_architectures FROM PUBLIC;
  3463. REVOKE ALL ON TABLE suite_architectures FROM dak;
  3464. GRANT ALL ON TABLE suite_architectures TO dak;
  3465. GRANT SELECT ON TABLE suite_architectures TO PUBLIC;
  3466. GRANT ALL ON TABLE suite_architectures TO ftpmaster;
  3467. --
  3468. -- Name: suite_arch_by_name; Type: ACL; Schema: public; Owner: dak
  3469. --
  3470. REVOKE ALL ON TABLE suite_arch_by_name FROM PUBLIC;
  3471. REVOKE ALL ON TABLE suite_arch_by_name FROM dak;
  3472. GRANT ALL ON TABLE suite_arch_by_name TO dak;
  3473. GRANT SELECT ON TABLE suite_arch_by_name TO PUBLIC;
  3474. GRANT SELECT ON TABLE suite_arch_by_name TO ftpmaster;
  3475. --
  3476. -- Name: suite_build_queue_copy; Type: ACL; Schema: public; Owner: dak
  3477. --
  3478. REVOKE ALL ON TABLE suite_build_queue_copy FROM PUBLIC;
  3479. REVOKE ALL ON TABLE suite_build_queue_copy FROM dak;
  3480. GRANT ALL ON TABLE suite_build_queue_copy TO dak;
  3481. GRANT SELECT ON TABLE suite_build_queue_copy TO PUBLIC;
  3482. GRANT ALL ON TABLE suite_build_queue_copy TO ftpmaster;
  3483. --
  3484. -- Name: suite_src_formats; Type: ACL; Schema: public; Owner: dak
  3485. --
  3486. REVOKE ALL ON TABLE suite_src_formats FROM PUBLIC;
  3487. REVOKE ALL ON TABLE suite_src_formats FROM dak;
  3488. GRANT ALL ON TABLE suite_src_formats TO dak;
  3489. GRANT SELECT ON TABLE suite_src_formats TO PUBLIC;
  3490. GRANT ALL ON TABLE suite_src_formats TO ftpmaster;
  3491. --
  3492. -- Name: uid_id_seq; Type: ACL; Schema: public; Owner: dak
  3493. --
  3494. REVOKE ALL ON SEQUENCE uid_id_seq FROM PUBLIC;
  3495. REVOKE ALL ON SEQUENCE uid_id_seq FROM dak;
  3496. GRANT ALL ON SEQUENCE uid_id_seq TO dak;
  3497. GRANT SELECT ON SEQUENCE uid_id_seq TO PUBLIC;
  3498. GRANT ALL ON SEQUENCE uid_id_seq TO ftpmaster;
  3499. --
  3500. -- Name: uid; Type: ACL; Schema: public; Owner: dak
  3501. --
  3502. REVOKE ALL ON TABLE uid FROM PUBLIC;
  3503. REVOKE ALL ON TABLE uid FROM dak;
  3504. GRANT ALL ON TABLE uid TO dak;
  3505. GRANT SELECT ON TABLE uid TO PUBLIC;
  3506. GRANT ALL ON TABLE uid TO ftpmaster;
  3507. --
  3508. -- Name: upload_blocks; Type: ACL; Schema: public; Owner: dak
  3509. --
  3510. REVOKE ALL ON TABLE upload_blocks FROM PUBLIC;
  3511. REVOKE ALL ON TABLE upload_blocks FROM dak;
  3512. GRANT ALL ON TABLE upload_blocks TO dak;
  3513. GRANT SELECT ON TABLE upload_blocks TO PUBLIC;
  3514. GRANT ALL ON TABLE upload_blocks TO ftpmaster;
  3515. --
  3516. -- Name: upload_blocks_id_seq; Type: ACL; Schema: public; Owner: dak
  3517. --
  3518. REVOKE ALL ON SEQUENCE upload_blocks_id_seq FROM PUBLIC;
  3519. REVOKE ALL ON SEQUENCE upload_blocks_id_seq FROM dak;
  3520. GRANT ALL ON SEQUENCE upload_blocks_id_seq TO dak;
  3521. GRANT ALL ON SEQUENCE upload_blocks_id_seq TO ftpmaster;
  3522. GRANT SELECT ON SEQUENCE upload_blocks_id_seq TO PUBLIC;
  3523. --
  3524. -- Name: version_check; Type: ACL; Schema: public; Owner: dak
  3525. --
  3526. REVOKE ALL ON TABLE version_check FROM PUBLIC;
  3527. REVOKE ALL ON TABLE version_check FROM dak;
  3528. GRANT ALL ON TABLE version_check TO dak;
  3529. GRANT SELECT,INSERT,UPDATE ON TABLE version_check TO ftpmaster;
  3530. GRANT SELECT ON TABLE version_check TO PUBLIC;
  3531. --
  3532. -- Name: version_checks; Type: ACL; Schema: public; Owner: dak
  3533. --
  3534. REVOKE ALL ON TABLE version_checks FROM PUBLIC;
  3535. REVOKE ALL ON TABLE version_checks FROM dak;
  3536. GRANT ALL ON TABLE version_checks TO dak;
  3537. GRANT SELECT ON TABLE version_checks TO PUBLIC;
  3538. --
  3539. -- PostgreSQL database dump complete
  3540. --
  3541. -- Set schema version
  3542. INSERT INTO config (name, value) VALUES ('db_revision', 68);