tripal_core.schema.api.inc 326 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado tables
  3. * to be used with tripal_core chado insert/update/select functions.
  4. * These schema definitions can be augmented by the various modules
  5. * (specifically to add missing foreign key definitions) by implementing
  6. * hook_chado_<table name>_schema().
  7. */
  8. /**
  9. *
  10. * @ingroup tripal_schema_api
  11. */
  12. function tripal_core_get_chado_tables() {
  13. if(is_array($db_url) and array_key_exists('chado',$db_url)){
  14. $previous_db = tripal_db_set_active('chado');
  15. $sql = 'SELECT tablename FROM pg_tables';
  16. $resource = db_query($sql);
  17. tripal_db_set_active($previous_db);
  18. } else {
  19. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  20. $resource = db_query($sql);
  21. }
  22. $tables = array();
  23. while ($r = db_fetch_object($resource)) {
  24. $tables[$r->tablename] = $r->tablename;
  25. }
  26. asort($tables);
  27. return $tables;
  28. }
  29. /**
  30. * Implements hook_organism_dbxref_schema()
  31. * Purpose: To describe the structure of organism_dbxref to tripal
  32. * @see tripal_core.api.inc: tripal_core_chado_insert()
  33. * @see tripal_core.api.inc: tripal_core_chado_update()
  34. * @see tripal_core.api.inc: tripal_core_chado_select()
  35. *
  36. * @return
  37. * An array describing the current table
  38. *
  39. * @ingroup tripal_schema_api
  40. *
  41. */
  42. function tripal_core_chado_organism_dbxref_schema () {
  43. $description = array();
  44. $description = array(
  45. 'table' => 'organism_dbxref',
  46. // 'description' => 'TODO: please describe this table!',
  47. 'fields' => array(
  48. 'organism_dbxref_id' => array(
  49. // 'description' => 'TODO: please describe this field!',
  50. 'type' => 'serial',
  51. 'not null' => '1',
  52. ),
  53. 'organism_id' => array(
  54. // 'description' => 'TODO: please describe this field!',
  55. 'type' => 'int',
  56. 'not null' => '1',
  57. ),
  58. 'dbxref_id' => array(
  59. // 'description' => 'TODO: please describe this field!',
  60. 'type' => 'int',
  61. 'not null' => '1',
  62. ),
  63. ),
  64. 'primary key' => array(
  65. '0' => 'organism_dbxref_id',
  66. ),
  67. 'unique keys' => array(
  68. 'organism_dbxref_c1' => array(
  69. '0' => 'organism_id',
  70. '1' => 'dbxref_id',
  71. ),
  72. ),
  73. 'indexes' => array(
  74. 'organism_dbxref_idx1' => array(
  75. '0' => 'organism_id',
  76. ),
  77. 'organism_dbxref_idx2' => array(
  78. '0' => 'dbxref_id',
  79. ),
  80. ),
  81. 'foreign keys' => array(
  82. ),
  83. );
  84. return $description;
  85. }
  86. /**
  87. * Implements hook_organismprop_schema()
  88. * Purpose: To describe the structure of organismprop to tripal
  89. * @see tripal_core.api.inc: tripal_core_chado_insert()
  90. * @see tripal_core.api.inc: tripal_core_chado_update()
  91. * @see tripal_core.api.inc: tripal_core_chado_select()
  92. *
  93. * @return
  94. * An array describing the current table
  95. *
  96. * @ingroup tripal_schema_api
  97. *
  98. */
  99. function tripal_core_chado_organismprop_schema () {
  100. $description = array();
  101. $description = array(
  102. 'table' => 'organismprop',
  103. // 'description' => 'TODO: please describe this table!',
  104. 'fields' => array(
  105. 'organismprop_id' => array(
  106. // 'description' => 'TODO: please describe this field!',
  107. 'type' => 'serial',
  108. 'not null' => '1',
  109. ),
  110. 'organism_id' => array(
  111. // 'description' => 'TODO: please describe this field!',
  112. 'type' => 'int',
  113. 'not null' => '1',
  114. ),
  115. 'type_id' => array(
  116. // 'description' => 'TODO: please describe this field!',
  117. 'type' => 'int',
  118. 'not null' => '1',
  119. ),
  120. 'value' => array(
  121. // 'description' => 'TODO: please describe this field!',
  122. 'type' => 'text',
  123. 'not null' => '',
  124. ),
  125. 'rank' => array(
  126. // 'description' => 'TODO: please describe this field!',
  127. 'type' => 'int',
  128. 'not null' => '1',
  129. 'default' => '0',
  130. ),
  131. ),
  132. 'primary key' => array(
  133. '0' => 'organismprop_id',
  134. ),
  135. 'unique keys' => array(
  136. 'organismprop_c1' => array(
  137. '0' => 'organism_id',
  138. '1' => 'type_id',
  139. '2' => 'rank',
  140. ),
  141. ),
  142. 'indexes' => array(
  143. 'organismprop_idx1' => array(
  144. '0' => 'organism_id',
  145. ),
  146. 'organismprop_idx2' => array(
  147. '0' => 'type_id',
  148. ),
  149. ),
  150. 'foreign keys' => array(
  151. ),
  152. );
  153. return $description;
  154. }
  155. /**
  156. * Implements hook_phendesc_schema()
  157. * Purpose: To describe the structure of phendesc to tripal
  158. * @see tripal_core.api.inc: tripal_core_chado_insert()
  159. * @see tripal_core.api.inc: tripal_core_chado_update()
  160. * @see tripal_core.api.inc: tripal_core_chado_select()
  161. *
  162. * @return
  163. * An array describing the current table
  164. *
  165. * @ingroup tripal_schema_api
  166. *
  167. */
  168. function tripal_core_chado_phendesc_schema () {
  169. $description = array();
  170. $description = array(
  171. 'table' => 'phendesc',
  172. // 'description' => 'TODO: please describe this table!',
  173. 'fields' => array(
  174. 'phendesc_id' => array(
  175. // 'description' => 'TODO: please describe this field!',
  176. 'type' => 'serial',
  177. 'not null' => '1',
  178. ),
  179. 'genotype_id' => array(
  180. // 'description' => 'TODO: please describe this field!',
  181. 'type' => 'int',
  182. 'not null' => '1',
  183. ),
  184. 'environment_id' => array(
  185. // 'description' => 'TODO: please describe this field!',
  186. 'type' => 'int',
  187. 'not null' => '1',
  188. ),
  189. 'description' => array(
  190. // 'description' => 'TODO: please describe this field!',
  191. 'type' => 'text',
  192. 'not null' => '1',
  193. ),
  194. 'type_id' => array(
  195. // 'description' => 'TODO: please describe this field!',
  196. 'type' => 'int',
  197. 'not null' => '1',
  198. ),
  199. 'pub_id' => array(
  200. // 'description' => 'TODO: please describe this field!',
  201. 'type' => 'int',
  202. 'not null' => '1',
  203. ),
  204. ),
  205. 'primary key' => array(
  206. '0' => 'phendesc_id',
  207. ),
  208. 'unique keys' => array(
  209. 'phendesc_c1' => array(
  210. '0' => 'genotype_id',
  211. '1' => 'environment_id',
  212. '2' => 'type_id',
  213. '3' => 'pub_id',
  214. ),
  215. ),
  216. 'indexes' => array(
  217. 'phendesc_idx1' => array(
  218. '0' => 'genotype_id',
  219. ),
  220. 'phendesc_idx2' => array(
  221. '0' => 'environment_id',
  222. ),
  223. 'phendesc_idx3' => array(
  224. '0' => 'pub_id',
  225. ),
  226. ),
  227. 'foreign keys' => array(
  228. ),
  229. );
  230. return $description;
  231. }
  232. /**
  233. * Implements hook_phenotype_schema()
  234. * Purpose: To describe the structure of phenotype to tripal
  235. * @see tripal_core.api.inc: tripal_core_chado_insert()
  236. * @see tripal_core.api.inc: tripal_core_chado_update()
  237. * @see tripal_core.api.inc: tripal_core_chado_select()
  238. *
  239. * @return
  240. * An array describing the current table
  241. *
  242. * @ingroup tripal_schema_api
  243. *
  244. */
  245. function tripal_core_chado_phenotype_schema () {
  246. $description = array();
  247. $description = array(
  248. 'table' => 'phenotype',
  249. // 'description' => 'TODO: please describe this table!',
  250. 'fields' => array(
  251. 'phenotype_id' => array(
  252. // 'description' => 'TODO: please describe this field!',
  253. 'type' => 'serial',
  254. 'not null' => '1',
  255. ),
  256. 'uniquename' => array(
  257. // 'description' => 'TODO: please describe this field!',
  258. 'type' => 'text',
  259. 'not null' => '1',
  260. ),
  261. 'observable_id' => array(
  262. // 'description' => 'TODO: please describe this field!',
  263. 'type' => 'int',
  264. 'not null' => '',
  265. ),
  266. 'attr_id' => array(
  267. // 'description' => 'TODO: please describe this field!',
  268. 'type' => 'int',
  269. 'not null' => '',
  270. ),
  271. 'value' => array(
  272. // 'description' => 'TODO: please describe this field!',
  273. 'type' => 'text',
  274. 'not null' => '',
  275. ),
  276. 'cvalue_id' => array(
  277. // 'description' => 'TODO: please describe this field!',
  278. 'type' => 'int',
  279. 'not null' => '',
  280. ),
  281. 'assay_id' => array(
  282. // 'description' => 'TODO: please describe this field!',
  283. 'type' => 'int',
  284. 'not null' => '',
  285. ),
  286. ),
  287. 'primary key' => array(
  288. '0' => 'phenotype_id',
  289. ),
  290. 'unique keys' => array(
  291. 'phenotype_c1' => array(
  292. '0' => 'uniquename',
  293. ),
  294. ),
  295. 'indexes' => array(
  296. 'phenotype_idx1' => array(
  297. '0' => 'cvalue_id',
  298. ),
  299. 'phenotype_idx2' => array(
  300. '0' => 'observable_id',
  301. ),
  302. 'phenotype_idx3' => array(
  303. '0' => 'attr_id',
  304. ),
  305. ),
  306. 'foreign keys' => array(
  307. ),
  308. );
  309. return $description;
  310. }
  311. /**
  312. * Implements hook_organism_schema()
  313. * Purpose: To describe the structure of organism to tripal
  314. * @see tripal_core.api.inc: tripal_core_chado_insert()
  315. * @see tripal_core.api.inc: tripal_core_chado_update()
  316. * @see tripal_core.api.inc: tripal_core_chado_select()
  317. *
  318. * @return
  319. * An array describing the current table
  320. *
  321. * @ingroup tripal_schema_api
  322. *
  323. */
  324. function tripal_core_chado_organism_schema () {
  325. $description = array();
  326. $description = array(
  327. 'table' => 'organism',
  328. // 'description' => 'TODO: please describe this table!',
  329. 'fields' => array(
  330. 'organism_id' => array(
  331. // 'description' => 'TODO: please describe this field!',
  332. 'type' => 'serial',
  333. 'not null' => '1',
  334. ),
  335. 'abbreviation' => array(
  336. // 'description' => 'TODO: please describe this field!',
  337. 'type' => 'varchar',
  338. 'length' => '255',
  339. 'not null' => '',
  340. ),
  341. 'genus' => array(
  342. // 'description' => 'TODO: please describe this field!',
  343. 'type' => 'varchar',
  344. 'length' => '255',
  345. 'not null' => '1',
  346. ),
  347. 'species' => array(
  348. // 'description' => 'TODO: please describe this field!',
  349. 'type' => 'varchar',
  350. 'length' => '255',
  351. 'not null' => '1',
  352. ),
  353. 'common_name' => array(
  354. // 'description' => 'TODO: please describe this field!',
  355. 'type' => 'varchar',
  356. 'length' => '255',
  357. 'not null' => '',
  358. ),
  359. 'comment' => array(
  360. // 'description' => 'TODO: please describe this field!',
  361. 'type' => 'text',
  362. 'not null' => '',
  363. ),
  364. ),
  365. 'primary key' => array(
  366. '0' => 'organism_id',
  367. ),
  368. 'unique keys' => array(
  369. 'organism_c1' => array(
  370. '0' => 'genus',
  371. '1' => 'species',
  372. ),
  373. ),
  374. 'indexes' => array(
  375. ),
  376. 'foreign keys' => array(
  377. ),
  378. );
  379. return $description;
  380. }
  381. /**
  382. * Implements hook_materialized_view_schema()
  383. * Purpose: To describe the structure of materialized_view to tripal
  384. * @see tripal_core.api.inc: tripal_core_chado_insert()
  385. * @see tripal_core.api.inc: tripal_core_chado_update()
  386. * @see tripal_core.api.inc: tripal_core_chado_select()
  387. *
  388. * @return
  389. * An array describing the current table
  390. *
  391. * @ingroup tripal_schema_api
  392. *
  393. */
  394. function tripal_core_chado_materialized_view_schema () {
  395. $description = array();
  396. $description = array(
  397. 'table' => 'materialized_view',
  398. // 'description' => 'TODO: please describe this table!',
  399. 'fields' => array(
  400. 'materialized_view_id' => array(
  401. // 'description' => 'TODO: please describe this field!',
  402. 'type' => 'serial',
  403. 'not null' => '1',
  404. ),
  405. 'last_update' => array(
  406. // 'description' => 'TODO: please describe this field!',
  407. 'type' => 'datetime',
  408. 'not null' => '',
  409. ),
  410. 'refresh_time' => array(
  411. // 'description' => 'TODO: please describe this field!',
  412. 'type' => 'int',
  413. 'not null' => '',
  414. ),
  415. 'name' => array(
  416. // 'description' => 'TODO: please describe this field!',
  417. 'type' => 'varchar',
  418. 'length' => '64',
  419. 'not null' => '',
  420. ),
  421. 'mv_schema' => array(
  422. // 'description' => 'TODO: please describe this field!',
  423. 'type' => 'varchar',
  424. 'length' => '64',
  425. 'not null' => '',
  426. ),
  427. 'mv_table' => array(
  428. // 'description' => 'TODO: please describe this field!',
  429. 'type' => 'varchar',
  430. 'length' => '128',
  431. 'not null' => '',
  432. ),
  433. 'mv_specs' => array(
  434. // 'description' => 'TODO: please describe this field!',
  435. 'type' => 'text',
  436. 'not null' => '',
  437. ),
  438. 'indexed' => array(
  439. // 'description' => 'TODO: please describe this field!',
  440. 'type' => 'text',
  441. 'not null' => '',
  442. ),
  443. 'query' => array(
  444. // 'description' => 'TODO: please describe this field!',
  445. 'type' => 'text',
  446. 'not null' => '',
  447. ),
  448. 'special_index' => array(
  449. // 'description' => 'TODO: please describe this field!',
  450. 'type' => 'text',
  451. 'not null' => '',
  452. ),
  453. ),
  454. 'primary key' => array(
  455. ),
  456. 'unique keys' => array(
  457. 'name' => array(
  458. '0' => 'name',
  459. ),
  460. ),
  461. 'indexes' => array(
  462. ),
  463. 'foreign keys' => array(
  464. ),
  465. );
  466. return $description;
  467. }
  468. /**
  469. * Implements hook_libraryprop_schema()
  470. * Purpose: To describe the structure of libraryprop to tripal
  471. * @see tripal_core.api.inc: tripal_core_chado_insert()
  472. * @see tripal_core.api.inc: tripal_core_chado_update()
  473. * @see tripal_core.api.inc: tripal_core_chado_select()
  474. *
  475. * @return
  476. * An array describing the current table
  477. *
  478. * @ingroup tripal_schema_api
  479. *
  480. */
  481. function tripal_core_chado_libraryprop_schema () {
  482. $description = array();
  483. $description = array(
  484. 'table' => 'libraryprop',
  485. // 'description' => 'TODO: please describe this table!',
  486. 'fields' => array(
  487. 'libraryprop_id' => array(
  488. // 'description' => 'TODO: please describe this field!',
  489. 'type' => 'serial',
  490. 'not null' => '1',
  491. ),
  492. 'library_id' => array(
  493. // 'description' => 'TODO: please describe this field!',
  494. 'type' => 'int',
  495. 'not null' => '1',
  496. ),
  497. 'type_id' => array(
  498. // 'description' => 'TODO: please describe this field!',
  499. 'type' => 'int',
  500. 'not null' => '1',
  501. ),
  502. 'value' => array(
  503. // 'description' => 'TODO: please describe this field!',
  504. 'type' => 'text',
  505. 'not null' => '',
  506. ),
  507. 'rank' => array(
  508. // 'description' => 'TODO: please describe this field!',
  509. 'type' => 'int',
  510. 'not null' => '1',
  511. 'default' => '0',
  512. ),
  513. ),
  514. 'primary key' => array(
  515. '0' => 'libraryprop_id',
  516. ),
  517. 'unique keys' => array(
  518. 'libraryprop_c1' => array(
  519. '0' => 'library_id',
  520. '1' => 'type_id',
  521. '2' => 'rank',
  522. ),
  523. ),
  524. 'indexes' => array(
  525. 'libraryprop_idx1' => array(
  526. '0' => 'library_id',
  527. ),
  528. 'libraryprop_idx2' => array(
  529. '0' => 'type_id',
  530. ),
  531. ),
  532. 'foreign keys' => array(
  533. ),
  534. );
  535. return $description;
  536. }
  537. /**
  538. * Implements hook_libraryprop_pub_schema()
  539. * Purpose: To describe the structure of libraryprop_pub to tripal
  540. * @see tripal_core.api.inc: tripal_core_chado_insert()
  541. * @see tripal_core.api.inc: tripal_core_chado_update()
  542. * @see tripal_core.api.inc: tripal_core_chado_select()
  543. *
  544. * @return
  545. * An array describing the current table
  546. *
  547. * @ingroup tripal_schema_api
  548. *
  549. */
  550. function tripal_core_chado_libraryprop_pub_schema () {
  551. $description = array();
  552. $description = array(
  553. 'table' => 'libraryprop_pub',
  554. // 'description' => 'TODO: please describe this table!',
  555. 'fields' => array(
  556. 'libraryprop_pub_id' => array(
  557. // 'description' => 'TODO: please describe this field!',
  558. 'type' => 'serial',
  559. 'not null' => '1',
  560. ),
  561. 'libraryprop_id' => array(
  562. // 'description' => 'TODO: please describe this field!',
  563. 'type' => 'int',
  564. 'not null' => '1',
  565. ),
  566. 'pub_id' => array(
  567. // 'description' => 'TODO: please describe this field!',
  568. 'type' => 'int',
  569. 'not null' => '1',
  570. ),
  571. ),
  572. 'primary key' => array(
  573. '0' => 'libraryprop_pub_id',
  574. ),
  575. 'unique keys' => array(
  576. 'libraryprop_pub_c1' => array(
  577. '0' => 'libraryprop_id',
  578. '1' => 'pub_id',
  579. ),
  580. ),
  581. 'indexes' => array(
  582. 'libraryprop_pub_idx1' => array(
  583. '0' => 'libraryprop_id',
  584. ),
  585. 'libraryprop_pub_idx2' => array(
  586. '0' => 'pub_id',
  587. ),
  588. ),
  589. 'foreign keys' => array(
  590. ),
  591. );
  592. return $description;
  593. }
  594. /**
  595. * Implements hook_magedocumentation_schema()
  596. * Purpose: To describe the structure of magedocumentation to tripal
  597. * @see tripal_core.api.inc: tripal_core_chado_insert()
  598. * @see tripal_core.api.inc: tripal_core_chado_update()
  599. * @see tripal_core.api.inc: tripal_core_chado_select()
  600. *
  601. * @return
  602. * An array describing the current table
  603. *
  604. * @ingroup tripal_schema_api
  605. *
  606. */
  607. function tripal_core_chado_magedocumentation_schema () {
  608. $description = array();
  609. $description = array(
  610. 'table' => 'magedocumentation',
  611. // 'description' => 'TODO: please describe this table!',
  612. 'fields' => array(
  613. 'magedocumentation_id' => array(
  614. // 'description' => 'TODO: please describe this field!',
  615. 'type' => 'serial',
  616. 'not null' => '1',
  617. ),
  618. 'mageml_id' => array(
  619. // 'description' => 'TODO: please describe this field!',
  620. 'type' => 'int',
  621. 'not null' => '1',
  622. ),
  623. 'tableinfo_id' => array(
  624. // 'description' => 'TODO: please describe this field!',
  625. 'type' => 'int',
  626. 'not null' => '1',
  627. ),
  628. 'row_id' => array(
  629. // 'description' => 'TODO: please describe this field!',
  630. 'type' => 'int',
  631. 'not null' => '1',
  632. ),
  633. 'mageidentifier' => array(
  634. // 'description' => 'TODO: please describe this field!',
  635. 'type' => 'text',
  636. 'not null' => '1',
  637. ),
  638. ),
  639. 'primary key' => array(
  640. '0' => 'magedocumentation_id',
  641. ),
  642. 'unique keys' => array(
  643. ),
  644. 'indexes' => array(
  645. 'magedocumentation_idx1' => array(
  646. '0' => 'mageml_id',
  647. ),
  648. 'magedocumentation_idx2' => array(
  649. '0' => 'tableinfo_id',
  650. ),
  651. 'magedocumentation_idx3' => array(
  652. '0' => 'row_id',
  653. ),
  654. ),
  655. 'foreign keys' => array(
  656. ),
  657. );
  658. return $description;
  659. }
  660. /**
  661. * Implements hook_mageml_schema()
  662. * Purpose: To describe the structure of mageml to tripal
  663. * @see tripal_core.api.inc: tripal_core_chado_insert()
  664. * @see tripal_core.api.inc: tripal_core_chado_update()
  665. * @see tripal_core.api.inc: tripal_core_chado_select()
  666. *
  667. * @return
  668. * An array describing the current table
  669. *
  670. * @ingroup tripal_schema_api
  671. *
  672. */
  673. function tripal_core_chado_mageml_schema () {
  674. $description = array();
  675. $description = array(
  676. 'table' => 'mageml',
  677. // 'description' => 'TODO: please describe this table!',
  678. 'fields' => array(
  679. 'mageml_id' => array(
  680. // 'description' => 'TODO: please describe this field!',
  681. 'type' => 'serial',
  682. 'not null' => '1',
  683. ),
  684. 'mage_package' => array(
  685. // 'description' => 'TODO: please describe this field!',
  686. 'type' => 'text',
  687. 'not null' => '1',
  688. ),
  689. 'mage_ml' => array(
  690. // 'description' => 'TODO: please describe this field!',
  691. 'type' => 'text',
  692. 'not null' => '1',
  693. ),
  694. ),
  695. 'primary key' => array(
  696. '0' => 'mageml_id',
  697. ),
  698. 'unique keys' => array(
  699. ),
  700. 'indexes' => array(
  701. ),
  702. 'foreign keys' => array(
  703. ),
  704. );
  705. return $description;
  706. }
  707. /**
  708. * Implements hook_phenotype_comparison_schema()
  709. * Purpose: To describe the structure of phenotype_comparison to tripal
  710. * @see tripal_core.api.inc: tripal_core_chado_insert()
  711. * @see tripal_core.api.inc: tripal_core_chado_update()
  712. * @see tripal_core.api.inc: tripal_core_chado_select()
  713. *
  714. * @return
  715. * An array describing the current table
  716. *
  717. * @ingroup tripal_schema_api
  718. *
  719. */
  720. function tripal_core_chado_phenotype_comparison_schema () {
  721. $description = array();
  722. $description = array(
  723. 'table' => 'phenotype_comparison',
  724. // 'description' => 'TODO: please describe this table!',
  725. 'fields' => array(
  726. 'phenotype_comparison_id' => array(
  727. // 'description' => 'TODO: please describe this field!',
  728. 'type' => 'serial',
  729. 'not null' => '1',
  730. ),
  731. 'genotype1_id' => array(
  732. // 'description' => 'TODO: please describe this field!',
  733. 'type' => 'int',
  734. 'not null' => '1',
  735. ),
  736. 'environment1_id' => array(
  737. // 'description' => 'TODO: please describe this field!',
  738. 'type' => 'int',
  739. 'not null' => '1',
  740. ),
  741. 'genotype2_id' => array(
  742. // 'description' => 'TODO: please describe this field!',
  743. 'type' => 'int',
  744. 'not null' => '1',
  745. ),
  746. 'environment2_id' => array(
  747. // 'description' => 'TODO: please describe this field!',
  748. 'type' => 'int',
  749. 'not null' => '1',
  750. ),
  751. 'phenotype1_id' => array(
  752. // 'description' => 'TODO: please describe this field!',
  753. 'type' => 'int',
  754. 'not null' => '1',
  755. ),
  756. 'phenotype2_id' => array(
  757. // 'description' => 'TODO: please describe this field!',
  758. 'type' => 'int',
  759. 'not null' => '',
  760. ),
  761. 'pub_id' => array(
  762. // 'description' => 'TODO: please describe this field!',
  763. 'type' => 'int',
  764. 'not null' => '1',
  765. ),
  766. 'organism_id' => array(
  767. // 'description' => 'TODO: please describe this field!',
  768. 'type' => 'int',
  769. 'not null' => '1',
  770. ),
  771. ),
  772. 'primary key' => array(
  773. '0' => 'phenotype_comparison_id',
  774. ),
  775. 'unique keys' => array(
  776. 'phenotype_comparison_c1' => array(
  777. '0' => 'genotype1_id',
  778. '1' => 'environment1_id',
  779. '2' => 'genotype2_id',
  780. '3' => 'environment2_id',
  781. '4' => 'phenotype1_id',
  782. '5' => 'pub_id',
  783. ),
  784. ),
  785. 'indexes' => array(
  786. 'phenotype_comparison_idx1' => array(
  787. '0' => 'genotype1_id',
  788. ),
  789. 'phenotype_comparison_idx2' => array(
  790. '0' => 'genotype2_id',
  791. ),
  792. 'phenotype_comparison_idx4' => array(
  793. '0' => 'pub_id',
  794. ),
  795. ),
  796. 'foreign keys' => array(
  797. ),
  798. );
  799. return $description;
  800. }
  801. /**
  802. * Implements hook_phenotype_comparison_cvterm_schema()
  803. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  804. * @see tripal_core.api.inc: tripal_core_chado_insert()
  805. * @see tripal_core.api.inc: tripal_core_chado_update()
  806. * @see tripal_core.api.inc: tripal_core_chado_select()
  807. *
  808. * @return
  809. * An array describing the current table
  810. *
  811. * @ingroup tripal_schema_api
  812. *
  813. */
  814. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  815. $description = array();
  816. $description = array(
  817. 'table' => 'phenotype_comparison_cvterm',
  818. // 'description' => 'TODO: please describe this table!',
  819. 'fields' => array(
  820. 'phenotype_comparison_cvterm_id' => array(
  821. // 'description' => 'TODO: please describe this field!',
  822. 'type' => 'serial',
  823. 'not null' => '1',
  824. ),
  825. 'phenotype_comparison_id' => array(
  826. // 'description' => 'TODO: please describe this field!',
  827. 'type' => 'int',
  828. 'not null' => '1',
  829. ),
  830. 'cvterm_id' => array(
  831. // 'description' => 'TODO: please describe this field!',
  832. 'type' => 'int',
  833. 'not null' => '1',
  834. ),
  835. 'pub_id' => array(
  836. // 'description' => 'TODO: please describe this field!',
  837. 'type' => 'int',
  838. 'not null' => '1',
  839. ),
  840. 'rank' => array(
  841. // 'description' => 'TODO: please describe this field!',
  842. 'type' => 'int',
  843. 'not null' => '1',
  844. 'default' => '0',
  845. ),
  846. ),
  847. 'primary key' => array(
  848. '0' => 'phenotype_comparison_cvterm_id',
  849. ),
  850. 'unique keys' => array(
  851. 'phenotype_comparison_cvterm_c1' => array(
  852. '0' => 'phenotype_comparison_id',
  853. '1' => 'cvterm_id',
  854. ),
  855. ),
  856. 'indexes' => array(
  857. 'phenotype_comparison_cvterm_idx1' => array(
  858. '0' => 'phenotype_comparison_id',
  859. ),
  860. 'phenotype_comparison_cvterm_idx2' => array(
  861. '0' => 'cvterm_id',
  862. ),
  863. ),
  864. 'foreign keys' => array(
  865. ),
  866. );
  867. return $description;
  868. }
  869. /**
  870. * Implements hook_phylonode_relationship_schema()
  871. * Purpose: To describe the structure of phylonode_relationship to tripal
  872. * @see tripal_core.api.inc: tripal_core_chado_insert()
  873. * @see tripal_core.api.inc: tripal_core_chado_update()
  874. * @see tripal_core.api.inc: tripal_core_chado_select()
  875. *
  876. * @return
  877. * An array describing the current table
  878. *
  879. * @ingroup tripal_schema_api
  880. *
  881. */
  882. function tripal_core_chado_phylonode_relationship_schema () {
  883. $description = array();
  884. $description = array(
  885. 'table' => 'phylonode_relationship',
  886. // 'description' => 'TODO: please describe this table!',
  887. 'fields' => array(
  888. 'phylonode_relationship_id' => array(
  889. // 'description' => 'TODO: please describe this field!',
  890. 'type' => 'serial',
  891. 'not null' => '1',
  892. ),
  893. 'subject_id' => array(
  894. // 'description' => 'TODO: please describe this field!',
  895. 'type' => 'int',
  896. 'not null' => '1',
  897. ),
  898. 'object_id' => array(
  899. // 'description' => 'TODO: please describe this field!',
  900. 'type' => 'int',
  901. 'not null' => '1',
  902. ),
  903. 'type_id' => array(
  904. // 'description' => 'TODO: please describe this field!',
  905. 'type' => 'int',
  906. 'not null' => '1',
  907. ),
  908. 'rank' => array(
  909. // 'description' => 'TODO: please describe this field!',
  910. 'type' => 'int',
  911. 'not null' => '',
  912. ),
  913. 'phylotree_id' => array(
  914. // 'description' => 'TODO: please describe this field!',
  915. 'type' => 'int',
  916. 'not null' => '1',
  917. ),
  918. ),
  919. 'primary key' => array(
  920. '0' => 'phylonode_relationship_id',
  921. ),
  922. 'unique keys' => array(
  923. 'subject_id' => array(
  924. '0' => 'subject_id',
  925. '1' => 'object_id',
  926. '2' => 'type_id',
  927. ),
  928. ),
  929. 'indexes' => array(
  930. 'phylonode_relationship_idx1' => array(
  931. '0' => 'subject_id',
  932. ),
  933. 'phylonode_relationship_idx2' => array(
  934. '0' => 'object_id',
  935. ),
  936. 'phylonode_relationship_idx3' => array(
  937. '0' => 'type_id',
  938. ),
  939. ),
  940. 'foreign keys' => array(
  941. ),
  942. );
  943. return $description;
  944. }
  945. /**
  946. * Implements hook_phylonodeprop_schema()
  947. * Purpose: To describe the structure of phylonodeprop to tripal
  948. * @see tripal_core.api.inc: tripal_core_chado_insert()
  949. * @see tripal_core.api.inc: tripal_core_chado_update()
  950. * @see tripal_core.api.inc: tripal_core_chado_select()
  951. *
  952. * @return
  953. * An array describing the current table
  954. *
  955. * @ingroup tripal_schema_api
  956. *
  957. */
  958. function tripal_core_chado_phylonodeprop_schema () {
  959. $description = array();
  960. $description = array(
  961. 'table' => 'phylonodeprop',
  962. // 'description' => 'TODO: please describe this table!',
  963. 'fields' => array(
  964. 'phylonodeprop_id' => array(
  965. // 'description' => 'TODO: please describe this field!',
  966. 'type' => 'serial',
  967. 'not null' => '1',
  968. ),
  969. 'phylonode_id' => array(
  970. // 'description' => 'TODO: please describe this field!',
  971. 'type' => 'int',
  972. 'not null' => '1',
  973. ),
  974. 'type_id' => array(
  975. // 'description' => 'TODO: please describe this field!',
  976. 'type' => 'int',
  977. 'not null' => '1',
  978. ),
  979. 'value' => array(
  980. // 'description' => 'TODO: please describe this field!',
  981. 'type' => 'text',
  982. 'not null' => '1',
  983. 'default' => '',
  984. ),
  985. 'rank' => array(
  986. // 'description' => 'TODO: please describe this field!',
  987. 'type' => 'int',
  988. 'not null' => '1',
  989. 'default' => '0',
  990. ),
  991. ),
  992. 'primary key' => array(
  993. '0' => 'phylonodeprop_id',
  994. ),
  995. 'unique keys' => array(
  996. 'phylonode_id' => array(
  997. '0' => 'phylonode_id',
  998. '1' => 'type_id',
  999. '2' => 'value',
  1000. '3' => 'rank',
  1001. ),
  1002. ),
  1003. 'indexes' => array(
  1004. 'phylonodeprop_idx1' => array(
  1005. '0' => 'phylonode_id',
  1006. ),
  1007. 'phylonodeprop_idx2' => array(
  1008. '0' => 'type_id',
  1009. ),
  1010. ),
  1011. 'foreign keys' => array(
  1012. ),
  1013. );
  1014. return $description;
  1015. }
  1016. /**
  1017. * Implements hook_phylotree_schema()
  1018. * Purpose: To describe the structure of phylotree to tripal
  1019. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1020. * @see tripal_core.api.inc: tripal_core_chado_update()
  1021. * @see tripal_core.api.inc: tripal_core_chado_select()
  1022. *
  1023. * @return
  1024. * An array describing the current table
  1025. *
  1026. * @ingroup tripal_schema_api
  1027. *
  1028. */
  1029. function tripal_core_chado_phylotree_schema () {
  1030. $description = array();
  1031. $description = array(
  1032. 'table' => 'phylotree',
  1033. // 'description' => 'TODO: please describe this table!',
  1034. 'fields' => array(
  1035. 'phylotree_id' => array(
  1036. // 'description' => 'TODO: please describe this field!',
  1037. 'type' => 'serial',
  1038. 'not null' => '1',
  1039. ),
  1040. 'dbxref_id' => array(
  1041. // 'description' => 'TODO: please describe this field!',
  1042. 'type' => 'int',
  1043. 'not null' => '1',
  1044. ),
  1045. 'name' => array(
  1046. // 'description' => 'TODO: please describe this field!',
  1047. 'type' => 'varchar',
  1048. 'length' => '255',
  1049. 'not null' => '',
  1050. ),
  1051. 'type_id' => array(
  1052. // 'description' => 'TODO: please describe this field!',
  1053. 'type' => 'int',
  1054. 'not null' => '',
  1055. ),
  1056. 'analysis_id' => array(
  1057. // 'description' => 'TODO: please describe this field!',
  1058. 'type' => 'int',
  1059. 'not null' => '',
  1060. ),
  1061. 'comment' => array(
  1062. // 'description' => 'TODO: please describe this field!',
  1063. 'type' => 'text',
  1064. 'not null' => '',
  1065. ),
  1066. ),
  1067. 'primary key' => array(
  1068. '0' => 'phylotree_id',
  1069. ),
  1070. 'unique keys' => array(
  1071. ),
  1072. 'indexes' => array(
  1073. 'phylotree_idx1' => array(
  1074. '0' => 'phylotree_id',
  1075. ),
  1076. ),
  1077. 'foreign keys' => array(
  1078. ),
  1079. );
  1080. return $description;
  1081. }
  1082. /**
  1083. * Implements hook_phylotree_pub_schema()
  1084. * Purpose: To describe the structure of phylotree_pub to tripal
  1085. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1086. * @see tripal_core.api.inc: tripal_core_chado_update()
  1087. * @see tripal_core.api.inc: tripal_core_chado_select()
  1088. *
  1089. * @return
  1090. * An array describing the current table
  1091. *
  1092. * @ingroup tripal_schema_api
  1093. *
  1094. */
  1095. function tripal_core_chado_phylotree_pub_schema () {
  1096. $description = array();
  1097. $description = array(
  1098. 'table' => 'phylotree_pub',
  1099. // 'description' => 'TODO: please describe this table!',
  1100. 'fields' => array(
  1101. 'phylotree_pub_id' => array(
  1102. // 'description' => 'TODO: please describe this field!',
  1103. 'type' => 'serial',
  1104. 'not null' => '1',
  1105. ),
  1106. 'phylotree_id' => array(
  1107. // 'description' => 'TODO: please describe this field!',
  1108. 'type' => 'int',
  1109. 'not null' => '1',
  1110. ),
  1111. 'pub_id' => array(
  1112. // 'description' => 'TODO: please describe this field!',
  1113. 'type' => 'int',
  1114. 'not null' => '1',
  1115. ),
  1116. ),
  1117. 'primary key' => array(
  1118. '0' => 'phylotree_pub_id',
  1119. ),
  1120. 'unique keys' => array(
  1121. 'phylotree_id' => array(
  1122. '0' => 'phylotree_id',
  1123. '1' => 'pub_id',
  1124. ),
  1125. ),
  1126. 'indexes' => array(
  1127. 'phylotree_pub_idx1' => array(
  1128. '0' => 'phylotree_id',
  1129. ),
  1130. 'phylotree_pub_idx2' => array(
  1131. '0' => 'pub_id',
  1132. ),
  1133. ),
  1134. 'foreign keys' => array(
  1135. ),
  1136. );
  1137. return $description;
  1138. }
  1139. /**
  1140. * Implements hook_phylonode_pub_schema()
  1141. * Purpose: To describe the structure of phylonode_pub to tripal
  1142. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1143. * @see tripal_core.api.inc: tripal_core_chado_update()
  1144. * @see tripal_core.api.inc: tripal_core_chado_select()
  1145. *
  1146. * @return
  1147. * An array describing the current table
  1148. *
  1149. * @ingroup tripal_schema_api
  1150. *
  1151. */
  1152. function tripal_core_chado_phylonode_pub_schema () {
  1153. $description = array();
  1154. $description = array(
  1155. 'table' => 'phylonode_pub',
  1156. // 'description' => 'TODO: please describe this table!',
  1157. 'fields' => array(
  1158. 'phylonode_pub_id' => array(
  1159. // 'description' => 'TODO: please describe this field!',
  1160. 'type' => 'serial',
  1161. 'not null' => '1',
  1162. ),
  1163. 'phylonode_id' => array(
  1164. // 'description' => 'TODO: please describe this field!',
  1165. 'type' => 'int',
  1166. 'not null' => '1',
  1167. ),
  1168. 'pub_id' => array(
  1169. // 'description' => 'TODO: please describe this field!',
  1170. 'type' => 'int',
  1171. 'not null' => '1',
  1172. ),
  1173. ),
  1174. 'primary key' => array(
  1175. '0' => 'phylonode_pub_id',
  1176. ),
  1177. 'unique keys' => array(
  1178. 'phylonode_id' => array(
  1179. '0' => 'phylonode_id',
  1180. '1' => 'pub_id',
  1181. ),
  1182. ),
  1183. 'indexes' => array(
  1184. 'phylonode_pub_idx1' => array(
  1185. '0' => 'phylonode_id',
  1186. ),
  1187. 'phylonode_pub_idx2' => array(
  1188. '0' => 'pub_id',
  1189. ),
  1190. ),
  1191. 'foreign keys' => array(
  1192. ),
  1193. );
  1194. return $description;
  1195. }
  1196. /**
  1197. * Implements hook_phylonode_organism_schema()
  1198. * Purpose: To describe the structure of phylonode_organism to tripal
  1199. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1200. * @see tripal_core.api.inc: tripal_core_chado_update()
  1201. * @see tripal_core.api.inc: tripal_core_chado_select()
  1202. *
  1203. * @return
  1204. * An array describing the current table
  1205. *
  1206. * @ingroup tripal_schema_api
  1207. *
  1208. */
  1209. function tripal_core_chado_phylonode_organism_schema () {
  1210. $description = array();
  1211. $description = array(
  1212. 'table' => 'phylonode_organism',
  1213. // 'description' => 'TODO: please describe this table!',
  1214. 'fields' => array(
  1215. 'phylonode_organism_id' => array(
  1216. // 'description' => 'TODO: please describe this field!',
  1217. 'type' => 'serial',
  1218. 'not null' => '1',
  1219. ),
  1220. 'phylonode_id' => array(
  1221. // 'description' => 'TODO: please describe this field!',
  1222. 'type' => 'int',
  1223. 'not null' => '1',
  1224. ),
  1225. 'organism_id' => array(
  1226. // 'description' => 'TODO: please describe this field!',
  1227. 'type' => 'int',
  1228. 'not null' => '1',
  1229. ),
  1230. ),
  1231. 'primary key' => array(
  1232. '0' => 'phylonode_organism_id',
  1233. ),
  1234. 'unique keys' => array(
  1235. 'phylonode_id' => array(
  1236. '0' => 'phylonode_id',
  1237. ),
  1238. ),
  1239. 'indexes' => array(
  1240. 'phylonode_organism_idx1' => array(
  1241. '0' => 'phylonode_id',
  1242. ),
  1243. 'phylonode_organism_idx2' => array(
  1244. '0' => 'organism_id',
  1245. ),
  1246. ),
  1247. 'foreign keys' => array(
  1248. ),
  1249. );
  1250. return $description;
  1251. }
  1252. /**
  1253. * Implements hook_phenotype_cvterm_schema()
  1254. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1255. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1256. * @see tripal_core.api.inc: tripal_core_chado_update()
  1257. * @see tripal_core.api.inc: tripal_core_chado_select()
  1258. *
  1259. * @return
  1260. * An array describing the current table
  1261. *
  1262. * @ingroup tripal_schema_api
  1263. *
  1264. */
  1265. function tripal_core_chado_phenotype_cvterm_schema () {
  1266. $description = array();
  1267. $description = array(
  1268. 'table' => 'phenotype_cvterm',
  1269. // 'description' => 'TODO: please describe this table!',
  1270. 'fields' => array(
  1271. 'phenotype_cvterm_id' => array(
  1272. // 'description' => 'TODO: please describe this field!',
  1273. 'type' => 'serial',
  1274. 'not null' => '1',
  1275. ),
  1276. 'phenotype_id' => array(
  1277. // 'description' => 'TODO: please describe this field!',
  1278. 'type' => 'int',
  1279. 'not null' => '1',
  1280. ),
  1281. 'cvterm_id' => array(
  1282. // 'description' => 'TODO: please describe this field!',
  1283. 'type' => 'int',
  1284. 'not null' => '1',
  1285. ),
  1286. 'rank' => array(
  1287. // 'description' => 'TODO: please describe this field!',
  1288. 'type' => 'int',
  1289. 'not null' => '1',
  1290. 'default' => '0',
  1291. ),
  1292. ),
  1293. 'primary key' => array(
  1294. '0' => 'phenotype_cvterm_id',
  1295. ),
  1296. 'unique keys' => array(
  1297. 'phenotype_cvterm_c1' => array(
  1298. '0' => 'phenotype_id',
  1299. '1' => 'cvterm_id',
  1300. '2' => 'rank',
  1301. ),
  1302. ),
  1303. 'indexes' => array(
  1304. 'phenotype_cvterm_idx1' => array(
  1305. '0' => 'phenotype_id',
  1306. ),
  1307. 'phenotype_cvterm_idx2' => array(
  1308. '0' => 'cvterm_id',
  1309. ),
  1310. ),
  1311. 'foreign keys' => array(
  1312. ),
  1313. );
  1314. return $description;
  1315. }
  1316. /**
  1317. * Implements hook_phenstatement_schema()
  1318. * Purpose: To describe the structure of phenstatement to tripal
  1319. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1320. * @see tripal_core.api.inc: tripal_core_chado_update()
  1321. * @see tripal_core.api.inc: tripal_core_chado_select()
  1322. *
  1323. * @return
  1324. * An array describing the current table
  1325. *
  1326. * @ingroup tripal_schema_api
  1327. *
  1328. */
  1329. function tripal_core_chado_phenstatement_schema () {
  1330. $description = array();
  1331. $description = array(
  1332. 'table' => 'phenstatement',
  1333. // 'description' => 'TODO: please describe this table!',
  1334. 'fields' => array(
  1335. 'phenstatement_id' => array(
  1336. // 'description' => 'TODO: please describe this field!',
  1337. 'type' => 'serial',
  1338. 'not null' => '1',
  1339. ),
  1340. 'genotype_id' => array(
  1341. // 'description' => 'TODO: please describe this field!',
  1342. 'type' => 'int',
  1343. 'not null' => '1',
  1344. ),
  1345. 'environment_id' => array(
  1346. // 'description' => 'TODO: please describe this field!',
  1347. 'type' => 'int',
  1348. 'not null' => '1',
  1349. ),
  1350. 'phenotype_id' => array(
  1351. // 'description' => 'TODO: please describe this field!',
  1352. 'type' => 'int',
  1353. 'not null' => '1',
  1354. ),
  1355. 'type_id' => array(
  1356. // 'description' => 'TODO: please describe this field!',
  1357. 'type' => 'int',
  1358. 'not null' => '1',
  1359. ),
  1360. 'pub_id' => array(
  1361. // 'description' => 'TODO: please describe this field!',
  1362. 'type' => 'int',
  1363. 'not null' => '1',
  1364. ),
  1365. ),
  1366. 'primary key' => array(
  1367. '0' => 'phenstatement_id',
  1368. ),
  1369. 'unique keys' => array(
  1370. 'phenstatement_c1' => array(
  1371. '0' => 'genotype_id',
  1372. '1' => 'phenotype_id',
  1373. '2' => 'environment_id',
  1374. '3' => 'type_id',
  1375. '4' => 'pub_id',
  1376. ),
  1377. ),
  1378. 'indexes' => array(
  1379. 'phenstatement_idx1' => array(
  1380. '0' => 'genotype_id',
  1381. ),
  1382. 'phenstatement_idx2' => array(
  1383. '0' => 'phenotype_id',
  1384. ),
  1385. ),
  1386. 'foreign keys' => array(
  1387. ),
  1388. );
  1389. return $description;
  1390. }
  1391. /**
  1392. * Implements hook_phylonode_schema()
  1393. * Purpose: To describe the structure of phylonode to tripal
  1394. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1395. * @see tripal_core.api.inc: tripal_core_chado_update()
  1396. * @see tripal_core.api.inc: tripal_core_chado_select()
  1397. *
  1398. * @return
  1399. * An array describing the current table
  1400. *
  1401. * @ingroup tripal_schema_api
  1402. *
  1403. */
  1404. function tripal_core_chado_phylonode_schema () {
  1405. $description = array();
  1406. $description = array(
  1407. 'table' => 'phylonode',
  1408. // 'description' => 'TODO: please describe this table!',
  1409. 'fields' => array(
  1410. 'phylonode_id' => array(
  1411. // 'description' => 'TODO: please describe this field!',
  1412. 'type' => 'serial',
  1413. 'not null' => '1',
  1414. ),
  1415. 'phylotree_id' => array(
  1416. // 'description' => 'TODO: please describe this field!',
  1417. 'type' => 'int',
  1418. 'not null' => '1',
  1419. ),
  1420. 'parent_phylonode_id' => array(
  1421. // 'description' => 'TODO: please describe this field!',
  1422. 'type' => 'int',
  1423. 'not null' => '',
  1424. ),
  1425. 'left_idx' => array(
  1426. // 'description' => 'TODO: please describe this field!',
  1427. 'type' => 'int',
  1428. 'not null' => '1',
  1429. ),
  1430. 'right_idx' => array(
  1431. // 'description' => 'TODO: please describe this field!',
  1432. 'type' => 'int',
  1433. 'not null' => '1',
  1434. ),
  1435. 'type_id' => array(
  1436. // 'description' => 'TODO: please describe this field!',
  1437. 'type' => 'int',
  1438. 'not null' => '',
  1439. ),
  1440. 'feature_id' => array(
  1441. // 'description' => 'TODO: please describe this field!',
  1442. 'type' => 'int',
  1443. 'not null' => '',
  1444. ),
  1445. 'label' => array(
  1446. // 'description' => 'TODO: please describe this field!',
  1447. 'type' => 'varchar',
  1448. 'length' => '255',
  1449. 'not null' => '',
  1450. ),
  1451. 'distance' => array(
  1452. // 'description' => 'TODO: please describe this field!',
  1453. 'type' => 'float',
  1454. 'size' => 'big',
  1455. 'not null' => '',
  1456. ),
  1457. ),
  1458. 'primary key' => array(
  1459. '0' => 'phylonode_id',
  1460. ),
  1461. 'unique keys' => array(
  1462. 'phylotree_id' => array(
  1463. '0' => 'phylotree_id',
  1464. '1' => 'left_idx',
  1465. ),
  1466. 'phylonode_phylotree_id_key1' => array(
  1467. '0' => 'phylotree_id',
  1468. '1' => 'right_idx',
  1469. ),
  1470. ),
  1471. 'indexes' => array(
  1472. ),
  1473. 'foreign keys' => array(
  1474. ),
  1475. );
  1476. return $description;
  1477. }
  1478. /**
  1479. * Implements hook_phylonode_dbxref_schema()
  1480. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1481. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1482. * @see tripal_core.api.inc: tripal_core_chado_update()
  1483. * @see tripal_core.api.inc: tripal_core_chado_select()
  1484. *
  1485. * @return
  1486. * An array describing the current table
  1487. *
  1488. * @ingroup tripal_schema_api
  1489. *
  1490. */
  1491. function tripal_core_chado_phylonode_dbxref_schema () {
  1492. $description = array();
  1493. $description = array(
  1494. 'table' => 'phylonode_dbxref',
  1495. // 'description' => 'TODO: please describe this table!',
  1496. 'fields' => array(
  1497. 'phylonode_dbxref_id' => array(
  1498. // 'description' => 'TODO: please describe this field!',
  1499. 'type' => 'serial',
  1500. 'not null' => '1',
  1501. ),
  1502. 'phylonode_id' => array(
  1503. // 'description' => 'TODO: please describe this field!',
  1504. 'type' => 'int',
  1505. 'not null' => '1',
  1506. ),
  1507. 'dbxref_id' => array(
  1508. // 'description' => 'TODO: please describe this field!',
  1509. 'type' => 'int',
  1510. 'not null' => '1',
  1511. ),
  1512. ),
  1513. 'primary key' => array(
  1514. '0' => 'phylonode_dbxref_id',
  1515. ),
  1516. 'unique keys' => array(
  1517. 'phylonode_id' => array(
  1518. '0' => 'phylonode_id',
  1519. '1' => 'dbxref_id',
  1520. ),
  1521. ),
  1522. 'indexes' => array(
  1523. 'phylonode_dbxref_idx1' => array(
  1524. '0' => 'phylonode_id',
  1525. ),
  1526. 'phylonode_dbxref_idx2' => array(
  1527. '0' => 'dbxref_id',
  1528. ),
  1529. ),
  1530. 'foreign keys' => array(
  1531. ),
  1532. );
  1533. return $description;
  1534. }
  1535. /**
  1536. * Implements hook_library_synonym_schema()
  1537. * Purpose: To describe the structure of library_synonym to tripal
  1538. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1539. * @see tripal_core.api.inc: tripal_core_chado_update()
  1540. * @see tripal_core.api.inc: tripal_core_chado_select()
  1541. *
  1542. * @return
  1543. * An array describing the current table
  1544. *
  1545. * @ingroup tripal_schema_api
  1546. *
  1547. */
  1548. function tripal_core_chado_library_synonym_schema () {
  1549. $description = array();
  1550. $description = array(
  1551. 'table' => 'library_synonym',
  1552. // 'description' => 'TODO: please describe this table!',
  1553. 'fields' => array(
  1554. 'library_synonym_id' => array(
  1555. // 'description' => 'TODO: please describe this field!',
  1556. 'type' => 'serial',
  1557. 'not null' => '1',
  1558. ),
  1559. 'synonym_id' => array(
  1560. // 'description' => 'TODO: please describe this field!',
  1561. 'type' => 'int',
  1562. 'not null' => '1',
  1563. ),
  1564. 'library_id' => array(
  1565. // 'description' => 'TODO: please describe this field!',
  1566. 'type' => 'int',
  1567. 'not null' => '1',
  1568. ),
  1569. 'pub_id' => array(
  1570. // 'description' => 'TODO: please describe this field!',
  1571. 'type' => 'int',
  1572. 'not null' => '1',
  1573. ),
  1574. 'is_current' => array(
  1575. // 'description' => 'TODO: please describe this field!',
  1576. 'type' => 'boolean',
  1577. 'not null' => '1',
  1578. 'default' => 'ru',
  1579. ),
  1580. 'is_internal' => array(
  1581. // 'description' => 'TODO: please describe this field!',
  1582. 'type' => 'boolean',
  1583. 'not null' => '1',
  1584. 'default' => 'als',
  1585. ),
  1586. ),
  1587. 'primary key' => array(
  1588. '0' => 'library_synonym_id',
  1589. ),
  1590. 'unique keys' => array(
  1591. 'library_synonym_c1' => array(
  1592. '0' => 'synonym_id',
  1593. '1' => 'library_id',
  1594. '2' => 'pub_id',
  1595. ),
  1596. ),
  1597. 'indexes' => array(
  1598. 'library_synonym_idx1' => array(
  1599. '0' => 'synonym_id',
  1600. ),
  1601. 'library_synonym_idx2' => array(
  1602. '0' => 'library_id',
  1603. ),
  1604. 'library_synonym_idx3' => array(
  1605. '0' => 'pub_id',
  1606. ),
  1607. ),
  1608. 'foreign keys' => array(
  1609. ),
  1610. );
  1611. return $description;
  1612. }
  1613. /**
  1614. * Implements hook_library_pub_schema()
  1615. * Purpose: To describe the structure of library_pub to tripal
  1616. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1617. * @see tripal_core.api.inc: tripal_core_chado_update()
  1618. * @see tripal_core.api.inc: tripal_core_chado_select()
  1619. *
  1620. * @return
  1621. * An array describing the current table
  1622. *
  1623. * @ingroup tripal_schema_api
  1624. *
  1625. */
  1626. function tripal_core_chado_library_pub_schema () {
  1627. $description = array();
  1628. $description = array(
  1629. 'table' => 'library_pub',
  1630. // 'description' => 'TODO: please describe this table!',
  1631. 'fields' => array(
  1632. 'library_pub_id' => array(
  1633. // 'description' => 'TODO: please describe this field!',
  1634. 'type' => 'serial',
  1635. 'not null' => '1',
  1636. ),
  1637. 'library_id' => array(
  1638. // 'description' => 'TODO: please describe this field!',
  1639. 'type' => 'int',
  1640. 'not null' => '1',
  1641. ),
  1642. 'pub_id' => array(
  1643. // 'description' => 'TODO: please describe this field!',
  1644. 'type' => 'int',
  1645. 'not null' => '1',
  1646. ),
  1647. ),
  1648. 'primary key' => array(
  1649. '0' => 'library_pub_id',
  1650. ),
  1651. 'unique keys' => array(
  1652. 'library_pub_c1' => array(
  1653. '0' => 'library_id',
  1654. '1' => 'pub_id',
  1655. ),
  1656. ),
  1657. 'indexes' => array(
  1658. 'library_pub_idx1' => array(
  1659. '0' => 'library_id',
  1660. ),
  1661. 'library_pub_idx2' => array(
  1662. '0' => 'pub_id',
  1663. ),
  1664. ),
  1665. 'foreign keys' => array(
  1666. ),
  1667. );
  1668. return $description;
  1669. }
  1670. /**
  1671. * Implements hook_featureprop_pub_schema()
  1672. * Purpose: To describe the structure of featureprop_pub to tripal
  1673. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1674. * @see tripal_core.api.inc: tripal_core_chado_update()
  1675. * @see tripal_core.api.inc: tripal_core_chado_select()
  1676. *
  1677. * @return
  1678. * An array describing the current table
  1679. *
  1680. * @ingroup tripal_schema_api
  1681. *
  1682. */
  1683. function tripal_core_chado_featureprop_pub_schema () {
  1684. $description = array();
  1685. $description = array(
  1686. 'table' => 'featureprop_pub',
  1687. // 'description' => 'TODO: please describe this table!',
  1688. 'fields' => array(
  1689. 'featureprop_pub_id' => array(
  1690. // 'description' => 'TODO: please describe this field!',
  1691. 'type' => 'serial',
  1692. 'not null' => '1',
  1693. ),
  1694. 'featureprop_id' => array(
  1695. // 'description' => 'TODO: please describe this field!',
  1696. 'type' => 'int',
  1697. 'not null' => '1',
  1698. ),
  1699. 'pub_id' => array(
  1700. // 'description' => 'TODO: please describe this field!',
  1701. 'type' => 'int',
  1702. 'not null' => '1',
  1703. ),
  1704. ),
  1705. 'primary key' => array(
  1706. '0' => 'featureprop_pub_id',
  1707. ),
  1708. 'unique keys' => array(
  1709. 'featureprop_pub_c1' => array(
  1710. '0' => 'featureprop_id',
  1711. '1' => 'pub_id',
  1712. ),
  1713. ),
  1714. 'indexes' => array(
  1715. 'featureprop_pub_idx1' => array(
  1716. '0' => 'featureprop_id',
  1717. ),
  1718. 'featureprop_pub_idx2' => array(
  1719. '0' => 'pub_id',
  1720. ),
  1721. ),
  1722. 'foreign keys' => array(
  1723. ),
  1724. );
  1725. return $description;
  1726. }
  1727. /**
  1728. * Implements hook_featureprop_schema()
  1729. * Purpose: To describe the structure of featureprop to tripal
  1730. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1731. * @see tripal_core.api.inc: tripal_core_chado_update()
  1732. * @see tripal_core.api.inc: tripal_core_chado_select()
  1733. *
  1734. * @return
  1735. * An array describing the current table
  1736. *
  1737. * @ingroup tripal_schema_api
  1738. *
  1739. */
  1740. function tripal_core_chado_featureprop_schema () {
  1741. $description = array();
  1742. $description = array(
  1743. 'table' => 'featureprop',
  1744. // 'description' => 'TODO: please describe this table!',
  1745. 'fields' => array(
  1746. 'featureprop_id' => array(
  1747. // 'description' => 'TODO: please describe this field!',
  1748. 'type' => 'serial',
  1749. 'not null' => '1',
  1750. ),
  1751. 'feature_id' => array(
  1752. // 'description' => 'TODO: please describe this field!',
  1753. 'type' => 'int',
  1754. 'not null' => '1',
  1755. ),
  1756. 'type_id' => array(
  1757. // 'description' => 'TODO: please describe this field!',
  1758. 'type' => 'int',
  1759. 'not null' => '1',
  1760. ),
  1761. 'value' => array(
  1762. // 'description' => 'TODO: please describe this field!',
  1763. 'type' => 'text',
  1764. 'not null' => '',
  1765. ),
  1766. 'rank' => array(
  1767. // 'description' => 'TODO: please describe this field!',
  1768. 'type' => 'int',
  1769. 'not null' => '1',
  1770. 'default' => '0',
  1771. ),
  1772. ),
  1773. 'primary key' => array(
  1774. '0' => 'featureprop_id',
  1775. ),
  1776. 'unique keys' => array(
  1777. 'featureprop_c1' => array(
  1778. '0' => 'feature_id',
  1779. '1' => 'type_id',
  1780. '2' => 'rank',
  1781. ),
  1782. ),
  1783. 'indexes' => array(
  1784. 'featureprop_idx1' => array(
  1785. '0' => 'feature_id',
  1786. ),
  1787. 'featureprop_idx2' => array(
  1788. '0' => 'type_id',
  1789. ),
  1790. ),
  1791. 'foreign keys' => array(
  1792. ),
  1793. );
  1794. return $description;
  1795. }
  1796. /**
  1797. * Implements hook_featurerange_schema()
  1798. * Purpose: To describe the structure of featurerange to tripal
  1799. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1800. * @see tripal_core.api.inc: tripal_core_chado_update()
  1801. * @see tripal_core.api.inc: tripal_core_chado_select()
  1802. *
  1803. * @return
  1804. * An array describing the current table
  1805. *
  1806. * @ingroup tripal_schema_api
  1807. *
  1808. */
  1809. function tripal_core_chado_featurerange_schema () {
  1810. $description = array();
  1811. $description = array(
  1812. 'table' => 'featurerange',
  1813. // 'description' => 'TODO: please describe this table!',
  1814. 'fields' => array(
  1815. 'featurerange_id' => array(
  1816. // 'description' => 'TODO: please describe this field!',
  1817. 'type' => 'serial',
  1818. 'not null' => '1',
  1819. ),
  1820. 'featuremap_id' => array(
  1821. // 'description' => 'TODO: please describe this field!',
  1822. 'type' => 'int',
  1823. 'not null' => '1',
  1824. ),
  1825. 'feature_id' => array(
  1826. // 'description' => 'TODO: please describe this field!',
  1827. 'type' => 'int',
  1828. 'not null' => '1',
  1829. ),
  1830. 'leftstartf_id' => array(
  1831. // 'description' => 'TODO: please describe this field!',
  1832. 'type' => 'int',
  1833. 'not null' => '1',
  1834. ),
  1835. 'leftendf_id' => array(
  1836. // 'description' => 'TODO: please describe this field!',
  1837. 'type' => 'int',
  1838. 'not null' => '',
  1839. ),
  1840. 'rightstartf_id' => array(
  1841. // 'description' => 'TODO: please describe this field!',
  1842. 'type' => 'int',
  1843. 'not null' => '',
  1844. ),
  1845. 'rightendf_id' => array(
  1846. // 'description' => 'TODO: please describe this field!',
  1847. 'type' => 'int',
  1848. 'not null' => '1',
  1849. ),
  1850. 'rangestr' => array(
  1851. // 'description' => 'TODO: please describe this field!',
  1852. 'type' => 'varchar',
  1853. 'length' => '255',
  1854. 'not null' => '',
  1855. ),
  1856. ),
  1857. 'primary key' => array(
  1858. '0' => 'featurerange_id',
  1859. ),
  1860. 'unique keys' => array(
  1861. ),
  1862. 'indexes' => array(
  1863. 'featurerange_idx1' => array(
  1864. '0' => 'featuremap_id',
  1865. ),
  1866. 'featurerange_idx2' => array(
  1867. '0' => 'feature_id',
  1868. ),
  1869. 'featurerange_idx3' => array(
  1870. '0' => 'leftstartf_id',
  1871. ),
  1872. 'featurerange_idx4' => array(
  1873. '0' => 'leftendf_id',
  1874. ),
  1875. 'featurerange_idx5' => array(
  1876. '0' => 'rightstartf_id',
  1877. ),
  1878. 'featurerange_idx6' => array(
  1879. '0' => 'rightendf_id',
  1880. ),
  1881. ),
  1882. 'foreign keys' => array(
  1883. ),
  1884. );
  1885. return $description;
  1886. }
  1887. /**
  1888. * Implements hook_featureset_meets_schema()
  1889. * Purpose: To describe the structure of featureset_meets to tripal
  1890. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1891. * @see tripal_core.api.inc: tripal_core_chado_update()
  1892. * @see tripal_core.api.inc: tripal_core_chado_select()
  1893. *
  1894. * @return
  1895. * An array describing the current table
  1896. *
  1897. * @ingroup tripal_schema_api
  1898. *
  1899. */
  1900. function tripal_core_chado_featureset_meets_schema () {
  1901. $description = array();
  1902. $description = array(
  1903. 'table' => 'featureset_meets',
  1904. // 'description' => 'TODO: please describe this table!',
  1905. 'fields' => array(
  1906. 'subject_id' => array(
  1907. // 'description' => 'TODO: please describe this field!',
  1908. 'type' => 'int',
  1909. 'not null' => '',
  1910. ),
  1911. 'object_id' => array(
  1912. // 'description' => 'TODO: please describe this field!',
  1913. 'type' => 'int',
  1914. 'not null' => '',
  1915. ),
  1916. ),
  1917. 'primary key' => array(
  1918. ),
  1919. 'unique keys' => array(
  1920. ),
  1921. 'indexes' => array(
  1922. ),
  1923. 'foreign keys' => array(
  1924. ),
  1925. );
  1926. return $description;
  1927. }
  1928. /**
  1929. * Implements hook_fnr_type_schema()
  1930. * Purpose: To describe the structure of fnr_type to tripal
  1931. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1932. * @see tripal_core.api.inc: tripal_core_chado_update()
  1933. * @see tripal_core.api.inc: tripal_core_chado_select()
  1934. *
  1935. * @return
  1936. * An array describing the current table
  1937. *
  1938. * @ingroup tripal_schema_api
  1939. *
  1940. */
  1941. function tripal_core_chado_fnr_type_schema () {
  1942. $description = array();
  1943. $description = array(
  1944. 'table' => 'fnr_type',
  1945. // 'description' => 'TODO: please describe this table!',
  1946. 'fields' => array(
  1947. 'feature_id' => array(
  1948. // 'description' => 'TODO: please describe this field!',
  1949. 'type' => 'int',
  1950. 'not null' => '',
  1951. ),
  1952. 'name' => array(
  1953. // 'description' => 'TODO: please describe this field!',
  1954. 'type' => 'varchar',
  1955. 'length' => '255',
  1956. 'not null' => '',
  1957. ),
  1958. 'dbxref_id' => array(
  1959. // 'description' => 'TODO: please describe this field!',
  1960. 'type' => 'int',
  1961. 'not null' => '',
  1962. ),
  1963. 'type' => array(
  1964. // 'description' => 'TODO: please describe this field!',
  1965. 'type' => 'varchar',
  1966. 'length' => '1024',
  1967. 'not null' => '',
  1968. ),
  1969. 'residues' => array(
  1970. // 'description' => 'TODO: please describe this field!',
  1971. 'type' => 'text',
  1972. 'not null' => '',
  1973. ),
  1974. 'seqlen' => array(
  1975. // 'description' => 'TODO: please describe this field!',
  1976. 'type' => 'int',
  1977. 'not null' => '',
  1978. ),
  1979. 'md5checksum' => array(
  1980. // 'description' => 'TODO: please describe this field!',
  1981. 'type' => 'char',
  1982. 'length' => '32',
  1983. 'not null' => '',
  1984. ),
  1985. 'type_id' => array(
  1986. // 'description' => 'TODO: please describe this field!',
  1987. 'type' => 'int',
  1988. 'not null' => '',
  1989. ),
  1990. 'timeaccessioned' => array(
  1991. // 'description' => 'TODO: please describe this field!',
  1992. 'type' => 'datetime',
  1993. 'not null' => '',
  1994. ),
  1995. 'timelastmodified' => array(
  1996. // 'description' => 'TODO: please describe this field!',
  1997. 'type' => 'datetime',
  1998. 'not null' => '',
  1999. ),
  2000. ),
  2001. 'primary key' => array(
  2002. ),
  2003. 'unique keys' => array(
  2004. ),
  2005. 'indexes' => array(
  2006. ),
  2007. 'foreign keys' => array(
  2008. ),
  2009. );
  2010. return $description;
  2011. }
  2012. /**
  2013. * Implements hook_featurepos_schema()
  2014. * Purpose: To describe the structure of featurepos to tripal
  2015. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2016. * @see tripal_core.api.inc: tripal_core_chado_update()
  2017. * @see tripal_core.api.inc: tripal_core_chado_select()
  2018. *
  2019. * @return
  2020. * An array describing the current table
  2021. *
  2022. * @ingroup tripal_schema_api
  2023. *
  2024. */
  2025. function tripal_core_chado_featurepos_schema () {
  2026. $description = array();
  2027. $description = array(
  2028. 'table' => 'featurepos',
  2029. // 'description' => 'TODO: please describe this table!',
  2030. 'fields' => array(
  2031. 'featurepos_id' => array(
  2032. // 'description' => 'TODO: please describe this field!',
  2033. 'type' => 'serial',
  2034. 'not null' => '1',
  2035. ),
  2036. 'featuremap_id' => array(
  2037. // 'description' => 'TODO: please describe this field!',
  2038. 'type' => 'serial',
  2039. 'not null' => '1',
  2040. ),
  2041. 'feature_id' => array(
  2042. // 'description' => 'TODO: please describe this field!',
  2043. 'type' => 'int',
  2044. 'not null' => '1',
  2045. ),
  2046. 'map_feature_id' => array(
  2047. // 'description' => 'TODO: please describe this field!',
  2048. 'type' => 'int',
  2049. 'not null' => '1',
  2050. ),
  2051. 'mappos' => array(
  2052. // 'description' => 'TODO: please describe this field!',
  2053. 'type' => 'float',
  2054. 'size' => 'big',
  2055. 'not null' => '1',
  2056. ),
  2057. ),
  2058. 'primary key' => array(
  2059. '0' => 'featurepos_id',
  2060. ),
  2061. 'unique keys' => array(
  2062. ),
  2063. 'indexes' => array(
  2064. 'featurepos_idx1' => array(
  2065. '0' => 'featuremap_id',
  2066. ),
  2067. 'featurepos_idx2' => array(
  2068. '0' => 'feature_id',
  2069. ),
  2070. 'featurepos_idx3' => array(
  2071. '0' => 'map_feature_id',
  2072. ),
  2073. ),
  2074. 'foreign keys' => array(
  2075. ),
  2076. );
  2077. return $description;
  2078. }
  2079. /**
  2080. * Implements hook_featuremap_pub_schema()
  2081. * Purpose: To describe the structure of featuremap_pub to tripal
  2082. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2083. * @see tripal_core.api.inc: tripal_core_chado_update()
  2084. * @see tripal_core.api.inc: tripal_core_chado_select()
  2085. *
  2086. * @return
  2087. * An array describing the current table
  2088. *
  2089. * @ingroup tripal_schema_api
  2090. *
  2091. */
  2092. function tripal_core_chado_featuremap_pub_schema () {
  2093. $description = array();
  2094. $description = array(
  2095. 'table' => 'featuremap_pub',
  2096. // 'description' => 'TODO: please describe this table!',
  2097. 'fields' => array(
  2098. 'featuremap_pub_id' => array(
  2099. // 'description' => 'TODO: please describe this field!',
  2100. 'type' => 'serial',
  2101. 'not null' => '1',
  2102. ),
  2103. 'featuremap_id' => array(
  2104. // 'description' => 'TODO: please describe this field!',
  2105. 'type' => 'int',
  2106. 'not null' => '1',
  2107. ),
  2108. 'pub_id' => array(
  2109. // 'description' => 'TODO: please describe this field!',
  2110. 'type' => 'int',
  2111. 'not null' => '1',
  2112. ),
  2113. ),
  2114. 'primary key' => array(
  2115. '0' => 'featuremap_pub_id',
  2116. ),
  2117. 'unique keys' => array(
  2118. ),
  2119. 'indexes' => array(
  2120. 'featuremap_pub_idx1' => array(
  2121. '0' => 'featuremap_id',
  2122. ),
  2123. 'featuremap_pub_idx2' => array(
  2124. '0' => 'pub_id',
  2125. ),
  2126. ),
  2127. 'foreign keys' => array(
  2128. ),
  2129. );
  2130. return $description;
  2131. }
  2132. /**
  2133. * Implements hook_feature_union_schema()
  2134. * Purpose: To describe the structure of feature_union to tripal
  2135. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2136. * @see tripal_core.api.inc: tripal_core_chado_update()
  2137. * @see tripal_core.api.inc: tripal_core_chado_select()
  2138. *
  2139. * @return
  2140. * An array describing the current table
  2141. *
  2142. * @ingroup tripal_schema_api
  2143. *
  2144. */
  2145. function tripal_core_chado_feature_union_schema () {
  2146. $description = array();
  2147. $description = array(
  2148. 'table' => 'feature_union',
  2149. // 'description' => 'TODO: please describe this table!',
  2150. 'fields' => array(
  2151. 'subject_id' => array(
  2152. // 'description' => 'TODO: please describe this field!',
  2153. 'type' => 'int',
  2154. 'not null' => '',
  2155. ),
  2156. 'object_id' => array(
  2157. // 'description' => 'TODO: please describe this field!',
  2158. 'type' => 'int',
  2159. 'not null' => '',
  2160. ),
  2161. 'srcfeature_id' => array(
  2162. // 'description' => 'TODO: please describe this field!',
  2163. 'type' => 'int',
  2164. 'not null' => '',
  2165. ),
  2166. 'subject_strand' => array(
  2167. // 'description' => 'TODO: please describe this field!',
  2168. 'type' => 'int',
  2169. 'size' => 'small',
  2170. 'not null' => '',
  2171. ),
  2172. 'object_strand' => array(
  2173. // 'description' => 'TODO: please describe this field!',
  2174. 'type' => 'int',
  2175. 'size' => 'small',
  2176. 'not null' => '',
  2177. ),
  2178. 'fmin' => array(
  2179. // 'description' => 'TODO: please describe this field!',
  2180. 'type' => 'int',
  2181. 'not null' => '',
  2182. ),
  2183. 'fmax' => array(
  2184. // 'description' => 'TODO: please describe this field!',
  2185. 'type' => 'int',
  2186. 'not null' => '',
  2187. ),
  2188. ),
  2189. 'primary key' => array(
  2190. ),
  2191. 'unique keys' => array(
  2192. ),
  2193. 'indexes' => array(
  2194. ),
  2195. 'foreign keys' => array(
  2196. ),
  2197. );
  2198. return $description;
  2199. }
  2200. /**
  2201. * Implements hook_featureloc_schema()
  2202. * Purpose: To describe the structure of featureloc to tripal
  2203. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2204. * @see tripal_core.api.inc: tripal_core_chado_update()
  2205. * @see tripal_core.api.inc: tripal_core_chado_select()
  2206. *
  2207. * @return
  2208. * An array describing the current table
  2209. *
  2210. * @ingroup tripal_schema_api
  2211. *
  2212. */
  2213. function tripal_core_chado_featureloc_schema () {
  2214. $description = array();
  2215. $description = array(
  2216. 'table' => 'featureloc',
  2217. // 'description' => 'TODO: please describe this table!',
  2218. 'fields' => array(
  2219. 'featureloc_id' => array(
  2220. // 'description' => 'TODO: please describe this field!',
  2221. 'type' => 'serial',
  2222. 'not null' => '1',
  2223. ),
  2224. 'feature_id' => array(
  2225. // 'description' => 'TODO: please describe this field!',
  2226. 'type' => 'int',
  2227. 'not null' => '1',
  2228. ),
  2229. 'srcfeature_id' => array(
  2230. // 'description' => 'TODO: please describe this field!',
  2231. 'type' => 'int',
  2232. 'not null' => '',
  2233. ),
  2234. 'fmin' => array(
  2235. // 'description' => 'TODO: please describe this field!',
  2236. 'type' => 'int',
  2237. 'not null' => '',
  2238. ),
  2239. 'is_fmin_partial' => array(
  2240. // 'description' => 'TODO: please describe this field!',
  2241. 'type' => 'boolean',
  2242. 'not null' => '1',
  2243. 'default' => 'als',
  2244. ),
  2245. 'fmax' => array(
  2246. // 'description' => 'TODO: please describe this field!',
  2247. 'type' => 'int',
  2248. 'not null' => '',
  2249. ),
  2250. 'is_fmax_partial' => array(
  2251. // 'description' => 'TODO: please describe this field!',
  2252. 'type' => 'boolean',
  2253. 'not null' => '1',
  2254. 'default' => 'als',
  2255. ),
  2256. 'strand' => array(
  2257. // 'description' => 'TODO: please describe this field!',
  2258. 'type' => 'int',
  2259. 'size' => 'small',
  2260. 'not null' => '',
  2261. ),
  2262. 'phase' => array(
  2263. // 'description' => 'TODO: please describe this field!',
  2264. 'type' => 'int',
  2265. 'not null' => '',
  2266. ),
  2267. 'residue_info' => array(
  2268. // 'description' => 'TODO: please describe this field!',
  2269. 'type' => 'text',
  2270. 'not null' => '',
  2271. ),
  2272. 'locgroup' => array(
  2273. // 'description' => 'TODO: please describe this field!',
  2274. 'type' => 'int',
  2275. 'not null' => '1',
  2276. 'default' => '0',
  2277. ),
  2278. 'rank' => array(
  2279. // 'description' => 'TODO: please describe this field!',
  2280. 'type' => 'int',
  2281. 'not null' => '1',
  2282. 'default' => '0',
  2283. ),
  2284. ),
  2285. 'primary key' => array(
  2286. '0' => 'featureloc_id',
  2287. ),
  2288. 'unique keys' => array(
  2289. 'featureloc_c1' => array(
  2290. '0' => 'feature_id',
  2291. '1' => 'locgroup',
  2292. '2' => 'rank',
  2293. ),
  2294. ),
  2295. 'indexes' => array(
  2296. 'binloc_boxrange' => array(
  2297. '0' => 'fmin',
  2298. ),
  2299. 'binloc_boxrange_src' => array(
  2300. '0' => 'srcfeature_id',
  2301. '1' => 'fmin',
  2302. ),
  2303. 'featureloc_idx1' => array(
  2304. '0' => 'feature_id',
  2305. ),
  2306. 'featureloc_idx2' => array(
  2307. '0' => 'srcfeature_id',
  2308. ),
  2309. 'featureloc_idx3' => array(
  2310. '0' => 'srcfeature_id',
  2311. '1' => 'fmin',
  2312. '2' => 'fmax',
  2313. ),
  2314. ),
  2315. 'foreign keys' => array(
  2316. ),
  2317. );
  2318. return $description;
  2319. }
  2320. /**
  2321. * Implements hook_featureloc_pub_schema()
  2322. * Purpose: To describe the structure of featureloc_pub to tripal
  2323. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2324. * @see tripal_core.api.inc: tripal_core_chado_update()
  2325. * @see tripal_core.api.inc: tripal_core_chado_select()
  2326. *
  2327. * @return
  2328. * An array describing the current table
  2329. *
  2330. * @ingroup tripal_schema_api
  2331. *
  2332. */
  2333. function tripal_core_chado_featureloc_pub_schema () {
  2334. $description = array();
  2335. $description = array(
  2336. 'table' => 'featureloc_pub',
  2337. // 'description' => 'TODO: please describe this table!',
  2338. 'fields' => array(
  2339. 'featureloc_pub_id' => array(
  2340. // 'description' => 'TODO: please describe this field!',
  2341. 'type' => 'serial',
  2342. 'not null' => '1',
  2343. ),
  2344. 'featureloc_id' => array(
  2345. // 'description' => 'TODO: please describe this field!',
  2346. 'type' => 'int',
  2347. 'not null' => '1',
  2348. ),
  2349. 'pub_id' => array(
  2350. // 'description' => 'TODO: please describe this field!',
  2351. 'type' => 'int',
  2352. 'not null' => '1',
  2353. ),
  2354. ),
  2355. 'primary key' => array(
  2356. '0' => 'featureloc_pub_id',
  2357. ),
  2358. 'unique keys' => array(
  2359. 'featureloc_pub_c1' => array(
  2360. '0' => 'featureloc_id',
  2361. '1' => 'pub_id',
  2362. ),
  2363. ),
  2364. 'indexes' => array(
  2365. 'featureloc_pub_idx1' => array(
  2366. '0' => 'featureloc_id',
  2367. ),
  2368. 'featureloc_pub_idx2' => array(
  2369. '0' => 'pub_id',
  2370. ),
  2371. ),
  2372. 'foreign keys' => array(
  2373. ),
  2374. );
  2375. return $description;
  2376. }
  2377. /**
  2378. * Implements hook_featuremap_schema()
  2379. * Purpose: To describe the structure of featuremap to tripal
  2380. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2381. * @see tripal_core.api.inc: tripal_core_chado_update()
  2382. * @see tripal_core.api.inc: tripal_core_chado_select()
  2383. *
  2384. * @return
  2385. * An array describing the current table
  2386. *
  2387. * @ingroup tripal_schema_api
  2388. *
  2389. */
  2390. function tripal_core_chado_featuremap_schema () {
  2391. $description = array();
  2392. $description = array(
  2393. 'table' => 'featuremap',
  2394. // 'description' => 'TODO: please describe this table!',
  2395. 'fields' => array(
  2396. 'featuremap_id' => array(
  2397. // 'description' => 'TODO: please describe this field!',
  2398. 'type' => 'serial',
  2399. 'not null' => '1',
  2400. ),
  2401. 'name' => array(
  2402. // 'description' => 'TODO: please describe this field!',
  2403. 'type' => 'varchar',
  2404. 'length' => '255',
  2405. 'not null' => '',
  2406. ),
  2407. 'description' => array(
  2408. // 'description' => 'TODO: please describe this field!',
  2409. 'type' => 'text',
  2410. 'not null' => '',
  2411. ),
  2412. 'unittype_id' => array(
  2413. // 'description' => 'TODO: please describe this field!',
  2414. 'type' => 'int',
  2415. 'not null' => '',
  2416. ),
  2417. ),
  2418. 'primary key' => array(
  2419. '0' => 'featuremap_id',
  2420. ),
  2421. 'unique keys' => array(
  2422. 'featuremap_c1' => array(
  2423. '0' => 'name',
  2424. ),
  2425. ),
  2426. 'indexes' => array(
  2427. ),
  2428. 'foreign keys' => array(
  2429. ),
  2430. );
  2431. return $description;
  2432. }
  2433. /**
  2434. * Implements hook_fp_key_schema()
  2435. * Purpose: To describe the structure of fp_key to tripal
  2436. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2437. * @see tripal_core.api.inc: tripal_core_chado_update()
  2438. * @see tripal_core.api.inc: tripal_core_chado_select()
  2439. *
  2440. * @return
  2441. * An array describing the current table
  2442. *
  2443. * @ingroup tripal_schema_api
  2444. *
  2445. */
  2446. function tripal_core_chado_fp_key_schema () {
  2447. $description = array();
  2448. $description = array(
  2449. 'table' => 'fp_key',
  2450. // 'description' => 'TODO: please describe this table!',
  2451. 'fields' => array(
  2452. 'feature_id' => array(
  2453. // 'description' => 'TODO: please describe this field!',
  2454. 'type' => 'int',
  2455. 'not null' => '',
  2456. ),
  2457. 'pkey' => array(
  2458. // 'description' => 'TODO: please describe this field!',
  2459. 'type' => 'varchar',
  2460. 'length' => '1024',
  2461. 'not null' => '',
  2462. ),
  2463. 'value' => array(
  2464. // 'description' => 'TODO: please describe this field!',
  2465. 'type' => 'text',
  2466. 'not null' => '',
  2467. ),
  2468. ),
  2469. 'primary key' => array(
  2470. ),
  2471. 'unique keys' => array(
  2472. ),
  2473. 'indexes' => array(
  2474. ),
  2475. 'foreign keys' => array(
  2476. ),
  2477. );
  2478. return $description;
  2479. }
  2480. /**
  2481. * Implements hook_genotype_schema()
  2482. * Purpose: To describe the structure of genotype to tripal
  2483. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2484. * @see tripal_core.api.inc: tripal_core_chado_update()
  2485. * @see tripal_core.api.inc: tripal_core_chado_select()
  2486. *
  2487. * @return
  2488. * An array describing the current table
  2489. *
  2490. * @ingroup tripal_schema_api
  2491. *
  2492. */
  2493. function tripal_core_chado_genotype_schema () {
  2494. $description = array();
  2495. $description = array(
  2496. 'table' => 'genotype',
  2497. // 'description' => 'TODO: please describe this table!',
  2498. 'fields' => array(
  2499. 'genotype_id' => array(
  2500. // 'description' => 'TODO: please describe this field!',
  2501. 'type' => 'serial',
  2502. 'not null' => '1',
  2503. ),
  2504. 'name' => array(
  2505. // 'description' => 'TODO: please describe this field!',
  2506. 'type' => 'text',
  2507. 'not null' => '',
  2508. ),
  2509. 'uniquename' => array(
  2510. // 'description' => 'TODO: please describe this field!',
  2511. 'type' => 'text',
  2512. 'not null' => '1',
  2513. ),
  2514. 'description' => array(
  2515. // 'description' => 'TODO: please describe this field!',
  2516. 'type' => 'varchar',
  2517. 'length' => '255',
  2518. 'not null' => '',
  2519. ),
  2520. ),
  2521. 'primary key' => array(
  2522. '0' => 'genotype_id',
  2523. ),
  2524. 'unique keys' => array(
  2525. 'genotype_c1' => array(
  2526. '0' => 'uniquename',
  2527. ),
  2528. ),
  2529. 'indexes' => array(
  2530. 'genotype_idx1' => array(
  2531. '0' => 'uniquename',
  2532. ),
  2533. 'genotype_idx2' => array(
  2534. '0' => 'name',
  2535. ),
  2536. ),
  2537. 'foreign keys' => array(
  2538. ),
  2539. );
  2540. return $description;
  2541. }
  2542. /**
  2543. * Implements hook_library_cvterm_schema()
  2544. * Purpose: To describe the structure of library_cvterm to tripal
  2545. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2546. * @see tripal_core.api.inc: tripal_core_chado_update()
  2547. * @see tripal_core.api.inc: tripal_core_chado_select()
  2548. *
  2549. * @return
  2550. * An array describing the current table
  2551. *
  2552. * @ingroup tripal_schema_api
  2553. *
  2554. */
  2555. function tripal_core_chado_library_cvterm_schema () {
  2556. $description = array();
  2557. $description = array(
  2558. 'table' => 'library_cvterm',
  2559. // 'description' => 'TODO: please describe this table!',
  2560. 'fields' => array(
  2561. 'library_cvterm_id' => array(
  2562. // 'description' => 'TODO: please describe this field!',
  2563. 'type' => 'serial',
  2564. 'not null' => '1',
  2565. ),
  2566. 'library_id' => array(
  2567. // 'description' => 'TODO: please describe this field!',
  2568. 'type' => 'int',
  2569. 'not null' => '1',
  2570. ),
  2571. 'cvterm_id' => array(
  2572. // 'description' => 'TODO: please describe this field!',
  2573. 'type' => 'int',
  2574. 'not null' => '1',
  2575. ),
  2576. 'pub_id' => array(
  2577. // 'description' => 'TODO: please describe this field!',
  2578. 'type' => 'int',
  2579. 'not null' => '1',
  2580. ),
  2581. ),
  2582. 'primary key' => array(
  2583. '0' => 'library_cvterm_id',
  2584. ),
  2585. 'unique keys' => array(
  2586. 'library_cvterm_c1' => array(
  2587. '0' => 'library_id',
  2588. '1' => 'cvterm_id',
  2589. '2' => 'pub_id',
  2590. ),
  2591. ),
  2592. 'indexes' => array(
  2593. 'library_cvterm_idx1' => array(
  2594. '0' => 'library_id',
  2595. ),
  2596. 'library_cvterm_idx2' => array(
  2597. '0' => 'cvterm_id',
  2598. ),
  2599. 'library_cvterm_idx3' => array(
  2600. '0' => 'pub_id',
  2601. ),
  2602. ),
  2603. 'foreign keys' => array(
  2604. ),
  2605. );
  2606. return $description;
  2607. }
  2608. /**
  2609. * Implements hook_library_dbxref_schema()
  2610. * Purpose: To describe the structure of library_dbxref to tripal
  2611. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2612. * @see tripal_core.api.inc: tripal_core_chado_update()
  2613. * @see tripal_core.api.inc: tripal_core_chado_select()
  2614. *
  2615. * @return
  2616. * An array describing the current table
  2617. *
  2618. * @ingroup tripal_schema_api
  2619. *
  2620. */
  2621. function tripal_core_chado_library_dbxref_schema () {
  2622. $description = array();
  2623. $description = array(
  2624. 'table' => 'library_dbxref',
  2625. // 'description' => 'TODO: please describe this table!',
  2626. 'fields' => array(
  2627. 'library_dbxref_id' => array(
  2628. // 'description' => 'TODO: please describe this field!',
  2629. 'type' => 'serial',
  2630. 'not null' => '1',
  2631. ),
  2632. 'library_id' => array(
  2633. // 'description' => 'TODO: please describe this field!',
  2634. 'type' => 'int',
  2635. 'not null' => '1',
  2636. ),
  2637. 'dbxref_id' => array(
  2638. // 'description' => 'TODO: please describe this field!',
  2639. 'type' => 'int',
  2640. 'not null' => '1',
  2641. ),
  2642. 'is_current' => array(
  2643. // 'description' => 'TODO: please describe this field!',
  2644. 'type' => 'boolean',
  2645. 'not null' => '1',
  2646. 'default' => 'ru',
  2647. ),
  2648. ),
  2649. 'primary key' => array(
  2650. '0' => 'library_dbxref_id',
  2651. ),
  2652. 'unique keys' => array(
  2653. 'library_dbxref_c1' => array(
  2654. '0' => 'library_id',
  2655. '1' => 'dbxref_id',
  2656. ),
  2657. ),
  2658. 'indexes' => array(
  2659. 'library_dbxref_idx1' => array(
  2660. '0' => 'library_id',
  2661. ),
  2662. 'library_dbxref_idx2' => array(
  2663. '0' => 'dbxref_id',
  2664. ),
  2665. ),
  2666. 'foreign keys' => array(
  2667. ),
  2668. );
  2669. return $description;
  2670. }
  2671. /**
  2672. * Implements hook_library_feature_schema()
  2673. * Purpose: To describe the structure of library_feature to tripal
  2674. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2675. * @see tripal_core.api.inc: tripal_core_chado_update()
  2676. * @see tripal_core.api.inc: tripal_core_chado_select()
  2677. *
  2678. * @return
  2679. * An array describing the current table
  2680. *
  2681. * @ingroup tripal_schema_api
  2682. *
  2683. */
  2684. function tripal_core_chado_library_feature_schema () {
  2685. $description = array();
  2686. $description = array(
  2687. 'table' => 'library_feature',
  2688. // 'description' => 'TODO: please describe this table!',
  2689. 'fields' => array(
  2690. 'library_feature_id' => array(
  2691. // 'description' => 'TODO: please describe this field!',
  2692. 'type' => 'serial',
  2693. 'not null' => '1',
  2694. ),
  2695. 'library_id' => array(
  2696. // 'description' => 'TODO: please describe this field!',
  2697. 'type' => 'int',
  2698. 'not null' => '1',
  2699. ),
  2700. 'feature_id' => array(
  2701. // 'description' => 'TODO: please describe this field!',
  2702. 'type' => 'int',
  2703. 'not null' => '1',
  2704. ),
  2705. ),
  2706. 'primary key' => array(
  2707. '0' => 'library_feature_id',
  2708. ),
  2709. 'unique keys' => array(
  2710. 'library_feature_c1' => array(
  2711. '0' => 'library_id',
  2712. '1' => 'feature_id',
  2713. ),
  2714. ),
  2715. 'indexes' => array(
  2716. 'library_feature_idx1' => array(
  2717. '0' => 'library_id',
  2718. ),
  2719. 'library_feature_idx2' => array(
  2720. '0' => 'feature_id',
  2721. ),
  2722. ),
  2723. 'foreign keys' => array(
  2724. ),
  2725. );
  2726. return $description;
  2727. }
  2728. /**
  2729. * Implements hook_library_feature_count_schema()
  2730. * Purpose: To describe the structure of library_feature_count to tripal
  2731. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2732. * @see tripal_core.api.inc: tripal_core_chado_update()
  2733. * @see tripal_core.api.inc: tripal_core_chado_select()
  2734. *
  2735. * @return
  2736. * An array describing the current table
  2737. *
  2738. * @ingroup tripal_schema_api
  2739. *
  2740. */
  2741. function tripal_core_chado_library_feature_count_schema () {
  2742. $description = array();
  2743. $description = array(
  2744. 'table' => 'library_feature_count',
  2745. // 'description' => 'TODO: please describe this table!',
  2746. 'fields' => array(
  2747. 'library_id' => array(
  2748. // 'description' => 'TODO: please describe this field!',
  2749. 'type' => 'int',
  2750. 'not null' => '',
  2751. ),
  2752. 'name' => array(
  2753. // 'description' => 'TODO: please describe this field!',
  2754. 'type' => 'varchar',
  2755. 'length' => '255',
  2756. 'not null' => '',
  2757. ),
  2758. 'num_features' => array(
  2759. // 'description' => 'TODO: please describe this field!',
  2760. 'type' => 'int',
  2761. 'not null' => '',
  2762. ),
  2763. 'feature_type' => array(
  2764. // 'description' => 'TODO: please describe this field!',
  2765. 'type' => 'varchar',
  2766. 'length' => '255',
  2767. 'not null' => '',
  2768. ),
  2769. ),
  2770. 'primary key' => array(
  2771. ),
  2772. 'unique keys' => array(
  2773. 'library_feature_count_index' => array(
  2774. '0' => 'library_id',
  2775. ),
  2776. ),
  2777. 'indexes' => array(
  2778. ),
  2779. 'foreign keys' => array(
  2780. ),
  2781. );
  2782. return $description;
  2783. }
  2784. /**
  2785. * Implements hook_library_schema()
  2786. * Purpose: To describe the structure of library to tripal
  2787. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2788. * @see tripal_core.api.inc: tripal_core_chado_update()
  2789. * @see tripal_core.api.inc: tripal_core_chado_select()
  2790. *
  2791. * @return
  2792. * An array describing the current table
  2793. *
  2794. * @ingroup tripal_schema_api
  2795. *
  2796. */
  2797. function tripal_core_chado_library_schema () {
  2798. $description = array();
  2799. $description = array(
  2800. 'table' => 'library',
  2801. // 'description' => 'TODO: please describe this table!',
  2802. 'fields' => array(
  2803. 'library_id' => array(
  2804. // 'description' => 'TODO: please describe this field!',
  2805. 'type' => 'serial',
  2806. 'not null' => '1',
  2807. ),
  2808. 'organism_id' => array(
  2809. // 'description' => 'TODO: please describe this field!',
  2810. 'type' => 'int',
  2811. 'not null' => '1',
  2812. ),
  2813. 'name' => array(
  2814. // 'description' => 'TODO: please describe this field!',
  2815. 'type' => 'varchar',
  2816. 'length' => '255',
  2817. 'not null' => '',
  2818. ),
  2819. 'uniquename' => array(
  2820. // 'description' => 'TODO: please describe this field!',
  2821. 'type' => 'text',
  2822. 'not null' => '1',
  2823. ),
  2824. 'type_id' => array(
  2825. // 'description' => 'TODO: please describe this field!',
  2826. 'type' => 'int',
  2827. 'not null' => '1',
  2828. ),
  2829. 'is_obsolete' => array(
  2830. // 'description' => 'TODO: please describe this field!',
  2831. 'type' => 'int',
  2832. 'not null' => '1',
  2833. 'default' => '0',
  2834. ),
  2835. 'timeaccessioned' => array(
  2836. // 'description' => 'TODO: please describe this field!',
  2837. 'type' => 'datetime',
  2838. 'not null' => '1',
  2839. 'default' => 'ow(',
  2840. ),
  2841. 'timelastmodified' => array(
  2842. // 'description' => 'TODO: please describe this field!',
  2843. 'type' => 'datetime',
  2844. 'not null' => '1',
  2845. 'default' => 'ow(',
  2846. ),
  2847. ),
  2848. 'primary key' => array(
  2849. '0' => 'library_id',
  2850. ),
  2851. 'unique keys' => array(
  2852. 'library_c1' => array(
  2853. '0' => 'organism_id',
  2854. '1' => 'uniquename',
  2855. '2' => 'type_id',
  2856. ),
  2857. ),
  2858. 'indexes' => array(
  2859. 'library_idx1' => array(
  2860. '0' => 'organism_id',
  2861. ),
  2862. 'library_idx2' => array(
  2863. '0' => 'type_id',
  2864. ),
  2865. 'library_idx3' => array(
  2866. '0' => 'uniquename',
  2867. ),
  2868. 'library_name_ind1' => array(
  2869. '0' => 'name',
  2870. ),
  2871. ),
  2872. 'foreign keys' => array(
  2873. ),
  2874. );
  2875. return $description;
  2876. }
  2877. /**
  2878. * Implements hook_intronloc_view_schema()
  2879. * Purpose: To describe the structure of intronloc_view to tripal
  2880. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2881. * @see tripal_core.api.inc: tripal_core_chado_update()
  2882. * @see tripal_core.api.inc: tripal_core_chado_select()
  2883. *
  2884. * @return
  2885. * An array describing the current table
  2886. *
  2887. * @ingroup tripal_schema_api
  2888. *
  2889. */
  2890. function tripal_core_chado_intronloc_view_schema () {
  2891. $description = array();
  2892. $description = array(
  2893. 'table' => 'intronloc_view',
  2894. // 'description' => 'TODO: please describe this table!',
  2895. 'fields' => array(
  2896. 'exon1_id' => array(
  2897. // 'description' => 'TODO: please describe this field!',
  2898. 'type' => 'int',
  2899. 'not null' => '',
  2900. ),
  2901. 'exon2_id' => array(
  2902. // 'description' => 'TODO: please describe this field!',
  2903. 'type' => 'int',
  2904. 'not null' => '',
  2905. ),
  2906. 'fmin' => array(
  2907. // 'description' => 'TODO: please describe this field!',
  2908. 'type' => 'int',
  2909. 'not null' => '',
  2910. ),
  2911. 'fmax' => array(
  2912. // 'description' => 'TODO: please describe this field!',
  2913. 'type' => 'int',
  2914. 'not null' => '',
  2915. ),
  2916. 'strand' => array(
  2917. // 'description' => 'TODO: please describe this field!',
  2918. 'type' => 'int',
  2919. 'size' => 'small',
  2920. 'not null' => '',
  2921. ),
  2922. 'srcfeature_id' => array(
  2923. // 'description' => 'TODO: please describe this field!',
  2924. 'type' => 'int',
  2925. 'not null' => '',
  2926. ),
  2927. ),
  2928. 'primary key' => array(
  2929. ),
  2930. 'unique keys' => array(
  2931. ),
  2932. 'indexes' => array(
  2933. ),
  2934. 'foreign keys' => array(
  2935. ),
  2936. );
  2937. return $description;
  2938. }
  2939. /**
  2940. * Implements hook_gff3atts_schema()
  2941. * Purpose: To describe the structure of gff3atts to tripal
  2942. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2943. * @see tripal_core.api.inc: tripal_core_chado_update()
  2944. * @see tripal_core.api.inc: tripal_core_chado_select()
  2945. *
  2946. * @return
  2947. * An array describing the current table
  2948. *
  2949. * @ingroup tripal_schema_api
  2950. *
  2951. */
  2952. function tripal_core_chado_gff3atts_schema () {
  2953. $description = array();
  2954. $description = array(
  2955. 'table' => 'gff3atts',
  2956. // 'description' => 'TODO: please describe this table!',
  2957. 'fields' => array(
  2958. 'feature_id' => array(
  2959. // 'description' => 'TODO: please describe this field!',
  2960. 'type' => 'int',
  2961. 'not null' => '',
  2962. ),
  2963. 'type' => array(
  2964. // 'description' => 'TODO: please describe this field!',
  2965. 'type' => 'text',
  2966. 'not null' => '',
  2967. ),
  2968. 'attribute' => array(
  2969. // 'description' => 'TODO: please describe this field!',
  2970. 'type' => 'varchar',
  2971. 'not null' => '',
  2972. ),
  2973. ),
  2974. 'primary key' => array(
  2975. ),
  2976. 'unique keys' => array(
  2977. ),
  2978. 'indexes' => array(
  2979. ),
  2980. 'foreign keys' => array(
  2981. ),
  2982. );
  2983. return $description;
  2984. }
  2985. /**
  2986. * Implements hook_gff3view_schema()
  2987. * Purpose: To describe the structure of gff3view to tripal
  2988. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2989. * @see tripal_core.api.inc: tripal_core_chado_update()
  2990. * @see tripal_core.api.inc: tripal_core_chado_select()
  2991. *
  2992. * @return
  2993. * An array describing the current table
  2994. *
  2995. * @ingroup tripal_schema_api
  2996. *
  2997. */
  2998. function tripal_core_chado_gff3view_schema () {
  2999. $description = array();
  3000. $description = array(
  3001. 'table' => 'gff3view',
  3002. // 'description' => 'TODO: please describe this table!',
  3003. 'fields' => array(
  3004. 'feature_id' => array(
  3005. // 'description' => 'TODO: please describe this field!',
  3006. 'type' => 'int',
  3007. 'not null' => '',
  3008. ),
  3009. 'ref' => array(
  3010. // 'description' => 'TODO: please describe this field!',
  3011. 'type' => 'varchar',
  3012. 'length' => '255',
  3013. 'not null' => '',
  3014. ),
  3015. 'source' => array(
  3016. // 'description' => 'TODO: please describe this field!',
  3017. 'type' => 'varchar',
  3018. 'length' => '255',
  3019. 'not null' => '',
  3020. ),
  3021. 'type' => array(
  3022. // 'description' => 'TODO: please describe this field!',
  3023. 'type' => 'varchar',
  3024. 'length' => '1024',
  3025. 'not null' => '',
  3026. ),
  3027. 'fstart' => array(
  3028. // 'description' => 'TODO: please describe this field!',
  3029. 'type' => 'int',
  3030. 'not null' => '',
  3031. ),
  3032. 'fend' => array(
  3033. // 'description' => 'TODO: please describe this field!',
  3034. 'type' => 'int',
  3035. 'not null' => '',
  3036. ),
  3037. 'score' => array(
  3038. // 'description' => 'TODO: please describe this field!',
  3039. 'type' => 'float',
  3040. 'size' => 'big',
  3041. 'not null' => '',
  3042. ),
  3043. 'strand' => array(
  3044. // 'description' => 'TODO: please describe this field!',
  3045. 'type' => 'int',
  3046. 'size' => 'small',
  3047. 'not null' => '',
  3048. ),
  3049. 'phase' => array(
  3050. // 'description' => 'TODO: please describe this field!',
  3051. 'type' => 'int',
  3052. 'not null' => '',
  3053. ),
  3054. 'seqlen' => array(
  3055. // 'description' => 'TODO: please describe this field!',
  3056. 'type' => 'int',
  3057. 'not null' => '',
  3058. ),
  3059. 'name' => array(
  3060. // 'description' => 'TODO: please describe this field!',
  3061. 'type' => 'varchar',
  3062. 'length' => '255',
  3063. 'not null' => '',
  3064. ),
  3065. 'organism_id' => array(
  3066. // 'description' => 'TODO: please describe this field!',
  3067. 'type' => 'int',
  3068. 'not null' => '',
  3069. ),
  3070. ),
  3071. 'primary key' => array(
  3072. ),
  3073. 'unique keys' => array(
  3074. ),
  3075. 'indexes' => array(
  3076. ),
  3077. 'foreign keys' => array(
  3078. ),
  3079. );
  3080. return $description;
  3081. }
  3082. /**
  3083. * Implements hook_gffatts_schema()
  3084. * Purpose: To describe the structure of gffatts to tripal
  3085. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3086. * @see tripal_core.api.inc: tripal_core_chado_update()
  3087. * @see tripal_core.api.inc: tripal_core_chado_select()
  3088. *
  3089. * @return
  3090. * An array describing the current table
  3091. *
  3092. * @ingroup tripal_schema_api
  3093. *
  3094. */
  3095. function tripal_core_chado_gffatts_schema () {
  3096. $description = array();
  3097. $description = array(
  3098. 'table' => 'gffatts',
  3099. // 'description' => 'TODO: please describe this table!',
  3100. 'fields' => array(
  3101. 'feature_id' => array(
  3102. // 'description' => 'TODO: please describe this field!',
  3103. 'type' => 'int',
  3104. 'not null' => '',
  3105. ),
  3106. 'type' => array(
  3107. // 'description' => 'TODO: please describe this field!',
  3108. 'type' => 'text',
  3109. 'not null' => '',
  3110. ),
  3111. 'attribute' => array(
  3112. // 'description' => 'TODO: please describe this field!',
  3113. 'type' => 'varchar',
  3114. 'not null' => '',
  3115. ),
  3116. ),
  3117. 'primary key' => array(
  3118. ),
  3119. 'unique keys' => array(
  3120. ),
  3121. 'indexes' => array(
  3122. ),
  3123. 'foreign keys' => array(
  3124. ),
  3125. );
  3126. return $description;
  3127. }
  3128. /**
  3129. * Implements hook_intron_combined_view_schema()
  3130. * Purpose: To describe the structure of intron_combined_view to tripal
  3131. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3132. * @see tripal_core.api.inc: tripal_core_chado_update()
  3133. * @see tripal_core.api.inc: tripal_core_chado_select()
  3134. *
  3135. * @return
  3136. * An array describing the current table
  3137. *
  3138. * @ingroup tripal_schema_api
  3139. *
  3140. */
  3141. function tripal_core_chado_intron_combined_view_schema () {
  3142. $description = array();
  3143. $description = array(
  3144. 'table' => 'intron_combined_view',
  3145. // 'description' => 'TODO: please describe this table!',
  3146. 'fields' => array(
  3147. 'exon1_id' => array(
  3148. // 'description' => 'TODO: please describe this field!',
  3149. 'type' => 'int',
  3150. 'not null' => '',
  3151. ),
  3152. 'exon2_id' => array(
  3153. // 'description' => 'TODO: please describe this field!',
  3154. 'type' => 'int',
  3155. 'not null' => '',
  3156. ),
  3157. 'fmin' => array(
  3158. // 'description' => 'TODO: please describe this field!',
  3159. 'type' => 'int',
  3160. 'not null' => '',
  3161. ),
  3162. 'fmax' => array(
  3163. // 'description' => 'TODO: please describe this field!',
  3164. 'type' => 'int',
  3165. 'not null' => '',
  3166. ),
  3167. 'strand' => array(
  3168. // 'description' => 'TODO: please describe this field!',
  3169. 'type' => 'int',
  3170. 'size' => 'small',
  3171. 'not null' => '',
  3172. ),
  3173. 'srcfeature_id' => array(
  3174. // 'description' => 'TODO: please describe this field!',
  3175. 'type' => 'int',
  3176. 'not null' => '',
  3177. ),
  3178. 'intron_rank' => array(
  3179. // 'description' => 'TODO: please describe this field!',
  3180. 'type' => 'int',
  3181. 'not null' => '',
  3182. ),
  3183. 'transcript_id' => array(
  3184. // 'description' => 'TODO: please describe this field!',
  3185. 'type' => 'int',
  3186. 'not null' => '',
  3187. ),
  3188. ),
  3189. 'primary key' => array(
  3190. ),
  3191. 'unique keys' => array(
  3192. ),
  3193. 'indexes' => array(
  3194. ),
  3195. 'foreign keys' => array(
  3196. ),
  3197. );
  3198. return $description;
  3199. }
  3200. /**
  3201. * Implements hook_project_schema()
  3202. * Purpose: To describe the structure of project to tripal
  3203. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3204. * @see tripal_core.api.inc: tripal_core_chado_update()
  3205. * @see tripal_core.api.inc: tripal_core_chado_select()
  3206. *
  3207. * @return
  3208. * An array describing the current table
  3209. *
  3210. * @ingroup tripal_schema_api
  3211. *
  3212. */
  3213. function tripal_core_chado_project_schema () {
  3214. $description = array();
  3215. $description = array(
  3216. 'table' => 'project',
  3217. // 'description' => 'TODO: please describe this table!',
  3218. 'fields' => array(
  3219. 'project_id' => array(
  3220. // 'description' => 'TODO: please describe this field!',
  3221. 'type' => 'serial',
  3222. 'not null' => '1',
  3223. ),
  3224. 'name' => array(
  3225. // 'description' => 'TODO: please describe this field!',
  3226. 'type' => 'varchar',
  3227. 'length' => '255',
  3228. 'not null' => '1',
  3229. ),
  3230. 'description' => array(
  3231. // 'description' => 'TODO: please describe this field!',
  3232. 'type' => 'varchar',
  3233. 'length' => '255',
  3234. 'not null' => '1',
  3235. ),
  3236. ),
  3237. 'primary key' => array(
  3238. '0' => 'project_id',
  3239. ),
  3240. 'unique keys' => array(
  3241. 'project_c1' => array(
  3242. '0' => 'name',
  3243. ),
  3244. ),
  3245. 'indexes' => array(
  3246. ),
  3247. 'foreign keys' => array(
  3248. ),
  3249. );
  3250. return $description;
  3251. }
  3252. /**
  3253. * Implements hook_protein_coding_gene_schema()
  3254. * Purpose: To describe the structure of protein_coding_gene to tripal
  3255. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3256. * @see tripal_core.api.inc: tripal_core_chado_update()
  3257. * @see tripal_core.api.inc: tripal_core_chado_select()
  3258. *
  3259. * @return
  3260. * An array describing the current table
  3261. *
  3262. * @ingroup tripal_schema_api
  3263. *
  3264. */
  3265. function tripal_core_chado_protein_coding_gene_schema () {
  3266. $description = array();
  3267. $description = array(
  3268. 'table' => 'protein_coding_gene',
  3269. // 'description' => 'TODO: please describe this table!',
  3270. 'fields' => array(
  3271. 'feature_id' => array(
  3272. // 'description' => 'TODO: please describe this field!',
  3273. 'type' => 'int',
  3274. 'not null' => '',
  3275. ),
  3276. 'dbxref_id' => array(
  3277. // 'description' => 'TODO: please describe this field!',
  3278. 'type' => 'int',
  3279. 'not null' => '',
  3280. ),
  3281. 'organism_id' => array(
  3282. // 'description' => 'TODO: please describe this field!',
  3283. 'type' => 'int',
  3284. 'not null' => '',
  3285. ),
  3286. 'name' => array(
  3287. // 'description' => 'TODO: please describe this field!',
  3288. 'type' => 'varchar',
  3289. 'length' => '255',
  3290. 'not null' => '',
  3291. ),
  3292. 'uniquename' => array(
  3293. // 'description' => 'TODO: please describe this field!',
  3294. 'type' => 'text',
  3295. 'not null' => '',
  3296. ),
  3297. 'residues' => array(
  3298. // 'description' => 'TODO: please describe this field!',
  3299. 'type' => 'text',
  3300. 'not null' => '',
  3301. ),
  3302. 'seqlen' => array(
  3303. // 'description' => 'TODO: please describe this field!',
  3304. 'type' => 'int',
  3305. 'not null' => '',
  3306. ),
  3307. 'md5checksum' => array(
  3308. // 'description' => 'TODO: please describe this field!',
  3309. 'type' => 'char',
  3310. 'length' => '32',
  3311. 'not null' => '',
  3312. ),
  3313. 'type_id' => array(
  3314. // 'description' => 'TODO: please describe this field!',
  3315. 'type' => 'int',
  3316. 'not null' => '',
  3317. ),
  3318. 'is_analysis' => array(
  3319. // 'description' => 'TODO: please describe this field!',
  3320. 'type' => 'boolean',
  3321. 'not null' => '',
  3322. ),
  3323. 'is_obsolete' => array(
  3324. // 'description' => 'TODO: please describe this field!',
  3325. 'type' => 'boolean',
  3326. 'not null' => '',
  3327. ),
  3328. 'timeaccessioned' => array(
  3329. // 'description' => 'TODO: please describe this field!',
  3330. 'type' => 'datetime',
  3331. 'not null' => '',
  3332. ),
  3333. 'timelastmodified' => array(
  3334. // 'description' => 'TODO: please describe this field!',
  3335. 'type' => 'datetime',
  3336. 'not null' => '',
  3337. ),
  3338. ),
  3339. 'primary key' => array(
  3340. ),
  3341. 'unique keys' => array(
  3342. ),
  3343. 'indexes' => array(
  3344. ),
  3345. 'foreign keys' => array(
  3346. ),
  3347. );
  3348. return $description;
  3349. }
  3350. /**
  3351. * Implements hook_studyfactorvalue_schema()
  3352. * Purpose: To describe the structure of studyfactorvalue to tripal
  3353. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3354. * @see tripal_core.api.inc: tripal_core_chado_update()
  3355. * @see tripal_core.api.inc: tripal_core_chado_select()
  3356. *
  3357. * @return
  3358. * An array describing the current table
  3359. *
  3360. * @ingroup tripal_schema_api
  3361. *
  3362. */
  3363. function tripal_core_chado_studyfactorvalue_schema () {
  3364. $description = array();
  3365. $description = array(
  3366. 'table' => 'studyfactorvalue',
  3367. // 'description' => 'TODO: please describe this table!',
  3368. 'fields' => array(
  3369. 'studyfactorvalue_id' => array(
  3370. // 'description' => 'TODO: please describe this field!',
  3371. 'type' => 'serial',
  3372. 'not null' => '1',
  3373. ),
  3374. 'studyfactor_id' => array(
  3375. // 'description' => 'TODO: please describe this field!',
  3376. 'type' => 'int',
  3377. 'not null' => '1',
  3378. ),
  3379. 'assay_id' => array(
  3380. // 'description' => 'TODO: please describe this field!',
  3381. 'type' => 'int',
  3382. 'not null' => '1',
  3383. ),
  3384. 'factorvalue' => array(
  3385. // 'description' => 'TODO: please describe this field!',
  3386. 'type' => 'text',
  3387. 'not null' => '',
  3388. ),
  3389. 'name' => array(
  3390. // 'description' => 'TODO: please describe this field!',
  3391. 'type' => 'text',
  3392. 'not null' => '',
  3393. ),
  3394. 'rank' => array(
  3395. // 'description' => 'TODO: please describe this field!',
  3396. 'type' => 'int',
  3397. 'not null' => '1',
  3398. 'default' => '0',
  3399. ),
  3400. ),
  3401. 'primary key' => array(
  3402. '0' => 'studyfactorvalue_id',
  3403. ),
  3404. 'unique keys' => array(
  3405. ),
  3406. 'indexes' => array(
  3407. 'studyfactorvalue_idx1' => array(
  3408. '0' => 'studyfactor_id',
  3409. ),
  3410. 'studyfactorvalue_idx2' => array(
  3411. '0' => 'assay_id',
  3412. ),
  3413. ),
  3414. 'foreign keys' => array(
  3415. ),
  3416. );
  3417. return $description;
  3418. }
  3419. /**
  3420. * Implements hook_studyfactor_schema()
  3421. * Purpose: To describe the structure of studyfactor to tripal
  3422. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3423. * @see tripal_core.api.inc: tripal_core_chado_update()
  3424. * @see tripal_core.api.inc: tripal_core_chado_select()
  3425. *
  3426. * @return
  3427. * An array describing the current table
  3428. *
  3429. * @ingroup tripal_schema_api
  3430. *
  3431. */
  3432. function tripal_core_chado_studyfactor_schema () {
  3433. $description = array();
  3434. $description = array(
  3435. 'table' => 'studyfactor',
  3436. // 'description' => 'TODO: please describe this table!',
  3437. 'fields' => array(
  3438. 'studyfactor_id' => array(
  3439. // 'description' => 'TODO: please describe this field!',
  3440. 'type' => 'serial',
  3441. 'not null' => '1',
  3442. ),
  3443. 'studydesign_id' => array(
  3444. // 'description' => 'TODO: please describe this field!',
  3445. 'type' => 'int',
  3446. 'not null' => '1',
  3447. ),
  3448. 'type_id' => array(
  3449. // 'description' => 'TODO: please describe this field!',
  3450. 'type' => 'int',
  3451. 'not null' => '',
  3452. ),
  3453. 'name' => array(
  3454. // 'description' => 'TODO: please describe this field!',
  3455. 'type' => 'text',
  3456. 'not null' => '1',
  3457. ),
  3458. 'description' => array(
  3459. // 'description' => 'TODO: please describe this field!',
  3460. 'type' => 'text',
  3461. 'not null' => '',
  3462. ),
  3463. ),
  3464. 'primary key' => array(
  3465. '0' => 'studyfactor_id',
  3466. ),
  3467. 'unique keys' => array(
  3468. ),
  3469. 'indexes' => array(
  3470. 'studyfactor_idx1' => array(
  3471. '0' => 'studydesign_id',
  3472. ),
  3473. 'studyfactor_idx2' => array(
  3474. '0' => 'type_id',
  3475. ),
  3476. ),
  3477. 'foreign keys' => array(
  3478. ),
  3479. );
  3480. return $description;
  3481. }
  3482. /**
  3483. * Implements hook_studyprop_schema()
  3484. * Purpose: To describe the structure of studyprop to tripal
  3485. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3486. * @see tripal_core.api.inc: tripal_core_chado_update()
  3487. * @see tripal_core.api.inc: tripal_core_chado_select()
  3488. *
  3489. * @return
  3490. * An array describing the current table
  3491. *
  3492. * @ingroup tripal_schema_api
  3493. *
  3494. */
  3495. function tripal_core_chado_studyprop_schema () {
  3496. $description = array();
  3497. $description = array(
  3498. 'table' => 'studyprop',
  3499. // 'description' => 'TODO: please describe this table!',
  3500. 'fields' => array(
  3501. 'studyprop_id' => array(
  3502. // 'description' => 'TODO: please describe this field!',
  3503. 'type' => 'serial',
  3504. 'not null' => '1',
  3505. ),
  3506. 'study_id' => array(
  3507. // 'description' => 'TODO: please describe this field!',
  3508. 'type' => 'int',
  3509. 'not null' => '1',
  3510. ),
  3511. 'type_id' => array(
  3512. // 'description' => 'TODO: please describe this field!',
  3513. 'type' => 'int',
  3514. 'not null' => '1',
  3515. ),
  3516. 'value' => array(
  3517. // 'description' => 'TODO: please describe this field!',
  3518. 'type' => 'text',
  3519. 'not null' => '',
  3520. ),
  3521. 'rank' => array(
  3522. // 'description' => 'TODO: please describe this field!',
  3523. 'type' => 'int',
  3524. 'not null' => '1',
  3525. 'default' => '0',
  3526. ),
  3527. ),
  3528. 'primary key' => array(
  3529. '0' => 'studyprop_id',
  3530. ),
  3531. 'unique keys' => array(
  3532. 'study_id' => array(
  3533. '0' => 'study_id',
  3534. '1' => 'type_id',
  3535. '2' => 'rank',
  3536. ),
  3537. ),
  3538. 'indexes' => array(
  3539. 'studyprop_idx1' => array(
  3540. '0' => 'study_id',
  3541. ),
  3542. 'studyprop_idx2' => array(
  3543. '0' => 'type_id',
  3544. ),
  3545. ),
  3546. 'foreign keys' => array(
  3547. ),
  3548. );
  3549. return $description;
  3550. }
  3551. /**
  3552. * Implements hook_studyprop_feature_schema()
  3553. * Purpose: To describe the structure of studyprop_feature to tripal
  3554. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3555. * @see tripal_core.api.inc: tripal_core_chado_update()
  3556. * @see tripal_core.api.inc: tripal_core_chado_select()
  3557. *
  3558. * @return
  3559. * An array describing the current table
  3560. *
  3561. * @ingroup tripal_schema_api
  3562. *
  3563. */
  3564. function tripal_core_chado_studyprop_feature_schema () {
  3565. $description = array();
  3566. $description = array(
  3567. 'table' => 'studyprop_feature',
  3568. // 'description' => 'TODO: please describe this table!',
  3569. 'fields' => array(
  3570. 'studyprop_feature_id' => array(
  3571. // 'description' => 'TODO: please describe this field!',
  3572. 'type' => 'serial',
  3573. 'not null' => '1',
  3574. ),
  3575. 'studyprop_id' => array(
  3576. // 'description' => 'TODO: please describe this field!',
  3577. 'type' => 'int',
  3578. 'not null' => '1',
  3579. ),
  3580. 'feature_id' => array(
  3581. // 'description' => 'TODO: please describe this field!',
  3582. 'type' => 'int',
  3583. 'not null' => '1',
  3584. ),
  3585. 'type_id' => array(
  3586. // 'description' => 'TODO: please describe this field!',
  3587. 'type' => 'int',
  3588. 'not null' => '',
  3589. ),
  3590. ),
  3591. 'primary key' => array(
  3592. '0' => 'studyprop_feature_id',
  3593. ),
  3594. 'unique keys' => array(
  3595. 'studyprop_id' => array(
  3596. '0' => 'studyprop_id',
  3597. '1' => 'feature_id',
  3598. ),
  3599. ),
  3600. 'indexes' => array(
  3601. 'studyprop_feature_idx1' => array(
  3602. '0' => 'studyprop_id',
  3603. ),
  3604. 'studyprop_feature_idx2' => array(
  3605. '0' => 'feature_id',
  3606. ),
  3607. ),
  3608. 'foreign keys' => array(
  3609. ),
  3610. );
  3611. return $description;
  3612. }
  3613. /**
  3614. * Implements hook_synonym_schema()
  3615. * Purpose: To describe the structure of synonym to tripal
  3616. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3617. * @see tripal_core.api.inc: tripal_core_chado_update()
  3618. * @see tripal_core.api.inc: tripal_core_chado_select()
  3619. *
  3620. * @return
  3621. * An array describing the current table
  3622. *
  3623. * @ingroup tripal_schema_api
  3624. *
  3625. */
  3626. function tripal_core_chado_synonym_schema () {
  3627. $description = array();
  3628. $description = array(
  3629. 'table' => 'synonym',
  3630. // 'description' => 'TODO: please describe this table!',
  3631. 'fields' => array(
  3632. 'synonym_id' => array(
  3633. // 'description' => 'TODO: please describe this field!',
  3634. 'type' => 'serial',
  3635. 'not null' => '1',
  3636. ),
  3637. 'name' => array(
  3638. // 'description' => 'TODO: please describe this field!',
  3639. 'type' => 'varchar',
  3640. 'length' => '255',
  3641. 'not null' => '1',
  3642. ),
  3643. 'type_id' => array(
  3644. // 'description' => 'TODO: please describe this field!',
  3645. 'type' => 'int',
  3646. 'not null' => '1',
  3647. ),
  3648. 'synonym_sgml' => array(
  3649. // 'description' => 'TODO: please describe this field!',
  3650. 'type' => 'varchar',
  3651. 'length' => '255',
  3652. 'not null' => '1',
  3653. ),
  3654. ),
  3655. 'primary key' => array(
  3656. '0' => 'synonym_id',
  3657. ),
  3658. 'unique keys' => array(
  3659. 'synonym_c1' => array(
  3660. '0' => 'name',
  3661. '1' => 'type_id',
  3662. ),
  3663. ),
  3664. 'indexes' => array(
  3665. 'synonym_idx1' => array(
  3666. '0' => 'type_id',
  3667. ),
  3668. ),
  3669. 'foreign keys' => array(
  3670. ),
  3671. );
  3672. return $description;
  3673. }
  3674. /**
  3675. * Implements hook_studydesignprop_schema()
  3676. * Purpose: To describe the structure of studydesignprop to tripal
  3677. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3678. * @see tripal_core.api.inc: tripal_core_chado_update()
  3679. * @see tripal_core.api.inc: tripal_core_chado_select()
  3680. *
  3681. * @return
  3682. * An array describing the current table
  3683. *
  3684. * @ingroup tripal_schema_api
  3685. *
  3686. */
  3687. function tripal_core_chado_studydesignprop_schema () {
  3688. $description = array();
  3689. $description = array(
  3690. 'table' => 'studydesignprop',
  3691. // 'description' => 'TODO: please describe this table!',
  3692. 'fields' => array(
  3693. 'studydesignprop_id' => array(
  3694. // 'description' => 'TODO: please describe this field!',
  3695. 'type' => 'serial',
  3696. 'not null' => '1',
  3697. ),
  3698. 'studydesign_id' => array(
  3699. // 'description' => 'TODO: please describe this field!',
  3700. 'type' => 'int',
  3701. 'not null' => '1',
  3702. ),
  3703. 'type_id' => array(
  3704. // 'description' => 'TODO: please describe this field!',
  3705. 'type' => 'int',
  3706. 'not null' => '1',
  3707. ),
  3708. 'value' => array(
  3709. // 'description' => 'TODO: please describe this field!',
  3710. 'type' => 'text',
  3711. 'not null' => '',
  3712. ),
  3713. 'rank' => array(
  3714. // 'description' => 'TODO: please describe this field!',
  3715. 'type' => 'int',
  3716. 'not null' => '1',
  3717. 'default' => '0',
  3718. ),
  3719. ),
  3720. 'primary key' => array(
  3721. '0' => 'studydesignprop_id',
  3722. ),
  3723. 'unique keys' => array(
  3724. 'studydesignprop_c1' => array(
  3725. '0' => 'studydesign_id',
  3726. '1' => 'type_id',
  3727. '2' => 'rank',
  3728. ),
  3729. ),
  3730. 'indexes' => array(
  3731. 'studydesignprop_idx1' => array(
  3732. '0' => 'studydesign_id',
  3733. ),
  3734. 'studydesignprop_idx2' => array(
  3735. '0' => 'type_id',
  3736. ),
  3737. ),
  3738. 'foreign keys' => array(
  3739. ),
  3740. );
  3741. return $description;
  3742. }
  3743. /**
  3744. * Implements hook_studydesign_schema()
  3745. * Purpose: To describe the structure of studydesign to tripal
  3746. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3747. * @see tripal_core.api.inc: tripal_core_chado_update()
  3748. * @see tripal_core.api.inc: tripal_core_chado_select()
  3749. *
  3750. * @return
  3751. * An array describing the current table
  3752. *
  3753. * @ingroup tripal_schema_api
  3754. *
  3755. */
  3756. function tripal_core_chado_studydesign_schema () {
  3757. $description = array();
  3758. $description = array(
  3759. 'table' => 'studydesign',
  3760. // 'description' => 'TODO: please describe this table!',
  3761. 'fields' => array(
  3762. 'studydesign_id' => array(
  3763. // 'description' => 'TODO: please describe this field!',
  3764. 'type' => 'serial',
  3765. 'not null' => '1',
  3766. ),
  3767. 'study_id' => array(
  3768. // 'description' => 'TODO: please describe this field!',
  3769. 'type' => 'int',
  3770. 'not null' => '1',
  3771. ),
  3772. 'description' => array(
  3773. // 'description' => 'TODO: please describe this field!',
  3774. 'type' => 'text',
  3775. 'not null' => '',
  3776. ),
  3777. ),
  3778. 'primary key' => array(
  3779. '0' => 'studydesign_id',
  3780. ),
  3781. 'unique keys' => array(
  3782. ),
  3783. 'indexes' => array(
  3784. 'studydesign_idx1' => array(
  3785. '0' => 'study_id',
  3786. ),
  3787. ),
  3788. 'foreign keys' => array(
  3789. ),
  3790. );
  3791. return $description;
  3792. }
  3793. /**
  3794. * Implements hook_stockprop_schema()
  3795. * Purpose: To describe the structure of stockprop to tripal
  3796. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3797. * @see tripal_core.api.inc: tripal_core_chado_update()
  3798. * @see tripal_core.api.inc: tripal_core_chado_select()
  3799. *
  3800. * @return
  3801. * An array describing the current table
  3802. *
  3803. * @ingroup tripal_schema_api
  3804. *
  3805. */
  3806. function tripal_core_chado_stockprop_schema () {
  3807. $description = array();
  3808. $description = array(
  3809. 'table' => 'stockprop',
  3810. // 'description' => 'TODO: please describe this table!',
  3811. 'fields' => array(
  3812. 'stockprop_id' => array(
  3813. // 'description' => 'TODO: please describe this field!',
  3814. 'type' => 'serial',
  3815. 'not null' => '1',
  3816. ),
  3817. 'stock_id' => array(
  3818. // 'description' => 'TODO: please describe this field!',
  3819. 'type' => 'int',
  3820. 'not null' => '1',
  3821. ),
  3822. 'type_id' => array(
  3823. // 'description' => 'TODO: please describe this field!',
  3824. 'type' => 'int',
  3825. 'not null' => '1',
  3826. ),
  3827. 'value' => array(
  3828. // 'description' => 'TODO: please describe this field!',
  3829. 'type' => 'text',
  3830. 'not null' => '',
  3831. ),
  3832. 'rank' => array(
  3833. // 'description' => 'TODO: please describe this field!',
  3834. 'type' => 'int',
  3835. 'not null' => '1',
  3836. 'default' => '0',
  3837. ),
  3838. ),
  3839. 'primary key' => array(
  3840. '0' => 'stockprop_id',
  3841. ),
  3842. 'unique keys' => array(
  3843. 'stockprop_c1' => array(
  3844. '0' => 'stock_id',
  3845. '1' => 'type_id',
  3846. '2' => 'rank',
  3847. ),
  3848. ),
  3849. 'indexes' => array(
  3850. 'stockprop_idx1' => array(
  3851. '0' => 'stock_id',
  3852. ),
  3853. 'stockprop_idx2' => array(
  3854. '0' => 'type_id',
  3855. ),
  3856. ),
  3857. 'foreign keys' => array(
  3858. ),
  3859. );
  3860. return $description;
  3861. }
  3862. /**
  3863. * Implements hook_stockprop_pub_schema()
  3864. * Purpose: To describe the structure of stockprop_pub to tripal
  3865. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3866. * @see tripal_core.api.inc: tripal_core_chado_update()
  3867. * @see tripal_core.api.inc: tripal_core_chado_select()
  3868. *
  3869. * @return
  3870. * An array describing the current table
  3871. *
  3872. * @ingroup tripal_schema_api
  3873. *
  3874. */
  3875. function tripal_core_chado_stockprop_pub_schema () {
  3876. $description = array();
  3877. $description = array(
  3878. 'table' => 'stockprop_pub',
  3879. // 'description' => 'TODO: please describe this table!',
  3880. 'fields' => array(
  3881. 'stockprop_pub_id' => array(
  3882. // 'description' => 'TODO: please describe this field!',
  3883. 'type' => 'serial',
  3884. 'not null' => '1',
  3885. ),
  3886. 'stockprop_id' => array(
  3887. // 'description' => 'TODO: please describe this field!',
  3888. 'type' => 'int',
  3889. 'not null' => '1',
  3890. ),
  3891. 'pub_id' => array(
  3892. // 'description' => 'TODO: please describe this field!',
  3893. 'type' => 'int',
  3894. 'not null' => '1',
  3895. ),
  3896. ),
  3897. 'primary key' => array(
  3898. '0' => 'stockprop_pub_id',
  3899. ),
  3900. 'unique keys' => array(
  3901. 'stockprop_pub_c1' => array(
  3902. '0' => 'stockprop_id',
  3903. '1' => 'pub_id',
  3904. ),
  3905. ),
  3906. 'indexes' => array(
  3907. 'stockprop_pub_idx1' => array(
  3908. '0' => 'stockprop_id',
  3909. ),
  3910. 'stockprop_pub_idx2' => array(
  3911. '0' => 'pub_id',
  3912. ),
  3913. ),
  3914. 'foreign keys' => array(
  3915. ),
  3916. );
  3917. return $description;
  3918. }
  3919. /**
  3920. * Implements hook_study_schema()
  3921. * Purpose: To describe the structure of study to tripal
  3922. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3923. * @see tripal_core.api.inc: tripal_core_chado_update()
  3924. * @see tripal_core.api.inc: tripal_core_chado_select()
  3925. *
  3926. * @return
  3927. * An array describing the current table
  3928. *
  3929. * @ingroup tripal_schema_api
  3930. *
  3931. */
  3932. function tripal_core_chado_study_schema () {
  3933. $description = array();
  3934. $description = array(
  3935. 'table' => 'study',
  3936. // 'description' => 'TODO: please describe this table!',
  3937. 'fields' => array(
  3938. 'study_id' => array(
  3939. // 'description' => 'TODO: please describe this field!',
  3940. 'type' => 'serial',
  3941. 'not null' => '1',
  3942. ),
  3943. 'contact_id' => array(
  3944. // 'description' => 'TODO: please describe this field!',
  3945. 'type' => 'int',
  3946. 'not null' => '1',
  3947. ),
  3948. 'pub_id' => array(
  3949. // 'description' => 'TODO: please describe this field!',
  3950. 'type' => 'int',
  3951. 'not null' => '',
  3952. ),
  3953. 'dbxref_id' => array(
  3954. // 'description' => 'TODO: please describe this field!',
  3955. 'type' => 'int',
  3956. 'not null' => '',
  3957. ),
  3958. 'name' => array(
  3959. // 'description' => 'TODO: please describe this field!',
  3960. 'type' => 'text',
  3961. 'not null' => '1',
  3962. ),
  3963. 'description' => array(
  3964. // 'description' => 'TODO: please describe this field!',
  3965. 'type' => 'text',
  3966. 'not null' => '',
  3967. ),
  3968. ),
  3969. 'primary key' => array(
  3970. '0' => 'study_id',
  3971. ),
  3972. 'unique keys' => array(
  3973. 'study_c1' => array(
  3974. '0' => 'name',
  3975. ),
  3976. ),
  3977. 'indexes' => array(
  3978. 'study_idx1' => array(
  3979. '0' => 'contact_id',
  3980. ),
  3981. 'study_idx2' => array(
  3982. '0' => 'pub_id',
  3983. ),
  3984. 'study_idx3' => array(
  3985. '0' => 'dbxref_id',
  3986. ),
  3987. ),
  3988. 'foreign keys' => array(
  3989. ),
  3990. );
  3991. return $description;
  3992. }
  3993. /**
  3994. * Implements hook_study_assay_schema()
  3995. * Purpose: To describe the structure of study_assay to tripal
  3996. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3997. * @see tripal_core.api.inc: tripal_core_chado_update()
  3998. * @see tripal_core.api.inc: tripal_core_chado_select()
  3999. *
  4000. * @return
  4001. * An array describing the current table
  4002. *
  4003. * @ingroup tripal_schema_api
  4004. *
  4005. */
  4006. function tripal_core_chado_study_assay_schema () {
  4007. $description = array();
  4008. $description = array(
  4009. 'table' => 'study_assay',
  4010. // 'description' => 'TODO: please describe this table!',
  4011. 'fields' => array(
  4012. 'study_assay_id' => array(
  4013. // 'description' => 'TODO: please describe this field!',
  4014. 'type' => 'serial',
  4015. 'not null' => '1',
  4016. ),
  4017. 'study_id' => array(
  4018. // 'description' => 'TODO: please describe this field!',
  4019. 'type' => 'int',
  4020. 'not null' => '1',
  4021. ),
  4022. 'assay_id' => array(
  4023. // 'description' => 'TODO: please describe this field!',
  4024. 'type' => 'int',
  4025. 'not null' => '1',
  4026. ),
  4027. ),
  4028. 'primary key' => array(
  4029. '0' => 'study_assay_id',
  4030. ),
  4031. 'unique keys' => array(
  4032. 'study_assay_c1' => array(
  4033. '0' => 'study_id',
  4034. '1' => 'assay_id',
  4035. ),
  4036. ),
  4037. 'indexes' => array(
  4038. 'study_assay_idx1' => array(
  4039. '0' => 'study_id',
  4040. ),
  4041. 'study_assay_idx2' => array(
  4042. '0' => 'assay_id',
  4043. ),
  4044. ),
  4045. 'foreign keys' => array(
  4046. ),
  4047. );
  4048. return $description;
  4049. }
  4050. /**
  4051. * Implements hook_tableinfo_schema()
  4052. * Purpose: To describe the structure of tableinfo to tripal
  4053. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4054. * @see tripal_core.api.inc: tripal_core_chado_update()
  4055. * @see tripal_core.api.inc: tripal_core_chado_select()
  4056. *
  4057. * @return
  4058. * An array describing the current table
  4059. *
  4060. * @ingroup tripal_schema_api
  4061. *
  4062. */
  4063. function tripal_core_chado_tableinfo_schema () {
  4064. $description = array();
  4065. $description = array(
  4066. 'table' => 'tableinfo',
  4067. // 'description' => 'TODO: please describe this table!',
  4068. 'fields' => array(
  4069. 'tableinfo_id' => array(
  4070. // 'description' => 'TODO: please describe this field!',
  4071. 'type' => 'serial',
  4072. 'not null' => '1',
  4073. ),
  4074. 'name' => array(
  4075. // 'description' => 'TODO: please describe this field!',
  4076. 'type' => 'varchar',
  4077. 'length' => '30',
  4078. 'not null' => '1',
  4079. ),
  4080. 'primary_key_column' => array(
  4081. // 'description' => 'TODO: please describe this field!',
  4082. 'type' => 'varchar',
  4083. 'length' => '30',
  4084. 'not null' => '',
  4085. ),
  4086. 'is_view' => array(
  4087. // 'description' => 'TODO: please describe this field!',
  4088. 'type' => 'int',
  4089. 'not null' => '1',
  4090. 'default' => '0',
  4091. ),
  4092. 'view_on_table_id' => array(
  4093. // 'description' => 'TODO: please describe this field!',
  4094. 'type' => 'int',
  4095. 'not null' => '',
  4096. ),
  4097. 'superclass_table_id' => array(
  4098. // 'description' => 'TODO: please describe this field!',
  4099. 'type' => 'int',
  4100. 'not null' => '',
  4101. ),
  4102. 'is_updateable' => array(
  4103. // 'description' => 'TODO: please describe this field!',
  4104. 'type' => 'int',
  4105. 'not null' => '1',
  4106. 'default' => '1',
  4107. ),
  4108. 'modification_date' => array(
  4109. // 'description' => 'TODO: please describe this field!',
  4110. 'type' => 'date',
  4111. 'not null' => '1',
  4112. 'default' => 'ow(',
  4113. ),
  4114. ),
  4115. 'primary key' => array(
  4116. '0' => 'tableinfo_id',
  4117. ),
  4118. 'unique keys' => array(
  4119. 'tableinfo_c1' => array(
  4120. '0' => 'name',
  4121. ),
  4122. ),
  4123. 'indexes' => array(
  4124. ),
  4125. 'foreign keys' => array(
  4126. ),
  4127. );
  4128. return $description;
  4129. }
  4130. /**
  4131. * Implements hook_treatment_schema()
  4132. * Purpose: To describe the structure of treatment to tripal
  4133. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4134. * @see tripal_core.api.inc: tripal_core_chado_update()
  4135. * @see tripal_core.api.inc: tripal_core_chado_select()
  4136. *
  4137. * @return
  4138. * An array describing the current table
  4139. *
  4140. * @ingroup tripal_schema_api
  4141. *
  4142. */
  4143. function tripal_core_chado_treatment_schema () {
  4144. $description = array();
  4145. $description = array(
  4146. 'table' => 'treatment',
  4147. // 'description' => 'TODO: please describe this table!',
  4148. 'fields' => array(
  4149. 'treatment_id' => array(
  4150. // 'description' => 'TODO: please describe this field!',
  4151. 'type' => 'serial',
  4152. 'not null' => '1',
  4153. ),
  4154. 'rank' => array(
  4155. // 'description' => 'TODO: please describe this field!',
  4156. 'type' => 'int',
  4157. 'not null' => '1',
  4158. 'default' => '0',
  4159. ),
  4160. 'biomaterial_id' => array(
  4161. // 'description' => 'TODO: please describe this field!',
  4162. 'type' => 'int',
  4163. 'not null' => '1',
  4164. ),
  4165. 'type_id' => array(
  4166. // 'description' => 'TODO: please describe this field!',
  4167. 'type' => 'int',
  4168. 'not null' => '1',
  4169. ),
  4170. 'protocol_id' => array(
  4171. // 'description' => 'TODO: please describe this field!',
  4172. 'type' => 'int',
  4173. 'not null' => '',
  4174. ),
  4175. 'name' => array(
  4176. // 'description' => 'TODO: please describe this field!',
  4177. 'type' => 'text',
  4178. 'not null' => '',
  4179. ),
  4180. ),
  4181. 'primary key' => array(
  4182. '0' => 'treatment_id',
  4183. ),
  4184. 'unique keys' => array(
  4185. ),
  4186. 'indexes' => array(
  4187. 'treatment_idx1' => array(
  4188. '0' => 'biomaterial_id',
  4189. ),
  4190. 'treatment_idx2' => array(
  4191. '0' => 'type_id',
  4192. ),
  4193. 'treatment_idx3' => array(
  4194. '0' => 'protocol_id',
  4195. ),
  4196. ),
  4197. 'foreign keys' => array(
  4198. ),
  4199. );
  4200. return $description;
  4201. }
  4202. /**
  4203. * Implements hook_tripal_obo_schema()
  4204. * Purpose: To describe the structure of tripal_obo to tripal
  4205. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4206. * @see tripal_core.api.inc: tripal_core_chado_update()
  4207. * @see tripal_core.api.inc: tripal_core_chado_select()
  4208. *
  4209. * @return
  4210. * An array describing the current table
  4211. *
  4212. * @ingroup tripal_schema_api
  4213. *
  4214. */
  4215. function tripal_core_chado_tripal_obo_schema () {
  4216. $description = array();
  4217. $description = array(
  4218. 'table' => 'tripal_obo',
  4219. // 'description' => 'TODO: please describe this table!',
  4220. 'fields' => array(
  4221. 'cv_id' => array(
  4222. // 'description' => 'TODO: please describe this field!',
  4223. 'type' => 'int',
  4224. 'unsigned' => '1',
  4225. 'not null' => '1',
  4226. 'default' => '0',
  4227. ),
  4228. 'file' => array(
  4229. // 'description' => 'TODO: please describe this field!',
  4230. 'type' => 'varchar',
  4231. 'length' => '1024',
  4232. 'not null' => '',
  4233. ),
  4234. 'url' => array(
  4235. // 'description' => 'TODO: please describe this field!',
  4236. 'type' => 'varchar',
  4237. 'length' => '1024',
  4238. 'not null' => '',
  4239. ),
  4240. ),
  4241. 'primary key' => array(
  4242. '0' => 'cv_id',
  4243. ),
  4244. 'unique keys' => array(
  4245. ),
  4246. 'indexes' => array(
  4247. 'cv_id' => array(
  4248. '0' => 'cv_id',
  4249. ),
  4250. ),
  4251. 'foreign keys' => array(
  4252. ),
  4253. );
  4254. return $description;
  4255. }
  4256. /**
  4257. * Implements hook_tripal_organism_views_common_name_schema()
  4258. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4259. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4260. * @see tripal_core.api.inc: tripal_core_chado_update()
  4261. * @see tripal_core.api.inc: tripal_core_chado_select()
  4262. *
  4263. * @return
  4264. * An array describing the current table
  4265. *
  4266. * @ingroup tripal_schema_api
  4267. *
  4268. */
  4269. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4270. $description = array();
  4271. $description = array(
  4272. 'table' => 'tripal_organism_views_common_name',
  4273. // 'description' => 'TODO: please describe this table!',
  4274. 'fields' => array(
  4275. 'nid' => array(
  4276. // 'description' => 'TODO: please describe this field!',
  4277. 'type' => 'int',
  4278. 'unsigned' => '1',
  4279. 'not null' => '1',
  4280. 'default' => '0',
  4281. ),
  4282. 'common_name' => array(
  4283. // 'description' => 'TODO: please describe this field!',
  4284. 'type' => 'varchar',
  4285. 'length' => '255',
  4286. 'not null' => '1',
  4287. 'default' => 'NA',
  4288. ),
  4289. ),
  4290. 'primary key' => array(
  4291. ),
  4292. 'unique keys' => array(
  4293. ),
  4294. 'indexes' => array(
  4295. ),
  4296. 'foreign keys' => array(
  4297. ),
  4298. );
  4299. return $description;
  4300. }
  4301. /**
  4302. * Implements hook_type_feature_count_schema()
  4303. * Purpose: To describe the structure of type_feature_count to tripal
  4304. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4305. * @see tripal_core.api.inc: tripal_core_chado_update()
  4306. * @see tripal_core.api.inc: tripal_core_chado_select()
  4307. *
  4308. * @return
  4309. * An array describing the current table
  4310. *
  4311. * @ingroup tripal_schema_api
  4312. *
  4313. */
  4314. function tripal_core_chado_type_feature_count_schema () {
  4315. $description = array();
  4316. $description = array(
  4317. 'table' => 'type_feature_count',
  4318. // 'description' => 'TODO: please describe this table!',
  4319. 'fields' => array(
  4320. 'type' => array(
  4321. // 'description' => 'TODO: please describe this field!',
  4322. 'type' => 'varchar',
  4323. 'length' => '1024',
  4324. 'not null' => '',
  4325. ),
  4326. 'num_features' => array(
  4327. // 'description' => 'TODO: please describe this field!',
  4328. 'type' => 'int',
  4329. 'size' => 'big',
  4330. 'not null' => '',
  4331. ),
  4332. ),
  4333. 'primary key' => array(
  4334. ),
  4335. 'unique keys' => array(
  4336. ),
  4337. 'indexes' => array(
  4338. ),
  4339. 'foreign keys' => array(
  4340. ),
  4341. );
  4342. return $description;
  4343. }
  4344. /**
  4345. * Implements hook_stockcollectionprop_schema()
  4346. * Purpose: To describe the structure of stockcollectionprop to tripal
  4347. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4348. * @see tripal_core.api.inc: tripal_core_chado_update()
  4349. * @see tripal_core.api.inc: tripal_core_chado_select()
  4350. *
  4351. * @return
  4352. * An array describing the current table
  4353. *
  4354. * @ingroup tripal_schema_api
  4355. *
  4356. */
  4357. function tripal_core_chado_stockcollectionprop_schema () {
  4358. $description = array();
  4359. $description = array(
  4360. 'table' => 'stockcollectionprop',
  4361. // 'description' => 'TODO: please describe this table!',
  4362. 'fields' => array(
  4363. 'stockcollectionprop_id' => array(
  4364. // 'description' => 'TODO: please describe this field!',
  4365. 'type' => 'serial',
  4366. 'not null' => '1',
  4367. ),
  4368. 'stockcollection_id' => array(
  4369. // 'description' => 'TODO: please describe this field!',
  4370. 'type' => 'int',
  4371. 'not null' => '1',
  4372. ),
  4373. 'type_id' => array(
  4374. // 'description' => 'TODO: please describe this field!',
  4375. 'type' => 'int',
  4376. 'not null' => '1',
  4377. ),
  4378. 'value' => array(
  4379. // 'description' => 'TODO: please describe this field!',
  4380. 'type' => 'text',
  4381. 'not null' => '',
  4382. ),
  4383. 'rank' => array(
  4384. // 'description' => 'TODO: please describe this field!',
  4385. 'type' => 'int',
  4386. 'not null' => '1',
  4387. 'default' => '0',
  4388. ),
  4389. ),
  4390. 'primary key' => array(
  4391. '0' => 'stockcollectionprop_id',
  4392. ),
  4393. 'unique keys' => array(
  4394. 'stockcollectionprop_c1' => array(
  4395. '0' => 'stockcollection_id',
  4396. '1' => 'type_id',
  4397. '2' => 'rank',
  4398. ),
  4399. ),
  4400. 'indexes' => array(
  4401. 'stockcollectionprop_idx1' => array(
  4402. '0' => 'stockcollection_id',
  4403. ),
  4404. 'stockcollectionprop_idx2' => array(
  4405. '0' => 'type_id',
  4406. ),
  4407. ),
  4408. 'foreign keys' => array(
  4409. ),
  4410. );
  4411. return $description;
  4412. }
  4413. /**
  4414. * Implements hook_stockcollection_stock_schema()
  4415. * Purpose: To describe the structure of stockcollection_stock to tripal
  4416. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4417. * @see tripal_core.api.inc: tripal_core_chado_update()
  4418. * @see tripal_core.api.inc: tripal_core_chado_select()
  4419. *
  4420. * @return
  4421. * An array describing the current table
  4422. *
  4423. * @ingroup tripal_schema_api
  4424. *
  4425. */
  4426. function tripal_core_chado_stockcollection_stock_schema () {
  4427. $description = array();
  4428. $description = array(
  4429. 'table' => 'stockcollection_stock',
  4430. // 'description' => 'TODO: please describe this table!',
  4431. 'fields' => array(
  4432. 'stockcollection_stock_id' => array(
  4433. // 'description' => 'TODO: please describe this field!',
  4434. 'type' => 'serial',
  4435. 'not null' => '1',
  4436. ),
  4437. 'stockcollection_id' => array(
  4438. // 'description' => 'TODO: please describe this field!',
  4439. 'type' => 'int',
  4440. 'not null' => '1',
  4441. ),
  4442. 'stock_id' => array(
  4443. // 'description' => 'TODO: please describe this field!',
  4444. 'type' => 'int',
  4445. 'not null' => '1',
  4446. ),
  4447. ),
  4448. 'primary key' => array(
  4449. '0' => 'stockcollection_stock_id',
  4450. ),
  4451. 'unique keys' => array(
  4452. 'stockcollection_stock_c1' => array(
  4453. '0' => 'stockcollection_id',
  4454. '1' => 'stock_id',
  4455. ),
  4456. ),
  4457. 'indexes' => array(
  4458. 'stockcollection_stock_idx1' => array(
  4459. '0' => 'stockcollection_id',
  4460. ),
  4461. 'stockcollection_stock_idx2' => array(
  4462. '0' => 'stock_id',
  4463. ),
  4464. ),
  4465. 'foreign keys' => array(
  4466. ),
  4467. );
  4468. return $description;
  4469. }
  4470. /**
  4471. * Implements hook_public_feature_schema()
  4472. * Purpose: To describe the structure of public_feature to tripal
  4473. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4474. * @see tripal_core.api.inc: tripal_core_chado_update()
  4475. * @see tripal_core.api.inc: tripal_core_chado_select()
  4476. *
  4477. * @return
  4478. * An array describing the current table
  4479. *
  4480. * @ingroup tripal_schema_api
  4481. *
  4482. */
  4483. function tripal_core_chado_public_feature_schema () {
  4484. $description = array();
  4485. $description = array(
  4486. 'table' => 'public_feature',
  4487. // 'description' => 'TODO: please describe this table!',
  4488. 'fields' => array(
  4489. 'vid' => array(
  4490. // 'description' => 'TODO: please describe this field!',
  4491. 'type' => 'int',
  4492. 'unsigned' => '1',
  4493. 'not null' => '1',
  4494. 'default' => '0',
  4495. ),
  4496. 'nid' => array(
  4497. // 'description' => 'TODO: please describe this field!',
  4498. 'type' => 'int',
  4499. 'unsigned' => '1',
  4500. 'not null' => '1',
  4501. 'default' => '0',
  4502. ),
  4503. 'feature_id' => array(
  4504. // 'description' => 'TODO: please describe this field!',
  4505. 'type' => 'int',
  4506. 'not null' => '1',
  4507. 'default' => '0',
  4508. ),
  4509. 'sync_date' => array(
  4510. // 'description' => 'TODO: please describe this field!',
  4511. 'type' => 'int',
  4512. 'not null' => '',
  4513. ),
  4514. ),
  4515. 'primary key' => array(
  4516. '0' => 'nid',
  4517. ),
  4518. 'unique keys' => array(
  4519. 'nid_vid' => array(
  4520. '0' => 'nid',
  4521. '1' => 'vid',
  4522. ),
  4523. 'vid' => array(
  4524. '0' => 'vid',
  4525. ),
  4526. ),
  4527. 'indexes' => array(
  4528. 'feature_id' => array(
  4529. '0' => 'feature_id',
  4530. ),
  4531. ),
  4532. 'foreign keys' => array(
  4533. ),
  4534. );
  4535. return $description;
  4536. }
  4537. /**
  4538. * Implements hook_public_library_schema()
  4539. * Purpose: To describe the structure of public_library to tripal
  4540. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4541. * @see tripal_core.api.inc: tripal_core_chado_update()
  4542. * @see tripal_core.api.inc: tripal_core_chado_select()
  4543. *
  4544. * @return
  4545. * An array describing the current table
  4546. *
  4547. * @ingroup tripal_schema_api
  4548. *
  4549. */
  4550. function tripal_core_chado_public_library_schema () {
  4551. $description = array();
  4552. $description = array(
  4553. 'table' => 'public_library',
  4554. // 'description' => 'TODO: please describe this table!',
  4555. 'fields' => array(
  4556. 'vid' => array(
  4557. // 'description' => 'TODO: please describe this field!',
  4558. 'type' => 'int',
  4559. 'unsigned' => '1',
  4560. 'not null' => '1',
  4561. 'default' => '0',
  4562. ),
  4563. 'nid' => array(
  4564. // 'description' => 'TODO: please describe this field!',
  4565. 'type' => 'int',
  4566. 'unsigned' => '1',
  4567. 'not null' => '1',
  4568. 'default' => '0',
  4569. ),
  4570. 'library_id' => array(
  4571. // 'description' => 'TODO: please describe this field!',
  4572. 'type' => 'int',
  4573. 'not null' => '1',
  4574. 'default' => '0',
  4575. ),
  4576. ),
  4577. 'primary key' => array(
  4578. '0' => 'nid',
  4579. ),
  4580. 'unique keys' => array(
  4581. 'nid_vid' => array(
  4582. '0' => 'nid',
  4583. '1' => 'vid',
  4584. ),
  4585. 'vid' => array(
  4586. '0' => 'vid',
  4587. ),
  4588. ),
  4589. 'indexes' => array(
  4590. 'library_id' => array(
  4591. '0' => 'library_id',
  4592. ),
  4593. ),
  4594. 'foreign keys' => array(
  4595. ),
  4596. );
  4597. return $description;
  4598. }
  4599. /**
  4600. * Implements hook_public_organism_schema()
  4601. * Purpose: To describe the structure of public_organism to tripal
  4602. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4603. * @see tripal_core.api.inc: tripal_core_chado_update()
  4604. * @see tripal_core.api.inc: tripal_core_chado_select()
  4605. *
  4606. * @return
  4607. * An array describing the current table
  4608. *
  4609. * @ingroup tripal_schema_api
  4610. *
  4611. */
  4612. function tripal_core_chado_public_organism_schema () {
  4613. $description = array();
  4614. $description = array(
  4615. 'table' => 'public_organism',
  4616. // 'description' => 'TODO: please describe this table!',
  4617. 'fields' => array(
  4618. 'vid' => array(
  4619. // 'description' => 'TODO: please describe this field!',
  4620. 'type' => 'int',
  4621. 'unsigned' => '1',
  4622. 'not null' => '1',
  4623. 'default' => '0',
  4624. ),
  4625. 'nid' => array(
  4626. // 'description' => 'TODO: please describe this field!',
  4627. 'type' => 'int',
  4628. 'unsigned' => '1',
  4629. 'not null' => '1',
  4630. 'default' => '0',
  4631. ),
  4632. 'organism_id' => array(
  4633. // 'description' => 'TODO: please describe this field!',
  4634. 'type' => 'int',
  4635. 'not null' => '1',
  4636. 'default' => '0',
  4637. ),
  4638. ),
  4639. 'primary key' => array(
  4640. '0' => 'nid',
  4641. ),
  4642. 'unique keys' => array(
  4643. 'nid_vid' => array(
  4644. '0' => 'nid',
  4645. '1' => 'vid',
  4646. ),
  4647. 'vid' => array(
  4648. '0' => 'vid',
  4649. ),
  4650. ),
  4651. 'indexes' => array(
  4652. 'organism_id' => array(
  4653. '0' => 'organism_id',
  4654. ),
  4655. ),
  4656. 'foreign keys' => array(
  4657. ),
  4658. );
  4659. return $description;
  4660. }
  4661. /**
  4662. * Implements hook_pubprop_schema()
  4663. * Purpose: To describe the structure of pubprop to tripal
  4664. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4665. * @see tripal_core.api.inc: tripal_core_chado_update()
  4666. * @see tripal_core.api.inc: tripal_core_chado_select()
  4667. *
  4668. * @return
  4669. * An array describing the current table
  4670. *
  4671. * @ingroup tripal_schema_api
  4672. *
  4673. */
  4674. function tripal_core_chado_pubprop_schema () {
  4675. $description = array();
  4676. $description = array(
  4677. 'table' => 'pubprop',
  4678. // 'description' => 'TODO: please describe this table!',
  4679. 'fields' => array(
  4680. 'pubprop_id' => array(
  4681. // 'description' => 'TODO: please describe this field!',
  4682. 'type' => 'serial',
  4683. 'not null' => '1',
  4684. ),
  4685. 'pub_id' => array(
  4686. // 'description' => 'TODO: please describe this field!',
  4687. 'type' => 'int',
  4688. 'not null' => '1',
  4689. ),
  4690. 'type_id' => array(
  4691. // 'description' => 'TODO: please describe this field!',
  4692. 'type' => 'int',
  4693. 'not null' => '1',
  4694. ),
  4695. 'value' => array(
  4696. // 'description' => 'TODO: please describe this field!',
  4697. 'type' => 'text',
  4698. 'not null' => '1',
  4699. ),
  4700. 'rank' => array(
  4701. // 'description' => 'TODO: please describe this field!',
  4702. 'type' => 'int',
  4703. 'not null' => '',
  4704. ),
  4705. ),
  4706. 'primary key' => array(
  4707. '0' => 'pubprop_id',
  4708. ),
  4709. 'unique keys' => array(
  4710. 'pubprop_c1' => array(
  4711. '0' => 'pub_id',
  4712. '1' => 'type_id',
  4713. '2' => 'rank',
  4714. ),
  4715. ),
  4716. 'indexes' => array(
  4717. 'pubprop_idx1' => array(
  4718. '0' => 'pub_id',
  4719. ),
  4720. 'pubprop_idx2' => array(
  4721. '0' => 'type_id',
  4722. ),
  4723. ),
  4724. 'foreign keys' => array(
  4725. ),
  4726. );
  4727. return $description;
  4728. }
  4729. /**
  4730. * Implements hook_pubauthor_schema()
  4731. * Purpose: To describe the structure of pubauthor to tripal
  4732. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4733. * @see tripal_core.api.inc: tripal_core_chado_update()
  4734. * @see tripal_core.api.inc: tripal_core_chado_select()
  4735. *
  4736. * @return
  4737. * An array describing the current table
  4738. *
  4739. * @ingroup tripal_schema_api
  4740. *
  4741. */
  4742. function tripal_core_chado_pubauthor_schema () {
  4743. $description = array();
  4744. $description = array(
  4745. 'table' => 'pubauthor',
  4746. // 'description' => 'TODO: please describe this table!',
  4747. 'fields' => array(
  4748. 'pubauthor_id' => array(
  4749. // 'description' => 'TODO: please describe this field!',
  4750. 'type' => 'serial',
  4751. 'not null' => '1',
  4752. ),
  4753. 'pub_id' => array(
  4754. // 'description' => 'TODO: please describe this field!',
  4755. 'type' => 'int',
  4756. 'not null' => '1',
  4757. ),
  4758. 'rank' => array(
  4759. // 'description' => 'TODO: please describe this field!',
  4760. 'type' => 'int',
  4761. 'not null' => '1',
  4762. ),
  4763. 'editor' => array(
  4764. // 'description' => 'TODO: please describe this field!',
  4765. 'type' => 'boolean',
  4766. 'not null' => '',
  4767. 'default' => 'als',
  4768. ),
  4769. 'surname' => array(
  4770. // 'description' => 'TODO: please describe this field!',
  4771. 'type' => 'varchar',
  4772. 'length' => '100',
  4773. 'not null' => '1',
  4774. ),
  4775. 'givennames' => array(
  4776. // 'description' => 'TODO: please describe this field!',
  4777. 'type' => 'varchar',
  4778. 'length' => '100',
  4779. 'not null' => '',
  4780. ),
  4781. 'suffix' => array(
  4782. // 'description' => 'TODO: please describe this field!',
  4783. 'type' => 'varchar',
  4784. 'length' => '100',
  4785. 'not null' => '',
  4786. ),
  4787. ),
  4788. 'primary key' => array(
  4789. '0' => 'pubauthor_id',
  4790. ),
  4791. 'unique keys' => array(
  4792. 'pubauthor_c1' => array(
  4793. '0' => 'pub_id',
  4794. '1' => 'rank',
  4795. ),
  4796. ),
  4797. 'indexes' => array(
  4798. 'pubauthor_idx2' => array(
  4799. '0' => 'pub_id',
  4800. ),
  4801. ),
  4802. 'foreign keys' => array(
  4803. ),
  4804. );
  4805. return $description;
  4806. }
  4807. /**
  4808. * Implements hook_pub_relationship_schema()
  4809. * Purpose: To describe the structure of pub_relationship to tripal
  4810. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4811. * @see tripal_core.api.inc: tripal_core_chado_update()
  4812. * @see tripal_core.api.inc: tripal_core_chado_select()
  4813. *
  4814. * @return
  4815. * An array describing the current table
  4816. *
  4817. * @ingroup tripal_schema_api
  4818. *
  4819. */
  4820. function tripal_core_chado_pub_relationship_schema () {
  4821. $description = array();
  4822. $description = array(
  4823. 'table' => 'pub_relationship',
  4824. // 'description' => 'TODO: please describe this table!',
  4825. 'fields' => array(
  4826. 'pub_relationship_id' => array(
  4827. // 'description' => 'TODO: please describe this field!',
  4828. 'type' => 'serial',
  4829. 'not null' => '1',
  4830. ),
  4831. 'subject_id' => array(
  4832. // 'description' => 'TODO: please describe this field!',
  4833. 'type' => 'int',
  4834. 'not null' => '1',
  4835. ),
  4836. 'object_id' => array(
  4837. // 'description' => 'TODO: please describe this field!',
  4838. 'type' => 'int',
  4839. 'not null' => '1',
  4840. ),
  4841. 'type_id' => array(
  4842. // 'description' => 'TODO: please describe this field!',
  4843. 'type' => 'int',
  4844. 'not null' => '1',
  4845. ),
  4846. ),
  4847. 'primary key' => array(
  4848. '0' => 'pub_relationship_id',
  4849. ),
  4850. 'unique keys' => array(
  4851. 'pub_relationship_c1' => array(
  4852. '0' => 'subject_id',
  4853. '1' => 'object_id',
  4854. '2' => 'type_id',
  4855. ),
  4856. ),
  4857. 'indexes' => array(
  4858. 'pub_relationship_idx1' => array(
  4859. '0' => 'subject_id',
  4860. ),
  4861. 'pub_relationship_idx2' => array(
  4862. '0' => 'object_id',
  4863. ),
  4864. 'pub_relationship_idx3' => array(
  4865. '0' => 'type_id',
  4866. ),
  4867. ),
  4868. 'foreign keys' => array(
  4869. ),
  4870. );
  4871. return $description;
  4872. }
  4873. /**
  4874. * Implements hook_protocol_schema()
  4875. * Purpose: To describe the structure of protocol to tripal
  4876. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4877. * @see tripal_core.api.inc: tripal_core_chado_update()
  4878. * @see tripal_core.api.inc: tripal_core_chado_select()
  4879. *
  4880. * @return
  4881. * An array describing the current table
  4882. *
  4883. * @ingroup tripal_schema_api
  4884. *
  4885. */
  4886. function tripal_core_chado_protocol_schema () {
  4887. $description = array();
  4888. $description = array(
  4889. 'table' => 'protocol',
  4890. // 'description' => 'TODO: please describe this table!',
  4891. 'fields' => array(
  4892. 'protocol_id' => array(
  4893. // 'description' => 'TODO: please describe this field!',
  4894. 'type' => 'serial',
  4895. 'not null' => '1',
  4896. ),
  4897. 'type_id' => array(
  4898. // 'description' => 'TODO: please describe this field!',
  4899. 'type' => 'int',
  4900. 'not null' => '1',
  4901. ),
  4902. 'pub_id' => array(
  4903. // 'description' => 'TODO: please describe this field!',
  4904. 'type' => 'int',
  4905. 'not null' => '',
  4906. ),
  4907. 'dbxref_id' => array(
  4908. // 'description' => 'TODO: please describe this field!',
  4909. 'type' => 'int',
  4910. 'not null' => '',
  4911. ),
  4912. 'name' => array(
  4913. // 'description' => 'TODO: please describe this field!',
  4914. 'type' => 'text',
  4915. 'not null' => '1',
  4916. ),
  4917. 'uri' => array(
  4918. // 'description' => 'TODO: please describe this field!',
  4919. 'type' => 'text',
  4920. 'not null' => '',
  4921. ),
  4922. 'protocoldescription' => array(
  4923. // 'description' => 'TODO: please describe this field!',
  4924. 'type' => 'text',
  4925. 'not null' => '',
  4926. ),
  4927. 'hardwaredescription' => array(
  4928. // 'description' => 'TODO: please describe this field!',
  4929. 'type' => 'text',
  4930. 'not null' => '',
  4931. ),
  4932. 'softwaredescription' => array(
  4933. // 'description' => 'TODO: please describe this field!',
  4934. 'type' => 'text',
  4935. 'not null' => '',
  4936. ),
  4937. ),
  4938. 'primary key' => array(
  4939. '0' => 'protocol_id',
  4940. ),
  4941. 'unique keys' => array(
  4942. 'protocol_c1' => array(
  4943. '0' => 'name',
  4944. ),
  4945. ),
  4946. 'indexes' => array(
  4947. 'protocol_idx1' => array(
  4948. '0' => 'type_id',
  4949. ),
  4950. 'protocol_idx2' => array(
  4951. '0' => 'pub_id',
  4952. ),
  4953. 'protocol_idx3' => array(
  4954. '0' => 'dbxref_id',
  4955. ),
  4956. ),
  4957. 'foreign keys' => array(
  4958. ),
  4959. );
  4960. return $description;
  4961. }
  4962. /**
  4963. * Implements hook_protocolparam_schema()
  4964. * Purpose: To describe the structure of protocolparam to tripal
  4965. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4966. * @see tripal_core.api.inc: tripal_core_chado_update()
  4967. * @see tripal_core.api.inc: tripal_core_chado_select()
  4968. *
  4969. * @return
  4970. * An array describing the current table
  4971. *
  4972. * @ingroup tripal_schema_api
  4973. *
  4974. */
  4975. function tripal_core_chado_protocolparam_schema () {
  4976. $description = array();
  4977. $description = array(
  4978. 'table' => 'protocolparam',
  4979. // 'description' => 'TODO: please describe this table!',
  4980. 'fields' => array(
  4981. 'protocolparam_id' => array(
  4982. // 'description' => 'TODO: please describe this field!',
  4983. 'type' => 'serial',
  4984. 'not null' => '1',
  4985. ),
  4986. 'protocol_id' => array(
  4987. // 'description' => 'TODO: please describe this field!',
  4988. 'type' => 'int',
  4989. 'not null' => '1',
  4990. ),
  4991. 'name' => array(
  4992. // 'description' => 'TODO: please describe this field!',
  4993. 'type' => 'text',
  4994. 'not null' => '1',
  4995. ),
  4996. 'datatype_id' => array(
  4997. // 'description' => 'TODO: please describe this field!',
  4998. 'type' => 'int',
  4999. 'not null' => '',
  5000. ),
  5001. 'unittype_id' => array(
  5002. // 'description' => 'TODO: please describe this field!',
  5003. 'type' => 'int',
  5004. 'not null' => '',
  5005. ),
  5006. 'value' => array(
  5007. // 'description' => 'TODO: please describe this field!',
  5008. 'type' => 'text',
  5009. 'not null' => '',
  5010. ),
  5011. 'rank' => array(
  5012. // 'description' => 'TODO: please describe this field!',
  5013. 'type' => 'int',
  5014. 'not null' => '1',
  5015. 'default' => '0',
  5016. ),
  5017. ),
  5018. 'primary key' => array(
  5019. '0' => 'protocolparam_id',
  5020. ),
  5021. 'unique keys' => array(
  5022. ),
  5023. 'indexes' => array(
  5024. 'protocolparam_idx1' => array(
  5025. '0' => 'protocol_id',
  5026. ),
  5027. 'protocolparam_idx2' => array(
  5028. '0' => 'datatype_id',
  5029. ),
  5030. 'protocolparam_idx3' => array(
  5031. '0' => 'unittype_id',
  5032. ),
  5033. ),
  5034. 'foreign keys' => array(
  5035. ),
  5036. );
  5037. return $description;
  5038. }
  5039. /**
  5040. * Implements hook_pub_schema()
  5041. * Purpose: To describe the structure of pub to tripal
  5042. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5043. * @see tripal_core.api.inc: tripal_core_chado_update()
  5044. * @see tripal_core.api.inc: tripal_core_chado_select()
  5045. *
  5046. * @return
  5047. * An array describing the current table
  5048. *
  5049. * @ingroup tripal_schema_api
  5050. *
  5051. */
  5052. function tripal_core_chado_pub_schema () {
  5053. $description = array();
  5054. $description = array(
  5055. 'table' => 'pub',
  5056. // 'description' => 'TODO: please describe this table!',
  5057. 'fields' => array(
  5058. 'pub_id' => array(
  5059. // 'description' => 'TODO: please describe this field!',
  5060. 'type' => 'serial',
  5061. 'not null' => '1',
  5062. ),
  5063. 'title' => array(
  5064. // 'description' => 'TODO: please describe this field!',
  5065. 'type' => 'text',
  5066. 'not null' => '',
  5067. ),
  5068. 'volumetitle' => array(
  5069. // 'description' => 'TODO: please describe this field!',
  5070. 'type' => 'text',
  5071. 'not null' => '',
  5072. ),
  5073. 'volume' => array(
  5074. // 'description' => 'TODO: please describe this field!',
  5075. 'type' => 'varchar',
  5076. 'length' => '255',
  5077. 'not null' => '',
  5078. ),
  5079. 'series_name' => array(
  5080. // 'description' => 'TODO: please describe this field!',
  5081. 'type' => 'varchar',
  5082. 'length' => '255',
  5083. 'not null' => '',
  5084. ),
  5085. 'issue' => array(
  5086. // 'description' => 'TODO: please describe this field!',
  5087. 'type' => 'varchar',
  5088. 'length' => '255',
  5089. 'not null' => '',
  5090. ),
  5091. 'pyear' => array(
  5092. // 'description' => 'TODO: please describe this field!',
  5093. 'type' => 'varchar',
  5094. 'length' => '255',
  5095. 'not null' => '',
  5096. ),
  5097. 'pages' => array(
  5098. // 'description' => 'TODO: please describe this field!',
  5099. 'type' => 'varchar',
  5100. 'length' => '255',
  5101. 'not null' => '',
  5102. ),
  5103. 'miniref' => array(
  5104. // 'description' => 'TODO: please describe this field!',
  5105. 'type' => 'varchar',
  5106. 'length' => '255',
  5107. 'not null' => '',
  5108. ),
  5109. 'uniquename' => array(
  5110. // 'description' => 'TODO: please describe this field!',
  5111. 'type' => 'text',
  5112. 'not null' => '1',
  5113. ),
  5114. 'type_id' => array(
  5115. // 'description' => 'TODO: please describe this field!',
  5116. 'type' => 'int',
  5117. 'not null' => '1',
  5118. ),
  5119. 'is_obsolete' => array(
  5120. // 'description' => 'TODO: please describe this field!',
  5121. 'type' => 'boolean',
  5122. 'not null' => '',
  5123. 'default' => 'als',
  5124. ),
  5125. 'publisher' => array(
  5126. // 'description' => 'TODO: please describe this field!',
  5127. 'type' => 'varchar',
  5128. 'length' => '255',
  5129. 'not null' => '',
  5130. ),
  5131. 'pubplace' => array(
  5132. // 'description' => 'TODO: please describe this field!',
  5133. 'type' => 'varchar',
  5134. 'length' => '255',
  5135. 'not null' => '',
  5136. ),
  5137. ),
  5138. 'primary key' => array(
  5139. '0' => 'pub_id',
  5140. ),
  5141. 'unique keys' => array(
  5142. 'pub_c1' => array(
  5143. '0' => 'uniquename',
  5144. ),
  5145. ),
  5146. 'indexes' => array(
  5147. 'pub_idx1' => array(
  5148. '0' => 'type_id',
  5149. ),
  5150. ),
  5151. 'foreign keys' => array(
  5152. ),
  5153. );
  5154. return $description;
  5155. }
  5156. /**
  5157. * Implements hook_pub_dbxref_schema()
  5158. * Purpose: To describe the structure of pub_dbxref to tripal
  5159. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5160. * @see tripal_core.api.inc: tripal_core_chado_update()
  5161. * @see tripal_core.api.inc: tripal_core_chado_select()
  5162. *
  5163. * @return
  5164. * An array describing the current table
  5165. *
  5166. * @ingroup tripal_schema_api
  5167. *
  5168. */
  5169. function tripal_core_chado_pub_dbxref_schema () {
  5170. $description = array();
  5171. $description = array(
  5172. 'table' => 'pub_dbxref',
  5173. // 'description' => 'TODO: please describe this table!',
  5174. 'fields' => array(
  5175. 'pub_dbxref_id' => array(
  5176. // 'description' => 'TODO: please describe this field!',
  5177. 'type' => 'serial',
  5178. 'not null' => '1',
  5179. ),
  5180. 'pub_id' => array(
  5181. // 'description' => 'TODO: please describe this field!',
  5182. 'type' => 'int',
  5183. 'not null' => '1',
  5184. ),
  5185. 'dbxref_id' => array(
  5186. // 'description' => 'TODO: please describe this field!',
  5187. 'type' => 'int',
  5188. 'not null' => '1',
  5189. ),
  5190. 'is_current' => array(
  5191. // 'description' => 'TODO: please describe this field!',
  5192. 'type' => 'boolean',
  5193. 'not null' => '1',
  5194. 'default' => 'ru',
  5195. ),
  5196. ),
  5197. 'primary key' => array(
  5198. '0' => 'pub_dbxref_id',
  5199. ),
  5200. 'unique keys' => array(
  5201. 'pub_dbxref_c1' => array(
  5202. '0' => 'pub_id',
  5203. '1' => 'dbxref_id',
  5204. ),
  5205. ),
  5206. 'indexes' => array(
  5207. 'pub_dbxref_idx1' => array(
  5208. '0' => 'pub_id',
  5209. ),
  5210. 'pub_dbxref_idx2' => array(
  5211. '0' => 'dbxref_id',
  5212. ),
  5213. ),
  5214. 'foreign keys' => array(
  5215. ),
  5216. );
  5217. return $description;
  5218. }
  5219. /**
  5220. * Implements hook_quantification_schema()
  5221. * Purpose: To describe the structure of quantification to tripal
  5222. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5223. * @see tripal_core.api.inc: tripal_core_chado_update()
  5224. * @see tripal_core.api.inc: tripal_core_chado_select()
  5225. *
  5226. * @return
  5227. * An array describing the current table
  5228. *
  5229. * @ingroup tripal_schema_api
  5230. *
  5231. */
  5232. function tripal_core_chado_quantification_schema () {
  5233. $description = array();
  5234. $description = array(
  5235. 'table' => 'quantification',
  5236. // 'description' => 'TODO: please describe this table!',
  5237. 'fields' => array(
  5238. 'quantification_id' => array(
  5239. // 'description' => 'TODO: please describe this field!',
  5240. 'type' => 'serial',
  5241. 'not null' => '1',
  5242. ),
  5243. 'acquisition_id' => array(
  5244. // 'description' => 'TODO: please describe this field!',
  5245. 'type' => 'int',
  5246. 'not null' => '1',
  5247. ),
  5248. 'operator_id' => array(
  5249. // 'description' => 'TODO: please describe this field!',
  5250. 'type' => 'int',
  5251. 'not null' => '',
  5252. ),
  5253. 'protocol_id' => array(
  5254. // 'description' => 'TODO: please describe this field!',
  5255. 'type' => 'int',
  5256. 'not null' => '',
  5257. ),
  5258. 'analysis_id' => array(
  5259. // 'description' => 'TODO: please describe this field!',
  5260. 'type' => 'int',
  5261. 'not null' => '1',
  5262. ),
  5263. 'quantificationdate' => array(
  5264. // 'description' => 'TODO: please describe this field!',
  5265. 'type' => 'datetime',
  5266. 'not null' => '',
  5267. 'default' => 'ow(',
  5268. ),
  5269. 'name' => array(
  5270. // 'description' => 'TODO: please describe this field!',
  5271. 'type' => 'text',
  5272. 'not null' => '',
  5273. ),
  5274. 'uri' => array(
  5275. // 'description' => 'TODO: please describe this field!',
  5276. 'type' => 'text',
  5277. 'not null' => '',
  5278. ),
  5279. ),
  5280. 'primary key' => array(
  5281. '0' => 'quantification_id',
  5282. ),
  5283. 'unique keys' => array(
  5284. 'quantification_c1' => array(
  5285. '0' => 'name',
  5286. '1' => 'analysis_id',
  5287. ),
  5288. ),
  5289. 'indexes' => array(
  5290. 'quantification_idx1' => array(
  5291. '0' => 'acquisition_id',
  5292. ),
  5293. 'quantification_idx2' => array(
  5294. '0' => 'operator_id',
  5295. ),
  5296. 'quantification_idx3' => array(
  5297. '0' => 'protocol_id',
  5298. ),
  5299. 'quantification_idx4' => array(
  5300. '0' => 'analysis_id',
  5301. ),
  5302. ),
  5303. 'foreign keys' => array(
  5304. ),
  5305. );
  5306. return $description;
  5307. }
  5308. /**
  5309. * Implements hook_quantification_relationship_schema()
  5310. * Purpose: To describe the structure of quantification_relationship to tripal
  5311. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5312. * @see tripal_core.api.inc: tripal_core_chado_update()
  5313. * @see tripal_core.api.inc: tripal_core_chado_select()
  5314. *
  5315. * @return
  5316. * An array describing the current table
  5317. *
  5318. * @ingroup tripal_schema_api
  5319. *
  5320. */
  5321. function tripal_core_chado_quantification_relationship_schema () {
  5322. $description = array();
  5323. $description = array(
  5324. 'table' => 'quantification_relationship',
  5325. // 'description' => 'TODO: please describe this table!',
  5326. 'fields' => array(
  5327. 'quantification_relationship_id' => array(
  5328. // 'description' => 'TODO: please describe this field!',
  5329. 'type' => 'serial',
  5330. 'not null' => '1',
  5331. ),
  5332. 'subject_id' => array(
  5333. // 'description' => 'TODO: please describe this field!',
  5334. 'type' => 'int',
  5335. 'not null' => '1',
  5336. ),
  5337. 'type_id' => array(
  5338. // 'description' => 'TODO: please describe this field!',
  5339. 'type' => 'int',
  5340. 'not null' => '1',
  5341. ),
  5342. 'object_id' => array(
  5343. // 'description' => 'TODO: please describe this field!',
  5344. 'type' => 'int',
  5345. 'not null' => '1',
  5346. ),
  5347. ),
  5348. 'primary key' => array(
  5349. '0' => 'quantification_relationship_id',
  5350. ),
  5351. 'unique keys' => array(
  5352. 'quantification_relationship_c1' => array(
  5353. '0' => 'subject_id',
  5354. '1' => 'object_id',
  5355. '2' => 'type_id',
  5356. ),
  5357. ),
  5358. 'indexes' => array(
  5359. 'quantification_relationship_idx1' => array(
  5360. '0' => 'subject_id',
  5361. ),
  5362. 'quantification_relationship_idx2' => array(
  5363. '0' => 'type_id',
  5364. ),
  5365. 'quantification_relationship_idx3' => array(
  5366. '0' => 'object_id',
  5367. ),
  5368. ),
  5369. 'foreign keys' => array(
  5370. ),
  5371. );
  5372. return $description;
  5373. }
  5374. /**
  5375. * Implements hook_stock_pub_schema()
  5376. * Purpose: To describe the structure of stock_pub to tripal
  5377. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5378. * @see tripal_core.api.inc: tripal_core_chado_update()
  5379. * @see tripal_core.api.inc: tripal_core_chado_select()
  5380. *
  5381. * @return
  5382. * An array describing the current table
  5383. *
  5384. * @ingroup tripal_schema_api
  5385. *
  5386. */
  5387. function tripal_core_chado_stock_pub_schema () {
  5388. $description = array();
  5389. $description = array(
  5390. 'table' => 'stock_pub',
  5391. // 'description' => 'TODO: please describe this table!',
  5392. 'fields' => array(
  5393. 'stock_pub_id' => array(
  5394. // 'description' => 'TODO: please describe this field!',
  5395. 'type' => 'serial',
  5396. 'not null' => '1',
  5397. ),
  5398. 'stock_id' => array(
  5399. // 'description' => 'TODO: please describe this field!',
  5400. 'type' => 'int',
  5401. 'not null' => '1',
  5402. ),
  5403. 'pub_id' => array(
  5404. // 'description' => 'TODO: please describe this field!',
  5405. 'type' => 'int',
  5406. 'not null' => '1',
  5407. ),
  5408. ),
  5409. 'primary key' => array(
  5410. '0' => 'stock_pub_id',
  5411. ),
  5412. 'unique keys' => array(
  5413. 'stock_pub_c1' => array(
  5414. '0' => 'stock_id',
  5415. '1' => 'pub_id',
  5416. ),
  5417. ),
  5418. 'indexes' => array(
  5419. 'stock_pub_idx1' => array(
  5420. '0' => 'stock_id',
  5421. ),
  5422. 'stock_pub_idx2' => array(
  5423. '0' => 'pub_id',
  5424. ),
  5425. ),
  5426. 'foreign keys' => array(
  5427. ),
  5428. );
  5429. return $description;
  5430. }
  5431. /**
  5432. * Implements hook_stock_relationship_schema()
  5433. * Purpose: To describe the structure of stock_relationship to tripal
  5434. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5435. * @see tripal_core.api.inc: tripal_core_chado_update()
  5436. * @see tripal_core.api.inc: tripal_core_chado_select()
  5437. *
  5438. * @return
  5439. * An array describing the current table
  5440. *
  5441. * @ingroup tripal_schema_api
  5442. *
  5443. */
  5444. function tripal_core_chado_stock_relationship_schema () {
  5445. $description = array();
  5446. $description = array(
  5447. 'table' => 'stock_relationship',
  5448. // 'description' => 'TODO: please describe this table!',
  5449. 'fields' => array(
  5450. 'stock_relationship_id' => array(
  5451. // 'description' => 'TODO: please describe this field!',
  5452. 'type' => 'serial',
  5453. 'not null' => '1',
  5454. ),
  5455. 'subject_id' => array(
  5456. // 'description' => 'TODO: please describe this field!',
  5457. 'type' => 'int',
  5458. 'not null' => '1',
  5459. ),
  5460. 'object_id' => array(
  5461. // 'description' => 'TODO: please describe this field!',
  5462. 'type' => 'int',
  5463. 'not null' => '1',
  5464. ),
  5465. 'type_id' => array(
  5466. // 'description' => 'TODO: please describe this field!',
  5467. 'type' => 'int',
  5468. 'not null' => '1',
  5469. ),
  5470. 'value' => array(
  5471. // 'description' => 'TODO: please describe this field!',
  5472. 'type' => 'text',
  5473. 'not null' => '',
  5474. ),
  5475. 'rank' => array(
  5476. // 'description' => 'TODO: please describe this field!',
  5477. 'type' => 'int',
  5478. 'not null' => '1',
  5479. 'default' => '0',
  5480. ),
  5481. ),
  5482. 'primary key' => array(
  5483. '0' => 'stock_relationship_id',
  5484. ),
  5485. 'unique keys' => array(
  5486. 'stock_relationship_c1' => array(
  5487. '0' => 'subject_id',
  5488. '1' => 'object_id',
  5489. '2' => 'type_id',
  5490. '3' => 'rank',
  5491. ),
  5492. ),
  5493. 'indexes' => array(
  5494. 'stock_relationship_idx1' => array(
  5495. '0' => 'subject_id',
  5496. ),
  5497. 'stock_relationship_idx2' => array(
  5498. '0' => 'object_id',
  5499. ),
  5500. 'stock_relationship_idx3' => array(
  5501. '0' => 'type_id',
  5502. ),
  5503. ),
  5504. 'foreign keys' => array(
  5505. ),
  5506. );
  5507. return $description;
  5508. }
  5509. /**
  5510. * Implements hook_stock_relationship_pub_schema()
  5511. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5512. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5513. * @see tripal_core.api.inc: tripal_core_chado_update()
  5514. * @see tripal_core.api.inc: tripal_core_chado_select()
  5515. *
  5516. * @return
  5517. * An array describing the current table
  5518. *
  5519. * @ingroup tripal_schema_api
  5520. *
  5521. */
  5522. function tripal_core_chado_stock_relationship_pub_schema () {
  5523. $description = array();
  5524. $description = array(
  5525. 'table' => 'stock_relationship_pub',
  5526. // 'description' => 'TODO: please describe this table!',
  5527. 'fields' => array(
  5528. 'stock_relationship_pub_id' => array(
  5529. // 'description' => 'TODO: please describe this field!',
  5530. 'type' => 'serial',
  5531. 'not null' => '1',
  5532. ),
  5533. 'stock_relationship_id' => array(
  5534. // 'description' => 'TODO: please describe this field!',
  5535. 'type' => 'int',
  5536. 'not null' => '1',
  5537. ),
  5538. 'pub_id' => array(
  5539. // 'description' => 'TODO: please describe this field!',
  5540. 'type' => 'int',
  5541. 'not null' => '1',
  5542. ),
  5543. ),
  5544. 'primary key' => array(
  5545. '0' => 'stock_relationship_pub_id',
  5546. ),
  5547. 'unique keys' => array(
  5548. 'stock_relationship_pub_c1' => array(
  5549. '0' => 'stock_relationship_id',
  5550. '1' => 'pub_id',
  5551. ),
  5552. ),
  5553. 'indexes' => array(
  5554. 'stock_relationship_pub_idx1' => array(
  5555. '0' => 'stock_relationship_id',
  5556. ),
  5557. 'stock_relationship_pub_idx2' => array(
  5558. '0' => 'pub_id',
  5559. ),
  5560. ),
  5561. 'foreign keys' => array(
  5562. ),
  5563. );
  5564. return $description;
  5565. }
  5566. /**
  5567. * Implements hook_stockcollection_schema()
  5568. * Purpose: To describe the structure of stockcollection to tripal
  5569. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5570. * @see tripal_core.api.inc: tripal_core_chado_update()
  5571. * @see tripal_core.api.inc: tripal_core_chado_select()
  5572. *
  5573. * @return
  5574. * An array describing the current table
  5575. *
  5576. * @ingroup tripal_schema_api
  5577. *
  5578. */
  5579. function tripal_core_chado_stockcollection_schema () {
  5580. $description = array();
  5581. $description = array(
  5582. 'table' => 'stockcollection',
  5583. // 'description' => 'TODO: please describe this table!',
  5584. 'fields' => array(
  5585. 'stockcollection_id' => array(
  5586. // 'description' => 'TODO: please describe this field!',
  5587. 'type' => 'serial',
  5588. 'not null' => '1',
  5589. ),
  5590. 'type_id' => array(
  5591. // 'description' => 'TODO: please describe this field!',
  5592. 'type' => 'int',
  5593. 'not null' => '1',
  5594. ),
  5595. 'contact_id' => array(
  5596. // 'description' => 'TODO: please describe this field!',
  5597. 'type' => 'int',
  5598. 'not null' => '',
  5599. ),
  5600. 'name' => array(
  5601. // 'description' => 'TODO: please describe this field!',
  5602. 'type' => 'varchar',
  5603. 'length' => '255',
  5604. 'not null' => '',
  5605. ),
  5606. 'uniquename' => array(
  5607. // 'description' => 'TODO: please describe this field!',
  5608. 'type' => 'text',
  5609. 'not null' => '1',
  5610. ),
  5611. ),
  5612. 'primary key' => array(
  5613. '0' => 'stockcollection_id',
  5614. ),
  5615. 'unique keys' => array(
  5616. 'stockcollection_c1' => array(
  5617. '0' => 'uniquename',
  5618. '1' => 'type_id',
  5619. ),
  5620. ),
  5621. 'indexes' => array(
  5622. 'stockcollection_idx1' => array(
  5623. '0' => 'contact_id',
  5624. ),
  5625. 'stockcollection_idx2' => array(
  5626. '0' => 'type_id',
  5627. ),
  5628. 'stockcollection_idx3' => array(
  5629. '0' => 'uniquename',
  5630. ),
  5631. 'stockcollection_name_ind1' => array(
  5632. '0' => 'name',
  5633. ),
  5634. ),
  5635. 'foreign keys' => array(
  5636. ),
  5637. );
  5638. return $description;
  5639. }
  5640. /**
  5641. * Implements hook_stock_genotype_schema()
  5642. * Purpose: To describe the structure of stock_genotype to tripal
  5643. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5644. * @see tripal_core.api.inc: tripal_core_chado_update()
  5645. * @see tripal_core.api.inc: tripal_core_chado_select()
  5646. *
  5647. * @return
  5648. * An array describing the current table
  5649. *
  5650. * @ingroup tripal_schema_api
  5651. *
  5652. */
  5653. function tripal_core_chado_stock_genotype_schema () {
  5654. $description = array();
  5655. $description = array(
  5656. 'table' => 'stock_genotype',
  5657. // 'description' => 'TODO: please describe this table!',
  5658. 'fields' => array(
  5659. 'stock_genotype_id' => array(
  5660. // 'description' => 'TODO: please describe this field!',
  5661. 'type' => 'serial',
  5662. 'not null' => '1',
  5663. ),
  5664. 'stock_id' => array(
  5665. // 'description' => 'TODO: please describe this field!',
  5666. 'type' => 'int',
  5667. 'not null' => '1',
  5668. ),
  5669. 'genotype_id' => array(
  5670. // 'description' => 'TODO: please describe this field!',
  5671. 'type' => 'int',
  5672. 'not null' => '1',
  5673. ),
  5674. ),
  5675. 'primary key' => array(
  5676. '0' => 'stock_genotype_id',
  5677. ),
  5678. 'unique keys' => array(
  5679. 'stock_genotype_c1' => array(
  5680. '0' => 'stock_id',
  5681. '1' => 'genotype_id',
  5682. ),
  5683. ),
  5684. 'indexes' => array(
  5685. 'stock_genotype_idx1' => array(
  5686. '0' => 'stock_id',
  5687. ),
  5688. 'stock_genotype_idx2' => array(
  5689. '0' => 'genotype_id',
  5690. ),
  5691. ),
  5692. 'foreign keys' => array(
  5693. ),
  5694. );
  5695. return $description;
  5696. }
  5697. /**
  5698. * Implements hook_stock_dbxref_schema()
  5699. * Purpose: To describe the structure of stock_dbxref to tripal
  5700. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5701. * @see tripal_core.api.inc: tripal_core_chado_update()
  5702. * @see tripal_core.api.inc: tripal_core_chado_select()
  5703. *
  5704. * @return
  5705. * An array describing the current table
  5706. *
  5707. * @ingroup tripal_schema_api
  5708. *
  5709. */
  5710. function tripal_core_chado_stock_dbxref_schema () {
  5711. $description = array();
  5712. $description = array(
  5713. 'table' => 'stock_dbxref',
  5714. // 'description' => 'TODO: please describe this table!',
  5715. 'fields' => array(
  5716. 'stock_dbxref_id' => array(
  5717. // 'description' => 'TODO: please describe this field!',
  5718. 'type' => 'serial',
  5719. 'not null' => '1',
  5720. ),
  5721. 'stock_id' => array(
  5722. // 'description' => 'TODO: please describe this field!',
  5723. 'type' => 'int',
  5724. 'not null' => '1',
  5725. ),
  5726. 'dbxref_id' => array(
  5727. // 'description' => 'TODO: please describe this field!',
  5728. 'type' => 'int',
  5729. 'not null' => '1',
  5730. ),
  5731. 'is_current' => array(
  5732. // 'description' => 'TODO: please describe this field!',
  5733. 'type' => 'boolean',
  5734. 'not null' => '1',
  5735. 'default' => 'ru',
  5736. ),
  5737. ),
  5738. 'primary key' => array(
  5739. '0' => 'stock_dbxref_id',
  5740. ),
  5741. 'unique keys' => array(
  5742. 'stock_dbxref_c1' => array(
  5743. '0' => 'stock_id',
  5744. '1' => 'dbxref_id',
  5745. ),
  5746. ),
  5747. 'indexes' => array(
  5748. 'stock_dbxref_idx1' => array(
  5749. '0' => 'stock_id',
  5750. ),
  5751. 'stock_dbxref_idx2' => array(
  5752. '0' => 'dbxref_id',
  5753. ),
  5754. ),
  5755. 'foreign keys' => array(
  5756. ),
  5757. );
  5758. return $description;
  5759. }
  5760. /**
  5761. * Implements hook_quantificationprop_schema()
  5762. * Purpose: To describe the structure of quantificationprop to tripal
  5763. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5764. * @see tripal_core.api.inc: tripal_core_chado_update()
  5765. * @see tripal_core.api.inc: tripal_core_chado_select()
  5766. *
  5767. * @return
  5768. * An array describing the current table
  5769. *
  5770. * @ingroup tripal_schema_api
  5771. *
  5772. */
  5773. function tripal_core_chado_quantificationprop_schema () {
  5774. $description = array();
  5775. $description = array(
  5776. 'table' => 'quantificationprop',
  5777. // 'description' => 'TODO: please describe this table!',
  5778. 'fields' => array(
  5779. 'quantificationprop_id' => array(
  5780. // 'description' => 'TODO: please describe this field!',
  5781. 'type' => 'serial',
  5782. 'not null' => '1',
  5783. ),
  5784. 'quantification_id' => array(
  5785. // 'description' => 'TODO: please describe this field!',
  5786. 'type' => 'int',
  5787. 'not null' => '1',
  5788. ),
  5789. 'type_id' => array(
  5790. // 'description' => 'TODO: please describe this field!',
  5791. 'type' => 'int',
  5792. 'not null' => '1',
  5793. ),
  5794. 'value' => array(
  5795. // 'description' => 'TODO: please describe this field!',
  5796. 'type' => 'text',
  5797. 'not null' => '',
  5798. ),
  5799. 'rank' => array(
  5800. // 'description' => 'TODO: please describe this field!',
  5801. 'type' => 'int',
  5802. 'not null' => '1',
  5803. 'default' => '0',
  5804. ),
  5805. ),
  5806. 'primary key' => array(
  5807. '0' => 'quantificationprop_id',
  5808. ),
  5809. 'unique keys' => array(
  5810. 'quantificationprop_c1' => array(
  5811. '0' => 'quantification_id',
  5812. '1' => 'type_id',
  5813. '2' => 'rank',
  5814. ),
  5815. ),
  5816. 'indexes' => array(
  5817. 'quantificationprop_idx1' => array(
  5818. '0' => 'quantification_id',
  5819. ),
  5820. 'quantificationprop_idx2' => array(
  5821. '0' => 'type_id',
  5822. ),
  5823. ),
  5824. 'foreign keys' => array(
  5825. ),
  5826. );
  5827. return $description;
  5828. }
  5829. /**
  5830. * Implements hook_stats_paths_to_root_schema()
  5831. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5832. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5833. * @see tripal_core.api.inc: tripal_core_chado_update()
  5834. * @see tripal_core.api.inc: tripal_core_chado_select()
  5835. *
  5836. * @return
  5837. * An array describing the current table
  5838. *
  5839. * @ingroup tripal_schema_api
  5840. *
  5841. */
  5842. function tripal_core_chado_stats_paths_to_root_schema () {
  5843. $description = array();
  5844. $description = array(
  5845. 'table' => 'stats_paths_to_root',
  5846. // 'description' => 'TODO: please describe this table!',
  5847. 'fields' => array(
  5848. 'cvterm_id' => array(
  5849. // 'description' => 'TODO: please describe this field!',
  5850. 'type' => 'int',
  5851. 'not null' => '',
  5852. ),
  5853. 'total_paths' => array(
  5854. // 'description' => 'TODO: please describe this field!',
  5855. 'type' => 'int',
  5856. 'size' => 'big',
  5857. 'not null' => '',
  5858. ),
  5859. 'avg_distance' => array(
  5860. // 'description' => 'TODO: please describe this field!',
  5861. 'type' => 'numeric',
  5862. 'not null' => '',
  5863. 'precision' => '0',
  5864. 'scale' => '0',
  5865. ),
  5866. 'min_distance' => array(
  5867. // 'description' => 'TODO: please describe this field!',
  5868. 'type' => 'int',
  5869. 'not null' => '',
  5870. ),
  5871. 'max_distance' => array(
  5872. // 'description' => 'TODO: please describe this field!',
  5873. 'type' => 'int',
  5874. 'not null' => '',
  5875. ),
  5876. ),
  5877. 'primary key' => array(
  5878. ),
  5879. 'unique keys' => array(
  5880. ),
  5881. 'indexes' => array(
  5882. ),
  5883. 'foreign keys' => array(
  5884. ),
  5885. );
  5886. return $description;
  5887. }
  5888. /**
  5889. * Implements hook_stock_schema()
  5890. * Purpose: To describe the structure of stock to tripal
  5891. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5892. * @see tripal_core.api.inc: tripal_core_chado_update()
  5893. * @see tripal_core.api.inc: tripal_core_chado_select()
  5894. *
  5895. * @return
  5896. * An array describing the current table
  5897. *
  5898. * @ingroup tripal_schema_api
  5899. *
  5900. */
  5901. function tripal_core_chado_stock_schema () {
  5902. $description = array();
  5903. $description = array(
  5904. 'table' => 'stock',
  5905. // 'description' => 'TODO: please describe this table!',
  5906. 'fields' => array(
  5907. 'stock_id' => array(
  5908. // 'description' => 'TODO: please describe this field!',
  5909. 'type' => 'serial',
  5910. 'not null' => '1',
  5911. ),
  5912. 'dbxref_id' => array(
  5913. // 'description' => 'TODO: please describe this field!',
  5914. 'type' => 'int',
  5915. 'not null' => '',
  5916. ),
  5917. 'organism_id' => array(
  5918. // 'description' => 'TODO: please describe this field!',
  5919. 'type' => 'int',
  5920. 'not null' => '1',
  5921. ),
  5922. 'name' => array(
  5923. // 'description' => 'TODO: please describe this field!',
  5924. 'type' => 'varchar',
  5925. 'length' => '255',
  5926. 'not null' => '',
  5927. ),
  5928. 'uniquename' => array(
  5929. // 'description' => 'TODO: please describe this field!',
  5930. 'type' => 'text',
  5931. 'not null' => '1',
  5932. ),
  5933. 'description' => array(
  5934. // 'description' => 'TODO: please describe this field!',
  5935. 'type' => 'text',
  5936. 'not null' => '',
  5937. ),
  5938. 'type_id' => array(
  5939. // 'description' => 'TODO: please describe this field!',
  5940. 'type' => 'int',
  5941. 'not null' => '1',
  5942. ),
  5943. 'is_obsolete' => array(
  5944. // 'description' => 'TODO: please describe this field!',
  5945. 'type' => 'boolean',
  5946. 'not null' => '1',
  5947. 'default' => 'als',
  5948. ),
  5949. ),
  5950. 'primary key' => array(
  5951. '0' => 'stock_id',
  5952. ),
  5953. 'unique keys' => array(
  5954. 'stock_c1' => array(
  5955. '0' => 'organism_id',
  5956. '1' => 'uniquename',
  5957. '2' => 'type_id',
  5958. ),
  5959. ),
  5960. 'indexes' => array(
  5961. 'stock_idx1' => array(
  5962. '0' => 'dbxref_id',
  5963. ),
  5964. 'stock_idx2' => array(
  5965. '0' => 'organism_id',
  5966. ),
  5967. 'stock_idx3' => array(
  5968. '0' => 'type_id',
  5969. ),
  5970. 'stock_idx4' => array(
  5971. '0' => 'uniquename',
  5972. ),
  5973. 'stock_name_ind1' => array(
  5974. '0' => 'name',
  5975. ),
  5976. ),
  5977. 'foreign keys' => array(
  5978. ),
  5979. );
  5980. return $description;
  5981. }
  5982. /**
  5983. * Implements hook_stock_cvterm_schema()
  5984. * Purpose: To describe the structure of stock_cvterm to tripal
  5985. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5986. * @see tripal_core.api.inc: tripal_core_chado_update()
  5987. * @see tripal_core.api.inc: tripal_core_chado_select()
  5988. *
  5989. * @return
  5990. * An array describing the current table
  5991. *
  5992. * @ingroup tripal_schema_api
  5993. *
  5994. */
  5995. function tripal_core_chado_stock_cvterm_schema () {
  5996. $description = array();
  5997. $description = array(
  5998. 'table' => 'stock_cvterm',
  5999. // 'description' => 'TODO: please describe this table!',
  6000. 'fields' => array(
  6001. 'stock_cvterm_id' => array(
  6002. // 'description' => 'TODO: please describe this field!',
  6003. 'type' => 'serial',
  6004. 'not null' => '1',
  6005. ),
  6006. 'stock_id' => array(
  6007. // 'description' => 'TODO: please describe this field!',
  6008. 'type' => 'int',
  6009. 'not null' => '1',
  6010. ),
  6011. 'cvterm_id' => array(
  6012. // 'description' => 'TODO: please describe this field!',
  6013. 'type' => 'int',
  6014. 'not null' => '1',
  6015. ),
  6016. 'pub_id' => array(
  6017. // 'description' => 'TODO: please describe this field!',
  6018. 'type' => 'int',
  6019. 'not null' => '1',
  6020. ),
  6021. ),
  6022. 'primary key' => array(
  6023. '0' => 'stock_cvterm_id',
  6024. ),
  6025. 'unique keys' => array(
  6026. 'stock_cvterm_c1' => array(
  6027. '0' => 'stock_id',
  6028. '1' => 'cvterm_id',
  6029. '2' => 'pub_id',
  6030. ),
  6031. ),
  6032. 'indexes' => array(
  6033. 'stock_cvterm_idx1' => array(
  6034. '0' => 'stock_id',
  6035. ),
  6036. 'stock_cvterm_idx2' => array(
  6037. '0' => 'cvterm_id',
  6038. ),
  6039. 'stock_cvterm_idx3' => array(
  6040. '0' => 'pub_id',
  6041. ),
  6042. ),
  6043. 'foreign keys' => array(
  6044. ),
  6045. );
  6046. return $description;
  6047. }
  6048. /**
  6049. * Implements hook_feature_synonym_schema()
  6050. * Purpose: To describe the structure of feature_synonym to tripal
  6051. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6052. * @see tripal_core.api.inc: tripal_core_chado_update()
  6053. * @see tripal_core.api.inc: tripal_core_chado_select()
  6054. *
  6055. * @return
  6056. * An array describing the current table
  6057. *
  6058. * @ingroup tripal_schema_api
  6059. *
  6060. */
  6061. function tripal_core_chado_feature_synonym_schema () {
  6062. $description = array();
  6063. $description = array(
  6064. 'table' => 'feature_synonym',
  6065. // 'description' => 'TODO: please describe this table!',
  6066. 'fields' => array(
  6067. 'feature_synonym_id' => array(
  6068. // 'description' => 'TODO: please describe this field!',
  6069. 'type' => 'serial',
  6070. 'not null' => '1',
  6071. ),
  6072. 'synonym_id' => array(
  6073. // 'description' => 'TODO: please describe this field!',
  6074. 'type' => 'int',
  6075. 'not null' => '1',
  6076. ),
  6077. 'feature_id' => array(
  6078. // 'description' => 'TODO: please describe this field!',
  6079. 'type' => 'int',
  6080. 'not null' => '1',
  6081. ),
  6082. 'pub_id' => array(
  6083. // 'description' => 'TODO: please describe this field!',
  6084. 'type' => 'int',
  6085. 'not null' => '1',
  6086. ),
  6087. 'is_current' => array(
  6088. // 'description' => 'TODO: please describe this field!',
  6089. 'type' => 'boolean',
  6090. 'not null' => '1',
  6091. 'default' => 'als',
  6092. ),
  6093. 'is_internal' => array(
  6094. // 'description' => 'TODO: please describe this field!',
  6095. 'type' => 'boolean',
  6096. 'not null' => '1',
  6097. 'default' => 'als',
  6098. ),
  6099. ),
  6100. 'primary key' => array(
  6101. '0' => 'feature_synonym_id',
  6102. ),
  6103. 'unique keys' => array(
  6104. 'feature_synonym_c1' => array(
  6105. '0' => 'synonym_id',
  6106. '1' => 'feature_id',
  6107. '2' => 'pub_id',
  6108. ),
  6109. ),
  6110. 'indexes' => array(
  6111. 'feature_synonym_idx1' => array(
  6112. '0' => 'synonym_id',
  6113. ),
  6114. 'feature_synonym_idx2' => array(
  6115. '0' => 'feature_id',
  6116. ),
  6117. 'feature_synonym_idx3' => array(
  6118. '0' => 'pub_id',
  6119. ),
  6120. ),
  6121. 'foreign keys' => array(
  6122. ),
  6123. );
  6124. return $description;
  6125. }
  6126. /**
  6127. * Implements hook_feature_relationshipprop_pub_schema()
  6128. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6129. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6130. * @see tripal_core.api.inc: tripal_core_chado_update()
  6131. * @see tripal_core.api.inc: tripal_core_chado_select()
  6132. *
  6133. * @return
  6134. * An array describing the current table
  6135. *
  6136. * @ingroup tripal_schema_api
  6137. *
  6138. */
  6139. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6140. $description = array();
  6141. $description = array(
  6142. 'table' => 'feature_relationshipprop_pub',
  6143. // 'description' => 'TODO: please describe this table!',
  6144. 'fields' => array(
  6145. 'feature_relationshipprop_pub_id' => array(
  6146. // 'description' => 'TODO: please describe this field!',
  6147. 'type' => 'serial',
  6148. 'not null' => '1',
  6149. ),
  6150. 'feature_relationshipprop_id' => array(
  6151. // 'description' => 'TODO: please describe this field!',
  6152. 'type' => 'int',
  6153. 'not null' => '1',
  6154. ),
  6155. 'pub_id' => array(
  6156. // 'description' => 'TODO: please describe this field!',
  6157. 'type' => 'int',
  6158. 'not null' => '1',
  6159. ),
  6160. ),
  6161. 'primary key' => array(
  6162. '0' => 'feature_relationshipprop_pub_id',
  6163. ),
  6164. 'unique keys' => array(
  6165. 'feature_relationshipprop_pub_c1' => array(
  6166. '0' => 'feature_relationshipprop_id',
  6167. '1' => 'pub_id',
  6168. ),
  6169. ),
  6170. 'indexes' => array(
  6171. 'feature_relationshipprop_pub_idx1' => array(
  6172. '0' => 'feature_relationshipprop_id',
  6173. ),
  6174. 'feature_relationshipprop_pub_idx2' => array(
  6175. '0' => 'pub_id',
  6176. ),
  6177. ),
  6178. 'foreign keys' => array(
  6179. ),
  6180. );
  6181. return $description;
  6182. }
  6183. /**
  6184. * Implements hook_cell_line_relationship_schema()
  6185. * Purpose: To describe the structure of cell_line_relationship to tripal
  6186. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6187. * @see tripal_core.api.inc: tripal_core_chado_update()
  6188. * @see tripal_core.api.inc: tripal_core_chado_select()
  6189. *
  6190. * @return
  6191. * An array describing the current table
  6192. *
  6193. * @ingroup tripal_schema_api
  6194. *
  6195. */
  6196. function tripal_core_chado_cell_line_relationship_schema () {
  6197. $description = array();
  6198. $description = array(
  6199. 'table' => 'cell_line_relationship',
  6200. // 'description' => 'TODO: please describe this table!',
  6201. 'fields' => array(
  6202. 'cell_line_relationship_id' => array(
  6203. // 'description' => 'TODO: please describe this field!',
  6204. 'type' => 'serial',
  6205. 'not null' => '1',
  6206. ),
  6207. 'subject_id' => array(
  6208. // 'description' => 'TODO: please describe this field!',
  6209. 'type' => 'int',
  6210. 'not null' => '1',
  6211. ),
  6212. 'object_id' => array(
  6213. // 'description' => 'TODO: please describe this field!',
  6214. 'type' => 'int',
  6215. 'not null' => '1',
  6216. ),
  6217. 'type_id' => array(
  6218. // 'description' => 'TODO: please describe this field!',
  6219. 'type' => 'int',
  6220. 'not null' => '1',
  6221. ),
  6222. ),
  6223. 'primary key' => array(
  6224. '0' => 'cell_line_relationship_id',
  6225. ),
  6226. 'unique keys' => array(
  6227. 'cell_line_relationship_c1' => array(
  6228. '0' => 'subject_id',
  6229. '1' => 'object_id',
  6230. '2' => 'type_id',
  6231. ),
  6232. ),
  6233. 'indexes' => array(
  6234. ),
  6235. 'foreign keys' => array(
  6236. ),
  6237. );
  6238. return $description;
  6239. }
  6240. /**
  6241. * Implements hook_cell_line_pub_schema()
  6242. * Purpose: To describe the structure of cell_line_pub to tripal
  6243. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6244. * @see tripal_core.api.inc: tripal_core_chado_update()
  6245. * @see tripal_core.api.inc: tripal_core_chado_select()
  6246. *
  6247. * @return
  6248. * An array describing the current table
  6249. *
  6250. * @ingroup tripal_schema_api
  6251. *
  6252. */
  6253. function tripal_core_chado_cell_line_pub_schema () {
  6254. $description = array();
  6255. $description = array(
  6256. 'table' => 'cell_line_pub',
  6257. // 'description' => 'TODO: please describe this table!',
  6258. 'fields' => array(
  6259. 'cell_line_pub_id' => array(
  6260. // 'description' => 'TODO: please describe this field!',
  6261. 'type' => 'serial',
  6262. 'not null' => '1',
  6263. ),
  6264. 'cell_line_id' => array(
  6265. // 'description' => 'TODO: please describe this field!',
  6266. 'type' => 'int',
  6267. 'not null' => '1',
  6268. ),
  6269. 'pub_id' => array(
  6270. // 'description' => 'TODO: please describe this field!',
  6271. 'type' => 'int',
  6272. 'not null' => '1',
  6273. ),
  6274. ),
  6275. 'primary key' => array(
  6276. '0' => 'cell_line_pub_id',
  6277. ),
  6278. 'unique keys' => array(
  6279. 'cell_line_pub_c1' => array(
  6280. '0' => 'cell_line_id',
  6281. '1' => 'pub_id',
  6282. ),
  6283. ),
  6284. 'indexes' => array(
  6285. ),
  6286. 'foreign keys' => array(
  6287. ),
  6288. );
  6289. return $description;
  6290. }
  6291. /**
  6292. * Implements hook_cell_line_synonym_schema()
  6293. * Purpose: To describe the structure of cell_line_synonym to tripal
  6294. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6295. * @see tripal_core.api.inc: tripal_core_chado_update()
  6296. * @see tripal_core.api.inc: tripal_core_chado_select()
  6297. *
  6298. * @return
  6299. * An array describing the current table
  6300. *
  6301. * @ingroup tripal_schema_api
  6302. *
  6303. */
  6304. function tripal_core_chado_cell_line_synonym_schema () {
  6305. $description = array();
  6306. $description = array(
  6307. 'table' => 'cell_line_synonym',
  6308. // 'description' => 'TODO: please describe this table!',
  6309. 'fields' => array(
  6310. 'cell_line_synonym_id' => array(
  6311. // 'description' => 'TODO: please describe this field!',
  6312. 'type' => 'serial',
  6313. 'not null' => '1',
  6314. ),
  6315. 'cell_line_id' => array(
  6316. // 'description' => 'TODO: please describe this field!',
  6317. 'type' => 'int',
  6318. 'not null' => '1',
  6319. ),
  6320. 'synonym_id' => array(
  6321. // 'description' => 'TODO: please describe this field!',
  6322. 'type' => 'int',
  6323. 'not null' => '1',
  6324. ),
  6325. 'pub_id' => array(
  6326. // 'description' => 'TODO: please describe this field!',
  6327. 'type' => 'int',
  6328. 'not null' => '1',
  6329. ),
  6330. 'is_current' => array(
  6331. // 'description' => 'TODO: please describe this field!',
  6332. 'type' => 'boolean',
  6333. 'not null' => '1',
  6334. 'default' => 'als',
  6335. ),
  6336. 'is_internal' => array(
  6337. // 'description' => 'TODO: please describe this field!',
  6338. 'type' => 'boolean',
  6339. 'not null' => '1',
  6340. 'default' => 'als',
  6341. ),
  6342. ),
  6343. 'primary key' => array(
  6344. '0' => 'cell_line_synonym_id',
  6345. ),
  6346. 'unique keys' => array(
  6347. 'cell_line_synonym_c1' => array(
  6348. '0' => 'synonym_id',
  6349. '1' => 'cell_line_id',
  6350. '2' => 'pub_id',
  6351. ),
  6352. ),
  6353. 'indexes' => array(
  6354. ),
  6355. 'foreign keys' => array(
  6356. ),
  6357. );
  6358. return $description;
  6359. }
  6360. /**
  6361. * Implements hook_cell_lineprop_schema()
  6362. * Purpose: To describe the structure of cell_lineprop to tripal
  6363. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6364. * @see tripal_core.api.inc: tripal_core_chado_update()
  6365. * @see tripal_core.api.inc: tripal_core_chado_select()
  6366. *
  6367. * @return
  6368. * An array describing the current table
  6369. *
  6370. * @ingroup tripal_schema_api
  6371. *
  6372. */
  6373. function tripal_core_chado_cell_lineprop_schema () {
  6374. $description = array();
  6375. $description = array(
  6376. 'table' => 'cell_lineprop',
  6377. // 'description' => 'TODO: please describe this table!',
  6378. 'fields' => array(
  6379. 'cell_lineprop_id' => array(
  6380. // 'description' => 'TODO: please describe this field!',
  6381. 'type' => 'serial',
  6382. 'not null' => '1',
  6383. ),
  6384. 'cell_line_id' => array(
  6385. // 'description' => 'TODO: please describe this field!',
  6386. 'type' => 'int',
  6387. 'not null' => '1',
  6388. ),
  6389. 'type_id' => array(
  6390. // 'description' => 'TODO: please describe this field!',
  6391. 'type' => 'int',
  6392. 'not null' => '1',
  6393. ),
  6394. 'value' => array(
  6395. // 'description' => 'TODO: please describe this field!',
  6396. 'type' => 'text',
  6397. 'not null' => '',
  6398. ),
  6399. 'rank' => array(
  6400. // 'description' => 'TODO: please describe this field!',
  6401. 'type' => 'int',
  6402. 'not null' => '1',
  6403. 'default' => '0',
  6404. ),
  6405. ),
  6406. 'primary key' => array(
  6407. '0' => 'cell_lineprop_id',
  6408. ),
  6409. 'unique keys' => array(
  6410. 'cell_lineprop_c1' => array(
  6411. '0' => 'cell_line_id',
  6412. '1' => 'type_id',
  6413. '2' => 'rank',
  6414. ),
  6415. ),
  6416. 'indexes' => array(
  6417. ),
  6418. 'foreign keys' => array(
  6419. ),
  6420. );
  6421. return $description;
  6422. }
  6423. /**
  6424. * Implements hook_cell_lineprop_pub_schema()
  6425. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6426. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6427. * @see tripal_core.api.inc: tripal_core_chado_update()
  6428. * @see tripal_core.api.inc: tripal_core_chado_select()
  6429. *
  6430. * @return
  6431. * An array describing the current table
  6432. *
  6433. * @ingroup tripal_schema_api
  6434. *
  6435. */
  6436. function tripal_core_chado_cell_lineprop_pub_schema () {
  6437. $description = array();
  6438. $description = array(
  6439. 'table' => 'cell_lineprop_pub',
  6440. // 'description' => 'TODO: please describe this table!',
  6441. 'fields' => array(
  6442. 'cell_lineprop_pub_id' => array(
  6443. // 'description' => 'TODO: please describe this field!',
  6444. 'type' => 'serial',
  6445. 'not null' => '1',
  6446. ),
  6447. 'cell_lineprop_id' => array(
  6448. // 'description' => 'TODO: please describe this field!',
  6449. 'type' => 'int',
  6450. 'not null' => '1',
  6451. ),
  6452. 'pub_id' => array(
  6453. // 'description' => 'TODO: please describe this field!',
  6454. 'type' => 'int',
  6455. 'not null' => '1',
  6456. ),
  6457. ),
  6458. 'primary key' => array(
  6459. '0' => 'cell_lineprop_pub_id',
  6460. ),
  6461. 'unique keys' => array(
  6462. 'cell_lineprop_pub_c1' => array(
  6463. '0' => 'cell_lineprop_id',
  6464. '1' => 'pub_id',
  6465. ),
  6466. ),
  6467. 'indexes' => array(
  6468. ),
  6469. 'foreign keys' => array(
  6470. ),
  6471. );
  6472. return $description;
  6473. }
  6474. /**
  6475. * Implements hook_cell_line_library_schema()
  6476. * Purpose: To describe the structure of cell_line_library to tripal
  6477. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6478. * @see tripal_core.api.inc: tripal_core_chado_update()
  6479. * @see tripal_core.api.inc: tripal_core_chado_select()
  6480. *
  6481. * @return
  6482. * An array describing the current table
  6483. *
  6484. * @ingroup tripal_schema_api
  6485. *
  6486. */
  6487. function tripal_core_chado_cell_line_library_schema () {
  6488. $description = array();
  6489. $description = array(
  6490. 'table' => 'cell_line_library',
  6491. // 'description' => 'TODO: please describe this table!',
  6492. 'fields' => array(
  6493. 'cell_line_library_id' => array(
  6494. // 'description' => 'TODO: please describe this field!',
  6495. 'type' => 'serial',
  6496. 'not null' => '1',
  6497. ),
  6498. 'cell_line_id' => array(
  6499. // 'description' => 'TODO: please describe this field!',
  6500. 'type' => 'int',
  6501. 'not null' => '1',
  6502. ),
  6503. 'library_id' => array(
  6504. // 'description' => 'TODO: please describe this field!',
  6505. 'type' => 'int',
  6506. 'not null' => '1',
  6507. ),
  6508. 'pub_id' => array(
  6509. // 'description' => 'TODO: please describe this field!',
  6510. 'type' => 'int',
  6511. 'not null' => '1',
  6512. ),
  6513. ),
  6514. 'primary key' => array(
  6515. '0' => 'cell_line_library_id',
  6516. ),
  6517. 'unique keys' => array(
  6518. 'cell_line_library_c1' => array(
  6519. '0' => 'cell_line_id',
  6520. '1' => 'library_id',
  6521. '2' => 'pub_id',
  6522. ),
  6523. ),
  6524. 'indexes' => array(
  6525. ),
  6526. 'foreign keys' => array(
  6527. ),
  6528. );
  6529. return $description;
  6530. }
  6531. /**
  6532. * Implements hook_cell_line_feature_schema()
  6533. * Purpose: To describe the structure of cell_line_feature to tripal
  6534. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6535. * @see tripal_core.api.inc: tripal_core_chado_update()
  6536. * @see tripal_core.api.inc: tripal_core_chado_select()
  6537. *
  6538. * @return
  6539. * An array describing the current table
  6540. *
  6541. * @ingroup tripal_schema_api
  6542. *
  6543. */
  6544. function tripal_core_chado_cell_line_feature_schema () {
  6545. $description = array();
  6546. $description = array(
  6547. 'table' => 'cell_line_feature',
  6548. // 'description' => 'TODO: please describe this table!',
  6549. 'fields' => array(
  6550. 'cell_line_feature_id' => array(
  6551. // 'description' => 'TODO: please describe this field!',
  6552. 'type' => 'serial',
  6553. 'not null' => '1',
  6554. ),
  6555. 'cell_line_id' => array(
  6556. // 'description' => 'TODO: please describe this field!',
  6557. 'type' => 'int',
  6558. 'not null' => '1',
  6559. ),
  6560. 'feature_id' => array(
  6561. // 'description' => 'TODO: please describe this field!',
  6562. 'type' => 'int',
  6563. 'not null' => '1',
  6564. ),
  6565. 'pub_id' => array(
  6566. // 'description' => 'TODO: please describe this field!',
  6567. 'type' => 'int',
  6568. 'not null' => '1',
  6569. ),
  6570. ),
  6571. 'primary key' => array(
  6572. '0' => 'cell_line_feature_id',
  6573. ),
  6574. 'unique keys' => array(
  6575. 'cell_line_feature_c1' => array(
  6576. '0' => 'cell_line_id',
  6577. '1' => 'feature_id',
  6578. '2' => 'pub_id',
  6579. ),
  6580. ),
  6581. 'indexes' => array(
  6582. ),
  6583. 'foreign keys' => array(
  6584. ),
  6585. );
  6586. return $description;
  6587. }
  6588. /**
  6589. * Implements hook_cell_line_schema()
  6590. * Purpose: To describe the structure of cell_line to tripal
  6591. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6592. * @see tripal_core.api.inc: tripal_core_chado_update()
  6593. * @see tripal_core.api.inc: tripal_core_chado_select()
  6594. *
  6595. * @return
  6596. * An array describing the current table
  6597. *
  6598. * @ingroup tripal_schema_api
  6599. *
  6600. */
  6601. function tripal_core_chado_cell_line_schema () {
  6602. $description = array();
  6603. $description = array(
  6604. 'table' => 'cell_line',
  6605. // 'description' => 'TODO: please describe this table!',
  6606. 'fields' => array(
  6607. 'cell_line_id' => array(
  6608. // 'description' => 'TODO: please describe this field!',
  6609. 'type' => 'serial',
  6610. 'not null' => '1',
  6611. ),
  6612. 'name' => array(
  6613. // 'description' => 'TODO: please describe this field!',
  6614. 'type' => 'varchar',
  6615. 'length' => '255',
  6616. 'not null' => '',
  6617. ),
  6618. 'uniquename' => array(
  6619. // 'description' => 'TODO: please describe this field!',
  6620. 'type' => 'varchar',
  6621. 'length' => '255',
  6622. 'not null' => '1',
  6623. ),
  6624. 'organism_id' => array(
  6625. // 'description' => 'TODO: please describe this field!',
  6626. 'type' => 'int',
  6627. 'not null' => '1',
  6628. ),
  6629. 'timeaccessioned' => array(
  6630. // 'description' => 'TODO: please describe this field!',
  6631. 'type' => 'datetime',
  6632. 'not null' => '1',
  6633. 'default' => 'ow(',
  6634. ),
  6635. 'timelastmodified' => array(
  6636. // 'description' => 'TODO: please describe this field!',
  6637. 'type' => 'datetime',
  6638. 'not null' => '1',
  6639. 'default' => 'ow(',
  6640. ),
  6641. ),
  6642. 'primary key' => array(
  6643. '0' => 'cell_line_id',
  6644. ),
  6645. 'unique keys' => array(
  6646. 'cell_line_c1' => array(
  6647. '0' => 'uniquename',
  6648. '1' => 'organism_id',
  6649. ),
  6650. ),
  6651. 'indexes' => array(
  6652. ),
  6653. 'foreign keys' => array(
  6654. ),
  6655. );
  6656. return $description;
  6657. }
  6658. /**
  6659. * Implements hook_cell_line_cvterm_schema()
  6660. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6661. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6662. * @see tripal_core.api.inc: tripal_core_chado_update()
  6663. * @see tripal_core.api.inc: tripal_core_chado_select()
  6664. *
  6665. * @return
  6666. * An array describing the current table
  6667. *
  6668. * @ingroup tripal_schema_api
  6669. *
  6670. */
  6671. function tripal_core_chado_cell_line_cvterm_schema () {
  6672. $description = array();
  6673. $description = array(
  6674. 'table' => 'cell_line_cvterm',
  6675. // 'description' => 'TODO: please describe this table!',
  6676. 'fields' => array(
  6677. 'cell_line_cvterm_id' => array(
  6678. // 'description' => 'TODO: please describe this field!',
  6679. 'type' => 'serial',
  6680. 'not null' => '1',
  6681. ),
  6682. 'cell_line_id' => array(
  6683. // 'description' => 'TODO: please describe this field!',
  6684. 'type' => 'int',
  6685. 'not null' => '1',
  6686. ),
  6687. 'cvterm_id' => array(
  6688. // 'description' => 'TODO: please describe this field!',
  6689. 'type' => 'int',
  6690. 'not null' => '1',
  6691. ),
  6692. 'pub_id' => array(
  6693. // 'description' => 'TODO: please describe this field!',
  6694. 'type' => 'int',
  6695. 'not null' => '1',
  6696. ),
  6697. 'rank' => array(
  6698. // 'description' => 'TODO: please describe this field!',
  6699. 'type' => 'int',
  6700. 'not null' => '1',
  6701. 'default' => '0',
  6702. ),
  6703. ),
  6704. 'primary key' => array(
  6705. '0' => 'cell_line_cvterm_id',
  6706. ),
  6707. 'unique keys' => array(
  6708. 'cell_line_cvterm_c1' => array(
  6709. '0' => 'cell_line_id',
  6710. '1' => 'cvterm_id',
  6711. '2' => 'pub_id',
  6712. '3' => 'rank',
  6713. ),
  6714. ),
  6715. 'indexes' => array(
  6716. ),
  6717. 'foreign keys' => array(
  6718. ),
  6719. );
  6720. return $description;
  6721. }
  6722. /**
  6723. * Implements hook_cell_line_cvtermprop_schema()
  6724. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6725. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6726. * @see tripal_core.api.inc: tripal_core_chado_update()
  6727. * @see tripal_core.api.inc: tripal_core_chado_select()
  6728. *
  6729. * @return
  6730. * An array describing the current table
  6731. *
  6732. * @ingroup tripal_schema_api
  6733. *
  6734. */
  6735. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6736. $description = array();
  6737. $description = array(
  6738. 'table' => 'cell_line_cvtermprop',
  6739. // 'description' => 'TODO: please describe this table!',
  6740. 'fields' => array(
  6741. 'cell_line_cvtermprop_id' => array(
  6742. // 'description' => 'TODO: please describe this field!',
  6743. 'type' => 'serial',
  6744. 'not null' => '1',
  6745. ),
  6746. 'cell_line_cvterm_id' => array(
  6747. // 'description' => 'TODO: please describe this field!',
  6748. 'type' => 'int',
  6749. 'not null' => '1',
  6750. ),
  6751. 'type_id' => array(
  6752. // 'description' => 'TODO: please describe this field!',
  6753. 'type' => 'int',
  6754. 'not null' => '1',
  6755. ),
  6756. 'value' => array(
  6757. // 'description' => 'TODO: please describe this field!',
  6758. 'type' => 'text',
  6759. 'not null' => '',
  6760. ),
  6761. 'rank' => array(
  6762. // 'description' => 'TODO: please describe this field!',
  6763. 'type' => 'int',
  6764. 'not null' => '1',
  6765. 'default' => '0',
  6766. ),
  6767. ),
  6768. 'primary key' => array(
  6769. '0' => 'cell_line_cvtermprop_id',
  6770. ),
  6771. 'unique keys' => array(
  6772. 'cell_line_cvtermprop_c1' => array(
  6773. '0' => 'cell_line_cvterm_id',
  6774. '1' => 'type_id',
  6775. '2' => 'rank',
  6776. ),
  6777. ),
  6778. 'indexes' => array(
  6779. ),
  6780. 'foreign keys' => array(
  6781. ),
  6782. );
  6783. return $description;
  6784. }
  6785. /**
  6786. * Implements hook_cell_line_dbxref_schema()
  6787. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6788. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6789. * @see tripal_core.api.inc: tripal_core_chado_update()
  6790. * @see tripal_core.api.inc: tripal_core_chado_select()
  6791. *
  6792. * @return
  6793. * An array describing the current table
  6794. *
  6795. * @ingroup tripal_schema_api
  6796. *
  6797. */
  6798. function tripal_core_chado_cell_line_dbxref_schema () {
  6799. $description = array();
  6800. $description = array(
  6801. 'table' => 'cell_line_dbxref',
  6802. // 'description' => 'TODO: please describe this table!',
  6803. 'fields' => array(
  6804. 'cell_line_dbxref_id' => array(
  6805. // 'description' => 'TODO: please describe this field!',
  6806. 'type' => 'serial',
  6807. 'not null' => '1',
  6808. ),
  6809. 'cell_line_id' => array(
  6810. // 'description' => 'TODO: please describe this field!',
  6811. 'type' => 'int',
  6812. 'not null' => '1',
  6813. ),
  6814. 'dbxref_id' => array(
  6815. // 'description' => 'TODO: please describe this field!',
  6816. 'type' => 'int',
  6817. 'not null' => '1',
  6818. ),
  6819. 'is_current' => array(
  6820. // 'description' => 'TODO: please describe this field!',
  6821. 'type' => 'boolean',
  6822. 'not null' => '1',
  6823. 'default' => 'ru',
  6824. ),
  6825. ),
  6826. 'primary key' => array(
  6827. '0' => 'cell_line_dbxref_id',
  6828. ),
  6829. 'unique keys' => array(
  6830. 'cell_line_dbxref_c1' => array(
  6831. '0' => 'cell_line_id',
  6832. '1' => 'dbxref_id',
  6833. ),
  6834. ),
  6835. 'indexes' => array(
  6836. ),
  6837. 'foreign keys' => array(
  6838. ),
  6839. );
  6840. return $description;
  6841. }
  6842. /**
  6843. * Implements hook_channel_schema()
  6844. * Purpose: To describe the structure of channel to tripal
  6845. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6846. * @see tripal_core.api.inc: tripal_core_chado_update()
  6847. * @see tripal_core.api.inc: tripal_core_chado_select()
  6848. *
  6849. * @return
  6850. * An array describing the current table
  6851. *
  6852. * @ingroup tripal_schema_api
  6853. *
  6854. */
  6855. function tripal_core_chado_channel_schema () {
  6856. $description = array();
  6857. $description = array(
  6858. 'table' => 'channel',
  6859. // 'description' => 'TODO: please describe this table!',
  6860. 'fields' => array(
  6861. 'channel_id' => array(
  6862. // 'description' => 'TODO: please describe this field!',
  6863. 'type' => 'serial',
  6864. 'not null' => '1',
  6865. ),
  6866. 'name' => array(
  6867. // 'description' => 'TODO: please describe this field!',
  6868. 'type' => 'text',
  6869. 'not null' => '1',
  6870. ),
  6871. 'definition' => array(
  6872. // 'description' => 'TODO: please describe this field!',
  6873. 'type' => 'text',
  6874. 'not null' => '1',
  6875. ),
  6876. ),
  6877. 'primary key' => array(
  6878. '0' => 'channel_id',
  6879. ),
  6880. 'unique keys' => array(
  6881. 'channel_c1' => array(
  6882. '0' => 'name',
  6883. ),
  6884. ),
  6885. 'indexes' => array(
  6886. ),
  6887. 'foreign keys' => array(
  6888. ),
  6889. );
  6890. return $description;
  6891. }
  6892. /**
  6893. * Implements hook_common_ancestor_cvterm_schema()
  6894. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6895. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6896. * @see tripal_core.api.inc: tripal_core_chado_update()
  6897. * @see tripal_core.api.inc: tripal_core_chado_select()
  6898. *
  6899. * @return
  6900. * An array describing the current table
  6901. *
  6902. * @ingroup tripal_schema_api
  6903. *
  6904. */
  6905. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6906. $description = array();
  6907. $description = array(
  6908. 'table' => 'common_ancestor_cvterm',
  6909. // 'description' => 'TODO: please describe this table!',
  6910. 'fields' => array(
  6911. 'cvterm1_id' => array(
  6912. // 'description' => 'TODO: please describe this field!',
  6913. 'type' => 'int',
  6914. 'not null' => '',
  6915. ),
  6916. 'cvterm2_id' => array(
  6917. // 'description' => 'TODO: please describe this field!',
  6918. 'type' => 'int',
  6919. 'not null' => '',
  6920. ),
  6921. 'ancestor_cvterm_id' => array(
  6922. // 'description' => 'TODO: please describe this field!',
  6923. 'type' => 'int',
  6924. 'not null' => '',
  6925. ),
  6926. 'pathdistance1' => array(
  6927. // 'description' => 'TODO: please describe this field!',
  6928. 'type' => 'int',
  6929. 'not null' => '',
  6930. ),
  6931. 'pathdistance2' => array(
  6932. // 'description' => 'TODO: please describe this field!',
  6933. 'type' => 'int',
  6934. 'not null' => '',
  6935. ),
  6936. 'total_pathdistance' => array(
  6937. // 'description' => 'TODO: please describe this field!',
  6938. 'type' => 'int',
  6939. 'not null' => '',
  6940. ),
  6941. ),
  6942. 'primary key' => array(
  6943. ),
  6944. 'unique keys' => array(
  6945. ),
  6946. 'indexes' => array(
  6947. ),
  6948. 'foreign keys' => array(
  6949. ),
  6950. );
  6951. return $description;
  6952. }
  6953. /**
  6954. * Implements hook_cv_cvterm_count_with_obs_schema()
  6955. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  6956. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6957. * @see tripal_core.api.inc: tripal_core_chado_update()
  6958. * @see tripal_core.api.inc: tripal_core_chado_select()
  6959. *
  6960. * @return
  6961. * An array describing the current table
  6962. *
  6963. * @ingroup tripal_schema_api
  6964. *
  6965. */
  6966. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  6967. $description = array();
  6968. $description = array(
  6969. 'table' => 'cv_cvterm_count_with_obs',
  6970. // 'description' => 'TODO: please describe this table!',
  6971. 'fields' => array(
  6972. 'name' => array(
  6973. // 'description' => 'TODO: please describe this field!',
  6974. 'type' => 'varchar',
  6975. 'length' => '255',
  6976. 'not null' => '',
  6977. ),
  6978. 'num_terms_incl_obs' => array(
  6979. // 'description' => 'TODO: please describe this field!',
  6980. 'type' => 'int',
  6981. 'size' => 'big',
  6982. 'not null' => '',
  6983. ),
  6984. ),
  6985. 'primary key' => array(
  6986. ),
  6987. 'unique keys' => array(
  6988. ),
  6989. 'indexes' => array(
  6990. ),
  6991. 'foreign keys' => array(
  6992. ),
  6993. );
  6994. return $description;
  6995. }
  6996. /**
  6997. * Implements hook_cv_leaf_schema()
  6998. * Purpose: To describe the structure of cv_leaf to tripal
  6999. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7000. * @see tripal_core.api.inc: tripal_core_chado_update()
  7001. * @see tripal_core.api.inc: tripal_core_chado_select()
  7002. *
  7003. * @return
  7004. * An array describing the current table
  7005. *
  7006. * @ingroup tripal_schema_api
  7007. *
  7008. */
  7009. function tripal_core_chado_cv_leaf_schema () {
  7010. $description = array();
  7011. $description = array(
  7012. 'table' => 'cv_leaf',
  7013. // 'description' => 'TODO: please describe this table!',
  7014. 'fields' => array(
  7015. 'cv_id' => array(
  7016. // 'description' => 'TODO: please describe this field!',
  7017. 'type' => 'int',
  7018. 'not null' => '',
  7019. ),
  7020. 'cvterm_id' => array(
  7021. // 'description' => 'TODO: please describe this field!',
  7022. 'type' => 'int',
  7023. 'not null' => '',
  7024. ),
  7025. ),
  7026. 'primary key' => array(
  7027. ),
  7028. 'unique keys' => array(
  7029. ),
  7030. 'indexes' => array(
  7031. ),
  7032. 'foreign keys' => array(
  7033. ),
  7034. );
  7035. return $description;
  7036. }
  7037. /**
  7038. * Implements hook_cv_link_count_schema()
  7039. * Purpose: To describe the structure of cv_link_count to tripal
  7040. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7041. * @see tripal_core.api.inc: tripal_core_chado_update()
  7042. * @see tripal_core.api.inc: tripal_core_chado_select()
  7043. *
  7044. * @return
  7045. * An array describing the current table
  7046. *
  7047. * @ingroup tripal_schema_api
  7048. *
  7049. */
  7050. function tripal_core_chado_cv_link_count_schema () {
  7051. $description = array();
  7052. $description = array(
  7053. 'table' => 'cv_link_count',
  7054. // 'description' => 'TODO: please describe this table!',
  7055. 'fields' => array(
  7056. 'cv_name' => array(
  7057. // 'description' => 'TODO: please describe this field!',
  7058. 'type' => 'varchar',
  7059. 'length' => '255',
  7060. 'not null' => '',
  7061. ),
  7062. 'relation_name' => array(
  7063. // 'description' => 'TODO: please describe this field!',
  7064. 'type' => 'varchar',
  7065. 'length' => '1024',
  7066. 'not null' => '',
  7067. ),
  7068. 'relation_cv_name' => array(
  7069. // 'description' => 'TODO: please describe this field!',
  7070. 'type' => 'varchar',
  7071. 'length' => '255',
  7072. 'not null' => '',
  7073. ),
  7074. 'num_links' => array(
  7075. // 'description' => 'TODO: please describe this field!',
  7076. 'type' => 'int',
  7077. 'size' => 'big',
  7078. 'not null' => '',
  7079. ),
  7080. ),
  7081. 'primary key' => array(
  7082. ),
  7083. 'unique keys' => array(
  7084. ),
  7085. 'indexes' => array(
  7086. ),
  7087. 'foreign keys' => array(
  7088. ),
  7089. );
  7090. return $description;
  7091. }
  7092. /**
  7093. * Implements hook_cv_path_count_schema()
  7094. * Purpose: To describe the structure of cv_path_count to tripal
  7095. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7096. * @see tripal_core.api.inc: tripal_core_chado_update()
  7097. * @see tripal_core.api.inc: tripal_core_chado_select()
  7098. *
  7099. * @return
  7100. * An array describing the current table
  7101. *
  7102. * @ingroup tripal_schema_api
  7103. *
  7104. */
  7105. function tripal_core_chado_cv_path_count_schema () {
  7106. $description = array();
  7107. $description = array(
  7108. 'table' => 'cv_path_count',
  7109. // 'description' => 'TODO: please describe this table!',
  7110. 'fields' => array(
  7111. 'cv_name' => array(
  7112. // 'description' => 'TODO: please describe this field!',
  7113. 'type' => 'varchar',
  7114. 'length' => '255',
  7115. 'not null' => '',
  7116. ),
  7117. 'relation_name' => array(
  7118. // 'description' => 'TODO: please describe this field!',
  7119. 'type' => 'varchar',
  7120. 'length' => '1024',
  7121. 'not null' => '',
  7122. ),
  7123. 'relation_cv_name' => array(
  7124. // 'description' => 'TODO: please describe this field!',
  7125. 'type' => 'varchar',
  7126. 'length' => '255',
  7127. 'not null' => '',
  7128. ),
  7129. 'num_paths' => array(
  7130. // 'description' => 'TODO: please describe this field!',
  7131. 'type' => 'int',
  7132. 'size' => 'big',
  7133. 'not null' => '',
  7134. ),
  7135. ),
  7136. 'primary key' => array(
  7137. ),
  7138. 'unique keys' => array(
  7139. ),
  7140. 'indexes' => array(
  7141. ),
  7142. 'foreign keys' => array(
  7143. ),
  7144. );
  7145. return $description;
  7146. }
  7147. /**
  7148. * Implements hook_cv_cvterm_count_schema()
  7149. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7150. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7151. * @see tripal_core.api.inc: tripal_core_chado_update()
  7152. * @see tripal_core.api.inc: tripal_core_chado_select()
  7153. *
  7154. * @return
  7155. * An array describing the current table
  7156. *
  7157. * @ingroup tripal_schema_api
  7158. *
  7159. */
  7160. function tripal_core_chado_cv_cvterm_count_schema () {
  7161. $description = array();
  7162. $description = array(
  7163. 'table' => 'cv_cvterm_count',
  7164. // 'description' => 'TODO: please describe this table!',
  7165. 'fields' => array(
  7166. 'name' => array(
  7167. // 'description' => 'TODO: please describe this field!',
  7168. 'type' => 'varchar',
  7169. 'length' => '255',
  7170. 'not null' => '',
  7171. ),
  7172. 'num_terms_excl_obs' => array(
  7173. // 'description' => 'TODO: please describe this field!',
  7174. 'type' => 'int',
  7175. 'size' => 'big',
  7176. 'not null' => '',
  7177. ),
  7178. ),
  7179. 'primary key' => array(
  7180. ),
  7181. 'unique keys' => array(
  7182. ),
  7183. 'indexes' => array(
  7184. ),
  7185. 'foreign keys' => array(
  7186. ),
  7187. );
  7188. return $description;
  7189. }
  7190. /**
  7191. * Implements hook_cv_schema()
  7192. * Purpose: To describe the structure of cv to tripal
  7193. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7194. * @see tripal_core.api.inc: tripal_core_chado_update()
  7195. * @see tripal_core.api.inc: tripal_core_chado_select()
  7196. *
  7197. * @return
  7198. * An array describing the current table
  7199. *
  7200. * @ingroup tripal_schema_api
  7201. *
  7202. */
  7203. function tripal_core_chado_cv_schema () {
  7204. $description = array();
  7205. $description = array(
  7206. 'table' => 'cv',
  7207. // 'description' => 'TODO: please describe this table!',
  7208. 'fields' => array(
  7209. 'cv_id' => array(
  7210. // 'description' => 'TODO: please describe this field!',
  7211. 'type' => 'serial',
  7212. 'not null' => '1',
  7213. ),
  7214. 'name' => array(
  7215. // 'description' => 'TODO: please describe this field!',
  7216. 'type' => 'varchar',
  7217. 'length' => '255',
  7218. 'not null' => '1',
  7219. ),
  7220. 'definition' => array(
  7221. // 'description' => 'TODO: please describe this field!',
  7222. 'type' => 'text',
  7223. 'not null' => '',
  7224. ),
  7225. ),
  7226. 'primary key' => array(
  7227. '0' => 'cv_id',
  7228. ),
  7229. 'unique keys' => array(
  7230. 'cv_c1' => array(
  7231. '0' => 'name',
  7232. ),
  7233. ),
  7234. 'indexes' => array(
  7235. ),
  7236. 'foreign keys' => array(
  7237. ),
  7238. );
  7239. return $description;
  7240. }
  7241. /**
  7242. * Implements hook_common_descendant_cvterm_schema()
  7243. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7244. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7245. * @see tripal_core.api.inc: tripal_core_chado_update()
  7246. * @see tripal_core.api.inc: tripal_core_chado_select()
  7247. *
  7248. * @return
  7249. * An array describing the current table
  7250. *
  7251. * @ingroup tripal_schema_api
  7252. *
  7253. */
  7254. function tripal_core_chado_common_descendant_cvterm_schema () {
  7255. $description = array();
  7256. $description = array(
  7257. 'table' => 'common_descendant_cvterm',
  7258. // 'description' => 'TODO: please describe this table!',
  7259. 'fields' => array(
  7260. 'cvterm1_id' => array(
  7261. // 'description' => 'TODO: please describe this field!',
  7262. 'type' => 'int',
  7263. 'not null' => '',
  7264. ),
  7265. 'cvterm2_id' => array(
  7266. // 'description' => 'TODO: please describe this field!',
  7267. 'type' => 'int',
  7268. 'not null' => '',
  7269. ),
  7270. 'ancestor_cvterm_id' => array(
  7271. // 'description' => 'TODO: please describe this field!',
  7272. 'type' => 'int',
  7273. 'not null' => '',
  7274. ),
  7275. 'pathdistance1' => array(
  7276. // 'description' => 'TODO: please describe this field!',
  7277. 'type' => 'int',
  7278. 'not null' => '',
  7279. ),
  7280. 'pathdistance2' => array(
  7281. // 'description' => 'TODO: please describe this field!',
  7282. 'type' => 'int',
  7283. 'not null' => '',
  7284. ),
  7285. 'total_pathdistance' => array(
  7286. // 'description' => 'TODO: please describe this field!',
  7287. 'type' => 'int',
  7288. 'not null' => '',
  7289. ),
  7290. ),
  7291. 'primary key' => array(
  7292. ),
  7293. 'unique keys' => array(
  7294. ),
  7295. 'indexes' => array(
  7296. ),
  7297. 'foreign keys' => array(
  7298. ),
  7299. );
  7300. return $description;
  7301. }
  7302. /**
  7303. * Implements hook_contact_schema()
  7304. * Purpose: To describe the structure of contact to tripal
  7305. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7306. * @see tripal_core.api.inc: tripal_core_chado_update()
  7307. * @see tripal_core.api.inc: tripal_core_chado_select()
  7308. *
  7309. * @return
  7310. * An array describing the current table
  7311. *
  7312. * @ingroup tripal_schema_api
  7313. *
  7314. */
  7315. function tripal_core_chado_contact_schema () {
  7316. $description = array();
  7317. $description = array(
  7318. 'table' => 'contact',
  7319. // 'description' => 'TODO: please describe this table!',
  7320. 'fields' => array(
  7321. 'contact_id' => array(
  7322. // 'description' => 'TODO: please describe this field!',
  7323. 'type' => 'serial',
  7324. 'not null' => '1',
  7325. ),
  7326. 'type_id' => array(
  7327. // 'description' => 'TODO: please describe this field!',
  7328. 'type' => 'int',
  7329. 'not null' => '',
  7330. ),
  7331. 'name' => array(
  7332. // 'description' => 'TODO: please describe this field!',
  7333. 'type' => 'varchar',
  7334. 'length' => '255',
  7335. 'not null' => '1',
  7336. ),
  7337. 'description' => array(
  7338. // 'description' => 'TODO: please describe this field!',
  7339. 'type' => 'varchar',
  7340. 'length' => '255',
  7341. 'not null' => '',
  7342. ),
  7343. ),
  7344. 'primary key' => array(
  7345. '0' => 'contact_id',
  7346. ),
  7347. 'unique keys' => array(
  7348. 'contact_c1' => array(
  7349. '0' => 'name',
  7350. ),
  7351. ),
  7352. 'indexes' => array(
  7353. ),
  7354. 'foreign keys' => array(
  7355. ),
  7356. );
  7357. return $description;
  7358. }
  7359. /**
  7360. * Implements hook_contact_relationship_schema()
  7361. * Purpose: To describe the structure of contact_relationship to tripal
  7362. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7363. * @see tripal_core.api.inc: tripal_core_chado_update()
  7364. * @see tripal_core.api.inc: tripal_core_chado_select()
  7365. *
  7366. * @return
  7367. * An array describing the current table
  7368. *
  7369. * @ingroup tripal_schema_api
  7370. *
  7371. */
  7372. function tripal_core_chado_contact_relationship_schema () {
  7373. $description = array();
  7374. $description = array(
  7375. 'table' => 'contact_relationship',
  7376. // 'description' => 'TODO: please describe this table!',
  7377. 'fields' => array(
  7378. 'contact_relationship_id' => array(
  7379. // 'description' => 'TODO: please describe this field!',
  7380. 'type' => 'serial',
  7381. 'not null' => '1',
  7382. ),
  7383. 'type_id' => array(
  7384. // 'description' => 'TODO: please describe this field!',
  7385. 'type' => 'int',
  7386. 'not null' => '1',
  7387. ),
  7388. 'subject_id' => array(
  7389. // 'description' => 'TODO: please describe this field!',
  7390. 'type' => 'int',
  7391. 'not null' => '1',
  7392. ),
  7393. 'object_id' => array(
  7394. // 'description' => 'TODO: please describe this field!',
  7395. 'type' => 'int',
  7396. 'not null' => '1',
  7397. ),
  7398. ),
  7399. 'primary key' => array(
  7400. '0' => 'contact_relationship_id',
  7401. ),
  7402. 'unique keys' => array(
  7403. 'contact_relationship_c1' => array(
  7404. '0' => 'subject_id',
  7405. '1' => 'object_id',
  7406. '2' => 'type_id',
  7407. ),
  7408. ),
  7409. 'indexes' => array(
  7410. 'contact_relationship_idx1' => array(
  7411. '0' => 'type_id',
  7412. ),
  7413. 'contact_relationship_idx2' => array(
  7414. '0' => 'subject_id',
  7415. ),
  7416. 'contact_relationship_idx3' => array(
  7417. '0' => 'object_id',
  7418. ),
  7419. ),
  7420. 'foreign keys' => array(
  7421. ),
  7422. );
  7423. return $description;
  7424. }
  7425. /**
  7426. * Implements hook_control_schema()
  7427. * Purpose: To describe the structure of control to tripal
  7428. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7429. * @see tripal_core.api.inc: tripal_core_chado_update()
  7430. * @see tripal_core.api.inc: tripal_core_chado_select()
  7431. *
  7432. * @return
  7433. * An array describing the current table
  7434. *
  7435. * @ingroup tripal_schema_api
  7436. *
  7437. */
  7438. function tripal_core_chado_control_schema () {
  7439. $description = array();
  7440. $description = array(
  7441. 'table' => 'control',
  7442. // 'description' => 'TODO: please describe this table!',
  7443. 'fields' => array(
  7444. 'control_id' => array(
  7445. // 'description' => 'TODO: please describe this field!',
  7446. 'type' => 'serial',
  7447. 'not null' => '1',
  7448. ),
  7449. 'type_id' => array(
  7450. // 'description' => 'TODO: please describe this field!',
  7451. 'type' => 'int',
  7452. 'not null' => '1',
  7453. ),
  7454. 'assay_id' => array(
  7455. // 'description' => 'TODO: please describe this field!',
  7456. 'type' => 'int',
  7457. 'not null' => '1',
  7458. ),
  7459. 'tableinfo_id' => array(
  7460. // 'description' => 'TODO: please describe this field!',
  7461. 'type' => 'int',
  7462. 'not null' => '1',
  7463. ),
  7464. 'row_id' => array(
  7465. // 'description' => 'TODO: please describe this field!',
  7466. 'type' => 'int',
  7467. 'not null' => '1',
  7468. ),
  7469. 'name' => array(
  7470. // 'description' => 'TODO: please describe this field!',
  7471. 'type' => 'text',
  7472. 'not null' => '',
  7473. ),
  7474. 'value' => array(
  7475. // 'description' => 'TODO: please describe this field!',
  7476. 'type' => 'text',
  7477. 'not null' => '',
  7478. ),
  7479. 'rank' => array(
  7480. // 'description' => 'TODO: please describe this field!',
  7481. 'type' => 'int',
  7482. 'not null' => '1',
  7483. 'default' => '0',
  7484. ),
  7485. ),
  7486. 'primary key' => array(
  7487. '0' => 'control_id',
  7488. ),
  7489. 'unique keys' => array(
  7490. ),
  7491. 'indexes' => array(
  7492. 'control_idx1' => array(
  7493. '0' => 'type_id',
  7494. ),
  7495. 'control_idx2' => array(
  7496. '0' => 'assay_id',
  7497. ),
  7498. 'control_idx3' => array(
  7499. '0' => 'tableinfo_id',
  7500. ),
  7501. 'control_idx4' => array(
  7502. '0' => 'row_id',
  7503. ),
  7504. ),
  7505. 'foreign keys' => array(
  7506. ),
  7507. );
  7508. return $description;
  7509. }
  7510. /**
  7511. * Implements hook_biomaterialprop_schema()
  7512. * Purpose: To describe the structure of biomaterialprop to tripal
  7513. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7514. * @see tripal_core.api.inc: tripal_core_chado_update()
  7515. * @see tripal_core.api.inc: tripal_core_chado_select()
  7516. *
  7517. * @return
  7518. * An array describing the current table
  7519. *
  7520. * @ingroup tripal_schema_api
  7521. *
  7522. */
  7523. function tripal_core_chado_biomaterialprop_schema () {
  7524. $description = array();
  7525. $description = array(
  7526. 'table' => 'biomaterialprop',
  7527. // 'description' => 'TODO: please describe this table!',
  7528. 'fields' => array(
  7529. 'biomaterialprop_id' => array(
  7530. // 'description' => 'TODO: please describe this field!',
  7531. 'type' => 'serial',
  7532. 'not null' => '1',
  7533. ),
  7534. 'biomaterial_id' => array(
  7535. // 'description' => 'TODO: please describe this field!',
  7536. 'type' => 'int',
  7537. 'not null' => '1',
  7538. ),
  7539. 'type_id' => array(
  7540. // 'description' => 'TODO: please describe this field!',
  7541. 'type' => 'int',
  7542. 'not null' => '1',
  7543. ),
  7544. 'value' => array(
  7545. // 'description' => 'TODO: please describe this field!',
  7546. 'type' => 'text',
  7547. 'not null' => '',
  7548. ),
  7549. 'rank' => array(
  7550. // 'description' => 'TODO: please describe this field!',
  7551. 'type' => 'int',
  7552. 'not null' => '1',
  7553. 'default' => '0',
  7554. ),
  7555. ),
  7556. 'primary key' => array(
  7557. '0' => 'biomaterialprop_id',
  7558. ),
  7559. 'unique keys' => array(
  7560. 'biomaterialprop_c1' => array(
  7561. '0' => 'biomaterial_id',
  7562. '1' => 'type_id',
  7563. '2' => 'rank',
  7564. ),
  7565. ),
  7566. 'indexes' => array(
  7567. 'biomaterialprop_idx1' => array(
  7568. '0' => 'biomaterial_id',
  7569. ),
  7570. 'biomaterialprop_idx2' => array(
  7571. '0' => 'type_id',
  7572. ),
  7573. ),
  7574. 'foreign keys' => array(
  7575. ),
  7576. );
  7577. return $description;
  7578. }
  7579. /**
  7580. * Implements hook_biomaterial_treatment_schema()
  7581. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7582. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7583. * @see tripal_core.api.inc: tripal_core_chado_update()
  7584. * @see tripal_core.api.inc: tripal_core_chado_select()
  7585. *
  7586. * @return
  7587. * An array describing the current table
  7588. *
  7589. * @ingroup tripal_schema_api
  7590. *
  7591. */
  7592. function tripal_core_chado_biomaterial_treatment_schema () {
  7593. $description = array();
  7594. $description = array(
  7595. 'table' => 'biomaterial_treatment',
  7596. // 'description' => 'TODO: please describe this table!',
  7597. 'fields' => array(
  7598. 'biomaterial_treatment_id' => array(
  7599. // 'description' => 'TODO: please describe this field!',
  7600. 'type' => 'serial',
  7601. 'not null' => '1',
  7602. ),
  7603. 'biomaterial_id' => array(
  7604. // 'description' => 'TODO: please describe this field!',
  7605. 'type' => 'int',
  7606. 'not null' => '1',
  7607. ),
  7608. 'treatment_id' => array(
  7609. // 'description' => 'TODO: please describe this field!',
  7610. 'type' => 'int',
  7611. 'not null' => '1',
  7612. ),
  7613. 'unittype_id' => array(
  7614. // 'description' => 'TODO: please describe this field!',
  7615. 'type' => 'int',
  7616. 'not null' => '',
  7617. ),
  7618. 'value' => array(
  7619. // 'description' => 'TODO: please describe this field!',
  7620. 'type' => 'float',
  7621. 'not null' => '',
  7622. ),
  7623. 'rank' => array(
  7624. // 'description' => 'TODO: please describe this field!',
  7625. 'type' => 'int',
  7626. 'not null' => '1',
  7627. 'default' => '0',
  7628. ),
  7629. ),
  7630. 'primary key' => array(
  7631. '0' => 'biomaterial_treatment_id',
  7632. ),
  7633. 'unique keys' => array(
  7634. 'biomaterial_treatment_c1' => array(
  7635. '0' => 'biomaterial_id',
  7636. '1' => 'treatment_id',
  7637. ),
  7638. ),
  7639. 'indexes' => array(
  7640. 'biomaterial_treatment_idx1' => array(
  7641. '0' => 'biomaterial_id',
  7642. ),
  7643. 'biomaterial_treatment_idx2' => array(
  7644. '0' => 'treatment_id',
  7645. ),
  7646. 'biomaterial_treatment_idx3' => array(
  7647. '0' => 'unittype_id',
  7648. ),
  7649. ),
  7650. 'foreign keys' => array(
  7651. ),
  7652. );
  7653. return $description;
  7654. }
  7655. /**
  7656. * Implements hook_acquisition_relationship_schema()
  7657. * Purpose: To describe the structure of acquisition_relationship to tripal
  7658. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7659. * @see tripal_core.api.inc: tripal_core_chado_update()
  7660. * @see tripal_core.api.inc: tripal_core_chado_select()
  7661. *
  7662. * @return
  7663. * An array describing the current table
  7664. *
  7665. * @ingroup tripal_schema_api
  7666. *
  7667. */
  7668. function tripal_core_chado_acquisition_relationship_schema () {
  7669. $description = array();
  7670. $description = array(
  7671. 'table' => 'acquisition_relationship',
  7672. // 'description' => 'TODO: please describe this table!',
  7673. 'fields' => array(
  7674. 'acquisition_relationship_id' => array(
  7675. // 'description' => 'TODO: please describe this field!',
  7676. 'type' => 'serial',
  7677. 'not null' => '1',
  7678. ),
  7679. 'subject_id' => array(
  7680. // 'description' => 'TODO: please describe this field!',
  7681. 'type' => 'int',
  7682. 'not null' => '1',
  7683. ),
  7684. 'type_id' => array(
  7685. // 'description' => 'TODO: please describe this field!',
  7686. 'type' => 'int',
  7687. 'not null' => '1',
  7688. ),
  7689. 'object_id' => array(
  7690. // 'description' => 'TODO: please describe this field!',
  7691. 'type' => 'int',
  7692. 'not null' => '1',
  7693. ),
  7694. 'value' => array(
  7695. // 'description' => 'TODO: please describe this field!',
  7696. 'type' => 'text',
  7697. 'not null' => '',
  7698. ),
  7699. 'rank' => array(
  7700. // 'description' => 'TODO: please describe this field!',
  7701. 'type' => 'int',
  7702. 'not null' => '1',
  7703. 'default' => '0',
  7704. ),
  7705. ),
  7706. 'primary key' => array(
  7707. '0' => 'acquisition_relationship_id',
  7708. ),
  7709. 'unique keys' => array(
  7710. 'acquisition_relationship_c1' => array(
  7711. '0' => 'subject_id',
  7712. '1' => 'object_id',
  7713. '2' => 'type_id',
  7714. '3' => 'rank',
  7715. ),
  7716. ),
  7717. 'indexes' => array(
  7718. 'acquisition_relationship_idx1' => array(
  7719. '0' => 'subject_id',
  7720. ),
  7721. 'acquisition_relationship_idx2' => array(
  7722. '0' => 'type_id',
  7723. ),
  7724. 'acquisition_relationship_idx3' => array(
  7725. '0' => 'object_id',
  7726. ),
  7727. ),
  7728. 'foreign keys' => array(
  7729. ),
  7730. );
  7731. return $description;
  7732. }
  7733. /**
  7734. * Implements hook_acquisition_schema()
  7735. * Purpose: To describe the structure of acquisition to tripal
  7736. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7737. * @see tripal_core.api.inc: tripal_core_chado_update()
  7738. * @see tripal_core.api.inc: tripal_core_chado_select()
  7739. *
  7740. * @return
  7741. * An array describing the current table
  7742. *
  7743. * @ingroup tripal_schema_api
  7744. *
  7745. */
  7746. function tripal_core_chado_acquisition_schema () {
  7747. $description = array();
  7748. $description = array(
  7749. 'table' => 'acquisition',
  7750. // 'description' => 'TODO: please describe this table!',
  7751. 'fields' => array(
  7752. 'acquisition_id' => array(
  7753. // 'description' => 'TODO: please describe this field!',
  7754. 'type' => 'serial',
  7755. 'not null' => '1',
  7756. ),
  7757. 'assay_id' => array(
  7758. // 'description' => 'TODO: please describe this field!',
  7759. 'type' => 'int',
  7760. 'not null' => '1',
  7761. ),
  7762. 'protocol_id' => array(
  7763. // 'description' => 'TODO: please describe this field!',
  7764. 'type' => 'int',
  7765. 'not null' => '',
  7766. ),
  7767. 'channel_id' => array(
  7768. // 'description' => 'TODO: please describe this field!',
  7769. 'type' => 'int',
  7770. 'not null' => '',
  7771. ),
  7772. 'acquisitiondate' => array(
  7773. // 'description' => 'TODO: please describe this field!',
  7774. 'type' => 'datetime',
  7775. 'not null' => '',
  7776. 'default' => 'ow(',
  7777. ),
  7778. 'name' => array(
  7779. // 'description' => 'TODO: please describe this field!',
  7780. 'type' => 'text',
  7781. 'not null' => '',
  7782. ),
  7783. 'uri' => array(
  7784. // 'description' => 'TODO: please describe this field!',
  7785. 'type' => 'text',
  7786. 'not null' => '',
  7787. ),
  7788. ),
  7789. 'primary key' => array(
  7790. '0' => 'acquisition_id',
  7791. ),
  7792. 'unique keys' => array(
  7793. 'acquisition_c1' => array(
  7794. '0' => 'name',
  7795. ),
  7796. ),
  7797. 'indexes' => array(
  7798. 'acquisition_idx1' => array(
  7799. '0' => 'assay_id',
  7800. ),
  7801. 'acquisition_idx2' => array(
  7802. '0' => 'protocol_id',
  7803. ),
  7804. 'acquisition_idx3' => array(
  7805. '0' => 'channel_id',
  7806. ),
  7807. ),
  7808. 'foreign keys' => array(
  7809. ),
  7810. );
  7811. return $description;
  7812. }
  7813. /**
  7814. * Implements hook_acquisitionprop_schema()
  7815. * Purpose: To describe the structure of acquisitionprop to tripal
  7816. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7817. * @see tripal_core.api.inc: tripal_core_chado_update()
  7818. * @see tripal_core.api.inc: tripal_core_chado_select()
  7819. *
  7820. * @return
  7821. * An array describing the current table
  7822. *
  7823. * @ingroup tripal_schema_api
  7824. *
  7825. */
  7826. function tripal_core_chado_acquisitionprop_schema () {
  7827. $description = array();
  7828. $description = array(
  7829. 'table' => 'acquisitionprop',
  7830. // 'description' => 'TODO: please describe this table!',
  7831. 'fields' => array(
  7832. 'acquisitionprop_id' => array(
  7833. // 'description' => 'TODO: please describe this field!',
  7834. 'type' => 'serial',
  7835. 'not null' => '1',
  7836. ),
  7837. 'acquisition_id' => array(
  7838. // 'description' => 'TODO: please describe this field!',
  7839. 'type' => 'int',
  7840. 'not null' => '1',
  7841. ),
  7842. 'type_id' => array(
  7843. // 'description' => 'TODO: please describe this field!',
  7844. 'type' => 'int',
  7845. 'not null' => '1',
  7846. ),
  7847. 'value' => array(
  7848. // 'description' => 'TODO: please describe this field!',
  7849. 'type' => 'text',
  7850. 'not null' => '',
  7851. ),
  7852. 'rank' => array(
  7853. // 'description' => 'TODO: please describe this field!',
  7854. 'type' => 'int',
  7855. 'not null' => '1',
  7856. 'default' => '0',
  7857. ),
  7858. ),
  7859. 'primary key' => array(
  7860. '0' => 'acquisitionprop_id',
  7861. ),
  7862. 'unique keys' => array(
  7863. 'acquisitionprop_c1' => array(
  7864. '0' => 'acquisition_id',
  7865. '1' => 'type_id',
  7866. '2' => 'rank',
  7867. ),
  7868. ),
  7869. 'indexes' => array(
  7870. 'acquisitionprop_idx1' => array(
  7871. '0' => 'acquisition_id',
  7872. ),
  7873. 'acquisitionprop_idx2' => array(
  7874. '0' => 'type_id',
  7875. ),
  7876. ),
  7877. 'foreign keys' => array(
  7878. ),
  7879. );
  7880. return $description;
  7881. }
  7882. /**
  7883. * Implements hook_all_feature_names_schema()
  7884. * Purpose: To describe the structure of all_feature_names to tripal
  7885. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7886. * @see tripal_core.api.inc: tripal_core_chado_update()
  7887. * @see tripal_core.api.inc: tripal_core_chado_select()
  7888. *
  7889. * @return
  7890. * An array describing the current table
  7891. *
  7892. * @ingroup tripal_schema_api
  7893. *
  7894. */
  7895. function tripal_core_chado_all_feature_names_schema () {
  7896. $description = array();
  7897. $description = array(
  7898. 'table' => 'all_feature_names',
  7899. // 'description' => 'TODO: please describe this table!',
  7900. 'fields' => array(
  7901. 'feature_id' => array(
  7902. // 'description' => 'TODO: please describe this field!',
  7903. 'type' => 'int',
  7904. 'not null' => '',
  7905. ),
  7906. 'name' => array(
  7907. // 'description' => 'TODO: please describe this field!',
  7908. 'type' => 'varchar',
  7909. 'length' => '255',
  7910. 'not null' => '',
  7911. ),
  7912. 'organism_id' => array(
  7913. // 'description' => 'TODO: please describe this field!',
  7914. 'type' => 'int',
  7915. 'not null' => '',
  7916. ),
  7917. ),
  7918. 'primary key' => array(
  7919. ),
  7920. 'unique keys' => array(
  7921. ),
  7922. 'indexes' => array(
  7923. ),
  7924. 'foreign keys' => array(
  7925. ),
  7926. );
  7927. return $description;
  7928. }
  7929. /**
  7930. * Implements hook_analysis_schema()
  7931. * Purpose: To describe the structure of analysis to tripal
  7932. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7933. * @see tripal_core.api.inc: tripal_core_chado_update()
  7934. * @see tripal_core.api.inc: tripal_core_chado_select()
  7935. *
  7936. * @return
  7937. * An array describing the current table
  7938. *
  7939. * @ingroup tripal_schema_api
  7940. *
  7941. */
  7942. function tripal_core_chado_analysis_schema () {
  7943. $description = array();
  7944. $description = array(
  7945. 'table' => 'analysis',
  7946. // 'description' => 'TODO: please describe this table!',
  7947. 'fields' => array(
  7948. 'analysis_id' => array(
  7949. // 'description' => 'TODO: please describe this field!',
  7950. 'type' => 'serial',
  7951. 'not null' => '1',
  7952. ),
  7953. 'name' => array(
  7954. // 'description' => 'TODO: please describe this field!',
  7955. 'type' => 'varchar',
  7956. 'length' => '255',
  7957. 'not null' => '',
  7958. ),
  7959. 'description' => array(
  7960. // 'description' => 'TODO: please describe this field!',
  7961. 'type' => 'text',
  7962. 'not null' => '',
  7963. ),
  7964. 'program' => array(
  7965. // 'description' => 'TODO: please describe this field!',
  7966. 'type' => 'varchar',
  7967. 'length' => '255',
  7968. 'not null' => '1',
  7969. ),
  7970. 'programversion' => array(
  7971. // 'description' => 'TODO: please describe this field!',
  7972. 'type' => 'varchar',
  7973. 'length' => '255',
  7974. 'not null' => '1',
  7975. ),
  7976. 'algorithm' => array(
  7977. // 'description' => 'TODO: please describe this field!',
  7978. 'type' => 'varchar',
  7979. 'length' => '255',
  7980. 'not null' => '',
  7981. ),
  7982. 'sourcename' => array(
  7983. // 'description' => 'TODO: please describe this field!',
  7984. 'type' => 'varchar',
  7985. 'length' => '255',
  7986. 'not null' => '',
  7987. ),
  7988. 'sourceversion' => array(
  7989. // 'description' => 'TODO: please describe this field!',
  7990. 'type' => 'varchar',
  7991. 'length' => '255',
  7992. 'not null' => '',
  7993. ),
  7994. 'sourceuri' => array(
  7995. // 'description' => 'TODO: please describe this field!',
  7996. 'type' => 'text',
  7997. 'not null' => '',
  7998. ),
  7999. 'timeexecuted' => array(
  8000. // 'description' => 'TODO: please describe this field!',
  8001. 'type' => 'datetime',
  8002. 'not null' => '1',
  8003. 'default' => 'ow(',
  8004. ),
  8005. ),
  8006. 'primary key' => array(
  8007. '0' => 'analysis_id',
  8008. ),
  8009. 'unique keys' => array(
  8010. 'analysis_c1' => array(
  8011. '0' => 'program',
  8012. '1' => 'programversion',
  8013. '2' => 'sourcename',
  8014. ),
  8015. ),
  8016. 'indexes' => array(
  8017. ),
  8018. 'foreign keys' => array(
  8019. ),
  8020. );
  8021. return $description;
  8022. }
  8023. /**
  8024. * Implements hook_analysisfeature_schema()
  8025. * Purpose: To describe the structure of analysisfeature to tripal
  8026. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8027. * @see tripal_core.api.inc: tripal_core_chado_update()
  8028. * @see tripal_core.api.inc: tripal_core_chado_select()
  8029. *
  8030. * @return
  8031. * An array describing the current table
  8032. *
  8033. * @ingroup tripal_schema_api
  8034. *
  8035. */
  8036. function tripal_core_chado_analysisfeature_schema () {
  8037. $description = array();
  8038. $description = array(
  8039. 'table' => 'analysisfeature',
  8040. // 'description' => 'TODO: please describe this table!',
  8041. 'fields' => array(
  8042. 'analysisfeature_id' => array(
  8043. // 'description' => 'TODO: please describe this field!',
  8044. 'type' => 'serial',
  8045. 'not null' => '1',
  8046. ),
  8047. 'feature_id' => array(
  8048. // 'description' => 'TODO: please describe this field!',
  8049. 'type' => 'int',
  8050. 'not null' => '1',
  8051. ),
  8052. 'analysis_id' => array(
  8053. // 'description' => 'TODO: please describe this field!',
  8054. 'type' => 'int',
  8055. 'not null' => '1',
  8056. ),
  8057. 'rawscore' => array(
  8058. // 'description' => 'TODO: please describe this field!',
  8059. 'type' => 'float',
  8060. 'size' => 'big',
  8061. 'not null' => '',
  8062. ),
  8063. 'normscore' => array(
  8064. // 'description' => 'TODO: please describe this field!',
  8065. 'type' => 'float',
  8066. 'size' => 'big',
  8067. 'not null' => '',
  8068. ),
  8069. 'significance' => array(
  8070. // 'description' => 'TODO: please describe this field!',
  8071. 'type' => 'float',
  8072. 'size' => 'big',
  8073. 'not null' => '',
  8074. ),
  8075. 'identity' => array(
  8076. // 'description' => 'TODO: please describe this field!',
  8077. 'type' => 'float',
  8078. 'size' => 'big',
  8079. 'not null' => '',
  8080. ),
  8081. ),
  8082. 'primary key' => array(
  8083. '0' => 'analysisfeature_id',
  8084. ),
  8085. 'unique keys' => array(
  8086. 'analysisfeature_c1' => array(
  8087. '0' => 'feature_id',
  8088. '1' => 'analysis_id',
  8089. ),
  8090. ),
  8091. 'indexes' => array(
  8092. 'analysisfeature_idx1' => array(
  8093. '0' => 'feature_id',
  8094. ),
  8095. 'analysisfeature_idx2' => array(
  8096. '0' => 'analysis_id',
  8097. ),
  8098. ),
  8099. 'foreign keys' => array(
  8100. ),
  8101. );
  8102. return $description;
  8103. }
  8104. /**
  8105. * Implements hook_analysisfeatureprop_schema()
  8106. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8107. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8108. * @see tripal_core.api.inc: tripal_core_chado_update()
  8109. * @see tripal_core.api.inc: tripal_core_chado_select()
  8110. *
  8111. * @return
  8112. * An array describing the current table
  8113. *
  8114. * @ingroup tripal_schema_api
  8115. *
  8116. */
  8117. function tripal_core_chado_analysisfeatureprop_schema () {
  8118. $description = array();
  8119. $description = array(
  8120. 'table' => 'analysisfeatureprop',
  8121. // 'description' => 'TODO: please describe this table!',
  8122. 'fields' => array(
  8123. 'analysisfeatureprop_id' => array(
  8124. // 'description' => 'TODO: please describe this field!',
  8125. 'type' => 'serial',
  8126. 'not null' => '1',
  8127. ),
  8128. 'analysisfeature_id' => array(
  8129. // 'description' => 'TODO: please describe this field!',
  8130. 'type' => 'int',
  8131. 'not null' => '1',
  8132. ),
  8133. 'type_id' => array(
  8134. // 'description' => 'TODO: please describe this field!',
  8135. 'type' => 'int',
  8136. 'not null' => '1',
  8137. ),
  8138. 'value' => array(
  8139. // 'description' => 'TODO: please describe this field!',
  8140. 'type' => 'text',
  8141. 'not null' => '',
  8142. ),
  8143. 'rank' => array(
  8144. // 'description' => 'TODO: please describe this field!',
  8145. 'type' => 'int',
  8146. 'not null' => '1',
  8147. ),
  8148. ),
  8149. 'primary key' => array(
  8150. '0' => 'analysisfeatureprop_id',
  8151. ),
  8152. 'unique keys' => array(
  8153. 'analysisfeature_id_type_id_rank' => array(
  8154. '0' => 'analysisfeature_id',
  8155. '1' => 'type_id',
  8156. '2' => 'rank',
  8157. ),
  8158. ),
  8159. 'indexes' => array(
  8160. ),
  8161. 'foreign keys' => array(
  8162. ),
  8163. );
  8164. return $description;
  8165. }
  8166. /**
  8167. * Implements hook_assayprop_schema()
  8168. * Purpose: To describe the structure of assayprop to tripal
  8169. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8170. * @see tripal_core.api.inc: tripal_core_chado_update()
  8171. * @see tripal_core.api.inc: tripal_core_chado_select()
  8172. *
  8173. * @return
  8174. * An array describing the current table
  8175. *
  8176. * @ingroup tripal_schema_api
  8177. *
  8178. */
  8179. function tripal_core_chado_assayprop_schema () {
  8180. $description = array();
  8181. $description = array(
  8182. 'table' => 'assayprop',
  8183. // 'description' => 'TODO: please describe this table!',
  8184. 'fields' => array(
  8185. 'assayprop_id' => array(
  8186. // 'description' => 'TODO: please describe this field!',
  8187. 'type' => 'serial',
  8188. 'not null' => '1',
  8189. ),
  8190. 'assay_id' => array(
  8191. // 'description' => 'TODO: please describe this field!',
  8192. 'type' => 'int',
  8193. 'not null' => '1',
  8194. ),
  8195. 'type_id' => array(
  8196. // 'description' => 'TODO: please describe this field!',
  8197. 'type' => 'int',
  8198. 'not null' => '1',
  8199. ),
  8200. 'value' => array(
  8201. // 'description' => 'TODO: please describe this field!',
  8202. 'type' => 'text',
  8203. 'not null' => '',
  8204. ),
  8205. 'rank' => array(
  8206. // 'description' => 'TODO: please describe this field!',
  8207. 'type' => 'int',
  8208. 'not null' => '1',
  8209. 'default' => '0',
  8210. ),
  8211. ),
  8212. 'primary key' => array(
  8213. '0' => 'assayprop_id',
  8214. ),
  8215. 'unique keys' => array(
  8216. 'assayprop_c1' => array(
  8217. '0' => 'assay_id',
  8218. '1' => 'type_id',
  8219. '2' => 'rank',
  8220. ),
  8221. ),
  8222. 'indexes' => array(
  8223. 'assayprop_idx1' => array(
  8224. '0' => 'assay_id',
  8225. ),
  8226. 'assayprop_idx2' => array(
  8227. '0' => 'type_id',
  8228. ),
  8229. ),
  8230. 'foreign keys' => array(
  8231. ),
  8232. );
  8233. return $description;
  8234. }
  8235. /**
  8236. * Implements hook_biomaterial_schema()
  8237. * Purpose: To describe the structure of biomaterial to tripal
  8238. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8239. * @see tripal_core.api.inc: tripal_core_chado_update()
  8240. * @see tripal_core.api.inc: tripal_core_chado_select()
  8241. *
  8242. * @return
  8243. * An array describing the current table
  8244. *
  8245. * @ingroup tripal_schema_api
  8246. *
  8247. */
  8248. function tripal_core_chado_biomaterial_schema () {
  8249. $description = array();
  8250. $description = array(
  8251. 'table' => 'biomaterial',
  8252. // 'description' => 'TODO: please describe this table!',
  8253. 'fields' => array(
  8254. 'biomaterial_id' => array(
  8255. // 'description' => 'TODO: please describe this field!',
  8256. 'type' => 'serial',
  8257. 'not null' => '1',
  8258. ),
  8259. 'taxon_id' => array(
  8260. // 'description' => 'TODO: please describe this field!',
  8261. 'type' => 'int',
  8262. 'not null' => '',
  8263. ),
  8264. 'biosourceprovider_id' => array(
  8265. // 'description' => 'TODO: please describe this field!',
  8266. 'type' => 'int',
  8267. 'not null' => '',
  8268. ),
  8269. 'dbxref_id' => array(
  8270. // 'description' => 'TODO: please describe this field!',
  8271. 'type' => 'int',
  8272. 'not null' => '',
  8273. ),
  8274. 'name' => array(
  8275. // 'description' => 'TODO: please describe this field!',
  8276. 'type' => 'text',
  8277. 'not null' => '',
  8278. ),
  8279. 'description' => array(
  8280. // 'description' => 'TODO: please describe this field!',
  8281. 'type' => 'text',
  8282. 'not null' => '',
  8283. ),
  8284. ),
  8285. 'primary key' => array(
  8286. '0' => 'biomaterial_id',
  8287. ),
  8288. 'unique keys' => array(
  8289. 'biomaterial_c1' => array(
  8290. '0' => 'name',
  8291. ),
  8292. ),
  8293. 'indexes' => array(
  8294. 'biomaterial_idx1' => array(
  8295. '0' => 'taxon_id',
  8296. ),
  8297. 'biomaterial_idx2' => array(
  8298. '0' => 'biosourceprovider_id',
  8299. ),
  8300. 'biomaterial_idx3' => array(
  8301. '0' => 'dbxref_id',
  8302. ),
  8303. ),
  8304. 'foreign keys' => array(
  8305. ),
  8306. );
  8307. return $description;
  8308. }
  8309. /**
  8310. * Implements hook_biomaterial_dbxref_schema()
  8311. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8312. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8313. * @see tripal_core.api.inc: tripal_core_chado_update()
  8314. * @see tripal_core.api.inc: tripal_core_chado_select()
  8315. *
  8316. * @return
  8317. * An array describing the current table
  8318. *
  8319. * @ingroup tripal_schema_api
  8320. *
  8321. */
  8322. function tripal_core_chado_biomaterial_dbxref_schema () {
  8323. $description = array();
  8324. $description = array(
  8325. 'table' => 'biomaterial_dbxref',
  8326. // 'description' => 'TODO: please describe this table!',
  8327. 'fields' => array(
  8328. 'biomaterial_dbxref_id' => array(
  8329. // 'description' => 'TODO: please describe this field!',
  8330. 'type' => 'serial',
  8331. 'not null' => '1',
  8332. ),
  8333. 'biomaterial_id' => array(
  8334. // 'description' => 'TODO: please describe this field!',
  8335. 'type' => 'int',
  8336. 'not null' => '1',
  8337. ),
  8338. 'dbxref_id' => array(
  8339. // 'description' => 'TODO: please describe this field!',
  8340. 'type' => 'int',
  8341. 'not null' => '1',
  8342. ),
  8343. ),
  8344. 'primary key' => array(
  8345. '0' => 'biomaterial_dbxref_id',
  8346. ),
  8347. 'unique keys' => array(
  8348. 'biomaterial_dbxref_c1' => array(
  8349. '0' => 'biomaterial_id',
  8350. '1' => 'dbxref_id',
  8351. ),
  8352. ),
  8353. 'indexes' => array(
  8354. 'biomaterial_dbxref_idx1' => array(
  8355. '0' => 'biomaterial_id',
  8356. ),
  8357. 'biomaterial_dbxref_idx2' => array(
  8358. '0' => 'dbxref_id',
  8359. ),
  8360. ),
  8361. 'foreign keys' => array(
  8362. ),
  8363. );
  8364. return $description;
  8365. }
  8366. /**
  8367. * Implements hook_biomaterial_relationship_schema()
  8368. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8369. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8370. * @see tripal_core.api.inc: tripal_core_chado_update()
  8371. * @see tripal_core.api.inc: tripal_core_chado_select()
  8372. *
  8373. * @return
  8374. * An array describing the current table
  8375. *
  8376. * @ingroup tripal_schema_api
  8377. *
  8378. */
  8379. function tripal_core_chado_biomaterial_relationship_schema () {
  8380. $description = array();
  8381. $description = array(
  8382. 'table' => 'biomaterial_relationship',
  8383. // 'description' => 'TODO: please describe this table!',
  8384. 'fields' => array(
  8385. 'biomaterial_relationship_id' => array(
  8386. // 'description' => 'TODO: please describe this field!',
  8387. 'type' => 'serial',
  8388. 'not null' => '1',
  8389. ),
  8390. 'subject_id' => array(
  8391. // 'description' => 'TODO: please describe this field!',
  8392. 'type' => 'int',
  8393. 'not null' => '1',
  8394. ),
  8395. 'type_id' => array(
  8396. // 'description' => 'TODO: please describe this field!',
  8397. 'type' => 'int',
  8398. 'not null' => '1',
  8399. ),
  8400. 'object_id' => array(
  8401. // 'description' => 'TODO: please describe this field!',
  8402. 'type' => 'int',
  8403. 'not null' => '1',
  8404. ),
  8405. ),
  8406. 'primary key' => array(
  8407. '0' => 'biomaterial_relationship_id',
  8408. ),
  8409. 'unique keys' => array(
  8410. 'biomaterial_relationship_c1' => array(
  8411. '0' => 'subject_id',
  8412. '1' => 'object_id',
  8413. '2' => 'type_id',
  8414. ),
  8415. ),
  8416. 'indexes' => array(
  8417. 'biomaterial_relationship_idx1' => array(
  8418. '0' => 'subject_id',
  8419. ),
  8420. 'biomaterial_relationship_idx2' => array(
  8421. '0' => 'object_id',
  8422. ),
  8423. 'biomaterial_relationship_idx3' => array(
  8424. '0' => 'type_id',
  8425. ),
  8426. ),
  8427. 'foreign keys' => array(
  8428. ),
  8429. );
  8430. return $description;
  8431. }
  8432. /**
  8433. * Implements hook_assay_project_schema()
  8434. * Purpose: To describe the structure of assay_project to tripal
  8435. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8436. * @see tripal_core.api.inc: tripal_core_chado_update()
  8437. * @see tripal_core.api.inc: tripal_core_chado_select()
  8438. *
  8439. * @return
  8440. * An array describing the current table
  8441. *
  8442. * @ingroup tripal_schema_api
  8443. *
  8444. */
  8445. function tripal_core_chado_assay_project_schema () {
  8446. $description = array();
  8447. $description = array(
  8448. 'table' => 'assay_project',
  8449. // 'description' => 'TODO: please describe this table!',
  8450. 'fields' => array(
  8451. 'assay_project_id' => array(
  8452. // 'description' => 'TODO: please describe this field!',
  8453. 'type' => 'serial',
  8454. 'not null' => '1',
  8455. ),
  8456. 'assay_id' => array(
  8457. // 'description' => 'TODO: please describe this field!',
  8458. 'type' => 'int',
  8459. 'not null' => '1',
  8460. ),
  8461. 'project_id' => array(
  8462. // 'description' => 'TODO: please describe this field!',
  8463. 'type' => 'int',
  8464. 'not null' => '1',
  8465. ),
  8466. ),
  8467. 'primary key' => array(
  8468. '0' => 'assay_project_id',
  8469. ),
  8470. 'unique keys' => array(
  8471. 'assay_project_c1' => array(
  8472. '0' => 'assay_id',
  8473. '1' => 'project_id',
  8474. ),
  8475. ),
  8476. 'indexes' => array(
  8477. 'assay_project_idx1' => array(
  8478. '0' => 'assay_id',
  8479. ),
  8480. 'assay_project_idx2' => array(
  8481. '0' => 'project_id',
  8482. ),
  8483. ),
  8484. 'foreign keys' => array(
  8485. ),
  8486. );
  8487. return $description;
  8488. }
  8489. /**
  8490. * Implements hook_assay_biomaterial_schema()
  8491. * Purpose: To describe the structure of assay_biomaterial to tripal
  8492. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8493. * @see tripal_core.api.inc: tripal_core_chado_update()
  8494. * @see tripal_core.api.inc: tripal_core_chado_select()
  8495. *
  8496. * @return
  8497. * An array describing the current table
  8498. *
  8499. * @ingroup tripal_schema_api
  8500. *
  8501. */
  8502. function tripal_core_chado_assay_biomaterial_schema () {
  8503. $description = array();
  8504. $description = array(
  8505. 'table' => 'assay_biomaterial',
  8506. // 'description' => 'TODO: please describe this table!',
  8507. 'fields' => array(
  8508. 'assay_biomaterial_id' => array(
  8509. // 'description' => 'TODO: please describe this field!',
  8510. 'type' => 'serial',
  8511. 'not null' => '1',
  8512. ),
  8513. 'assay_id' => array(
  8514. // 'description' => 'TODO: please describe this field!',
  8515. 'type' => 'int',
  8516. 'not null' => '1',
  8517. ),
  8518. 'biomaterial_id' => array(
  8519. // 'description' => 'TODO: please describe this field!',
  8520. 'type' => 'int',
  8521. 'not null' => '1',
  8522. ),
  8523. 'channel_id' => array(
  8524. // 'description' => 'TODO: please describe this field!',
  8525. 'type' => 'int',
  8526. 'not null' => '',
  8527. ),
  8528. 'rank' => array(
  8529. // 'description' => 'TODO: please describe this field!',
  8530. 'type' => 'int',
  8531. 'not null' => '1',
  8532. 'default' => '0',
  8533. ),
  8534. ),
  8535. 'primary key' => array(
  8536. '0' => 'assay_biomaterial_id',
  8537. ),
  8538. 'unique keys' => array(
  8539. 'assay_biomaterial_c1' => array(
  8540. '0' => 'assay_id',
  8541. '1' => 'biomaterial_id',
  8542. '2' => 'channel_id',
  8543. '3' => 'rank',
  8544. ),
  8545. ),
  8546. 'indexes' => array(
  8547. 'assay_biomaterial_idx1' => array(
  8548. '0' => 'assay_id',
  8549. ),
  8550. 'assay_biomaterial_idx2' => array(
  8551. '0' => 'biomaterial_id',
  8552. ),
  8553. 'assay_biomaterial_idx3' => array(
  8554. '0' => 'channel_id',
  8555. ),
  8556. ),
  8557. 'foreign keys' => array(
  8558. ),
  8559. );
  8560. return $description;
  8561. }
  8562. /**
  8563. * Implements hook_analysisprop_schema()
  8564. * Purpose: To describe the structure of analysisprop to tripal
  8565. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8566. * @see tripal_core.api.inc: tripal_core_chado_update()
  8567. * @see tripal_core.api.inc: tripal_core_chado_select()
  8568. *
  8569. * @return
  8570. * An array describing the current table
  8571. *
  8572. * @ingroup tripal_schema_api
  8573. *
  8574. */
  8575. function tripal_core_chado_analysisprop_schema () {
  8576. $description = array();
  8577. $description = array(
  8578. 'table' => 'analysisprop',
  8579. // 'description' => 'TODO: please describe this table!',
  8580. 'fields' => array(
  8581. 'analysisprop_id' => array(
  8582. // 'description' => 'TODO: please describe this field!',
  8583. 'type' => 'serial',
  8584. 'not null' => '1',
  8585. ),
  8586. 'analysis_id' => array(
  8587. // 'description' => 'TODO: please describe this field!',
  8588. 'type' => 'int',
  8589. 'not null' => '1',
  8590. ),
  8591. 'type_id' => array(
  8592. // 'description' => 'TODO: please describe this field!',
  8593. 'type' => 'int',
  8594. 'not null' => '1',
  8595. ),
  8596. 'value' => array(
  8597. // 'description' => 'TODO: please describe this field!',
  8598. 'type' => 'text',
  8599. 'not null' => '',
  8600. ),
  8601. 'rank' => array(
  8602. // 'description' => 'TODO: please describe this field!',
  8603. 'type' => 'int',
  8604. 'not null' => '1',
  8605. 'default' => '0',
  8606. ),
  8607. ),
  8608. 'primary key' => array(
  8609. '0' => 'analysisprop_id',
  8610. ),
  8611. 'unique keys' => array(
  8612. 'analysisprop_c1' => array(
  8613. '0' => 'analysis_id',
  8614. '1' => 'type_id',
  8615. '2' => 'rank',
  8616. ),
  8617. ),
  8618. 'indexes' => array(
  8619. 'analysisprop_idx1' => array(
  8620. '0' => 'analysis_id',
  8621. ),
  8622. 'analysisprop_idx2' => array(
  8623. '0' => 'type_id',
  8624. ),
  8625. ),
  8626. 'foreign keys' => array(
  8627. ),
  8628. );
  8629. return $description;
  8630. }
  8631. /**
  8632. * Implements hook_arraydesign_schema()
  8633. * Purpose: To describe the structure of arraydesign to tripal
  8634. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8635. * @see tripal_core.api.inc: tripal_core_chado_update()
  8636. * @see tripal_core.api.inc: tripal_core_chado_select()
  8637. *
  8638. * @return
  8639. * An array describing the current table
  8640. *
  8641. * @ingroup tripal_schema_api
  8642. *
  8643. */
  8644. function tripal_core_chado_arraydesign_schema () {
  8645. $description = array();
  8646. $description = array(
  8647. 'table' => 'arraydesign',
  8648. // 'description' => 'TODO: please describe this table!',
  8649. 'fields' => array(
  8650. 'arraydesign_id' => array(
  8651. // 'description' => 'TODO: please describe this field!',
  8652. 'type' => 'serial',
  8653. 'not null' => '1',
  8654. ),
  8655. 'manufacturer_id' => array(
  8656. // 'description' => 'TODO: please describe this field!',
  8657. 'type' => 'int',
  8658. 'not null' => '1',
  8659. ),
  8660. 'platformtype_id' => array(
  8661. // 'description' => 'TODO: please describe this field!',
  8662. 'type' => 'int',
  8663. 'not null' => '1',
  8664. ),
  8665. 'substratetype_id' => array(
  8666. // 'description' => 'TODO: please describe this field!',
  8667. 'type' => 'int',
  8668. 'not null' => '',
  8669. ),
  8670. 'protocol_id' => array(
  8671. // 'description' => 'TODO: please describe this field!',
  8672. 'type' => 'int',
  8673. 'not null' => '',
  8674. ),
  8675. 'dbxref_id' => array(
  8676. // 'description' => 'TODO: please describe this field!',
  8677. 'type' => 'int',
  8678. 'not null' => '',
  8679. ),
  8680. 'name' => array(
  8681. // 'description' => 'TODO: please describe this field!',
  8682. 'type' => 'text',
  8683. 'not null' => '1',
  8684. ),
  8685. 'version' => array(
  8686. // 'description' => 'TODO: please describe this field!',
  8687. 'type' => 'text',
  8688. 'not null' => '',
  8689. ),
  8690. 'description' => array(
  8691. // 'description' => 'TODO: please describe this field!',
  8692. 'type' => 'text',
  8693. 'not null' => '',
  8694. ),
  8695. 'array_dimensions' => array(
  8696. // 'description' => 'TODO: please describe this field!',
  8697. 'type' => 'text',
  8698. 'not null' => '',
  8699. ),
  8700. 'element_dimensions' => array(
  8701. // 'description' => 'TODO: please describe this field!',
  8702. 'type' => 'text',
  8703. 'not null' => '',
  8704. ),
  8705. 'num_of_elements' => array(
  8706. // 'description' => 'TODO: please describe this field!',
  8707. 'type' => 'int',
  8708. 'not null' => '',
  8709. ),
  8710. 'num_array_columns' => array(
  8711. // 'description' => 'TODO: please describe this field!',
  8712. 'type' => 'int',
  8713. 'not null' => '',
  8714. ),
  8715. 'num_array_rows' => array(
  8716. // 'description' => 'TODO: please describe this field!',
  8717. 'type' => 'int',
  8718. 'not null' => '',
  8719. ),
  8720. 'num_grid_columns' => array(
  8721. // 'description' => 'TODO: please describe this field!',
  8722. 'type' => 'int',
  8723. 'not null' => '',
  8724. ),
  8725. 'num_grid_rows' => array(
  8726. // 'description' => 'TODO: please describe this field!',
  8727. 'type' => 'int',
  8728. 'not null' => '',
  8729. ),
  8730. 'num_sub_columns' => array(
  8731. // 'description' => 'TODO: please describe this field!',
  8732. 'type' => 'int',
  8733. 'not null' => '',
  8734. ),
  8735. 'num_sub_rows' => array(
  8736. // 'description' => 'TODO: please describe this field!',
  8737. 'type' => 'int',
  8738. 'not null' => '',
  8739. ),
  8740. ),
  8741. 'primary key' => array(
  8742. '0' => 'arraydesign_id',
  8743. ),
  8744. 'unique keys' => array(
  8745. 'arraydesign_c1' => array(
  8746. '0' => 'name',
  8747. ),
  8748. ),
  8749. 'indexes' => array(
  8750. 'arraydesign_idx1' => array(
  8751. '0' => 'manufacturer_id',
  8752. ),
  8753. 'arraydesign_idx2' => array(
  8754. '0' => 'platformtype_id',
  8755. ),
  8756. 'arraydesign_idx3' => array(
  8757. '0' => 'substratetype_id',
  8758. ),
  8759. 'arraydesign_idx4' => array(
  8760. '0' => 'protocol_id',
  8761. ),
  8762. 'arraydesign_idx5' => array(
  8763. '0' => 'dbxref_id',
  8764. ),
  8765. ),
  8766. 'foreign keys' => array(
  8767. ),
  8768. );
  8769. return $description;
  8770. }
  8771. /**
  8772. * Implements hook_arraydesignprop_schema()
  8773. * Purpose: To describe the structure of arraydesignprop to tripal
  8774. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8775. * @see tripal_core.api.inc: tripal_core_chado_update()
  8776. * @see tripal_core.api.inc: tripal_core_chado_select()
  8777. *
  8778. * @return
  8779. * An array describing the current table
  8780. *
  8781. * @ingroup tripal_schema_api
  8782. *
  8783. */
  8784. function tripal_core_chado_arraydesignprop_schema () {
  8785. $description = array();
  8786. $description = array(
  8787. 'table' => 'arraydesignprop',
  8788. // 'description' => 'TODO: please describe this table!',
  8789. 'fields' => array(
  8790. 'arraydesignprop_id' => array(
  8791. // 'description' => 'TODO: please describe this field!',
  8792. 'type' => 'serial',
  8793. 'not null' => '1',
  8794. ),
  8795. 'arraydesign_id' => array(
  8796. // 'description' => 'TODO: please describe this field!',
  8797. 'type' => 'int',
  8798. 'not null' => '1',
  8799. ),
  8800. 'type_id' => array(
  8801. // 'description' => 'TODO: please describe this field!',
  8802. 'type' => 'int',
  8803. 'not null' => '1',
  8804. ),
  8805. 'value' => array(
  8806. // 'description' => 'TODO: please describe this field!',
  8807. 'type' => 'text',
  8808. 'not null' => '',
  8809. ),
  8810. 'rank' => array(
  8811. // 'description' => 'TODO: please describe this field!',
  8812. 'type' => 'int',
  8813. 'not null' => '1',
  8814. 'default' => '0',
  8815. ),
  8816. ),
  8817. 'primary key' => array(
  8818. '0' => 'arraydesignprop_id',
  8819. ),
  8820. 'unique keys' => array(
  8821. 'arraydesignprop_c1' => array(
  8822. '0' => 'arraydesign_id',
  8823. '1' => 'type_id',
  8824. '2' => 'rank',
  8825. ),
  8826. ),
  8827. 'indexes' => array(
  8828. 'arraydesignprop_idx1' => array(
  8829. '0' => 'arraydesign_id',
  8830. ),
  8831. 'arraydesignprop_idx2' => array(
  8832. '0' => 'type_id',
  8833. ),
  8834. ),
  8835. 'foreign keys' => array(
  8836. ),
  8837. );
  8838. return $description;
  8839. }
  8840. /**
  8841. * Implements hook_assay_schema()
  8842. * Purpose: To describe the structure of assay to tripal
  8843. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8844. * @see tripal_core.api.inc: tripal_core_chado_update()
  8845. * @see tripal_core.api.inc: tripal_core_chado_select()
  8846. *
  8847. * @return
  8848. * An array describing the current table
  8849. *
  8850. * @ingroup tripal_schema_api
  8851. *
  8852. */
  8853. function tripal_core_chado_assay_schema () {
  8854. $description = array();
  8855. $description = array(
  8856. 'table' => 'assay',
  8857. // 'description' => 'TODO: please describe this table!',
  8858. 'fields' => array(
  8859. 'assay_id' => array(
  8860. // 'description' => 'TODO: please describe this field!',
  8861. 'type' => 'serial',
  8862. 'not null' => '1',
  8863. ),
  8864. 'arraydesign_id' => array(
  8865. // 'description' => 'TODO: please describe this field!',
  8866. 'type' => 'int',
  8867. 'not null' => '1',
  8868. ),
  8869. 'protocol_id' => array(
  8870. // 'description' => 'TODO: please describe this field!',
  8871. 'type' => 'int',
  8872. 'not null' => '',
  8873. ),
  8874. 'assaydate' => array(
  8875. // 'description' => 'TODO: please describe this field!',
  8876. 'type' => 'datetime',
  8877. 'not null' => '',
  8878. 'default' => 'ow(',
  8879. ),
  8880. 'arrayidentifier' => array(
  8881. // 'description' => 'TODO: please describe this field!',
  8882. 'type' => 'text',
  8883. 'not null' => '',
  8884. ),
  8885. 'arraybatchidentifier' => array(
  8886. // 'description' => 'TODO: please describe this field!',
  8887. 'type' => 'text',
  8888. 'not null' => '',
  8889. ),
  8890. 'operator_id' => array(
  8891. // 'description' => 'TODO: please describe this field!',
  8892. 'type' => 'int',
  8893. 'not null' => '1',
  8894. ),
  8895. 'dbxref_id' => array(
  8896. // 'description' => 'TODO: please describe this field!',
  8897. 'type' => 'int',
  8898. 'not null' => '',
  8899. ),
  8900. 'name' => array(
  8901. // 'description' => 'TODO: please describe this field!',
  8902. 'type' => 'text',
  8903. 'not null' => '',
  8904. ),
  8905. 'description' => array(
  8906. // 'description' => 'TODO: please describe this field!',
  8907. 'type' => 'text',
  8908. 'not null' => '',
  8909. ),
  8910. ),
  8911. 'primary key' => array(
  8912. '0' => 'assay_id',
  8913. ),
  8914. 'unique keys' => array(
  8915. 'assay_c1' => array(
  8916. '0' => 'name',
  8917. ),
  8918. ),
  8919. 'indexes' => array(
  8920. 'assay_idx1' => array(
  8921. '0' => 'arraydesign_id',
  8922. ),
  8923. 'assay_idx2' => array(
  8924. '0' => 'protocol_id',
  8925. ),
  8926. 'assay_idx3' => array(
  8927. '0' => 'operator_id',
  8928. ),
  8929. 'assay_idx4' => array(
  8930. '0' => 'dbxref_id',
  8931. ),
  8932. ),
  8933. 'foreign keys' => array(
  8934. ),
  8935. );
  8936. return $description;
  8937. }
  8938. /**
  8939. * Implements hook_cv_root_schema()
  8940. * Purpose: To describe the structure of cv_root to tripal
  8941. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8942. * @see tripal_core.api.inc: tripal_core_chado_update()
  8943. * @see tripal_core.api.inc: tripal_core_chado_select()
  8944. *
  8945. * @return
  8946. * An array describing the current table
  8947. *
  8948. * @ingroup tripal_schema_api
  8949. *
  8950. */
  8951. function tripal_core_chado_cv_root_schema () {
  8952. $description = array();
  8953. $description = array(
  8954. 'table' => 'cv_root',
  8955. // 'description' => 'TODO: please describe this table!',
  8956. 'fields' => array(
  8957. 'cv_id' => array(
  8958. // 'description' => 'TODO: please describe this field!',
  8959. 'type' => 'int',
  8960. 'not null' => '',
  8961. ),
  8962. 'root_cvterm_id' => array(
  8963. // 'description' => 'TODO: please describe this field!',
  8964. 'type' => 'int',
  8965. 'not null' => '',
  8966. ),
  8967. ),
  8968. 'primary key' => array(
  8969. ),
  8970. 'unique keys' => array(
  8971. ),
  8972. 'indexes' => array(
  8973. ),
  8974. 'foreign keys' => array(
  8975. ),
  8976. );
  8977. return $description;
  8978. }
  8979. /**
  8980. * Implements hook_cvterm_schema()
  8981. * Purpose: To describe the structure of cvterm to tripal
  8982. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8983. * @see tripal_core.api.inc: tripal_core_chado_update()
  8984. * @see tripal_core.api.inc: tripal_core_chado_select()
  8985. *
  8986. * @return
  8987. * An array describing the current table
  8988. *
  8989. * @ingroup tripal_schema_api
  8990. *
  8991. */
  8992. function tripal_core_chado_cvterm_schema () {
  8993. $description = array();
  8994. $description = array(
  8995. 'table' => 'cvterm',
  8996. // 'description' => 'TODO: please describe this table!',
  8997. 'fields' => array(
  8998. 'cvterm_id' => array(
  8999. // 'description' => 'TODO: please describe this field!',
  9000. 'type' => 'serial',
  9001. 'not null' => '1',
  9002. ),
  9003. 'cv_id' => array(
  9004. // 'description' => 'TODO: please describe this field!',
  9005. 'type' => 'int',
  9006. 'not null' => '1',
  9007. ),
  9008. 'name' => array(
  9009. // 'description' => 'TODO: please describe this field!',
  9010. 'type' => 'varchar',
  9011. 'length' => '1024',
  9012. 'not null' => '1',
  9013. ),
  9014. 'definition' => array(
  9015. // 'description' => 'TODO: please describe this field!',
  9016. 'type' => 'text',
  9017. 'not null' => '',
  9018. ),
  9019. 'dbxref_id' => array(
  9020. // 'description' => 'TODO: please describe this field!',
  9021. 'type' => 'int',
  9022. 'not null' => '1',
  9023. ),
  9024. 'is_obsolete' => array(
  9025. // 'description' => 'TODO: please describe this field!',
  9026. 'type' => 'int',
  9027. 'not null' => '1',
  9028. 'default' => '0',
  9029. ),
  9030. 'is_relationshiptype' => array(
  9031. // 'description' => 'TODO: please describe this field!',
  9032. 'type' => 'int',
  9033. 'not null' => '1',
  9034. 'default' => '0',
  9035. ),
  9036. ),
  9037. 'primary key' => array(
  9038. '0' => 'cvterm_id',
  9039. ),
  9040. 'unique keys' => array(
  9041. 'cvterm_c1' => array(
  9042. '0' => 'name',
  9043. '1' => 'cv_id',
  9044. '2' => 'is_obsolete',
  9045. ),
  9046. 'cvterm_c2' => array(
  9047. '0' => 'dbxref_id',
  9048. ),
  9049. ),
  9050. 'indexes' => array(
  9051. 'cvterm_idx1' => array(
  9052. '0' => 'cv_id',
  9053. ),
  9054. 'cvterm_idx2' => array(
  9055. '0' => 'name',
  9056. ),
  9057. 'cvterm_idx3' => array(
  9058. '0' => 'dbxref_id',
  9059. ),
  9060. ),
  9061. 'foreign keys' => array(
  9062. ),
  9063. );
  9064. return $description;
  9065. }
  9066. /**
  9067. * Implements hook_feature_dbxref_schema()
  9068. * Purpose: To describe the structure of feature_dbxref to tripal
  9069. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9070. * @see tripal_core.api.inc: tripal_core_chado_update()
  9071. * @see tripal_core.api.inc: tripal_core_chado_select()
  9072. *
  9073. * @return
  9074. * An array describing the current table
  9075. *
  9076. * @ingroup tripal_schema_api
  9077. *
  9078. */
  9079. function tripal_core_chado_feature_dbxref_schema () {
  9080. $description = array();
  9081. $description = array(
  9082. 'table' => 'feature_dbxref',
  9083. // 'description' => 'TODO: please describe this table!',
  9084. 'fields' => array(
  9085. 'feature_dbxref_id' => array(
  9086. // 'description' => 'TODO: please describe this field!',
  9087. 'type' => 'serial',
  9088. 'not null' => '1',
  9089. ),
  9090. 'feature_id' => array(
  9091. // 'description' => 'TODO: please describe this field!',
  9092. 'type' => 'int',
  9093. 'not null' => '1',
  9094. ),
  9095. 'dbxref_id' => array(
  9096. // 'description' => 'TODO: please describe this field!',
  9097. 'type' => 'int',
  9098. 'not null' => '1',
  9099. ),
  9100. 'is_current' => array(
  9101. // 'description' => 'TODO: please describe this field!',
  9102. 'type' => 'boolean',
  9103. 'not null' => '1',
  9104. 'default' => 'ru',
  9105. ),
  9106. ),
  9107. 'primary key' => array(
  9108. '0' => 'feature_dbxref_id',
  9109. ),
  9110. 'unique keys' => array(
  9111. 'feature_dbxref_c1' => array(
  9112. '0' => 'feature_id',
  9113. '1' => 'dbxref_id',
  9114. ),
  9115. ),
  9116. 'indexes' => array(
  9117. 'feature_dbxref_idx1' => array(
  9118. '0' => 'feature_id',
  9119. ),
  9120. 'feature_dbxref_idx2' => array(
  9121. '0' => 'dbxref_id',
  9122. ),
  9123. ),
  9124. 'foreign keys' => array(
  9125. ),
  9126. );
  9127. return $description;
  9128. }
  9129. /**
  9130. * Implements hook_feature_cvtermprop_schema()
  9131. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9132. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9133. * @see tripal_core.api.inc: tripal_core_chado_update()
  9134. * @see tripal_core.api.inc: tripal_core_chado_select()
  9135. *
  9136. * @return
  9137. * An array describing the current table
  9138. *
  9139. * @ingroup tripal_schema_api
  9140. *
  9141. */
  9142. function tripal_core_chado_feature_cvtermprop_schema () {
  9143. $description = array();
  9144. $description = array(
  9145. 'table' => 'feature_cvtermprop',
  9146. // 'description' => 'TODO: please describe this table!',
  9147. 'fields' => array(
  9148. 'feature_cvtermprop_id' => array(
  9149. // 'description' => 'TODO: please describe this field!',
  9150. 'type' => 'serial',
  9151. 'not null' => '1',
  9152. ),
  9153. 'feature_cvterm_id' => array(
  9154. // 'description' => 'TODO: please describe this field!',
  9155. 'type' => 'int',
  9156. 'not null' => '1',
  9157. ),
  9158. 'type_id' => array(
  9159. // 'description' => 'TODO: please describe this field!',
  9160. 'type' => 'int',
  9161. 'not null' => '1',
  9162. ),
  9163. 'value' => array(
  9164. // 'description' => 'TODO: please describe this field!',
  9165. 'type' => 'text',
  9166. 'not null' => '',
  9167. ),
  9168. 'rank' => array(
  9169. // 'description' => 'TODO: please describe this field!',
  9170. 'type' => 'int',
  9171. 'not null' => '1',
  9172. 'default' => '0',
  9173. ),
  9174. ),
  9175. 'primary key' => array(
  9176. '0' => 'feature_cvtermprop_id',
  9177. ),
  9178. 'unique keys' => array(
  9179. 'feature_cvtermprop_c1' => array(
  9180. '0' => 'feature_cvterm_id',
  9181. '1' => 'type_id',
  9182. '2' => 'rank',
  9183. ),
  9184. ),
  9185. 'indexes' => array(
  9186. 'feature_cvtermprop_idx1' => array(
  9187. '0' => 'feature_cvterm_id',
  9188. ),
  9189. 'feature_cvtermprop_idx2' => array(
  9190. '0' => 'type_id',
  9191. ),
  9192. ),
  9193. 'foreign keys' => array(
  9194. ),
  9195. );
  9196. return $description;
  9197. }
  9198. /**
  9199. * Implements hook_feature_difference_schema()
  9200. * Purpose: To describe the structure of feature_difference to tripal
  9201. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9202. * @see tripal_core.api.inc: tripal_core_chado_update()
  9203. * @see tripal_core.api.inc: tripal_core_chado_select()
  9204. *
  9205. * @return
  9206. * An array describing the current table
  9207. *
  9208. * @ingroup tripal_schema_api
  9209. *
  9210. */
  9211. function tripal_core_chado_feature_difference_schema () {
  9212. $description = array();
  9213. $description = array(
  9214. 'table' => 'feature_difference',
  9215. // 'description' => 'TODO: please describe this table!',
  9216. 'fields' => array(
  9217. 'subject_id' => array(
  9218. // 'description' => 'TODO: please describe this field!',
  9219. 'type' => 'int',
  9220. 'not null' => '',
  9221. ),
  9222. 'object_id' => array(
  9223. // 'description' => 'TODO: please describe this field!',
  9224. 'type' => 'int',
  9225. 'not null' => '',
  9226. ),
  9227. 'srcfeature_id' => array(
  9228. // 'description' => 'TODO: please describe this field!',
  9229. 'type' => 'int',
  9230. 'size' => 'small',
  9231. 'not null' => '',
  9232. ),
  9233. 'fmin' => array(
  9234. // 'description' => 'TODO: please describe this field!',
  9235. 'type' => 'int',
  9236. 'not null' => '',
  9237. ),
  9238. 'fmax' => array(
  9239. // 'description' => 'TODO: please describe this field!',
  9240. 'type' => 'int',
  9241. 'not null' => '',
  9242. ),
  9243. 'strand' => array(
  9244. // 'description' => 'TODO: please describe this field!',
  9245. 'type' => 'int',
  9246. 'not null' => '',
  9247. ),
  9248. ),
  9249. 'primary key' => array(
  9250. ),
  9251. 'unique keys' => array(
  9252. ),
  9253. 'indexes' => array(
  9254. ),
  9255. 'foreign keys' => array(
  9256. ),
  9257. );
  9258. return $description;
  9259. }
  9260. /**
  9261. * Implements hook_feature_disjoint_schema()
  9262. * Purpose: To describe the structure of feature_disjoint to tripal
  9263. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9264. * @see tripal_core.api.inc: tripal_core_chado_update()
  9265. * @see tripal_core.api.inc: tripal_core_chado_select()
  9266. *
  9267. * @return
  9268. * An array describing the current table
  9269. *
  9270. * @ingroup tripal_schema_api
  9271. *
  9272. */
  9273. function tripal_core_chado_feature_disjoint_schema () {
  9274. $description = array();
  9275. $description = array(
  9276. 'table' => 'feature_disjoint',
  9277. // 'description' => 'TODO: please describe this table!',
  9278. 'fields' => array(
  9279. 'subject_id' => array(
  9280. // 'description' => 'TODO: please describe this field!',
  9281. 'type' => 'int',
  9282. 'not null' => '',
  9283. ),
  9284. 'object_id' => array(
  9285. // 'description' => 'TODO: please describe this field!',
  9286. 'type' => 'int',
  9287. 'not null' => '',
  9288. ),
  9289. ),
  9290. 'primary key' => array(
  9291. ),
  9292. 'unique keys' => array(
  9293. ),
  9294. 'indexes' => array(
  9295. ),
  9296. 'foreign keys' => array(
  9297. ),
  9298. );
  9299. return $description;
  9300. }
  9301. /**
  9302. * Implements hook_feature_distance_schema()
  9303. * Purpose: To describe the structure of feature_distance to tripal
  9304. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9305. * @see tripal_core.api.inc: tripal_core_chado_update()
  9306. * @see tripal_core.api.inc: tripal_core_chado_select()
  9307. *
  9308. * @return
  9309. * An array describing the current table
  9310. *
  9311. * @ingroup tripal_schema_api
  9312. *
  9313. */
  9314. function tripal_core_chado_feature_distance_schema () {
  9315. $description = array();
  9316. $description = array(
  9317. 'table' => 'feature_distance',
  9318. // 'description' => 'TODO: please describe this table!',
  9319. 'fields' => array(
  9320. 'subject_id' => array(
  9321. // 'description' => 'TODO: please describe this field!',
  9322. 'type' => 'int',
  9323. 'not null' => '',
  9324. ),
  9325. 'object_id' => array(
  9326. // 'description' => 'TODO: please describe this field!',
  9327. 'type' => 'int',
  9328. 'not null' => '',
  9329. ),
  9330. 'srcfeature_id' => array(
  9331. // 'description' => 'TODO: please describe this field!',
  9332. 'type' => 'int',
  9333. 'not null' => '',
  9334. ),
  9335. 'subject_strand' => array(
  9336. // 'description' => 'TODO: please describe this field!',
  9337. 'type' => 'int',
  9338. 'size' => 'small',
  9339. 'not null' => '',
  9340. ),
  9341. 'object_strand' => array(
  9342. // 'description' => 'TODO: please describe this field!',
  9343. 'type' => 'int',
  9344. 'size' => 'small',
  9345. 'not null' => '',
  9346. ),
  9347. 'distance' => array(
  9348. // 'description' => 'TODO: please describe this field!',
  9349. 'type' => 'int',
  9350. 'not null' => '',
  9351. ),
  9352. ),
  9353. 'primary key' => array(
  9354. ),
  9355. 'unique keys' => array(
  9356. ),
  9357. 'indexes' => array(
  9358. ),
  9359. 'foreign keys' => array(
  9360. ),
  9361. );
  9362. return $description;
  9363. }
  9364. /**
  9365. * Implements hook_feature_cvterm_pub_schema()
  9366. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9367. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9368. * @see tripal_core.api.inc: tripal_core_chado_update()
  9369. * @see tripal_core.api.inc: tripal_core_chado_select()
  9370. *
  9371. * @return
  9372. * An array describing the current table
  9373. *
  9374. * @ingroup tripal_schema_api
  9375. *
  9376. */
  9377. function tripal_core_chado_feature_cvterm_pub_schema () {
  9378. $description = array();
  9379. $description = array(
  9380. 'table' => 'feature_cvterm_pub',
  9381. // 'description' => 'TODO: please describe this table!',
  9382. 'fields' => array(
  9383. 'feature_cvterm_pub_id' => array(
  9384. // 'description' => 'TODO: please describe this field!',
  9385. 'type' => 'serial',
  9386. 'not null' => '1',
  9387. ),
  9388. 'feature_cvterm_id' => array(
  9389. // 'description' => 'TODO: please describe this field!',
  9390. 'type' => 'int',
  9391. 'not null' => '1',
  9392. ),
  9393. 'pub_id' => array(
  9394. // 'description' => 'TODO: please describe this field!',
  9395. 'type' => 'int',
  9396. 'not null' => '1',
  9397. ),
  9398. ),
  9399. 'primary key' => array(
  9400. '0' => 'feature_cvterm_pub_id',
  9401. ),
  9402. 'unique keys' => array(
  9403. 'feature_cvterm_pub_c1' => array(
  9404. '0' => 'feature_cvterm_id',
  9405. '1' => 'pub_id',
  9406. ),
  9407. ),
  9408. 'indexes' => array(
  9409. 'feature_cvterm_pub_idx1' => array(
  9410. '0' => 'feature_cvterm_id',
  9411. ),
  9412. 'feature_cvterm_pub_idx2' => array(
  9413. '0' => 'pub_id',
  9414. ),
  9415. ),
  9416. 'foreign keys' => array(
  9417. ),
  9418. );
  9419. return $description;
  9420. }
  9421. /**
  9422. * Implements hook_feature_cvterm_dbxref_schema()
  9423. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9424. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9425. * @see tripal_core.api.inc: tripal_core_chado_update()
  9426. * @see tripal_core.api.inc: tripal_core_chado_select()
  9427. *
  9428. * @return
  9429. * An array describing the current table
  9430. *
  9431. * @ingroup tripal_schema_api
  9432. *
  9433. */
  9434. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9435. $description = array();
  9436. $description = array(
  9437. 'table' => 'feature_cvterm_dbxref',
  9438. // 'description' => 'TODO: please describe this table!',
  9439. 'fields' => array(
  9440. 'feature_cvterm_dbxref_id' => array(
  9441. // 'description' => 'TODO: please describe this field!',
  9442. 'type' => 'serial',
  9443. 'not null' => '1',
  9444. ),
  9445. 'feature_cvterm_id' => array(
  9446. // 'description' => 'TODO: please describe this field!',
  9447. 'type' => 'int',
  9448. 'not null' => '1',
  9449. ),
  9450. 'dbxref_id' => array(
  9451. // 'description' => 'TODO: please describe this field!',
  9452. 'type' => 'int',
  9453. 'not null' => '1',
  9454. ),
  9455. ),
  9456. 'primary key' => array(
  9457. '0' => 'feature_cvterm_dbxref_id',
  9458. ),
  9459. 'unique keys' => array(
  9460. 'feature_cvterm_dbxref_c1' => array(
  9461. '0' => 'feature_cvterm_id',
  9462. '1' => 'dbxref_id',
  9463. ),
  9464. ),
  9465. 'indexes' => array(
  9466. 'feature_cvterm_dbxref_idx1' => array(
  9467. '0' => 'feature_cvterm_id',
  9468. ),
  9469. 'feature_cvterm_dbxref_idx2' => array(
  9470. '0' => 'dbxref_id',
  9471. ),
  9472. ),
  9473. 'foreign keys' => array(
  9474. ),
  9475. );
  9476. return $description;
  9477. }
  9478. /**
  9479. * Implements hook_f_type_schema()
  9480. * Purpose: To describe the structure of f_type to tripal
  9481. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9482. * @see tripal_core.api.inc: tripal_core_chado_update()
  9483. * @see tripal_core.api.inc: tripal_core_chado_select()
  9484. *
  9485. * @return
  9486. * An array describing the current table
  9487. *
  9488. * @ingroup tripal_schema_api
  9489. *
  9490. */
  9491. function tripal_core_chado_f_type_schema () {
  9492. $description = array();
  9493. $description = array(
  9494. 'table' => 'f_type',
  9495. // 'description' => 'TODO: please describe this table!',
  9496. 'fields' => array(
  9497. 'feature_id' => array(
  9498. // 'description' => 'TODO: please describe this field!',
  9499. 'type' => 'int',
  9500. 'not null' => '',
  9501. ),
  9502. 'name' => array(
  9503. // 'description' => 'TODO: please describe this field!',
  9504. 'type' => 'varchar',
  9505. 'length' => '255',
  9506. 'not null' => '',
  9507. ),
  9508. 'dbxref_id' => array(
  9509. // 'description' => 'TODO: please describe this field!',
  9510. 'type' => 'int',
  9511. 'not null' => '',
  9512. ),
  9513. 'type' => array(
  9514. // 'description' => 'TODO: please describe this field!',
  9515. 'type' => 'varchar',
  9516. 'length' => '1024',
  9517. 'not null' => '',
  9518. ),
  9519. 'residues' => array(
  9520. // 'description' => 'TODO: please describe this field!',
  9521. 'type' => 'text',
  9522. 'not null' => '',
  9523. ),
  9524. 'seqlen' => array(
  9525. // 'description' => 'TODO: please describe this field!',
  9526. 'type' => 'int',
  9527. 'not null' => '',
  9528. ),
  9529. 'md5checksum' => array(
  9530. // 'description' => 'TODO: please describe this field!',
  9531. 'type' => 'char',
  9532. 'length' => '32',
  9533. 'not null' => '',
  9534. ),
  9535. 'type_id' => array(
  9536. // 'description' => 'TODO: please describe this field!',
  9537. 'type' => 'int',
  9538. 'not null' => '',
  9539. ),
  9540. 'timeaccessioned' => array(
  9541. // 'description' => 'TODO: please describe this field!',
  9542. 'type' => 'datetime',
  9543. 'not null' => '',
  9544. ),
  9545. 'timelastmodified' => array(
  9546. // 'description' => 'TODO: please describe this field!',
  9547. 'type' => 'datetime',
  9548. 'not null' => '',
  9549. ),
  9550. ),
  9551. 'primary key' => array(
  9552. ),
  9553. 'unique keys' => array(
  9554. ),
  9555. 'indexes' => array(
  9556. ),
  9557. 'foreign keys' => array(
  9558. ),
  9559. );
  9560. return $description;
  9561. }
  9562. /**
  9563. * Implements hook_feature_schema()
  9564. * Purpose: To describe the structure of feature to tripal
  9565. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9566. * @see tripal_core.api.inc: tripal_core_chado_update()
  9567. * @see tripal_core.api.inc: tripal_core_chado_select()
  9568. *
  9569. * @return
  9570. * An array describing the current table
  9571. *
  9572. * @ingroup tripal_schema_api
  9573. *
  9574. */
  9575. function tripal_core_chado_feature_schema () {
  9576. $description = array();
  9577. $description = array(
  9578. 'table' => 'feature',
  9579. // 'description' => 'TODO: please describe this table!',
  9580. 'fields' => array(
  9581. 'feature_id' => array(
  9582. // 'description' => 'TODO: please describe this field!',
  9583. 'type' => 'serial',
  9584. 'not null' => '1',
  9585. ),
  9586. 'dbxref_id' => array(
  9587. // 'description' => 'TODO: please describe this field!',
  9588. 'type' => 'int',
  9589. 'not null' => '',
  9590. ),
  9591. 'organism_id' => array(
  9592. // 'description' => 'TODO: please describe this field!',
  9593. 'type' => 'int',
  9594. 'not null' => '1',
  9595. ),
  9596. 'name' => array(
  9597. // 'description' => 'TODO: please describe this field!',
  9598. 'type' => 'varchar',
  9599. 'length' => '255',
  9600. 'not null' => '',
  9601. ),
  9602. 'uniquename' => array(
  9603. // 'description' => 'TODO: please describe this field!',
  9604. 'type' => 'text',
  9605. 'not null' => '1',
  9606. ),
  9607. 'residues' => array(
  9608. // 'description' => 'TODO: please describe this field!',
  9609. 'type' => 'text',
  9610. 'not null' => '',
  9611. ),
  9612. 'seqlen' => array(
  9613. // 'description' => 'TODO: please describe this field!',
  9614. 'type' => 'int',
  9615. 'not null' => '',
  9616. ),
  9617. 'md5checksum' => array(
  9618. // 'description' => 'TODO: please describe this field!',
  9619. 'type' => 'char',
  9620. 'length' => '32',
  9621. 'not null' => '',
  9622. ),
  9623. 'type_id' => array(
  9624. // 'description' => 'TODO: please describe this field!',
  9625. 'type' => 'int',
  9626. 'not null' => '1',
  9627. ),
  9628. 'is_analysis' => array(
  9629. // 'description' => 'TODO: please describe this field!',
  9630. 'type' => 'boolean',
  9631. 'not null' => '1',
  9632. 'default' => 'als',
  9633. ),
  9634. 'is_obsolete' => array(
  9635. // 'description' => 'TODO: please describe this field!',
  9636. 'type' => 'boolean',
  9637. 'not null' => '1',
  9638. 'default' => 'als',
  9639. ),
  9640. 'timeaccessioned' => array(
  9641. // 'description' => 'TODO: please describe this field!',
  9642. 'type' => 'datetime',
  9643. 'not null' => '1',
  9644. 'default' => 'ow(',
  9645. ),
  9646. 'timelastmodified' => array(
  9647. // 'description' => 'TODO: please describe this field!',
  9648. 'type' => 'datetime',
  9649. 'not null' => '1',
  9650. 'default' => 'ow(',
  9651. ),
  9652. ),
  9653. 'primary key' => array(
  9654. '0' => 'feature_id',
  9655. ),
  9656. 'unique keys' => array(
  9657. 'feature_c1' => array(
  9658. '0' => 'organism_id',
  9659. '1' => 'uniquename',
  9660. '2' => 'type_id',
  9661. ),
  9662. ),
  9663. 'indexes' => array(
  9664. 'feature_idx1' => array(
  9665. '0' => 'dbxref_id',
  9666. ),
  9667. 'feature_idx2' => array(
  9668. '0' => 'organism_id',
  9669. ),
  9670. 'feature_idx3' => array(
  9671. '0' => 'type_id',
  9672. ),
  9673. 'feature_idx4' => array(
  9674. '0' => 'uniquename',
  9675. ),
  9676. 'feature_name_ind1' => array(
  9677. '0' => 'name',
  9678. ),
  9679. ),
  9680. 'foreign keys' => array(
  9681. ),
  9682. );
  9683. return $description;
  9684. }
  9685. /**
  9686. * Implements hook_feature_contains_schema()
  9687. * Purpose: To describe the structure of feature_contains to tripal
  9688. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9689. * @see tripal_core.api.inc: tripal_core_chado_update()
  9690. * @see tripal_core.api.inc: tripal_core_chado_select()
  9691. *
  9692. * @return
  9693. * An array describing the current table
  9694. *
  9695. * @ingroup tripal_schema_api
  9696. *
  9697. */
  9698. function tripal_core_chado_feature_contains_schema () {
  9699. $description = array();
  9700. $description = array(
  9701. 'table' => 'feature_contains',
  9702. // 'description' => 'TODO: please describe this table!',
  9703. 'fields' => array(
  9704. 'subject_id' => array(
  9705. // 'description' => 'TODO: please describe this field!',
  9706. 'type' => 'int',
  9707. 'not null' => '',
  9708. ),
  9709. 'object_id' => array(
  9710. // 'description' => 'TODO: please describe this field!',
  9711. 'type' => 'int',
  9712. 'not null' => '',
  9713. ),
  9714. ),
  9715. 'primary key' => array(
  9716. ),
  9717. 'unique keys' => array(
  9718. ),
  9719. 'indexes' => array(
  9720. ),
  9721. 'foreign keys' => array(
  9722. ),
  9723. );
  9724. return $description;
  9725. }
  9726. /**
  9727. * Implements hook_feature_cvterm_schema()
  9728. * Purpose: To describe the structure of feature_cvterm to tripal
  9729. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9730. * @see tripal_core.api.inc: tripal_core_chado_update()
  9731. * @see tripal_core.api.inc: tripal_core_chado_select()
  9732. *
  9733. * @return
  9734. * An array describing the current table
  9735. *
  9736. * @ingroup tripal_schema_api
  9737. *
  9738. */
  9739. function tripal_core_chado_feature_cvterm_schema () {
  9740. $description = array();
  9741. $description = array(
  9742. 'table' => 'feature_cvterm',
  9743. // 'description' => 'TODO: please describe this table!',
  9744. 'fields' => array(
  9745. 'feature_cvterm_id' => array(
  9746. // 'description' => 'TODO: please describe this field!',
  9747. 'type' => 'serial',
  9748. 'not null' => '1',
  9749. ),
  9750. 'feature_id' => array(
  9751. // 'description' => 'TODO: please describe this field!',
  9752. 'type' => 'int',
  9753. 'not null' => '1',
  9754. ),
  9755. 'cvterm_id' => array(
  9756. // 'description' => 'TODO: please describe this field!',
  9757. 'type' => 'int',
  9758. 'not null' => '1',
  9759. ),
  9760. 'pub_id' => array(
  9761. // 'description' => 'TODO: please describe this field!',
  9762. 'type' => 'int',
  9763. 'not null' => '1',
  9764. ),
  9765. 'is_not' => array(
  9766. // 'description' => 'TODO: please describe this field!',
  9767. 'type' => 'boolean',
  9768. 'not null' => '1',
  9769. 'default' => 'als',
  9770. ),
  9771. 'rank' => array(
  9772. // 'description' => 'TODO: please describe this field!',
  9773. 'type' => 'int',
  9774. 'not null' => '1',
  9775. 'default' => '0',
  9776. ),
  9777. ),
  9778. 'primary key' => array(
  9779. '0' => 'feature_cvterm_id',
  9780. ),
  9781. 'unique keys' => array(
  9782. 'feature_cvterm_c1' => array(
  9783. '0' => 'feature_id',
  9784. '1' => 'cvterm_id',
  9785. '2' => 'pub_id',
  9786. '3' => 'rank',
  9787. ),
  9788. ),
  9789. 'indexes' => array(
  9790. 'feature_cvterm_idx1' => array(
  9791. '0' => 'feature_id',
  9792. ),
  9793. 'feature_cvterm_idx2' => array(
  9794. '0' => 'cvterm_id',
  9795. ),
  9796. 'feature_cvterm_idx3' => array(
  9797. '0' => 'pub_id',
  9798. ),
  9799. ),
  9800. 'foreign keys' => array(
  9801. ),
  9802. );
  9803. return $description;
  9804. }
  9805. /**
  9806. * Implements hook_feature_expression_schema()
  9807. * Purpose: To describe the structure of feature_expression to tripal
  9808. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9809. * @see tripal_core.api.inc: tripal_core_chado_update()
  9810. * @see tripal_core.api.inc: tripal_core_chado_select()
  9811. *
  9812. * @return
  9813. * An array describing the current table
  9814. *
  9815. * @ingroup tripal_schema_api
  9816. *
  9817. */
  9818. function tripal_core_chado_feature_expression_schema () {
  9819. $description = array();
  9820. $description = array(
  9821. 'table' => 'feature_expression',
  9822. // 'description' => 'TODO: please describe this table!',
  9823. 'fields' => array(
  9824. 'feature_expression_id' => array(
  9825. // 'description' => 'TODO: please describe this field!',
  9826. 'type' => 'serial',
  9827. 'not null' => '1',
  9828. ),
  9829. 'expression_id' => array(
  9830. // 'description' => 'TODO: please describe this field!',
  9831. 'type' => 'int',
  9832. 'not null' => '1',
  9833. ),
  9834. 'feature_id' => array(
  9835. // 'description' => 'TODO: please describe this field!',
  9836. 'type' => 'int',
  9837. 'not null' => '1',
  9838. ),
  9839. 'pub_id' => array(
  9840. // 'description' => 'TODO: please describe this field!',
  9841. 'type' => 'int',
  9842. 'not null' => '1',
  9843. ),
  9844. ),
  9845. 'primary key' => array(
  9846. '0' => 'feature_expression_id',
  9847. ),
  9848. 'unique keys' => array(
  9849. 'feature_expression_c1' => array(
  9850. '0' => 'expression_id',
  9851. '1' => 'feature_id',
  9852. '2' => 'pub_id',
  9853. ),
  9854. ),
  9855. 'indexes' => array(
  9856. 'feature_expression_idx1' => array(
  9857. '0' => 'expression_id',
  9858. ),
  9859. 'feature_expression_idx2' => array(
  9860. '0' => 'feature_id',
  9861. ),
  9862. 'feature_expression_idx3' => array(
  9863. '0' => 'pub_id',
  9864. ),
  9865. ),
  9866. 'foreign keys' => array(
  9867. ),
  9868. );
  9869. return $description;
  9870. }
  9871. /**
  9872. * Implements hook_feature_expressionprop_schema()
  9873. * Purpose: To describe the structure of feature_expressionprop to tripal
  9874. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9875. * @see tripal_core.api.inc: tripal_core_chado_update()
  9876. * @see tripal_core.api.inc: tripal_core_chado_select()
  9877. *
  9878. * @return
  9879. * An array describing the current table
  9880. *
  9881. * @ingroup tripal_schema_api
  9882. *
  9883. */
  9884. function tripal_core_chado_feature_expressionprop_schema () {
  9885. $description = array();
  9886. $description = array(
  9887. 'table' => 'feature_expressionprop',
  9888. // 'description' => 'TODO: please describe this table!',
  9889. 'fields' => array(
  9890. 'feature_expressionprop_id' => array(
  9891. // 'description' => 'TODO: please describe this field!',
  9892. 'type' => 'serial',
  9893. 'not null' => '1',
  9894. ),
  9895. 'feature_expression_id' => array(
  9896. // 'description' => 'TODO: please describe this field!',
  9897. 'type' => 'int',
  9898. 'not null' => '1',
  9899. ),
  9900. 'type_id' => array(
  9901. // 'description' => 'TODO: please describe this field!',
  9902. 'type' => 'int',
  9903. 'not null' => '1',
  9904. ),
  9905. 'value' => array(
  9906. // 'description' => 'TODO: please describe this field!',
  9907. 'type' => 'text',
  9908. 'not null' => '',
  9909. ),
  9910. 'rank' => array(
  9911. // 'description' => 'TODO: please describe this field!',
  9912. 'type' => 'int',
  9913. 'not null' => '1',
  9914. 'default' => '0',
  9915. ),
  9916. ),
  9917. 'primary key' => array(
  9918. '0' => 'feature_expressionprop_id',
  9919. ),
  9920. 'unique keys' => array(
  9921. 'feature_expressionprop_c1' => array(
  9922. '0' => 'feature_expression_id',
  9923. '1' => 'type_id',
  9924. '2' => 'rank',
  9925. ),
  9926. ),
  9927. 'indexes' => array(
  9928. 'feature_expressionprop_idx1' => array(
  9929. '0' => 'feature_expression_id',
  9930. ),
  9931. 'feature_expressionprop_idx2' => array(
  9932. '0' => 'type_id',
  9933. ),
  9934. ),
  9935. 'foreign keys' => array(
  9936. ),
  9937. );
  9938. return $description;
  9939. }
  9940. /**
  9941. * Implements hook_feature_pubprop_schema()
  9942. * Purpose: To describe the structure of feature_pubprop to tripal
  9943. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9944. * @see tripal_core.api.inc: tripal_core_chado_update()
  9945. * @see tripal_core.api.inc: tripal_core_chado_select()
  9946. *
  9947. * @return
  9948. * An array describing the current table
  9949. *
  9950. * @ingroup tripal_schema_api
  9951. *
  9952. */
  9953. function tripal_core_chado_feature_pubprop_schema () {
  9954. $description = array();
  9955. $description = array(
  9956. 'table' => 'feature_pubprop',
  9957. // 'description' => 'TODO: please describe this table!',
  9958. 'fields' => array(
  9959. 'feature_pubprop_id' => array(
  9960. // 'description' => 'TODO: please describe this field!',
  9961. 'type' => 'serial',
  9962. 'not null' => '1',
  9963. ),
  9964. 'feature_pub_id' => array(
  9965. // 'description' => 'TODO: please describe this field!',
  9966. 'type' => 'int',
  9967. 'not null' => '1',
  9968. ),
  9969. 'type_id' => array(
  9970. // 'description' => 'TODO: please describe this field!',
  9971. 'type' => 'int',
  9972. 'not null' => '1',
  9973. ),
  9974. 'value' => array(
  9975. // 'description' => 'TODO: please describe this field!',
  9976. 'type' => 'text',
  9977. 'not null' => '',
  9978. ),
  9979. 'rank' => array(
  9980. // 'description' => 'TODO: please describe this field!',
  9981. 'type' => 'int',
  9982. 'not null' => '1',
  9983. 'default' => '0',
  9984. ),
  9985. ),
  9986. 'primary key' => array(
  9987. '0' => 'feature_pubprop_id',
  9988. ),
  9989. 'unique keys' => array(
  9990. 'feature_pubprop_c1' => array(
  9991. '0' => 'feature_pub_id',
  9992. '1' => 'type_id',
  9993. '2' => 'rank',
  9994. ),
  9995. ),
  9996. 'indexes' => array(
  9997. 'feature_pubprop_idx1' => array(
  9998. '0' => 'feature_pub_id',
  9999. ),
  10000. ),
  10001. 'foreign keys' => array(
  10002. ),
  10003. );
  10004. return $description;
  10005. }
  10006. /**
  10007. * Implements hook_feature_relationship_schema()
  10008. * Purpose: To describe the structure of feature_relationship to tripal
  10009. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10010. * @see tripal_core.api.inc: tripal_core_chado_update()
  10011. * @see tripal_core.api.inc: tripal_core_chado_select()
  10012. *
  10013. * @return
  10014. * An array describing the current table
  10015. *
  10016. * @ingroup tripal_schema_api
  10017. *
  10018. */
  10019. function tripal_core_chado_feature_relationship_schema () {
  10020. $description = array();
  10021. $description = array(
  10022. 'table' => 'feature_relationship',
  10023. // 'description' => 'TODO: please describe this table!',
  10024. 'fields' => array(
  10025. 'feature_relationship_id' => array(
  10026. // 'description' => 'TODO: please describe this field!',
  10027. 'type' => 'serial',
  10028. 'not null' => '1',
  10029. ),
  10030. 'subject_id' => array(
  10031. // 'description' => 'TODO: please describe this field!',
  10032. 'type' => 'int',
  10033. 'not null' => '1',
  10034. ),
  10035. 'object_id' => array(
  10036. // 'description' => 'TODO: please describe this field!',
  10037. 'type' => 'int',
  10038. 'not null' => '1',
  10039. ),
  10040. 'type_id' => array(
  10041. // 'description' => 'TODO: please describe this field!',
  10042. 'type' => 'int',
  10043. 'not null' => '1',
  10044. ),
  10045. 'value' => array(
  10046. // 'description' => 'TODO: please describe this field!',
  10047. 'type' => 'text',
  10048. 'not null' => '',
  10049. ),
  10050. 'rank' => array(
  10051. // 'description' => 'TODO: please describe this field!',
  10052. 'type' => 'int',
  10053. 'not null' => '1',
  10054. 'default' => '0',
  10055. ),
  10056. ),
  10057. 'primary key' => array(
  10058. '0' => 'feature_relationship_id',
  10059. ),
  10060. 'unique keys' => array(
  10061. 'feature_relationship_c1' => array(
  10062. '0' => 'subject_id',
  10063. '1' => 'object_id',
  10064. '2' => 'type_id',
  10065. '3' => 'rank',
  10066. ),
  10067. ),
  10068. 'indexes' => array(
  10069. 'feature_relationship_idx1' => array(
  10070. '0' => 'subject_id',
  10071. ),
  10072. 'feature_relationship_idx2' => array(
  10073. '0' => 'object_id',
  10074. ),
  10075. 'feature_relationship_idx3' => array(
  10076. '0' => 'type_id',
  10077. ),
  10078. ),
  10079. 'foreign keys' => array(
  10080. ),
  10081. );
  10082. return $description;
  10083. }
  10084. /**
  10085. * Implements hook_feature_relationship_pub_schema()
  10086. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10087. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10088. * @see tripal_core.api.inc: tripal_core_chado_update()
  10089. * @see tripal_core.api.inc: tripal_core_chado_select()
  10090. *
  10091. * @return
  10092. * An array describing the current table
  10093. *
  10094. * @ingroup tripal_schema_api
  10095. *
  10096. */
  10097. function tripal_core_chado_feature_relationship_pub_schema () {
  10098. $description = array();
  10099. $description = array(
  10100. 'table' => 'feature_relationship_pub',
  10101. // 'description' => 'TODO: please describe this table!',
  10102. 'fields' => array(
  10103. 'feature_relationship_pub_id' => array(
  10104. // 'description' => 'TODO: please describe this field!',
  10105. 'type' => 'serial',
  10106. 'not null' => '1',
  10107. ),
  10108. 'feature_relationship_id' => array(
  10109. // 'description' => 'TODO: please describe this field!',
  10110. 'type' => 'int',
  10111. 'not null' => '1',
  10112. ),
  10113. 'pub_id' => array(
  10114. // 'description' => 'TODO: please describe this field!',
  10115. 'type' => 'int',
  10116. 'not null' => '1',
  10117. ),
  10118. ),
  10119. 'primary key' => array(
  10120. '0' => 'feature_relationship_pub_id',
  10121. ),
  10122. 'unique keys' => array(
  10123. 'feature_relationship_pub_c1' => array(
  10124. '0' => 'feature_relationship_id',
  10125. '1' => 'pub_id',
  10126. ),
  10127. ),
  10128. 'indexes' => array(
  10129. 'feature_relationship_pub_idx1' => array(
  10130. '0' => 'feature_relationship_id',
  10131. ),
  10132. 'feature_relationship_pub_idx2' => array(
  10133. '0' => 'pub_id',
  10134. ),
  10135. ),
  10136. 'foreign keys' => array(
  10137. ),
  10138. );
  10139. return $description;
  10140. }
  10141. /**
  10142. * Implements hook_feature_relationshipprop_schema()
  10143. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10144. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10145. * @see tripal_core.api.inc: tripal_core_chado_update()
  10146. * @see tripal_core.api.inc: tripal_core_chado_select()
  10147. *
  10148. * @return
  10149. * An array describing the current table
  10150. *
  10151. * @ingroup tripal_schema_api
  10152. *
  10153. */
  10154. function tripal_core_chado_feature_relationshipprop_schema () {
  10155. $description = array();
  10156. $description = array(
  10157. 'table' => 'feature_relationshipprop',
  10158. // 'description' => 'TODO: please describe this table!',
  10159. 'fields' => array(
  10160. 'feature_relationshipprop_id' => array(
  10161. // 'description' => 'TODO: please describe this field!',
  10162. 'type' => 'serial',
  10163. 'not null' => '1',
  10164. ),
  10165. 'feature_relationship_id' => array(
  10166. // 'description' => 'TODO: please describe this field!',
  10167. 'type' => 'int',
  10168. 'not null' => '1',
  10169. ),
  10170. 'type_id' => array(
  10171. // 'description' => 'TODO: please describe this field!',
  10172. 'type' => 'int',
  10173. 'not null' => '1',
  10174. ),
  10175. 'value' => array(
  10176. // 'description' => 'TODO: please describe this field!',
  10177. 'type' => 'text',
  10178. 'not null' => '',
  10179. ),
  10180. 'rank' => array(
  10181. // 'description' => 'TODO: please describe this field!',
  10182. 'type' => 'int',
  10183. 'not null' => '1',
  10184. 'default' => '0',
  10185. ),
  10186. ),
  10187. 'primary key' => array(
  10188. '0' => 'feature_relationshipprop_id',
  10189. ),
  10190. 'unique keys' => array(
  10191. 'feature_relationshipprop_c1' => array(
  10192. '0' => 'feature_relationship_id',
  10193. '1' => 'type_id',
  10194. '2' => 'rank',
  10195. ),
  10196. ),
  10197. 'indexes' => array(
  10198. 'feature_relationshipprop_idx1' => array(
  10199. '0' => 'feature_relationship_id',
  10200. ),
  10201. 'feature_relationshipprop_idx2' => array(
  10202. '0' => 'type_id',
  10203. ),
  10204. ),
  10205. 'foreign keys' => array(
  10206. ),
  10207. );
  10208. return $description;
  10209. }
  10210. /**
  10211. * Implements hook_feature_pub_schema()
  10212. * Purpose: To describe the structure of feature_pub to tripal
  10213. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10214. * @see tripal_core.api.inc: tripal_core_chado_update()
  10215. * @see tripal_core.api.inc: tripal_core_chado_select()
  10216. *
  10217. * @return
  10218. * An array describing the current table
  10219. *
  10220. * @ingroup tripal_schema_api
  10221. *
  10222. */
  10223. function tripal_core_chado_feature_pub_schema () {
  10224. $description = array();
  10225. $description = array(
  10226. 'table' => 'feature_pub',
  10227. // 'description' => 'TODO: please describe this table!',
  10228. 'fields' => array(
  10229. 'feature_pub_id' => array(
  10230. // 'description' => 'TODO: please describe this field!',
  10231. 'type' => 'serial',
  10232. 'not null' => '1',
  10233. ),
  10234. 'feature_id' => array(
  10235. // 'description' => 'TODO: please describe this field!',
  10236. 'type' => 'int',
  10237. 'not null' => '1',
  10238. ),
  10239. 'pub_id' => array(
  10240. // 'description' => 'TODO: please describe this field!',
  10241. 'type' => 'int',
  10242. 'not null' => '1',
  10243. ),
  10244. ),
  10245. 'primary key' => array(
  10246. '0' => 'feature_pub_id',
  10247. ),
  10248. 'unique keys' => array(
  10249. 'feature_pub_c1' => array(
  10250. '0' => 'feature_id',
  10251. '1' => 'pub_id',
  10252. ),
  10253. ),
  10254. 'indexes' => array(
  10255. 'feature_pub_idx1' => array(
  10256. '0' => 'feature_id',
  10257. ),
  10258. 'feature_pub_idx2' => array(
  10259. '0' => 'pub_id',
  10260. ),
  10261. ),
  10262. 'foreign keys' => array(
  10263. ),
  10264. );
  10265. return $description;
  10266. }
  10267. /**
  10268. * Implements hook_feature_phenotype_schema()
  10269. * Purpose: To describe the structure of feature_phenotype to tripal
  10270. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10271. * @see tripal_core.api.inc: tripal_core_chado_update()
  10272. * @see tripal_core.api.inc: tripal_core_chado_select()
  10273. *
  10274. * @return
  10275. * An array describing the current table
  10276. *
  10277. * @ingroup tripal_schema_api
  10278. *
  10279. */
  10280. function tripal_core_chado_feature_phenotype_schema () {
  10281. $description = array();
  10282. $description = array(
  10283. 'table' => 'feature_phenotype',
  10284. // 'description' => 'TODO: please describe this table!',
  10285. 'fields' => array(
  10286. 'feature_phenotype_id' => array(
  10287. // 'description' => 'TODO: please describe this field!',
  10288. 'type' => 'serial',
  10289. 'not null' => '1',
  10290. ),
  10291. 'feature_id' => array(
  10292. // 'description' => 'TODO: please describe this field!',
  10293. 'type' => 'int',
  10294. 'not null' => '1',
  10295. ),
  10296. 'phenotype_id' => array(
  10297. // 'description' => 'TODO: please describe this field!',
  10298. 'type' => 'int',
  10299. 'not null' => '1',
  10300. ),
  10301. ),
  10302. 'primary key' => array(
  10303. '0' => 'feature_phenotype_id',
  10304. ),
  10305. 'unique keys' => array(
  10306. 'feature_phenotype_c1' => array(
  10307. '0' => 'feature_id',
  10308. '1' => 'phenotype_id',
  10309. ),
  10310. ),
  10311. 'indexes' => array(
  10312. 'feature_phenotype_idx1' => array(
  10313. '0' => 'feature_id',
  10314. ),
  10315. 'feature_phenotype_idx2' => array(
  10316. '0' => 'phenotype_id',
  10317. ),
  10318. ),
  10319. 'foreign keys' => array(
  10320. ),
  10321. );
  10322. return $description;
  10323. }
  10324. /**
  10325. * Implements hook_feature_genotype_schema()
  10326. * Purpose: To describe the structure of feature_genotype to tripal
  10327. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10328. * @see tripal_core.api.inc: tripal_core_chado_update()
  10329. * @see tripal_core.api.inc: tripal_core_chado_select()
  10330. *
  10331. * @return
  10332. * An array describing the current table
  10333. *
  10334. * @ingroup tripal_schema_api
  10335. *
  10336. */
  10337. function tripal_core_chado_feature_genotype_schema () {
  10338. $description = array();
  10339. $description = array(
  10340. 'table' => 'feature_genotype',
  10341. // 'description' => 'TODO: please describe this table!',
  10342. 'fields' => array(
  10343. 'feature_genotype_id' => array(
  10344. // 'description' => 'TODO: please describe this field!',
  10345. 'type' => 'serial',
  10346. 'not null' => '1',
  10347. ),
  10348. 'feature_id' => array(
  10349. // 'description' => 'TODO: please describe this field!',
  10350. 'type' => 'int',
  10351. 'not null' => '1',
  10352. ),
  10353. 'genotype_id' => array(
  10354. // 'description' => 'TODO: please describe this field!',
  10355. 'type' => 'int',
  10356. 'not null' => '1',
  10357. ),
  10358. 'chromosome_id' => array(
  10359. // 'description' => 'TODO: please describe this field!',
  10360. 'type' => 'int',
  10361. 'not null' => '',
  10362. ),
  10363. 'rank' => array(
  10364. // 'description' => 'TODO: please describe this field!',
  10365. 'type' => 'int',
  10366. 'not null' => '1',
  10367. ),
  10368. 'cgroup' => array(
  10369. // 'description' => 'TODO: please describe this field!',
  10370. 'type' => 'int',
  10371. 'not null' => '1',
  10372. ),
  10373. 'cvterm_id' => array(
  10374. // 'description' => 'TODO: please describe this field!',
  10375. 'type' => 'int',
  10376. 'not null' => '1',
  10377. ),
  10378. ),
  10379. 'primary key' => array(
  10380. '0' => 'feature_genotype_id',
  10381. ),
  10382. 'unique keys' => array(
  10383. 'feature_genotype_c1' => array(
  10384. '0' => 'feature_id',
  10385. '1' => 'genotype_id',
  10386. '2' => 'cvterm_id',
  10387. '3' => 'chromosome_id',
  10388. '4' => 'rank',
  10389. '5' => 'cgroup',
  10390. ),
  10391. ),
  10392. 'indexes' => array(
  10393. 'feature_genotype_idx1' => array(
  10394. '0' => 'feature_id',
  10395. ),
  10396. 'feature_genotype_idx2' => array(
  10397. '0' => 'genotype_id',
  10398. ),
  10399. ),
  10400. 'foreign keys' => array(
  10401. ),
  10402. );
  10403. return $description;
  10404. }
  10405. /**
  10406. * Implements hook_feature_intersection_schema()
  10407. * Purpose: To describe the structure of feature_intersection to tripal
  10408. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10409. * @see tripal_core.api.inc: tripal_core_chado_update()
  10410. * @see tripal_core.api.inc: tripal_core_chado_select()
  10411. *
  10412. * @return
  10413. * An array describing the current table
  10414. *
  10415. * @ingroup tripal_schema_api
  10416. *
  10417. */
  10418. function tripal_core_chado_feature_intersection_schema () {
  10419. $description = array();
  10420. $description = array(
  10421. 'table' => 'feature_intersection',
  10422. // 'description' => 'TODO: please describe this table!',
  10423. 'fields' => array(
  10424. 'subject_id' => array(
  10425. // 'description' => 'TODO: please describe this field!',
  10426. 'type' => 'int',
  10427. 'not null' => '',
  10428. ),
  10429. 'object_id' => array(
  10430. // 'description' => 'TODO: please describe this field!',
  10431. 'type' => 'int',
  10432. 'not null' => '',
  10433. ),
  10434. 'srcfeature_id' => array(
  10435. // 'description' => 'TODO: please describe this field!',
  10436. 'type' => 'int',
  10437. 'not null' => '',
  10438. ),
  10439. 'subject_strand' => array(
  10440. // 'description' => 'TODO: please describe this field!',
  10441. 'type' => 'int',
  10442. 'size' => 'small',
  10443. 'not null' => '',
  10444. ),
  10445. 'object_strand' => array(
  10446. // 'description' => 'TODO: please describe this field!',
  10447. 'type' => 'int',
  10448. 'size' => 'small',
  10449. 'not null' => '',
  10450. ),
  10451. 'fmin' => array(
  10452. // 'description' => 'TODO: please describe this field!',
  10453. 'type' => 'int',
  10454. 'not null' => '',
  10455. ),
  10456. 'fmax' => array(
  10457. // 'description' => 'TODO: please describe this field!',
  10458. 'type' => 'int',
  10459. 'not null' => '',
  10460. ),
  10461. ),
  10462. 'primary key' => array(
  10463. ),
  10464. 'unique keys' => array(
  10465. ),
  10466. 'indexes' => array(
  10467. ),
  10468. 'foreign keys' => array(
  10469. ),
  10470. );
  10471. return $description;
  10472. }
  10473. /**
  10474. * Implements hook_feature_meets_schema()
  10475. * Purpose: To describe the structure of feature_meets to tripal
  10476. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10477. * @see tripal_core.api.inc: tripal_core_chado_update()
  10478. * @see tripal_core.api.inc: tripal_core_chado_select()
  10479. *
  10480. * @return
  10481. * An array describing the current table
  10482. *
  10483. * @ingroup tripal_schema_api
  10484. *
  10485. */
  10486. function tripal_core_chado_feature_meets_schema () {
  10487. $description = array();
  10488. $description = array(
  10489. 'table' => 'feature_meets',
  10490. // 'description' => 'TODO: please describe this table!',
  10491. 'fields' => array(
  10492. 'subject_id' => array(
  10493. // 'description' => 'TODO: please describe this field!',
  10494. 'type' => 'int',
  10495. 'not null' => '',
  10496. ),
  10497. 'object_id' => array(
  10498. // 'description' => 'TODO: please describe this field!',
  10499. 'type' => 'int',
  10500. 'not null' => '',
  10501. ),
  10502. ),
  10503. 'primary key' => array(
  10504. ),
  10505. 'unique keys' => array(
  10506. ),
  10507. 'indexes' => array(
  10508. ),
  10509. 'foreign keys' => array(
  10510. ),
  10511. );
  10512. return $description;
  10513. }
  10514. /**
  10515. * Implements hook_feature_meets_on_same_strand_schema()
  10516. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10517. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10518. * @see tripal_core.api.inc: tripal_core_chado_update()
  10519. * @see tripal_core.api.inc: tripal_core_chado_select()
  10520. *
  10521. * @return
  10522. * An array describing the current table
  10523. *
  10524. * @ingroup tripal_schema_api
  10525. *
  10526. */
  10527. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10528. $description = array();
  10529. $description = array(
  10530. 'table' => 'feature_meets_on_same_strand',
  10531. // 'description' => 'TODO: please describe this table!',
  10532. 'fields' => array(
  10533. 'subject_id' => array(
  10534. // 'description' => 'TODO: please describe this field!',
  10535. 'type' => 'int',
  10536. 'not null' => '',
  10537. ),
  10538. 'object_id' => array(
  10539. // 'description' => 'TODO: please describe this field!',
  10540. 'type' => 'int',
  10541. 'not null' => '',
  10542. ),
  10543. ),
  10544. 'primary key' => array(
  10545. ),
  10546. 'unique keys' => array(
  10547. ),
  10548. 'indexes' => array(
  10549. ),
  10550. 'foreign keys' => array(
  10551. ),
  10552. );
  10553. return $description;
  10554. }
  10555. /**
  10556. * Implements hook_f_loc_schema()
  10557. * Purpose: To describe the structure of f_loc to tripal
  10558. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10559. * @see tripal_core.api.inc: tripal_core_chado_update()
  10560. * @see tripal_core.api.inc: tripal_core_chado_select()
  10561. *
  10562. * @return
  10563. * An array describing the current table
  10564. *
  10565. * @ingroup tripal_schema_api
  10566. *
  10567. */
  10568. function tripal_core_chado_f_loc_schema () {
  10569. $description = array();
  10570. $description = array(
  10571. 'table' => 'f_loc',
  10572. // 'description' => 'TODO: please describe this table!',
  10573. 'fields' => array(
  10574. 'feature_id' => array(
  10575. // 'description' => 'TODO: please describe this field!',
  10576. 'type' => 'int',
  10577. 'not null' => '',
  10578. ),
  10579. 'name' => array(
  10580. // 'description' => 'TODO: please describe this field!',
  10581. 'type' => 'varchar',
  10582. 'length' => '255',
  10583. 'not null' => '',
  10584. ),
  10585. 'dbxref_id' => array(
  10586. // 'description' => 'TODO: please describe this field!',
  10587. 'type' => 'int',
  10588. 'not null' => '',
  10589. ),
  10590. 'nbeg' => array(
  10591. // 'description' => 'TODO: please describe this field!',
  10592. 'type' => 'int',
  10593. 'not null' => '',
  10594. ),
  10595. 'nend' => array(
  10596. // 'description' => 'TODO: please describe this field!',
  10597. 'type' => 'int',
  10598. 'not null' => '',
  10599. ),
  10600. 'strand' => array(
  10601. // 'description' => 'TODO: please describe this field!',
  10602. 'type' => 'int',
  10603. 'size' => 'small',
  10604. 'not null' => '',
  10605. ),
  10606. ),
  10607. 'primary key' => array(
  10608. ),
  10609. 'unique keys' => array(
  10610. ),
  10611. 'indexes' => array(
  10612. ),
  10613. 'foreign keys' => array(
  10614. ),
  10615. );
  10616. return $description;
  10617. }
  10618. /**
  10619. * Implements hook_expressionprop_schema()
  10620. * Purpose: To describe the structure of expressionprop to tripal
  10621. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10622. * @see tripal_core.api.inc: tripal_core_chado_update()
  10623. * @see tripal_core.api.inc: tripal_core_chado_select()
  10624. *
  10625. * @return
  10626. * An array describing the current table
  10627. *
  10628. * @ingroup tripal_schema_api
  10629. *
  10630. */
  10631. function tripal_core_chado_expressionprop_schema () {
  10632. $description = array();
  10633. $description = array(
  10634. 'table' => 'expressionprop',
  10635. // 'description' => 'TODO: please describe this table!',
  10636. 'fields' => array(
  10637. 'expressionprop_id' => array(
  10638. // 'description' => 'TODO: please describe this field!',
  10639. 'type' => 'serial',
  10640. 'not null' => '1',
  10641. ),
  10642. 'expression_id' => array(
  10643. // 'description' => 'TODO: please describe this field!',
  10644. 'type' => 'int',
  10645. 'not null' => '1',
  10646. ),
  10647. 'type_id' => array(
  10648. // 'description' => 'TODO: please describe this field!',
  10649. 'type' => 'int',
  10650. 'not null' => '1',
  10651. ),
  10652. 'value' => array(
  10653. // 'description' => 'TODO: please describe this field!',
  10654. 'type' => 'text',
  10655. 'not null' => '',
  10656. ),
  10657. 'rank' => array(
  10658. // 'description' => 'TODO: please describe this field!',
  10659. 'type' => 'int',
  10660. 'not null' => '1',
  10661. 'default' => '0',
  10662. ),
  10663. ),
  10664. 'primary key' => array(
  10665. '0' => 'expressionprop_id',
  10666. ),
  10667. 'unique keys' => array(
  10668. 'expressionprop_c1' => array(
  10669. '0' => 'expression_id',
  10670. '1' => 'type_id',
  10671. '2' => 'rank',
  10672. ),
  10673. ),
  10674. 'indexes' => array(
  10675. 'expressionprop_idx1' => array(
  10676. '0' => 'expression_id',
  10677. ),
  10678. 'expressionprop_idx2' => array(
  10679. '0' => 'type_id',
  10680. ),
  10681. ),
  10682. 'foreign keys' => array(
  10683. ),
  10684. );
  10685. return $description;
  10686. }
  10687. /**
  10688. * Implements hook_db_dbxref_count_schema()
  10689. * Purpose: To describe the structure of db_dbxref_count to tripal
  10690. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10691. * @see tripal_core.api.inc: tripal_core_chado_update()
  10692. * @see tripal_core.api.inc: tripal_core_chado_select()
  10693. *
  10694. * @return
  10695. * An array describing the current table
  10696. *
  10697. * @ingroup tripal_schema_api
  10698. *
  10699. */
  10700. function tripal_core_chado_db_dbxref_count_schema () {
  10701. $description = array();
  10702. $description = array(
  10703. 'table' => 'db_dbxref_count',
  10704. // 'description' => 'TODO: please describe this table!',
  10705. 'fields' => array(
  10706. 'name' => array(
  10707. // 'description' => 'TODO: please describe this field!',
  10708. 'type' => 'varchar',
  10709. 'length' => '255',
  10710. 'not null' => '',
  10711. ),
  10712. 'num_dbxrefs' => array(
  10713. // 'description' => 'TODO: please describe this field!',
  10714. 'type' => 'int',
  10715. 'size' => 'big',
  10716. 'not null' => '',
  10717. ),
  10718. ),
  10719. 'primary key' => array(
  10720. ),
  10721. 'unique keys' => array(
  10722. ),
  10723. 'indexes' => array(
  10724. ),
  10725. 'foreign keys' => array(
  10726. ),
  10727. );
  10728. return $description;
  10729. }
  10730. /**
  10731. * Implements hook_dbxref_schema()
  10732. * Purpose: To describe the structure of dbxref to tripal
  10733. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10734. * @see tripal_core.api.inc: tripal_core_chado_update()
  10735. * @see tripal_core.api.inc: tripal_core_chado_select()
  10736. *
  10737. * @return
  10738. * An array describing the current table
  10739. *
  10740. * @ingroup tripal_schema_api
  10741. *
  10742. */
  10743. function tripal_core_chado_dbxref_schema () {
  10744. $description = array();
  10745. $description = array(
  10746. 'table' => 'dbxref',
  10747. // 'description' => 'TODO: please describe this table!',
  10748. 'fields' => array(
  10749. 'dbxref_id' => array(
  10750. // 'description' => 'TODO: please describe this field!',
  10751. 'type' => 'serial',
  10752. 'not null' => '1',
  10753. ),
  10754. 'db_id' => array(
  10755. // 'description' => 'TODO: please describe this field!',
  10756. 'type' => 'int',
  10757. 'not null' => '1',
  10758. ),
  10759. 'accession' => array(
  10760. // 'description' => 'TODO: please describe this field!',
  10761. 'type' => 'varchar',
  10762. 'length' => '255',
  10763. 'not null' => '1',
  10764. ),
  10765. 'version' => array(
  10766. // 'description' => 'TODO: please describe this field!',
  10767. 'type' => 'varchar',
  10768. 'length' => '255',
  10769. 'not null' => '1',
  10770. 'default' => '',
  10771. ),
  10772. 'description' => array(
  10773. // 'description' => 'TODO: please describe this field!',
  10774. 'type' => 'text',
  10775. 'not null' => '',
  10776. ),
  10777. ),
  10778. 'primary key' => array(
  10779. '0' => 'dbxref_id',
  10780. ),
  10781. 'unique keys' => array(
  10782. 'dbxref_c1' => array(
  10783. '0' => 'db_id',
  10784. '1' => 'accession',
  10785. '2' => 'version',
  10786. ),
  10787. ),
  10788. 'indexes' => array(
  10789. 'dbxref_idx1' => array(
  10790. '0' => 'db_id',
  10791. ),
  10792. 'dbxref_idx2' => array(
  10793. '0' => 'accession',
  10794. ),
  10795. 'dbxref_idx3' => array(
  10796. '0' => 'version',
  10797. ),
  10798. ),
  10799. 'foreign keys' => array(
  10800. ),
  10801. );
  10802. return $description;
  10803. }
  10804. /**
  10805. * Implements hook_dbxrefprop_schema()
  10806. * Purpose: To describe the structure of dbxrefprop to tripal
  10807. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10808. * @see tripal_core.api.inc: tripal_core_chado_update()
  10809. * @see tripal_core.api.inc: tripal_core_chado_select()
  10810. *
  10811. * @return
  10812. * An array describing the current table
  10813. *
  10814. * @ingroup tripal_schema_api
  10815. *
  10816. */
  10817. function tripal_core_chado_dbxrefprop_schema () {
  10818. $description = array();
  10819. $description = array(
  10820. 'table' => 'dbxrefprop',
  10821. // 'description' => 'TODO: please describe this table!',
  10822. 'fields' => array(
  10823. 'dbxrefprop_id' => array(
  10824. // 'description' => 'TODO: please describe this field!',
  10825. 'type' => 'serial',
  10826. 'not null' => '1',
  10827. ),
  10828. 'dbxref_id' => array(
  10829. // 'description' => 'TODO: please describe this field!',
  10830. 'type' => 'int',
  10831. 'not null' => '1',
  10832. ),
  10833. 'type_id' => array(
  10834. // 'description' => 'TODO: please describe this field!',
  10835. 'type' => 'int',
  10836. 'not null' => '1',
  10837. ),
  10838. 'value' => array(
  10839. // 'description' => 'TODO: please describe this field!',
  10840. 'type' => 'text',
  10841. 'not null' => '1',
  10842. 'default' => '',
  10843. ),
  10844. 'rank' => array(
  10845. // 'description' => 'TODO: please describe this field!',
  10846. 'type' => 'int',
  10847. 'not null' => '1',
  10848. 'default' => '0',
  10849. ),
  10850. ),
  10851. 'primary key' => array(
  10852. '0' => 'dbxrefprop_id',
  10853. ),
  10854. 'unique keys' => array(
  10855. 'dbxrefprop_c1' => array(
  10856. '0' => 'dbxref_id',
  10857. '1' => 'type_id',
  10858. '2' => 'rank',
  10859. ),
  10860. ),
  10861. 'indexes' => array(
  10862. 'dbxrefprop_idx1' => array(
  10863. '0' => 'dbxref_id',
  10864. ),
  10865. 'dbxrefprop_idx2' => array(
  10866. '0' => 'type_id',
  10867. ),
  10868. ),
  10869. 'foreign keys' => array(
  10870. ),
  10871. );
  10872. return $description;
  10873. }
  10874. /**
  10875. * Implements hook_dfeatureloc_schema()
  10876. * Purpose: To describe the structure of dfeatureloc to tripal
  10877. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10878. * @see tripal_core.api.inc: tripal_core_chado_update()
  10879. * @see tripal_core.api.inc: tripal_core_chado_select()
  10880. *
  10881. * @return
  10882. * An array describing the current table
  10883. *
  10884. * @ingroup tripal_schema_api
  10885. *
  10886. */
  10887. function tripal_core_chado_dfeatureloc_schema () {
  10888. $description = array();
  10889. $description = array(
  10890. 'table' => 'dfeatureloc',
  10891. // 'description' => 'TODO: please describe this table!',
  10892. 'fields' => array(
  10893. 'featureloc_id' => array(
  10894. // 'description' => 'TODO: please describe this field!',
  10895. 'type' => 'int',
  10896. 'not null' => '',
  10897. ),
  10898. 'feature_id' => array(
  10899. // 'description' => 'TODO: please describe this field!',
  10900. 'type' => 'int',
  10901. 'not null' => '',
  10902. ),
  10903. 'srcfeature_id' => array(
  10904. // 'description' => 'TODO: please describe this field!',
  10905. 'type' => 'int',
  10906. 'not null' => '',
  10907. ),
  10908. 'nbeg' => array(
  10909. // 'description' => 'TODO: please describe this field!',
  10910. 'type' => 'int',
  10911. 'not null' => '',
  10912. ),
  10913. 'is_nbeg_partial' => array(
  10914. // 'description' => 'TODO: please describe this field!',
  10915. 'type' => 'boolean',
  10916. 'not null' => '',
  10917. ),
  10918. 'nend' => array(
  10919. // 'description' => 'TODO: please describe this field!',
  10920. 'type' => 'int',
  10921. 'not null' => '',
  10922. ),
  10923. 'is_nend_partial' => array(
  10924. // 'description' => 'TODO: please describe this field!',
  10925. 'type' => 'boolean',
  10926. 'not null' => '',
  10927. ),
  10928. 'strand' => array(
  10929. // 'description' => 'TODO: please describe this field!',
  10930. 'type' => 'int',
  10931. 'size' => 'small',
  10932. 'not null' => '',
  10933. ),
  10934. 'phase' => array(
  10935. // 'description' => 'TODO: please describe this field!',
  10936. 'type' => 'int',
  10937. 'not null' => '',
  10938. ),
  10939. 'residue_info' => array(
  10940. // 'description' => 'TODO: please describe this field!',
  10941. 'type' => 'text',
  10942. 'not null' => '',
  10943. ),
  10944. 'locgroup' => array(
  10945. // 'description' => 'TODO: please describe this field!',
  10946. 'type' => 'int',
  10947. 'not null' => '',
  10948. ),
  10949. 'rank' => array(
  10950. // 'description' => 'TODO: please describe this field!',
  10951. 'type' => 'int',
  10952. 'not null' => '',
  10953. ),
  10954. ),
  10955. 'primary key' => array(
  10956. ),
  10957. 'unique keys' => array(
  10958. ),
  10959. 'indexes' => array(
  10960. ),
  10961. 'foreign keys' => array(
  10962. ),
  10963. );
  10964. return $description;
  10965. }
  10966. /**
  10967. * Implements hook_db_schema()
  10968. * Purpose: To describe the structure of db to tripal
  10969. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10970. * @see tripal_core.api.inc: tripal_core_chado_update()
  10971. * @see tripal_core.api.inc: tripal_core_chado_select()
  10972. *
  10973. * @return
  10974. * An array describing the current table
  10975. *
  10976. * @ingroup tripal_schema_api
  10977. *
  10978. */
  10979. function tripal_core_chado_db_schema () {
  10980. $description = array();
  10981. $description = array(
  10982. 'table' => 'db',
  10983. // 'description' => 'TODO: please describe this table!',
  10984. 'fields' => array(
  10985. 'db_id' => array(
  10986. // 'description' => 'TODO: please describe this field!',
  10987. 'type' => 'serial',
  10988. 'not null' => '1',
  10989. ),
  10990. 'name' => array(
  10991. // 'description' => 'TODO: please describe this field!',
  10992. 'type' => 'varchar',
  10993. 'length' => '255',
  10994. 'not null' => '1',
  10995. ),
  10996. 'description' => array(
  10997. // 'description' => 'TODO: please describe this field!',
  10998. 'type' => 'varchar',
  10999. 'length' => '255',
  11000. 'not null' => '',
  11001. ),
  11002. 'urlprefix' => array(
  11003. // 'description' => 'TODO: please describe this field!',
  11004. 'type' => 'varchar',
  11005. 'length' => '255',
  11006. 'not null' => '',
  11007. ),
  11008. 'url' => array(
  11009. // 'description' => 'TODO: please describe this field!',
  11010. 'type' => 'varchar',
  11011. 'length' => '255',
  11012. 'not null' => '',
  11013. ),
  11014. ),
  11015. 'primary key' => array(
  11016. '0' => 'db_id',
  11017. ),
  11018. 'unique keys' => array(
  11019. 'db_c1' => array(
  11020. '0' => 'name',
  11021. ),
  11022. ),
  11023. 'indexes' => array(
  11024. ),
  11025. 'foreign keys' => array(
  11026. ),
  11027. );
  11028. return $description;
  11029. }
  11030. /**
  11031. * Implements hook_cvtermsynonym_schema()
  11032. * Purpose: To describe the structure of cvtermsynonym to tripal
  11033. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11034. * @see tripal_core.api.inc: tripal_core_chado_update()
  11035. * @see tripal_core.api.inc: tripal_core_chado_select()
  11036. *
  11037. * @return
  11038. * An array describing the current table
  11039. *
  11040. * @ingroup tripal_schema_api
  11041. *
  11042. */
  11043. function tripal_core_chado_cvtermsynonym_schema () {
  11044. $description = array();
  11045. $description = array(
  11046. 'table' => 'cvtermsynonym',
  11047. // 'description' => 'TODO: please describe this table!',
  11048. 'fields' => array(
  11049. 'cvtermsynonym_id' => array(
  11050. // 'description' => 'TODO: please describe this field!',
  11051. 'type' => 'serial',
  11052. 'not null' => '1',
  11053. ),
  11054. 'cvterm_id' => array(
  11055. // 'description' => 'TODO: please describe this field!',
  11056. 'type' => 'int',
  11057. 'not null' => '1',
  11058. ),
  11059. 'synonym' => array(
  11060. // 'description' => 'TODO: please describe this field!',
  11061. 'type' => 'varchar',
  11062. 'length' => '1024',
  11063. 'not null' => '1',
  11064. ),
  11065. 'type_id' => array(
  11066. // 'description' => 'TODO: please describe this field!',
  11067. 'type' => 'int',
  11068. 'not null' => '',
  11069. ),
  11070. ),
  11071. 'primary key' => array(
  11072. '0' => 'cvtermsynonym_id',
  11073. ),
  11074. 'unique keys' => array(
  11075. 'cvtermsynonym_c1' => array(
  11076. '0' => 'cvterm_id',
  11077. '1' => 'synonym',
  11078. ),
  11079. ),
  11080. 'indexes' => array(
  11081. 'cvtermsynonym_idx1' => array(
  11082. '0' => 'cvterm_id',
  11083. ),
  11084. ),
  11085. 'foreign keys' => array(
  11086. ),
  11087. );
  11088. return $description;
  11089. }
  11090. /**
  11091. * Implements hook_cvterm_dbxref_schema()
  11092. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11093. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11094. * @see tripal_core.api.inc: tripal_core_chado_update()
  11095. * @see tripal_core.api.inc: tripal_core_chado_select()
  11096. *
  11097. * @return
  11098. * An array describing the current table
  11099. *
  11100. * @ingroup tripal_schema_api
  11101. *
  11102. */
  11103. function tripal_core_chado_cvterm_dbxref_schema () {
  11104. $description = array();
  11105. $description = array(
  11106. 'table' => 'cvterm_dbxref',
  11107. // 'description' => 'TODO: please describe this table!',
  11108. 'fields' => array(
  11109. 'cvterm_dbxref_id' => array(
  11110. // 'description' => 'TODO: please describe this field!',
  11111. 'type' => 'serial',
  11112. 'not null' => '1',
  11113. ),
  11114. 'cvterm_id' => array(
  11115. // 'description' => 'TODO: please describe this field!',
  11116. 'type' => 'int',
  11117. 'not null' => '1',
  11118. ),
  11119. 'dbxref_id' => array(
  11120. // 'description' => 'TODO: please describe this field!',
  11121. 'type' => 'int',
  11122. 'not null' => '1',
  11123. ),
  11124. 'is_for_definition' => array(
  11125. // 'description' => 'TODO: please describe this field!',
  11126. 'type' => 'int',
  11127. 'not null' => '1',
  11128. 'default' => '0',
  11129. ),
  11130. ),
  11131. 'primary key' => array(
  11132. '0' => 'cvterm_dbxref_id',
  11133. ),
  11134. 'unique keys' => array(
  11135. 'cvterm_dbxref_c1' => array(
  11136. '0' => 'cvterm_id',
  11137. '1' => 'dbxref_id',
  11138. ),
  11139. ),
  11140. 'indexes' => array(
  11141. 'cvterm_dbxref_idx1' => array(
  11142. '0' => 'cvterm_id',
  11143. ),
  11144. 'cvterm_dbxref_idx2' => array(
  11145. '0' => 'dbxref_id',
  11146. ),
  11147. ),
  11148. 'foreign keys' => array(
  11149. ),
  11150. );
  11151. return $description;
  11152. }
  11153. /**
  11154. * Implements hook_cvterm_relationship_schema()
  11155. * Purpose: To describe the structure of cvterm_relationship to tripal
  11156. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11157. * @see tripal_core.api.inc: tripal_core_chado_update()
  11158. * @see tripal_core.api.inc: tripal_core_chado_select()
  11159. *
  11160. * @return
  11161. * An array describing the current table
  11162. *
  11163. * @ingroup tripal_schema_api
  11164. *
  11165. */
  11166. function tripal_core_chado_cvterm_relationship_schema () {
  11167. $description = array();
  11168. $description = array(
  11169. 'table' => 'cvterm_relationship',
  11170. // 'description' => 'TODO: please describe this table!',
  11171. 'fields' => array(
  11172. 'cvterm_relationship_id' => array(
  11173. // 'description' => 'TODO: please describe this field!',
  11174. 'type' => 'serial',
  11175. 'not null' => '1',
  11176. ),
  11177. 'type_id' => array(
  11178. // 'description' => 'TODO: please describe this field!',
  11179. 'type' => 'int',
  11180. 'not null' => '1',
  11181. ),
  11182. 'subject_id' => array(
  11183. // 'description' => 'TODO: please describe this field!',
  11184. 'type' => 'int',
  11185. 'not null' => '1',
  11186. ),
  11187. 'object_id' => array(
  11188. // 'description' => 'TODO: please describe this field!',
  11189. 'type' => 'int',
  11190. 'not null' => '1',
  11191. ),
  11192. ),
  11193. 'primary key' => array(
  11194. '0' => 'cvterm_relationship_id',
  11195. ),
  11196. 'unique keys' => array(
  11197. 'cvterm_relationship_c1' => array(
  11198. '0' => 'subject_id',
  11199. '1' => 'object_id',
  11200. '2' => 'type_id',
  11201. ),
  11202. ),
  11203. 'indexes' => array(
  11204. 'cvterm_relationship_idx1' => array(
  11205. '0' => 'type_id',
  11206. ),
  11207. 'cvterm_relationship_idx2' => array(
  11208. '0' => 'subject_id',
  11209. ),
  11210. 'cvterm_relationship_idx3' => array(
  11211. '0' => 'object_id',
  11212. ),
  11213. ),
  11214. 'foreign keys' => array(
  11215. ),
  11216. );
  11217. return $description;
  11218. }
  11219. /**
  11220. * Implements hook_cvtermpath_schema()
  11221. * Purpose: To describe the structure of cvtermpath to tripal
  11222. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11223. * @see tripal_core.api.inc: tripal_core_chado_update()
  11224. * @see tripal_core.api.inc: tripal_core_chado_select()
  11225. *
  11226. * @return
  11227. * An array describing the current table
  11228. *
  11229. * @ingroup tripal_schema_api
  11230. *
  11231. */
  11232. function tripal_core_chado_cvtermpath_schema () {
  11233. $description = array();
  11234. $description = array(
  11235. 'table' => 'cvtermpath',
  11236. // 'description' => 'TODO: please describe this table!',
  11237. 'fields' => array(
  11238. 'cvtermpath_id' => array(
  11239. // 'description' => 'TODO: please describe this field!',
  11240. 'type' => 'serial',
  11241. 'not null' => '1',
  11242. ),
  11243. 'type_id' => array(
  11244. // 'description' => 'TODO: please describe this field!',
  11245. 'type' => 'int',
  11246. 'not null' => '',
  11247. ),
  11248. 'subject_id' => array(
  11249. // 'description' => 'TODO: please describe this field!',
  11250. 'type' => 'int',
  11251. 'not null' => '1',
  11252. ),
  11253. 'object_id' => array(
  11254. // 'description' => 'TODO: please describe this field!',
  11255. 'type' => 'int',
  11256. 'not null' => '1',
  11257. ),
  11258. 'cv_id' => array(
  11259. // 'description' => 'TODO: please describe this field!',
  11260. 'type' => 'int',
  11261. 'not null' => '1',
  11262. ),
  11263. 'pathdistance' => array(
  11264. // 'description' => 'TODO: please describe this field!',
  11265. 'type' => 'int',
  11266. 'not null' => '',
  11267. ),
  11268. ),
  11269. 'primary key' => array(
  11270. '0' => 'cvtermpath_id',
  11271. ),
  11272. 'unique keys' => array(
  11273. 'cvtermpath_c1' => array(
  11274. '0' => 'subject_id',
  11275. '1' => 'object_id',
  11276. '2' => 'type_id',
  11277. '3' => 'pathdistance',
  11278. ),
  11279. ),
  11280. 'indexes' => array(
  11281. 'cvtermpath_idx1' => array(
  11282. '0' => 'type_id',
  11283. ),
  11284. 'cvtermpath_idx2' => array(
  11285. '0' => 'subject_id',
  11286. ),
  11287. 'cvtermpath_idx3' => array(
  11288. '0' => 'object_id',
  11289. ),
  11290. 'cvtermpath_idx4' => array(
  11291. '0' => 'cv_id',
  11292. ),
  11293. ),
  11294. 'foreign keys' => array(
  11295. ),
  11296. );
  11297. return $description;
  11298. }
  11299. /**
  11300. * Implements hook_cvtermprop_schema()
  11301. * Purpose: To describe the structure of cvtermprop to tripal
  11302. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11303. * @see tripal_core.api.inc: tripal_core_chado_update()
  11304. * @see tripal_core.api.inc: tripal_core_chado_select()
  11305. *
  11306. * @return
  11307. * An array describing the current table
  11308. *
  11309. * @ingroup tripal_schema_api
  11310. *
  11311. */
  11312. function tripal_core_chado_cvtermprop_schema () {
  11313. $description = array();
  11314. $description = array(
  11315. 'table' => 'cvtermprop',
  11316. // 'description' => 'TODO: please describe this table!',
  11317. 'fields' => array(
  11318. 'cvtermprop_id' => array(
  11319. // 'description' => 'TODO: please describe this field!',
  11320. 'type' => 'serial',
  11321. 'not null' => '1',
  11322. ),
  11323. 'cvterm_id' => array(
  11324. // 'description' => 'TODO: please describe this field!',
  11325. 'type' => 'int',
  11326. 'not null' => '1',
  11327. ),
  11328. 'type_id' => array(
  11329. // 'description' => 'TODO: please describe this field!',
  11330. 'type' => 'int',
  11331. 'not null' => '1',
  11332. ),
  11333. 'value' => array(
  11334. // 'description' => 'TODO: please describe this field!',
  11335. 'type' => 'text',
  11336. 'not null' => '1',
  11337. 'default' => '',
  11338. ),
  11339. 'rank' => array(
  11340. // 'description' => 'TODO: please describe this field!',
  11341. 'type' => 'int',
  11342. 'not null' => '1',
  11343. 'default' => '0',
  11344. ),
  11345. ),
  11346. 'primary key' => array(
  11347. '0' => 'cvtermprop_id',
  11348. ),
  11349. 'unique keys' => array(
  11350. 'cvterm_id' => array(
  11351. '0' => 'cvterm_id',
  11352. '1' => 'type_id',
  11353. '2' => 'value',
  11354. '3' => 'rank',
  11355. ),
  11356. ),
  11357. 'indexes' => array(
  11358. 'cvtermprop_idx1' => array(
  11359. '0' => 'cvterm_id',
  11360. ),
  11361. 'cvtermprop_idx2' => array(
  11362. '0' => 'type_id',
  11363. ),
  11364. ),
  11365. 'foreign keys' => array(
  11366. ),
  11367. );
  11368. return $description;
  11369. }
  11370. /**
  11371. * Implements hook_eimage_schema()
  11372. * Purpose: To describe the structure of eimage to tripal
  11373. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11374. * @see tripal_core.api.inc: tripal_core_chado_update()
  11375. * @see tripal_core.api.inc: tripal_core_chado_select()
  11376. *
  11377. * @return
  11378. * An array describing the current table
  11379. *
  11380. * @ingroup tripal_schema_api
  11381. *
  11382. */
  11383. function tripal_core_chado_eimage_schema () {
  11384. $description = array();
  11385. $description = array(
  11386. 'table' => 'eimage',
  11387. // 'description' => 'TODO: please describe this table!',
  11388. 'fields' => array(
  11389. 'eimage_id' => array(
  11390. // 'description' => 'TODO: please describe this field!',
  11391. 'type' => 'serial',
  11392. 'not null' => '1',
  11393. ),
  11394. 'eimage_data' => array(
  11395. // 'description' => 'TODO: please describe this field!',
  11396. 'type' => 'text',
  11397. 'not null' => '',
  11398. ),
  11399. 'eimage_type' => array(
  11400. // 'description' => 'TODO: please describe this field!',
  11401. 'type' => 'varchar',
  11402. 'length' => '255',
  11403. 'not null' => '1',
  11404. ),
  11405. 'image_uri' => array(
  11406. // 'description' => 'TODO: please describe this field!',
  11407. 'type' => 'varchar',
  11408. 'length' => '255',
  11409. 'not null' => '',
  11410. ),
  11411. ),
  11412. 'primary key' => array(
  11413. '0' => 'eimage_id',
  11414. ),
  11415. 'unique keys' => array(
  11416. ),
  11417. 'indexes' => array(
  11418. ),
  11419. 'foreign keys' => array(
  11420. ),
  11421. );
  11422. return $description;
  11423. }
  11424. /**
  11425. * Implements hook_element_schema()
  11426. * Purpose: To describe the structure of element to tripal
  11427. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11428. * @see tripal_core.api.inc: tripal_core_chado_update()
  11429. * @see tripal_core.api.inc: tripal_core_chado_select()
  11430. *
  11431. * @return
  11432. * An array describing the current table
  11433. *
  11434. * @ingroup tripal_schema_api
  11435. *
  11436. */
  11437. function tripal_core_chado_element_schema () {
  11438. $description = array();
  11439. $description = array(
  11440. 'table' => 'element',
  11441. // 'description' => 'TODO: please describe this table!',
  11442. 'fields' => array(
  11443. 'element_id' => array(
  11444. // 'description' => 'TODO: please describe this field!',
  11445. 'type' => 'serial',
  11446. 'not null' => '1',
  11447. ),
  11448. 'feature_id' => array(
  11449. // 'description' => 'TODO: please describe this field!',
  11450. 'type' => 'int',
  11451. 'not null' => '',
  11452. ),
  11453. 'arraydesign_id' => array(
  11454. // 'description' => 'TODO: please describe this field!',
  11455. 'type' => 'int',
  11456. 'not null' => '1',
  11457. ),
  11458. 'type_id' => array(
  11459. // 'description' => 'TODO: please describe this field!',
  11460. 'type' => 'int',
  11461. 'not null' => '',
  11462. ),
  11463. 'dbxref_id' => array(
  11464. // 'description' => 'TODO: please describe this field!',
  11465. 'type' => 'int',
  11466. 'not null' => '',
  11467. ),
  11468. ),
  11469. 'primary key' => array(
  11470. '0' => 'element_id',
  11471. ),
  11472. 'unique keys' => array(
  11473. 'element_c1' => array(
  11474. '0' => 'feature_id',
  11475. '1' => 'arraydesign_id',
  11476. ),
  11477. ),
  11478. 'indexes' => array(
  11479. 'element_idx1' => array(
  11480. '0' => 'feature_id',
  11481. ),
  11482. 'element_idx2' => array(
  11483. '0' => 'arraydesign_id',
  11484. ),
  11485. 'element_idx3' => array(
  11486. '0' => 'type_id',
  11487. ),
  11488. 'element_idx4' => array(
  11489. '0' => 'dbxref_id',
  11490. ),
  11491. ),
  11492. 'foreign keys' => array(
  11493. ),
  11494. );
  11495. return $description;
  11496. }
  11497. /**
  11498. * Implements hook_expression_cvterm_schema()
  11499. * Purpose: To describe the structure of expression_cvterm to tripal
  11500. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11501. * @see tripal_core.api.inc: tripal_core_chado_update()
  11502. * @see tripal_core.api.inc: tripal_core_chado_select()
  11503. *
  11504. * @return
  11505. * An array describing the current table
  11506. *
  11507. * @ingroup tripal_schema_api
  11508. *
  11509. */
  11510. function tripal_core_chado_expression_cvterm_schema () {
  11511. $description = array();
  11512. $description = array(
  11513. 'table' => 'expression_cvterm',
  11514. // 'description' => 'TODO: please describe this table!',
  11515. 'fields' => array(
  11516. 'expression_cvterm_id' => array(
  11517. // 'description' => 'TODO: please describe this field!',
  11518. 'type' => 'serial',
  11519. 'not null' => '1',
  11520. ),
  11521. 'expression_id' => array(
  11522. // 'description' => 'TODO: please describe this field!',
  11523. 'type' => 'int',
  11524. 'not null' => '1',
  11525. ),
  11526. 'cvterm_id' => array(
  11527. // 'description' => 'TODO: please describe this field!',
  11528. 'type' => 'int',
  11529. 'not null' => '1',
  11530. ),
  11531. 'rank' => array(
  11532. // 'description' => 'TODO: please describe this field!',
  11533. 'type' => 'int',
  11534. 'not null' => '1',
  11535. 'default' => '0',
  11536. ),
  11537. 'cvterm_type_id' => array(
  11538. // 'description' => 'TODO: please describe this field!',
  11539. 'type' => 'int',
  11540. 'not null' => '1',
  11541. ),
  11542. ),
  11543. 'primary key' => array(
  11544. '0' => 'expression_cvterm_id',
  11545. ),
  11546. 'unique keys' => array(
  11547. 'expression_cvterm_c1' => array(
  11548. '0' => 'expression_id',
  11549. '1' => 'cvterm_id',
  11550. '2' => 'cvterm_type_id',
  11551. ),
  11552. ),
  11553. 'indexes' => array(
  11554. 'expression_cvterm_idx1' => array(
  11555. '0' => 'expression_id',
  11556. ),
  11557. 'expression_cvterm_idx2' => array(
  11558. '0' => 'cvterm_id',
  11559. ),
  11560. 'expression_cvterm_idx3' => array(
  11561. '0' => 'cvterm_type_id',
  11562. ),
  11563. ),
  11564. 'foreign keys' => array(
  11565. ),
  11566. );
  11567. return $description;
  11568. }
  11569. /**
  11570. * Implements hook_expression_cvtermprop_schema()
  11571. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11572. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11573. * @see tripal_core.api.inc: tripal_core_chado_update()
  11574. * @see tripal_core.api.inc: tripal_core_chado_select()
  11575. *
  11576. * @return
  11577. * An array describing the current table
  11578. *
  11579. * @ingroup tripal_schema_api
  11580. *
  11581. */
  11582. function tripal_core_chado_expression_cvtermprop_schema () {
  11583. $description = array();
  11584. $description = array(
  11585. 'table' => 'expression_cvtermprop',
  11586. // 'description' => 'TODO: please describe this table!',
  11587. 'fields' => array(
  11588. 'expression_cvtermprop_id' => array(
  11589. // 'description' => 'TODO: please describe this field!',
  11590. 'type' => 'serial',
  11591. 'not null' => '1',
  11592. ),
  11593. 'expression_cvterm_id' => array(
  11594. // 'description' => 'TODO: please describe this field!',
  11595. 'type' => 'int',
  11596. 'not null' => '1',
  11597. ),
  11598. 'type_id' => array(
  11599. // 'description' => 'TODO: please describe this field!',
  11600. 'type' => 'int',
  11601. 'not null' => '1',
  11602. ),
  11603. 'value' => array(
  11604. // 'description' => 'TODO: please describe this field!',
  11605. 'type' => 'text',
  11606. 'not null' => '',
  11607. ),
  11608. 'rank' => array(
  11609. // 'description' => 'TODO: please describe this field!',
  11610. 'type' => 'int',
  11611. 'not null' => '1',
  11612. 'default' => '0',
  11613. ),
  11614. ),
  11615. 'primary key' => array(
  11616. '0' => 'expression_cvtermprop_id',
  11617. ),
  11618. 'unique keys' => array(
  11619. 'expression_cvtermprop_c1' => array(
  11620. '0' => 'expression_cvterm_id',
  11621. '1' => 'type_id',
  11622. '2' => 'rank',
  11623. ),
  11624. ),
  11625. 'indexes' => array(
  11626. 'expression_cvtermprop_idx1' => array(
  11627. '0' => 'expression_cvterm_id',
  11628. ),
  11629. 'expression_cvtermprop_idx2' => array(
  11630. '0' => 'type_id',
  11631. ),
  11632. ),
  11633. 'foreign keys' => array(
  11634. ),
  11635. );
  11636. return $description;
  11637. }
  11638. /**
  11639. * Implements hook_expression_image_schema()
  11640. * Purpose: To describe the structure of expression_image to tripal
  11641. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11642. * @see tripal_core.api.inc: tripal_core_chado_update()
  11643. * @see tripal_core.api.inc: tripal_core_chado_select()
  11644. *
  11645. * @return
  11646. * An array describing the current table
  11647. *
  11648. * @ingroup tripal_schema_api
  11649. *
  11650. */
  11651. function tripal_core_chado_expression_image_schema () {
  11652. $description = array();
  11653. $description = array(
  11654. 'table' => 'expression_image',
  11655. // 'description' => 'TODO: please describe this table!',
  11656. 'fields' => array(
  11657. 'expression_image_id' => array(
  11658. // 'description' => 'TODO: please describe this field!',
  11659. 'type' => 'serial',
  11660. 'not null' => '1',
  11661. ),
  11662. 'expression_id' => array(
  11663. // 'description' => 'TODO: please describe this field!',
  11664. 'type' => 'int',
  11665. 'not null' => '1',
  11666. ),
  11667. 'eimage_id' => array(
  11668. // 'description' => 'TODO: please describe this field!',
  11669. 'type' => 'int',
  11670. 'not null' => '1',
  11671. ),
  11672. ),
  11673. 'primary key' => array(
  11674. '0' => 'expression_image_id',
  11675. ),
  11676. 'unique keys' => array(
  11677. 'expression_image_c1' => array(
  11678. '0' => 'expression_id',
  11679. '1' => 'eimage_id',
  11680. ),
  11681. ),
  11682. 'indexes' => array(
  11683. 'expression_image_idx1' => array(
  11684. '0' => 'expression_id',
  11685. ),
  11686. 'expression_image_idx2' => array(
  11687. '0' => 'eimage_id',
  11688. ),
  11689. ),
  11690. 'foreign keys' => array(
  11691. ),
  11692. );
  11693. return $description;
  11694. }
  11695. /**
  11696. * Implements hook_expression_pub_schema()
  11697. * Purpose: To describe the structure of expression_pub to tripal
  11698. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11699. * @see tripal_core.api.inc: tripal_core_chado_update()
  11700. * @see tripal_core.api.inc: tripal_core_chado_select()
  11701. *
  11702. * @return
  11703. * An array describing the current table
  11704. *
  11705. * @ingroup tripal_schema_api
  11706. *
  11707. */
  11708. function tripal_core_chado_expression_pub_schema () {
  11709. $description = array();
  11710. $description = array(
  11711. 'table' => 'expression_pub',
  11712. // 'description' => 'TODO: please describe this table!',
  11713. 'fields' => array(
  11714. 'expression_pub_id' => array(
  11715. // 'description' => 'TODO: please describe this field!',
  11716. 'type' => 'serial',
  11717. 'not null' => '1',
  11718. ),
  11719. 'expression_id' => array(
  11720. // 'description' => 'TODO: please describe this field!',
  11721. 'type' => 'int',
  11722. 'not null' => '1',
  11723. ),
  11724. 'pub_id' => array(
  11725. // 'description' => 'TODO: please describe this field!',
  11726. 'type' => 'int',
  11727. 'not null' => '1',
  11728. ),
  11729. ),
  11730. 'primary key' => array(
  11731. '0' => 'expression_pub_id',
  11732. ),
  11733. 'unique keys' => array(
  11734. 'expression_pub_c1' => array(
  11735. '0' => 'expression_id',
  11736. '1' => 'pub_id',
  11737. ),
  11738. ),
  11739. 'indexes' => array(
  11740. 'expression_pub_idx1' => array(
  11741. '0' => 'expression_id',
  11742. ),
  11743. 'expression_pub_idx2' => array(
  11744. '0' => 'pub_id',
  11745. ),
  11746. ),
  11747. 'foreign keys' => array(
  11748. ),
  11749. );
  11750. return $description;
  11751. }
  11752. /**
  11753. * Implements hook_expression_schema()
  11754. * Purpose: To describe the structure of expression to tripal
  11755. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11756. * @see tripal_core.api.inc: tripal_core_chado_update()
  11757. * @see tripal_core.api.inc: tripal_core_chado_select()
  11758. *
  11759. * @return
  11760. * An array describing the current table
  11761. *
  11762. * @ingroup tripal_schema_api
  11763. *
  11764. */
  11765. function tripal_core_chado_expression_schema () {
  11766. $description = array();
  11767. $description = array(
  11768. 'table' => 'expression',
  11769. // 'description' => 'TODO: please describe this table!',
  11770. 'fields' => array(
  11771. 'expression_id' => array(
  11772. // 'description' => 'TODO: please describe this field!',
  11773. 'type' => 'serial',
  11774. 'not null' => '1',
  11775. ),
  11776. 'uniquename' => array(
  11777. // 'description' => 'TODO: please describe this field!',
  11778. 'type' => 'text',
  11779. 'not null' => '1',
  11780. ),
  11781. 'md5checksum' => array(
  11782. // 'description' => 'TODO: please describe this field!',
  11783. 'type' => 'char',
  11784. 'length' => '32',
  11785. 'not null' => '',
  11786. ),
  11787. 'description' => array(
  11788. // 'description' => 'TODO: please describe this field!',
  11789. 'type' => 'text',
  11790. 'not null' => '',
  11791. ),
  11792. ),
  11793. 'primary key' => array(
  11794. '0' => 'expression_id',
  11795. ),
  11796. 'unique keys' => array(
  11797. 'expression_c1' => array(
  11798. '0' => 'uniquename',
  11799. ),
  11800. ),
  11801. 'indexes' => array(
  11802. ),
  11803. 'foreign keys' => array(
  11804. ),
  11805. );
  11806. return $description;
  11807. }
  11808. /**
  11809. * Implements hook_environment_cvterm_schema()
  11810. * Purpose: To describe the structure of environment_cvterm to tripal
  11811. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11812. * @see tripal_core.api.inc: tripal_core_chado_update()
  11813. * @see tripal_core.api.inc: tripal_core_chado_select()
  11814. *
  11815. * @return
  11816. * An array describing the current table
  11817. *
  11818. * @ingroup tripal_schema_api
  11819. *
  11820. */
  11821. function tripal_core_chado_environment_cvterm_schema () {
  11822. $description = array();
  11823. $description = array(
  11824. 'table' => 'environment_cvterm',
  11825. // 'description' => 'TODO: please describe this table!',
  11826. 'fields' => array(
  11827. 'environment_cvterm_id' => array(
  11828. // 'description' => 'TODO: please describe this field!',
  11829. 'type' => 'serial',
  11830. 'not null' => '1',
  11831. ),
  11832. 'environment_id' => array(
  11833. // 'description' => 'TODO: please describe this field!',
  11834. 'type' => 'int',
  11835. 'not null' => '1',
  11836. ),
  11837. 'cvterm_id' => array(
  11838. // 'description' => 'TODO: please describe this field!',
  11839. 'type' => 'int',
  11840. 'not null' => '1',
  11841. ),
  11842. ),
  11843. 'primary key' => array(
  11844. '0' => 'environment_cvterm_id',
  11845. ),
  11846. 'unique keys' => array(
  11847. 'environment_cvterm_c1' => array(
  11848. '0' => 'environment_id',
  11849. '1' => 'cvterm_id',
  11850. ),
  11851. ),
  11852. 'indexes' => array(
  11853. 'environment_cvterm_idx1' => array(
  11854. '0' => 'environment_id',
  11855. ),
  11856. 'environment_cvterm_idx2' => array(
  11857. '0' => 'cvterm_id',
  11858. ),
  11859. ),
  11860. 'foreign keys' => array(
  11861. ),
  11862. );
  11863. return $description;
  11864. }
  11865. /**
  11866. * Implements hook_element_relationship_schema()
  11867. * Purpose: To describe the structure of element_relationship to tripal
  11868. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11869. * @see tripal_core.api.inc: tripal_core_chado_update()
  11870. * @see tripal_core.api.inc: tripal_core_chado_select()
  11871. *
  11872. * @return
  11873. * An array describing the current table
  11874. *
  11875. * @ingroup tripal_schema_api
  11876. *
  11877. */
  11878. function tripal_core_chado_element_relationship_schema () {
  11879. $description = array();
  11880. $description = array(
  11881. 'table' => 'element_relationship',
  11882. // 'description' => 'TODO: please describe this table!',
  11883. 'fields' => array(
  11884. 'element_relationship_id' => array(
  11885. // 'description' => 'TODO: please describe this field!',
  11886. 'type' => 'serial',
  11887. 'not null' => '1',
  11888. ),
  11889. 'subject_id' => array(
  11890. // 'description' => 'TODO: please describe this field!',
  11891. 'type' => 'int',
  11892. 'not null' => '1',
  11893. ),
  11894. 'type_id' => array(
  11895. // 'description' => 'TODO: please describe this field!',
  11896. 'type' => 'int',
  11897. 'not null' => '1',
  11898. ),
  11899. 'object_id' => array(
  11900. // 'description' => 'TODO: please describe this field!',
  11901. 'type' => 'int',
  11902. 'not null' => '1',
  11903. ),
  11904. 'value' => array(
  11905. // 'description' => 'TODO: please describe this field!',
  11906. 'type' => 'text',
  11907. 'not null' => '',
  11908. ),
  11909. 'rank' => array(
  11910. // 'description' => 'TODO: please describe this field!',
  11911. 'type' => 'int',
  11912. 'not null' => '1',
  11913. 'default' => '0',
  11914. ),
  11915. ),
  11916. 'primary key' => array(
  11917. '0' => 'element_relationship_id',
  11918. ),
  11919. 'unique keys' => array(
  11920. 'element_relationship_c1' => array(
  11921. '0' => 'subject_id',
  11922. '1' => 'object_id',
  11923. '2' => 'type_id',
  11924. '3' => 'rank',
  11925. ),
  11926. ),
  11927. 'indexes' => array(
  11928. 'element_relationship_idx1' => array(
  11929. '0' => 'subject_id',
  11930. ),
  11931. 'element_relationship_idx2' => array(
  11932. '0' => 'type_id',
  11933. ),
  11934. 'element_relationship_idx3' => array(
  11935. '0' => 'object_id',
  11936. ),
  11937. 'element_relationship_idx4' => array(
  11938. '0' => 'value',
  11939. ),
  11940. ),
  11941. 'foreign keys' => array(
  11942. ),
  11943. );
  11944. return $description;
  11945. }
  11946. /**
  11947. * Implements hook_elementresult_schema()
  11948. * Purpose: To describe the structure of elementresult to tripal
  11949. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11950. * @see tripal_core.api.inc: tripal_core_chado_update()
  11951. * @see tripal_core.api.inc: tripal_core_chado_select()
  11952. *
  11953. * @return
  11954. * An array describing the current table
  11955. *
  11956. * @ingroup tripal_schema_api
  11957. *
  11958. */
  11959. function tripal_core_chado_elementresult_schema () {
  11960. $description = array();
  11961. $description = array(
  11962. 'table' => 'elementresult',
  11963. // 'description' => 'TODO: please describe this table!',
  11964. 'fields' => array(
  11965. 'elementresult_id' => array(
  11966. // 'description' => 'TODO: please describe this field!',
  11967. 'type' => 'serial',
  11968. 'not null' => '1',
  11969. ),
  11970. 'element_id' => array(
  11971. // 'description' => 'TODO: please describe this field!',
  11972. 'type' => 'int',
  11973. 'not null' => '1',
  11974. ),
  11975. 'quantification_id' => array(
  11976. // 'description' => 'TODO: please describe this field!',
  11977. 'type' => 'int',
  11978. 'not null' => '1',
  11979. ),
  11980. 'signal' => array(
  11981. // 'description' => 'TODO: please describe this field!',
  11982. 'type' => 'float',
  11983. 'size' => 'big',
  11984. 'not null' => '1',
  11985. ),
  11986. ),
  11987. 'primary key' => array(
  11988. '0' => 'elementresult_id',
  11989. ),
  11990. 'unique keys' => array(
  11991. 'elementresult_c1' => array(
  11992. '0' => 'element_id',
  11993. '1' => 'quantification_id',
  11994. ),
  11995. ),
  11996. 'indexes' => array(
  11997. 'elementresult_idx1' => array(
  11998. '0' => 'element_id',
  11999. ),
  12000. 'elementresult_idx2' => array(
  12001. '0' => 'quantification_id',
  12002. ),
  12003. 'elementresult_idx3' => array(
  12004. '0' => 'signal',
  12005. ),
  12006. ),
  12007. 'foreign keys' => array(
  12008. ),
  12009. );
  12010. return $description;
  12011. }
  12012. /**
  12013. * Implements hook_elementresult_relationship_schema()
  12014. * Purpose: To describe the structure of elementresult_relationship to tripal
  12015. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12016. * @see tripal_core.api.inc: tripal_core_chado_update()
  12017. * @see tripal_core.api.inc: tripal_core_chado_select()
  12018. *
  12019. * @return
  12020. * An array describing the current table
  12021. *
  12022. * @ingroup tripal_schema_api
  12023. *
  12024. */
  12025. function tripal_core_chado_elementresult_relationship_schema () {
  12026. $description = array();
  12027. $description = array(
  12028. 'table' => 'elementresult_relationship',
  12029. // 'description' => 'TODO: please describe this table!',
  12030. 'fields' => array(
  12031. 'elementresult_relationship_id' => array(
  12032. // 'description' => 'TODO: please describe this field!',
  12033. 'type' => 'serial',
  12034. 'not null' => '1',
  12035. ),
  12036. 'subject_id' => array(
  12037. // 'description' => 'TODO: please describe this field!',
  12038. 'type' => 'int',
  12039. 'not null' => '1',
  12040. ),
  12041. 'type_id' => array(
  12042. // 'description' => 'TODO: please describe this field!',
  12043. 'type' => 'int',
  12044. 'not null' => '1',
  12045. ),
  12046. 'object_id' => array(
  12047. // 'description' => 'TODO: please describe this field!',
  12048. 'type' => 'int',
  12049. 'not null' => '1',
  12050. ),
  12051. 'value' => array(
  12052. // 'description' => 'TODO: please describe this field!',
  12053. 'type' => 'text',
  12054. 'not null' => '',
  12055. ),
  12056. 'rank' => array(
  12057. // 'description' => 'TODO: please describe this field!',
  12058. 'type' => 'int',
  12059. 'not null' => '1',
  12060. 'default' => '0',
  12061. ),
  12062. ),
  12063. 'primary key' => array(
  12064. '0' => 'elementresult_relationship_id',
  12065. ),
  12066. 'unique keys' => array(
  12067. 'elementresult_relationship_c1' => array(
  12068. '0' => 'subject_id',
  12069. '1' => 'object_id',
  12070. '2' => 'type_id',
  12071. '3' => 'rank',
  12072. ),
  12073. ),
  12074. 'indexes' => array(
  12075. 'elementresult_relationship_idx1' => array(
  12076. '0' => 'subject_id',
  12077. ),
  12078. 'elementresult_relationship_idx2' => array(
  12079. '0' => 'type_id',
  12080. ),
  12081. 'elementresult_relationship_idx3' => array(
  12082. '0' => 'object_id',
  12083. ),
  12084. 'elementresult_relationship_idx4' => array(
  12085. '0' => 'value',
  12086. ),
  12087. ),
  12088. 'foreign keys' => array(
  12089. ),
  12090. );
  12091. return $description;
  12092. }
  12093. /**
  12094. * Implements hook_environment_schema()
  12095. * Purpose: To describe the structure of environment to tripal
  12096. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12097. * @see tripal_core.api.inc: tripal_core_chado_update()
  12098. * @see tripal_core.api.inc: tripal_core_chado_select()
  12099. *
  12100. * @return
  12101. * An array describing the current table
  12102. *
  12103. * @ingroup tripal_schema_api
  12104. *
  12105. */
  12106. function tripal_core_chado_environment_schema () {
  12107. $description = array();
  12108. $description = array(
  12109. 'table' => 'environment',
  12110. // 'description' => 'TODO: please describe this table!',
  12111. 'fields' => array(
  12112. 'environment_id' => array(
  12113. // 'description' => 'TODO: please describe this field!',
  12114. 'type' => 'serial',
  12115. 'not null' => '1',
  12116. ),
  12117. 'uniquename' => array(
  12118. // 'description' => 'TODO: please describe this field!',
  12119. 'type' => 'text',
  12120. 'not null' => '1',
  12121. ),
  12122. 'description' => array(
  12123. // 'description' => 'TODO: please describe this field!',
  12124. 'type' => 'text',
  12125. 'not null' => '',
  12126. ),
  12127. ),
  12128. 'primary key' => array(
  12129. '0' => 'environment_id',
  12130. ),
  12131. 'unique keys' => array(
  12132. 'environment_c1' => array(
  12133. '0' => 'uniquename',
  12134. ),
  12135. ),
  12136. 'indexes' => array(
  12137. 'environment_idx1' => array(
  12138. '0' => 'uniquename',
  12139. ),
  12140. ),
  12141. 'foreign keys' => array(
  12142. ),
  12143. );
  12144. return $description;
  12145. }