tripal_core.schema.api.inc 328 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853
  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. * Implements hook_organism_dbxref_schema()
  10. * Purpose: To describe the structure of organism_dbxref to tripal
  11. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12. * @see tripal_core.api.inc: tripal_core_chado_update()
  13. * @see tripal_core.api.inc: tripal_core_chado_select()
  14. *
  15. * @return
  16. * An array describing the current table
  17. *
  18. * @ingroup tripal_api
  19. *
  20. * @ingroup tripal_core
  21. */
  22. function tripal_core_chado_organism_dbxref_schema () {
  23. $description = array();
  24. $description = array(
  25. 'table' => 'organism_dbxref',
  26. // 'description' => 'TODO: please describe this table!',
  27. 'fields' => array(
  28. 'organism_dbxref_id' => array(
  29. // 'description' => 'TODO: please describe this field!',
  30. 'type' => 'serial',
  31. 'not null' => '1',
  32. ),
  33. 'organism_id' => array(
  34. // 'description' => 'TODO: please describe this field!',
  35. 'type' => 'int',
  36. 'not null' => '1',
  37. ),
  38. 'dbxref_id' => array(
  39. // 'description' => 'TODO: please describe this field!',
  40. 'type' => 'int',
  41. 'not null' => '1',
  42. ),
  43. ),
  44. 'primary key' => array(
  45. '0' => 'organism_dbxref_id',
  46. ),
  47. 'unique keys' => array(
  48. 'organism_dbxref_c1' => array(
  49. '0' => 'organism_id',
  50. '1' => 'dbxref_id',
  51. ),
  52. ),
  53. 'indexes' => array(
  54. 'organism_dbxref_idx1' => array(
  55. '0' => 'organism_id',
  56. ),
  57. 'organism_dbxref_idx2' => array(
  58. '0' => 'dbxref_id',
  59. ),
  60. ),
  61. 'foreign keys' => array(
  62. ),
  63. );
  64. return $description;
  65. }
  66. /**
  67. * Implements hook_organismprop_schema()
  68. * Purpose: To describe the structure of organismprop to tripal
  69. * @see tripal_core.api.inc: tripal_core_chado_insert()
  70. * @see tripal_core.api.inc: tripal_core_chado_update()
  71. * @see tripal_core.api.inc: tripal_core_chado_select()
  72. *
  73. * @return
  74. * An array describing the current table
  75. *
  76. * @ingroup tripal_api
  77. *
  78. * @ingroup tripal_core
  79. */
  80. function tripal_core_chado_organismprop_schema () {
  81. $description = array();
  82. $description = array(
  83. 'table' => 'organismprop',
  84. // 'description' => 'TODO: please describe this table!',
  85. 'fields' => array(
  86. 'organismprop_id' => array(
  87. // 'description' => 'TODO: please describe this field!',
  88. 'type' => 'serial',
  89. 'not null' => '1',
  90. ),
  91. 'organism_id' => array(
  92. // 'description' => 'TODO: please describe this field!',
  93. 'type' => 'int',
  94. 'not null' => '1',
  95. ),
  96. 'type_id' => array(
  97. // 'description' => 'TODO: please describe this field!',
  98. 'type' => 'int',
  99. 'not null' => '1',
  100. ),
  101. 'value' => array(
  102. // 'description' => 'TODO: please describe this field!',
  103. 'type' => 'text',
  104. 'not null' => '',
  105. ),
  106. 'rank' => array(
  107. // 'description' => 'TODO: please describe this field!',
  108. 'type' => 'int',
  109. 'not null' => '1',
  110. 'default' => '0',
  111. ),
  112. ),
  113. 'primary key' => array(
  114. '0' => 'organismprop_id',
  115. ),
  116. 'unique keys' => array(
  117. 'organismprop_c1' => array(
  118. '0' => 'organism_id',
  119. '1' => 'type_id',
  120. '2' => 'rank',
  121. ),
  122. ),
  123. 'indexes' => array(
  124. 'organismprop_idx1' => array(
  125. '0' => 'organism_id',
  126. ),
  127. 'organismprop_idx2' => array(
  128. '0' => 'type_id',
  129. ),
  130. ),
  131. 'foreign keys' => array(
  132. ),
  133. );
  134. return $description;
  135. }
  136. /**
  137. * Implements hook_phendesc_schema()
  138. * Purpose: To describe the structure of phendesc to tripal
  139. * @see tripal_core.api.inc: tripal_core_chado_insert()
  140. * @see tripal_core.api.inc: tripal_core_chado_update()
  141. * @see tripal_core.api.inc: tripal_core_chado_select()
  142. *
  143. * @return
  144. * An array describing the current table
  145. *
  146. * @ingroup tripal_api
  147. *
  148. * @ingroup tripal_core
  149. */
  150. function tripal_core_chado_phendesc_schema () {
  151. $description = array();
  152. $description = array(
  153. 'table' => 'phendesc',
  154. // 'description' => 'TODO: please describe this table!',
  155. 'fields' => array(
  156. 'phendesc_id' => array(
  157. // 'description' => 'TODO: please describe this field!',
  158. 'type' => 'serial',
  159. 'not null' => '1',
  160. ),
  161. 'genotype_id' => array(
  162. // 'description' => 'TODO: please describe this field!',
  163. 'type' => 'int',
  164. 'not null' => '1',
  165. ),
  166. 'environment_id' => array(
  167. // 'description' => 'TODO: please describe this field!',
  168. 'type' => 'int',
  169. 'not null' => '1',
  170. ),
  171. 'description' => array(
  172. // 'description' => 'TODO: please describe this field!',
  173. 'type' => 'text',
  174. 'not null' => '1',
  175. ),
  176. 'type_id' => array(
  177. // 'description' => 'TODO: please describe this field!',
  178. 'type' => 'int',
  179. 'not null' => '1',
  180. ),
  181. 'pub_id' => array(
  182. // 'description' => 'TODO: please describe this field!',
  183. 'type' => 'int',
  184. 'not null' => '1',
  185. ),
  186. ),
  187. 'primary key' => array(
  188. '0' => 'phendesc_id',
  189. ),
  190. 'unique keys' => array(
  191. 'phendesc_c1' => array(
  192. '0' => 'genotype_id',
  193. '1' => 'environment_id',
  194. '2' => 'type_id',
  195. '3' => 'pub_id',
  196. ),
  197. ),
  198. 'indexes' => array(
  199. 'phendesc_idx1' => array(
  200. '0' => 'genotype_id',
  201. ),
  202. 'phendesc_idx2' => array(
  203. '0' => 'environment_id',
  204. ),
  205. 'phendesc_idx3' => array(
  206. '0' => 'pub_id',
  207. ),
  208. ),
  209. 'foreign keys' => array(
  210. ),
  211. );
  212. return $description;
  213. }
  214. /**
  215. * Implements hook_phenotype_schema()
  216. * Purpose: To describe the structure of phenotype to tripal
  217. * @see tripal_core.api.inc: tripal_core_chado_insert()
  218. * @see tripal_core.api.inc: tripal_core_chado_update()
  219. * @see tripal_core.api.inc: tripal_core_chado_select()
  220. *
  221. * @return
  222. * An array describing the current table
  223. *
  224. * @ingroup tripal_api
  225. *
  226. * @ingroup tripal_core
  227. */
  228. function tripal_core_chado_phenotype_schema () {
  229. $description = array();
  230. $description = array(
  231. 'table' => 'phenotype',
  232. // 'description' => 'TODO: please describe this table!',
  233. 'fields' => array(
  234. 'phenotype_id' => array(
  235. // 'description' => 'TODO: please describe this field!',
  236. 'type' => 'serial',
  237. 'not null' => '1',
  238. ),
  239. 'uniquename' => array(
  240. // 'description' => 'TODO: please describe this field!',
  241. 'type' => 'text',
  242. 'not null' => '1',
  243. ),
  244. 'observable_id' => array(
  245. // 'description' => 'TODO: please describe this field!',
  246. 'type' => 'int',
  247. 'not null' => '',
  248. ),
  249. 'attr_id' => array(
  250. // 'description' => 'TODO: please describe this field!',
  251. 'type' => 'int',
  252. 'not null' => '',
  253. ),
  254. 'value' => array(
  255. // 'description' => 'TODO: please describe this field!',
  256. 'type' => 'text',
  257. 'not null' => '',
  258. ),
  259. 'cvalue_id' => array(
  260. // 'description' => 'TODO: please describe this field!',
  261. 'type' => 'int',
  262. 'not null' => '',
  263. ),
  264. 'assay_id' => array(
  265. // 'description' => 'TODO: please describe this field!',
  266. 'type' => 'int',
  267. 'not null' => '',
  268. ),
  269. ),
  270. 'primary key' => array(
  271. '0' => 'phenotype_id',
  272. ),
  273. 'unique keys' => array(
  274. 'phenotype_c1' => array(
  275. '0' => 'uniquename',
  276. ),
  277. ),
  278. 'indexes' => array(
  279. 'phenotype_idx1' => array(
  280. '0' => 'cvalue_id',
  281. ),
  282. 'phenotype_idx2' => array(
  283. '0' => 'observable_id',
  284. ),
  285. 'phenotype_idx3' => array(
  286. '0' => 'attr_id',
  287. ),
  288. ),
  289. 'foreign keys' => array(
  290. ),
  291. );
  292. return $description;
  293. }
  294. /**
  295. * Implements hook_organism_schema()
  296. * Purpose: To describe the structure of organism to tripal
  297. * @see tripal_core.api.inc: tripal_core_chado_insert()
  298. * @see tripal_core.api.inc: tripal_core_chado_update()
  299. * @see tripal_core.api.inc: tripal_core_chado_select()
  300. *
  301. * @return
  302. * An array describing the current table
  303. *
  304. * @ingroup tripal_api
  305. *
  306. * @ingroup tripal_core
  307. */
  308. function tripal_core_chado_organism_schema () {
  309. $description = array();
  310. $description = array(
  311. 'table' => 'organism',
  312. // 'description' => 'TODO: please describe this table!',
  313. 'fields' => array(
  314. 'organism_id' => array(
  315. // 'description' => 'TODO: please describe this field!',
  316. 'type' => 'serial',
  317. 'not null' => '1',
  318. ),
  319. 'abbreviation' => array(
  320. // 'description' => 'TODO: please describe this field!',
  321. 'type' => 'varchar',
  322. 'length' => '255',
  323. 'not null' => '',
  324. ),
  325. 'genus' => array(
  326. // 'description' => 'TODO: please describe this field!',
  327. 'type' => 'varchar',
  328. 'length' => '255',
  329. 'not null' => '1',
  330. ),
  331. 'species' => array(
  332. // 'description' => 'TODO: please describe this field!',
  333. 'type' => 'varchar',
  334. 'length' => '255',
  335. 'not null' => '1',
  336. ),
  337. 'common_name' => array(
  338. // 'description' => 'TODO: please describe this field!',
  339. 'type' => 'varchar',
  340. 'length' => '255',
  341. 'not null' => '',
  342. ),
  343. 'comment' => array(
  344. // 'description' => 'TODO: please describe this field!',
  345. 'type' => 'text',
  346. 'not null' => '',
  347. ),
  348. ),
  349. 'primary key' => array(
  350. '0' => 'organism_id',
  351. ),
  352. 'unique keys' => array(
  353. 'organism_c1' => array(
  354. '0' => 'genus',
  355. '1' => 'species',
  356. ),
  357. ),
  358. 'indexes' => array(
  359. ),
  360. 'foreign keys' => array(
  361. ),
  362. );
  363. return $description;
  364. }
  365. /**
  366. * Implements hook_materialized_view_schema()
  367. * Purpose: To describe the structure of materialized_view to tripal
  368. * @see tripal_core.api.inc: tripal_core_chado_insert()
  369. * @see tripal_core.api.inc: tripal_core_chado_update()
  370. * @see tripal_core.api.inc: tripal_core_chado_select()
  371. *
  372. * @return
  373. * An array describing the current table
  374. *
  375. * @ingroup tripal_api
  376. *
  377. * @ingroup tripal_core
  378. */
  379. function tripal_core_chado_materialized_view_schema () {
  380. $description = array();
  381. $description = array(
  382. 'table' => 'materialized_view',
  383. // 'description' => 'TODO: please describe this table!',
  384. 'fields' => array(
  385. 'materialized_view_id' => array(
  386. // 'description' => 'TODO: please describe this field!',
  387. 'type' => 'serial',
  388. 'not null' => '1',
  389. ),
  390. 'last_update' => array(
  391. // 'description' => 'TODO: please describe this field!',
  392. 'type' => 'datetime',
  393. 'not null' => '',
  394. ),
  395. 'refresh_time' => array(
  396. // 'description' => 'TODO: please describe this field!',
  397. 'type' => 'int',
  398. 'not null' => '',
  399. ),
  400. 'name' => array(
  401. // 'description' => 'TODO: please describe this field!',
  402. 'type' => 'varchar',
  403. 'length' => '64',
  404. 'not null' => '',
  405. ),
  406. 'mv_schema' => array(
  407. // 'description' => 'TODO: please describe this field!',
  408. 'type' => 'varchar',
  409. 'length' => '64',
  410. 'not null' => '',
  411. ),
  412. 'mv_table' => array(
  413. // 'description' => 'TODO: please describe this field!',
  414. 'type' => 'varchar',
  415. 'length' => '128',
  416. 'not null' => '',
  417. ),
  418. 'mv_specs' => array(
  419. // 'description' => 'TODO: please describe this field!',
  420. 'type' => 'text',
  421. 'not null' => '',
  422. ),
  423. 'indexed' => array(
  424. // 'description' => 'TODO: please describe this field!',
  425. 'type' => 'text',
  426. 'not null' => '',
  427. ),
  428. 'query' => array(
  429. // 'description' => 'TODO: please describe this field!',
  430. 'type' => 'text',
  431. 'not null' => '',
  432. ),
  433. 'special_index' => array(
  434. // 'description' => 'TODO: please describe this field!',
  435. 'type' => 'text',
  436. 'not null' => '',
  437. ),
  438. ),
  439. 'primary key' => array(
  440. ),
  441. 'unique keys' => array(
  442. 'name' => array(
  443. '0' => 'name',
  444. ),
  445. ),
  446. 'indexes' => array(
  447. ),
  448. 'foreign keys' => array(
  449. ),
  450. );
  451. return $description;
  452. }
  453. /**
  454. * Implements hook_libraryprop_schema()
  455. * Purpose: To describe the structure of libraryprop to tripal
  456. * @see tripal_core.api.inc: tripal_core_chado_insert()
  457. * @see tripal_core.api.inc: tripal_core_chado_update()
  458. * @see tripal_core.api.inc: tripal_core_chado_select()
  459. *
  460. * @return
  461. * An array describing the current table
  462. *
  463. * @ingroup tripal_api
  464. *
  465. * @ingroup tripal_core
  466. */
  467. function tripal_core_chado_libraryprop_schema () {
  468. $description = array();
  469. $description = array(
  470. 'table' => 'libraryprop',
  471. // 'description' => 'TODO: please describe this table!',
  472. 'fields' => array(
  473. 'libraryprop_id' => array(
  474. // 'description' => 'TODO: please describe this field!',
  475. 'type' => 'serial',
  476. 'not null' => '1',
  477. ),
  478. 'library_id' => array(
  479. // 'description' => 'TODO: please describe this field!',
  480. 'type' => 'int',
  481. 'not null' => '1',
  482. ),
  483. 'type_id' => array(
  484. // 'description' => 'TODO: please describe this field!',
  485. 'type' => 'int',
  486. 'not null' => '1',
  487. ),
  488. 'value' => array(
  489. // 'description' => 'TODO: please describe this field!',
  490. 'type' => 'text',
  491. 'not null' => '',
  492. ),
  493. 'rank' => array(
  494. // 'description' => 'TODO: please describe this field!',
  495. 'type' => 'int',
  496. 'not null' => '1',
  497. 'default' => '0',
  498. ),
  499. ),
  500. 'primary key' => array(
  501. '0' => 'libraryprop_id',
  502. ),
  503. 'unique keys' => array(
  504. 'libraryprop_c1' => array(
  505. '0' => 'library_id',
  506. '1' => 'type_id',
  507. '2' => 'rank',
  508. ),
  509. ),
  510. 'indexes' => array(
  511. 'libraryprop_idx1' => array(
  512. '0' => 'library_id',
  513. ),
  514. 'libraryprop_idx2' => array(
  515. '0' => 'type_id',
  516. ),
  517. ),
  518. 'foreign keys' => array(
  519. ),
  520. );
  521. return $description;
  522. }
  523. /**
  524. * Implements hook_libraryprop_pub_schema()
  525. * Purpose: To describe the structure of libraryprop_pub to tripal
  526. * @see tripal_core.api.inc: tripal_core_chado_insert()
  527. * @see tripal_core.api.inc: tripal_core_chado_update()
  528. * @see tripal_core.api.inc: tripal_core_chado_select()
  529. *
  530. * @return
  531. * An array describing the current table
  532. *
  533. * @ingroup tripal_api
  534. *
  535. * @ingroup tripal_core
  536. */
  537. function tripal_core_chado_libraryprop_pub_schema () {
  538. $description = array();
  539. $description = array(
  540. 'table' => 'libraryprop_pub',
  541. // 'description' => 'TODO: please describe this table!',
  542. 'fields' => array(
  543. 'libraryprop_pub_id' => array(
  544. // 'description' => 'TODO: please describe this field!',
  545. 'type' => 'serial',
  546. 'not null' => '1',
  547. ),
  548. 'libraryprop_id' => array(
  549. // 'description' => 'TODO: please describe this field!',
  550. 'type' => 'int',
  551. 'not null' => '1',
  552. ),
  553. 'pub_id' => array(
  554. // 'description' => 'TODO: please describe this field!',
  555. 'type' => 'int',
  556. 'not null' => '1',
  557. ),
  558. ),
  559. 'primary key' => array(
  560. '0' => 'libraryprop_pub_id',
  561. ),
  562. 'unique keys' => array(
  563. 'libraryprop_pub_c1' => array(
  564. '0' => 'libraryprop_id',
  565. '1' => 'pub_id',
  566. ),
  567. ),
  568. 'indexes' => array(
  569. 'libraryprop_pub_idx1' => array(
  570. '0' => 'libraryprop_id',
  571. ),
  572. 'libraryprop_pub_idx2' => array(
  573. '0' => 'pub_id',
  574. ),
  575. ),
  576. 'foreign keys' => array(
  577. ),
  578. );
  579. return $description;
  580. }
  581. /**
  582. * Implements hook_magedocumentation_schema()
  583. * Purpose: To describe the structure of magedocumentation to tripal
  584. * @see tripal_core.api.inc: tripal_core_chado_insert()
  585. * @see tripal_core.api.inc: tripal_core_chado_update()
  586. * @see tripal_core.api.inc: tripal_core_chado_select()
  587. *
  588. * @return
  589. * An array describing the current table
  590. *
  591. * @ingroup tripal_api
  592. *
  593. * @ingroup tripal_core
  594. */
  595. function tripal_core_chado_magedocumentation_schema () {
  596. $description = array();
  597. $description = array(
  598. 'table' => 'magedocumentation',
  599. // 'description' => 'TODO: please describe this table!',
  600. 'fields' => array(
  601. 'magedocumentation_id' => array(
  602. // 'description' => 'TODO: please describe this field!',
  603. 'type' => 'serial',
  604. 'not null' => '1',
  605. ),
  606. 'mageml_id' => array(
  607. // 'description' => 'TODO: please describe this field!',
  608. 'type' => 'int',
  609. 'not null' => '1',
  610. ),
  611. 'tableinfo_id' => array(
  612. // 'description' => 'TODO: please describe this field!',
  613. 'type' => 'int',
  614. 'not null' => '1',
  615. ),
  616. 'row_id' => array(
  617. // 'description' => 'TODO: please describe this field!',
  618. 'type' => 'int',
  619. 'not null' => '1',
  620. ),
  621. 'mageidentifier' => array(
  622. // 'description' => 'TODO: please describe this field!',
  623. 'type' => 'text',
  624. 'not null' => '1',
  625. ),
  626. ),
  627. 'primary key' => array(
  628. '0' => 'magedocumentation_id',
  629. ),
  630. 'unique keys' => array(
  631. ),
  632. 'indexes' => array(
  633. 'magedocumentation_idx1' => array(
  634. '0' => 'mageml_id',
  635. ),
  636. 'magedocumentation_idx2' => array(
  637. '0' => 'tableinfo_id',
  638. ),
  639. 'magedocumentation_idx3' => array(
  640. '0' => 'row_id',
  641. ),
  642. ),
  643. 'foreign keys' => array(
  644. ),
  645. );
  646. return $description;
  647. }
  648. /**
  649. * Implements hook_mageml_schema()
  650. * Purpose: To describe the structure of mageml to tripal
  651. * @see tripal_core.api.inc: tripal_core_chado_insert()
  652. * @see tripal_core.api.inc: tripal_core_chado_update()
  653. * @see tripal_core.api.inc: tripal_core_chado_select()
  654. *
  655. * @return
  656. * An array describing the current table
  657. *
  658. * @ingroup tripal_api
  659. *
  660. * @ingroup tripal_core
  661. */
  662. function tripal_core_chado_mageml_schema () {
  663. $description = array();
  664. $description = array(
  665. 'table' => 'mageml',
  666. // 'description' => 'TODO: please describe this table!',
  667. 'fields' => array(
  668. 'mageml_id' => array(
  669. // 'description' => 'TODO: please describe this field!',
  670. 'type' => 'serial',
  671. 'not null' => '1',
  672. ),
  673. 'mage_package' => array(
  674. // 'description' => 'TODO: please describe this field!',
  675. 'type' => 'text',
  676. 'not null' => '1',
  677. ),
  678. 'mage_ml' => array(
  679. // 'description' => 'TODO: please describe this field!',
  680. 'type' => 'text',
  681. 'not null' => '1',
  682. ),
  683. ),
  684. 'primary key' => array(
  685. '0' => 'mageml_id',
  686. ),
  687. 'unique keys' => array(
  688. ),
  689. 'indexes' => array(
  690. ),
  691. 'foreign keys' => array(
  692. ),
  693. );
  694. return $description;
  695. }
  696. /**
  697. * Implements hook_phenotype_comparison_schema()
  698. * Purpose: To describe the structure of phenotype_comparison to tripal
  699. * @see tripal_core.api.inc: tripal_core_chado_insert()
  700. * @see tripal_core.api.inc: tripal_core_chado_update()
  701. * @see tripal_core.api.inc: tripal_core_chado_select()
  702. *
  703. * @return
  704. * An array describing the current table
  705. *
  706. * @ingroup tripal_api
  707. *
  708. * @ingroup tripal_core
  709. */
  710. function tripal_core_chado_phenotype_comparison_schema () {
  711. $description = array();
  712. $description = array(
  713. 'table' => 'phenotype_comparison',
  714. // 'description' => 'TODO: please describe this table!',
  715. 'fields' => array(
  716. 'phenotype_comparison_id' => array(
  717. // 'description' => 'TODO: please describe this field!',
  718. 'type' => 'serial',
  719. 'not null' => '1',
  720. ),
  721. 'genotype1_id' => array(
  722. // 'description' => 'TODO: please describe this field!',
  723. 'type' => 'int',
  724. 'not null' => '1',
  725. ),
  726. 'environment1_id' => array(
  727. // 'description' => 'TODO: please describe this field!',
  728. 'type' => 'int',
  729. 'not null' => '1',
  730. ),
  731. 'genotype2_id' => array(
  732. // 'description' => 'TODO: please describe this field!',
  733. 'type' => 'int',
  734. 'not null' => '1',
  735. ),
  736. 'environment2_id' => array(
  737. // 'description' => 'TODO: please describe this field!',
  738. 'type' => 'int',
  739. 'not null' => '1',
  740. ),
  741. 'phenotype1_id' => array(
  742. // 'description' => 'TODO: please describe this field!',
  743. 'type' => 'int',
  744. 'not null' => '1',
  745. ),
  746. 'phenotype2_id' => array(
  747. // 'description' => 'TODO: please describe this field!',
  748. 'type' => 'int',
  749. 'not null' => '',
  750. ),
  751. 'pub_id' => array(
  752. // 'description' => 'TODO: please describe this field!',
  753. 'type' => 'int',
  754. 'not null' => '1',
  755. ),
  756. 'organism_id' => array(
  757. // 'description' => 'TODO: please describe this field!',
  758. 'type' => 'int',
  759. 'not null' => '1',
  760. ),
  761. ),
  762. 'primary key' => array(
  763. '0' => 'phenotype_comparison_id',
  764. ),
  765. 'unique keys' => array(
  766. 'phenotype_comparison_c1' => array(
  767. '0' => 'genotype1_id',
  768. '1' => 'environment1_id',
  769. '2' => 'genotype2_id',
  770. '3' => 'environment2_id',
  771. '4' => 'phenotype1_id',
  772. '5' => 'pub_id',
  773. ),
  774. ),
  775. 'indexes' => array(
  776. 'phenotype_comparison_idx1' => array(
  777. '0' => 'genotype1_id',
  778. ),
  779. 'phenotype_comparison_idx2' => array(
  780. '0' => 'genotype2_id',
  781. ),
  782. 'phenotype_comparison_idx4' => array(
  783. '0' => 'pub_id',
  784. ),
  785. ),
  786. 'foreign keys' => array(
  787. ),
  788. );
  789. return $description;
  790. }
  791. /**
  792. * Implements hook_phenotype_comparison_cvterm_schema()
  793. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  794. * @see tripal_core.api.inc: tripal_core_chado_insert()
  795. * @see tripal_core.api.inc: tripal_core_chado_update()
  796. * @see tripal_core.api.inc: tripal_core_chado_select()
  797. *
  798. * @return
  799. * An array describing the current table
  800. *
  801. * @ingroup tripal_api
  802. *
  803. * @ingroup tripal_core
  804. */
  805. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  806. $description = array();
  807. $description = array(
  808. 'table' => 'phenotype_comparison_cvterm',
  809. // 'description' => 'TODO: please describe this table!',
  810. 'fields' => array(
  811. 'phenotype_comparison_cvterm_id' => array(
  812. // 'description' => 'TODO: please describe this field!',
  813. 'type' => 'serial',
  814. 'not null' => '1',
  815. ),
  816. 'phenotype_comparison_id' => array(
  817. // 'description' => 'TODO: please describe this field!',
  818. 'type' => 'int',
  819. 'not null' => '1',
  820. ),
  821. 'cvterm_id' => array(
  822. // 'description' => 'TODO: please describe this field!',
  823. 'type' => 'int',
  824. 'not null' => '1',
  825. ),
  826. 'pub_id' => array(
  827. // 'description' => 'TODO: please describe this field!',
  828. 'type' => 'int',
  829. 'not null' => '1',
  830. ),
  831. 'rank' => array(
  832. // 'description' => 'TODO: please describe this field!',
  833. 'type' => 'int',
  834. 'not null' => '1',
  835. 'default' => '0',
  836. ),
  837. ),
  838. 'primary key' => array(
  839. '0' => 'phenotype_comparison_cvterm_id',
  840. ),
  841. 'unique keys' => array(
  842. 'phenotype_comparison_cvterm_c1' => array(
  843. '0' => 'phenotype_comparison_id',
  844. '1' => 'cvterm_id',
  845. ),
  846. ),
  847. 'indexes' => array(
  848. 'phenotype_comparison_cvterm_idx1' => array(
  849. '0' => 'phenotype_comparison_id',
  850. ),
  851. 'phenotype_comparison_cvterm_idx2' => array(
  852. '0' => 'cvterm_id',
  853. ),
  854. ),
  855. 'foreign keys' => array(
  856. ),
  857. );
  858. return $description;
  859. }
  860. /**
  861. * Implements hook_phylonode_relationship_schema()
  862. * Purpose: To describe the structure of phylonode_relationship to tripal
  863. * @see tripal_core.api.inc: tripal_core_chado_insert()
  864. * @see tripal_core.api.inc: tripal_core_chado_update()
  865. * @see tripal_core.api.inc: tripal_core_chado_select()
  866. *
  867. * @return
  868. * An array describing the current table
  869. *
  870. * @ingroup tripal_api
  871. *
  872. * @ingroup tripal_core
  873. */
  874. function tripal_core_chado_phylonode_relationship_schema () {
  875. $description = array();
  876. $description = array(
  877. 'table' => 'phylonode_relationship',
  878. // 'description' => 'TODO: please describe this table!',
  879. 'fields' => array(
  880. 'phylonode_relationship_id' => array(
  881. // 'description' => 'TODO: please describe this field!',
  882. 'type' => 'serial',
  883. 'not null' => '1',
  884. ),
  885. 'subject_id' => array(
  886. // 'description' => 'TODO: please describe this field!',
  887. 'type' => 'int',
  888. 'not null' => '1',
  889. ),
  890. 'object_id' => array(
  891. // 'description' => 'TODO: please describe this field!',
  892. 'type' => 'int',
  893. 'not null' => '1',
  894. ),
  895. 'type_id' => array(
  896. // 'description' => 'TODO: please describe this field!',
  897. 'type' => 'int',
  898. 'not null' => '1',
  899. ),
  900. 'rank' => array(
  901. // 'description' => 'TODO: please describe this field!',
  902. 'type' => 'int',
  903. 'not null' => '',
  904. ),
  905. 'phylotree_id' => array(
  906. // 'description' => 'TODO: please describe this field!',
  907. 'type' => 'int',
  908. 'not null' => '1',
  909. ),
  910. ),
  911. 'primary key' => array(
  912. '0' => 'phylonode_relationship_id',
  913. ),
  914. 'unique keys' => array(
  915. 'subject_id' => array(
  916. '0' => 'subject_id',
  917. '1' => 'object_id',
  918. '2' => 'type_id',
  919. ),
  920. ),
  921. 'indexes' => array(
  922. 'phylonode_relationship_idx1' => array(
  923. '0' => 'subject_id',
  924. ),
  925. 'phylonode_relationship_idx2' => array(
  926. '0' => 'object_id',
  927. ),
  928. 'phylonode_relationship_idx3' => array(
  929. '0' => 'type_id',
  930. ),
  931. ),
  932. 'foreign keys' => array(
  933. ),
  934. );
  935. return $description;
  936. }
  937. /**
  938. * Implements hook_phylonodeprop_schema()
  939. * Purpose: To describe the structure of phylonodeprop to tripal
  940. * @see tripal_core.api.inc: tripal_core_chado_insert()
  941. * @see tripal_core.api.inc: tripal_core_chado_update()
  942. * @see tripal_core.api.inc: tripal_core_chado_select()
  943. *
  944. * @return
  945. * An array describing the current table
  946. *
  947. * @ingroup tripal_api
  948. *
  949. * @ingroup tripal_core
  950. */
  951. function tripal_core_chado_phylonodeprop_schema () {
  952. $description = array();
  953. $description = array(
  954. 'table' => 'phylonodeprop',
  955. // 'description' => 'TODO: please describe this table!',
  956. 'fields' => array(
  957. 'phylonodeprop_id' => array(
  958. // 'description' => 'TODO: please describe this field!',
  959. 'type' => 'serial',
  960. 'not null' => '1',
  961. ),
  962. 'phylonode_id' => array(
  963. // 'description' => 'TODO: please describe this field!',
  964. 'type' => 'int',
  965. 'not null' => '1',
  966. ),
  967. 'type_id' => array(
  968. // 'description' => 'TODO: please describe this field!',
  969. 'type' => 'int',
  970. 'not null' => '1',
  971. ),
  972. 'value' => array(
  973. // 'description' => 'TODO: please describe this field!',
  974. 'type' => 'text',
  975. 'not null' => '1',
  976. 'default' => '',
  977. ),
  978. 'rank' => array(
  979. // 'description' => 'TODO: please describe this field!',
  980. 'type' => 'int',
  981. 'not null' => '1',
  982. 'default' => '0',
  983. ),
  984. ),
  985. 'primary key' => array(
  986. '0' => 'phylonodeprop_id',
  987. ),
  988. 'unique keys' => array(
  989. 'phylonode_id' => array(
  990. '0' => 'phylonode_id',
  991. '1' => 'type_id',
  992. '2' => 'value',
  993. '3' => 'rank',
  994. ),
  995. ),
  996. 'indexes' => array(
  997. 'phylonodeprop_idx1' => array(
  998. '0' => 'phylonode_id',
  999. ),
  1000. 'phylonodeprop_idx2' => array(
  1001. '0' => 'type_id',
  1002. ),
  1003. ),
  1004. 'foreign keys' => array(
  1005. ),
  1006. );
  1007. return $description;
  1008. }
  1009. /**
  1010. * Implements hook_phylotree_schema()
  1011. * Purpose: To describe the structure of phylotree to tripal
  1012. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1013. * @see tripal_core.api.inc: tripal_core_chado_update()
  1014. * @see tripal_core.api.inc: tripal_core_chado_select()
  1015. *
  1016. * @return
  1017. * An array describing the current table
  1018. *
  1019. * @ingroup tripal_api
  1020. *
  1021. * @ingroup tripal_core
  1022. */
  1023. function tripal_core_chado_phylotree_schema () {
  1024. $description = array();
  1025. $description = array(
  1026. 'table' => 'phylotree',
  1027. // 'description' => 'TODO: please describe this table!',
  1028. 'fields' => array(
  1029. 'phylotree_id' => array(
  1030. // 'description' => 'TODO: please describe this field!',
  1031. 'type' => 'serial',
  1032. 'not null' => '1',
  1033. ),
  1034. 'dbxref_id' => array(
  1035. // 'description' => 'TODO: please describe this field!',
  1036. 'type' => 'int',
  1037. 'not null' => '1',
  1038. ),
  1039. 'name' => array(
  1040. // 'description' => 'TODO: please describe this field!',
  1041. 'type' => 'varchar',
  1042. 'length' => '255',
  1043. 'not null' => '',
  1044. ),
  1045. 'type_id' => array(
  1046. // 'description' => 'TODO: please describe this field!',
  1047. 'type' => 'int',
  1048. 'not null' => '',
  1049. ),
  1050. 'analysis_id' => array(
  1051. // 'description' => 'TODO: please describe this field!',
  1052. 'type' => 'int',
  1053. 'not null' => '',
  1054. ),
  1055. 'comment' => array(
  1056. // 'description' => 'TODO: please describe this field!',
  1057. 'type' => 'text',
  1058. 'not null' => '',
  1059. ),
  1060. ),
  1061. 'primary key' => array(
  1062. '0' => 'phylotree_id',
  1063. ),
  1064. 'unique keys' => array(
  1065. ),
  1066. 'indexes' => array(
  1067. 'phylotree_idx1' => array(
  1068. '0' => 'phylotree_id',
  1069. ),
  1070. ),
  1071. 'foreign keys' => array(
  1072. ),
  1073. );
  1074. return $description;
  1075. }
  1076. /**
  1077. * Implements hook_phylotree_pub_schema()
  1078. * Purpose: To describe the structure of phylotree_pub to tripal
  1079. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1080. * @see tripal_core.api.inc: tripal_core_chado_update()
  1081. * @see tripal_core.api.inc: tripal_core_chado_select()
  1082. *
  1083. * @return
  1084. * An array describing the current table
  1085. *
  1086. * @ingroup tripal_api
  1087. *
  1088. * @ingroup tripal_core
  1089. */
  1090. function tripal_core_chado_phylotree_pub_schema () {
  1091. $description = array();
  1092. $description = array(
  1093. 'table' => 'phylotree_pub',
  1094. // 'description' => 'TODO: please describe this table!',
  1095. 'fields' => array(
  1096. 'phylotree_pub_id' => array(
  1097. // 'description' => 'TODO: please describe this field!',
  1098. 'type' => 'serial',
  1099. 'not null' => '1',
  1100. ),
  1101. 'phylotree_id' => array(
  1102. // 'description' => 'TODO: please describe this field!',
  1103. 'type' => 'int',
  1104. 'not null' => '1',
  1105. ),
  1106. 'pub_id' => array(
  1107. // 'description' => 'TODO: please describe this field!',
  1108. 'type' => 'int',
  1109. 'not null' => '1',
  1110. ),
  1111. ),
  1112. 'primary key' => array(
  1113. '0' => 'phylotree_pub_id',
  1114. ),
  1115. 'unique keys' => array(
  1116. 'phylotree_id' => array(
  1117. '0' => 'phylotree_id',
  1118. '1' => 'pub_id',
  1119. ),
  1120. ),
  1121. 'indexes' => array(
  1122. 'phylotree_pub_idx1' => array(
  1123. '0' => 'phylotree_id',
  1124. ),
  1125. 'phylotree_pub_idx2' => array(
  1126. '0' => 'pub_id',
  1127. ),
  1128. ),
  1129. 'foreign keys' => array(
  1130. ),
  1131. );
  1132. return $description;
  1133. }
  1134. /**
  1135. * Implements hook_phylonode_pub_schema()
  1136. * Purpose: To describe the structure of phylonode_pub to tripal
  1137. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1138. * @see tripal_core.api.inc: tripal_core_chado_update()
  1139. * @see tripal_core.api.inc: tripal_core_chado_select()
  1140. *
  1141. * @return
  1142. * An array describing the current table
  1143. *
  1144. * @ingroup tripal_api
  1145. *
  1146. * @ingroup tripal_core
  1147. */
  1148. function tripal_core_chado_phylonode_pub_schema () {
  1149. $description = array();
  1150. $description = array(
  1151. 'table' => 'phylonode_pub',
  1152. // 'description' => 'TODO: please describe this table!',
  1153. 'fields' => array(
  1154. 'phylonode_pub_id' => array(
  1155. // 'description' => 'TODO: please describe this field!',
  1156. 'type' => 'serial',
  1157. 'not null' => '1',
  1158. ),
  1159. 'phylonode_id' => array(
  1160. // 'description' => 'TODO: please describe this field!',
  1161. 'type' => 'int',
  1162. 'not null' => '1',
  1163. ),
  1164. 'pub_id' => array(
  1165. // 'description' => 'TODO: please describe this field!',
  1166. 'type' => 'int',
  1167. 'not null' => '1',
  1168. ),
  1169. ),
  1170. 'primary key' => array(
  1171. '0' => 'phylonode_pub_id',
  1172. ),
  1173. 'unique keys' => array(
  1174. 'phylonode_id' => array(
  1175. '0' => 'phylonode_id',
  1176. '1' => 'pub_id',
  1177. ),
  1178. ),
  1179. 'indexes' => array(
  1180. 'phylonode_pub_idx1' => array(
  1181. '0' => 'phylonode_id',
  1182. ),
  1183. 'phylonode_pub_idx2' => array(
  1184. '0' => 'pub_id',
  1185. ),
  1186. ),
  1187. 'foreign keys' => array(
  1188. ),
  1189. );
  1190. return $description;
  1191. }
  1192. /**
  1193. * Implements hook_phylonode_organism_schema()
  1194. * Purpose: To describe the structure of phylonode_organism to tripal
  1195. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1196. * @see tripal_core.api.inc: tripal_core_chado_update()
  1197. * @see tripal_core.api.inc: tripal_core_chado_select()
  1198. *
  1199. * @return
  1200. * An array describing the current table
  1201. *
  1202. * @ingroup tripal_api
  1203. *
  1204. * @ingroup tripal_core
  1205. */
  1206. function tripal_core_chado_phylonode_organism_schema () {
  1207. $description = array();
  1208. $description = array(
  1209. 'table' => 'phylonode_organism',
  1210. // 'description' => 'TODO: please describe this table!',
  1211. 'fields' => array(
  1212. 'phylonode_organism_id' => array(
  1213. // 'description' => 'TODO: please describe this field!',
  1214. 'type' => 'serial',
  1215. 'not null' => '1',
  1216. ),
  1217. 'phylonode_id' => array(
  1218. // 'description' => 'TODO: please describe this field!',
  1219. 'type' => 'int',
  1220. 'not null' => '1',
  1221. ),
  1222. 'organism_id' => array(
  1223. // 'description' => 'TODO: please describe this field!',
  1224. 'type' => 'int',
  1225. 'not null' => '1',
  1226. ),
  1227. ),
  1228. 'primary key' => array(
  1229. '0' => 'phylonode_organism_id',
  1230. ),
  1231. 'unique keys' => array(
  1232. 'phylonode_id' => array(
  1233. '0' => 'phylonode_id',
  1234. ),
  1235. ),
  1236. 'indexes' => array(
  1237. 'phylonode_organism_idx1' => array(
  1238. '0' => 'phylonode_id',
  1239. ),
  1240. 'phylonode_organism_idx2' => array(
  1241. '0' => 'organism_id',
  1242. ),
  1243. ),
  1244. 'foreign keys' => array(
  1245. ),
  1246. );
  1247. return $description;
  1248. }
  1249. /**
  1250. * Implements hook_phenotype_cvterm_schema()
  1251. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1252. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1253. * @see tripal_core.api.inc: tripal_core_chado_update()
  1254. * @see tripal_core.api.inc: tripal_core_chado_select()
  1255. *
  1256. * @return
  1257. * An array describing the current table
  1258. *
  1259. * @ingroup tripal_api
  1260. *
  1261. * @ingroup tripal_core
  1262. */
  1263. function tripal_core_chado_phenotype_cvterm_schema () {
  1264. $description = array();
  1265. $description = array(
  1266. 'table' => 'phenotype_cvterm',
  1267. // 'description' => 'TODO: please describe this table!',
  1268. 'fields' => array(
  1269. 'phenotype_cvterm_id' => array(
  1270. // 'description' => 'TODO: please describe this field!',
  1271. 'type' => 'serial',
  1272. 'not null' => '1',
  1273. ),
  1274. 'phenotype_id' => array(
  1275. // 'description' => 'TODO: please describe this field!',
  1276. 'type' => 'int',
  1277. 'not null' => '1',
  1278. ),
  1279. 'cvterm_id' => array(
  1280. // 'description' => 'TODO: please describe this field!',
  1281. 'type' => 'int',
  1282. 'not null' => '1',
  1283. ),
  1284. 'rank' => array(
  1285. // 'description' => 'TODO: please describe this field!',
  1286. 'type' => 'int',
  1287. 'not null' => '1',
  1288. 'default' => '0',
  1289. ),
  1290. ),
  1291. 'primary key' => array(
  1292. '0' => 'phenotype_cvterm_id',
  1293. ),
  1294. 'unique keys' => array(
  1295. 'phenotype_cvterm_c1' => array(
  1296. '0' => 'phenotype_id',
  1297. '1' => 'cvterm_id',
  1298. '2' => 'rank',
  1299. ),
  1300. ),
  1301. 'indexes' => array(
  1302. 'phenotype_cvterm_idx1' => array(
  1303. '0' => 'phenotype_id',
  1304. ),
  1305. 'phenotype_cvterm_idx2' => array(
  1306. '0' => 'cvterm_id',
  1307. ),
  1308. ),
  1309. 'foreign keys' => array(
  1310. ),
  1311. );
  1312. return $description;
  1313. }
  1314. /**
  1315. * Implements hook_phenstatement_schema()
  1316. * Purpose: To describe the structure of phenstatement to tripal
  1317. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1318. * @see tripal_core.api.inc: tripal_core_chado_update()
  1319. * @see tripal_core.api.inc: tripal_core_chado_select()
  1320. *
  1321. * @return
  1322. * An array describing the current table
  1323. *
  1324. * @ingroup tripal_api
  1325. *
  1326. * @ingroup tripal_core
  1327. */
  1328. function tripal_core_chado_phenstatement_schema () {
  1329. $description = array();
  1330. $description = array(
  1331. 'table' => 'phenstatement',
  1332. // 'description' => 'TODO: please describe this table!',
  1333. 'fields' => array(
  1334. 'phenstatement_id' => array(
  1335. // 'description' => 'TODO: please describe this field!',
  1336. 'type' => 'serial',
  1337. 'not null' => '1',
  1338. ),
  1339. 'genotype_id' => array(
  1340. // 'description' => 'TODO: please describe this field!',
  1341. 'type' => 'int',
  1342. 'not null' => '1',
  1343. ),
  1344. 'environment_id' => array(
  1345. // 'description' => 'TODO: please describe this field!',
  1346. 'type' => 'int',
  1347. 'not null' => '1',
  1348. ),
  1349. 'phenotype_id' => array(
  1350. // 'description' => 'TODO: please describe this field!',
  1351. 'type' => 'int',
  1352. 'not null' => '1',
  1353. ),
  1354. 'type_id' => array(
  1355. // 'description' => 'TODO: please describe this field!',
  1356. 'type' => 'int',
  1357. 'not null' => '1',
  1358. ),
  1359. 'pub_id' => array(
  1360. // 'description' => 'TODO: please describe this field!',
  1361. 'type' => 'int',
  1362. 'not null' => '1',
  1363. ),
  1364. ),
  1365. 'primary key' => array(
  1366. '0' => 'phenstatement_id',
  1367. ),
  1368. 'unique keys' => array(
  1369. 'phenstatement_c1' => array(
  1370. '0' => 'genotype_id',
  1371. '1' => 'phenotype_id',
  1372. '2' => 'environment_id',
  1373. '3' => 'type_id',
  1374. '4' => 'pub_id',
  1375. ),
  1376. ),
  1377. 'indexes' => array(
  1378. 'phenstatement_idx1' => array(
  1379. '0' => 'genotype_id',
  1380. ),
  1381. 'phenstatement_idx2' => array(
  1382. '0' => 'phenotype_id',
  1383. ),
  1384. ),
  1385. 'foreign keys' => array(
  1386. ),
  1387. );
  1388. return $description;
  1389. }
  1390. /**
  1391. * Implements hook_phylonode_schema()
  1392. * Purpose: To describe the structure of phylonode to tripal
  1393. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1394. * @see tripal_core.api.inc: tripal_core_chado_update()
  1395. * @see tripal_core.api.inc: tripal_core_chado_select()
  1396. *
  1397. * @return
  1398. * An array describing the current table
  1399. *
  1400. * @ingroup tripal_api
  1401. *
  1402. * @ingroup tripal_core
  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_api
  1489. *
  1490. * @ingroup tripal_core
  1491. */
  1492. function tripal_core_chado_phylonode_dbxref_schema () {
  1493. $description = array();
  1494. $description = array(
  1495. 'table' => 'phylonode_dbxref',
  1496. // 'description' => 'TODO: please describe this table!',
  1497. 'fields' => array(
  1498. 'phylonode_dbxref_id' => array(
  1499. // 'description' => 'TODO: please describe this field!',
  1500. 'type' => 'serial',
  1501. 'not null' => '1',
  1502. ),
  1503. 'phylonode_id' => array(
  1504. // 'description' => 'TODO: please describe this field!',
  1505. 'type' => 'int',
  1506. 'not null' => '1',
  1507. ),
  1508. 'dbxref_id' => array(
  1509. // 'description' => 'TODO: please describe this field!',
  1510. 'type' => 'int',
  1511. 'not null' => '1',
  1512. ),
  1513. ),
  1514. 'primary key' => array(
  1515. '0' => 'phylonode_dbxref_id',
  1516. ),
  1517. 'unique keys' => array(
  1518. 'phylonode_id' => array(
  1519. '0' => 'phylonode_id',
  1520. '1' => 'dbxref_id',
  1521. ),
  1522. ),
  1523. 'indexes' => array(
  1524. 'phylonode_dbxref_idx1' => array(
  1525. '0' => 'phylonode_id',
  1526. ),
  1527. 'phylonode_dbxref_idx2' => array(
  1528. '0' => 'dbxref_id',
  1529. ),
  1530. ),
  1531. 'foreign keys' => array(
  1532. ),
  1533. );
  1534. return $description;
  1535. }
  1536. /**
  1537. * Implements hook_library_synonym_schema()
  1538. * Purpose: To describe the structure of library_synonym to tripal
  1539. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1540. * @see tripal_core.api.inc: tripal_core_chado_update()
  1541. * @see tripal_core.api.inc: tripal_core_chado_select()
  1542. *
  1543. * @return
  1544. * An array describing the current table
  1545. *
  1546. * @ingroup tripal_api
  1547. *
  1548. * @ingroup tripal_core
  1549. */
  1550. function tripal_core_chado_library_synonym_schema () {
  1551. $description = array();
  1552. $description = array(
  1553. 'table' => 'library_synonym',
  1554. // 'description' => 'TODO: please describe this table!',
  1555. 'fields' => array(
  1556. 'library_synonym_id' => array(
  1557. // 'description' => 'TODO: please describe this field!',
  1558. 'type' => 'serial',
  1559. 'not null' => '1',
  1560. ),
  1561. 'synonym_id' => array(
  1562. // 'description' => 'TODO: please describe this field!',
  1563. 'type' => 'int',
  1564. 'not null' => '1',
  1565. ),
  1566. 'library_id' => array(
  1567. // 'description' => 'TODO: please describe this field!',
  1568. 'type' => 'int',
  1569. 'not null' => '1',
  1570. ),
  1571. 'pub_id' => array(
  1572. // 'description' => 'TODO: please describe this field!',
  1573. 'type' => 'int',
  1574. 'not null' => '1',
  1575. ),
  1576. 'is_current' => array(
  1577. // 'description' => 'TODO: please describe this field!',
  1578. 'type' => 'boolean',
  1579. 'not null' => '1',
  1580. 'default' => 'ru',
  1581. ),
  1582. 'is_internal' => array(
  1583. // 'description' => 'TODO: please describe this field!',
  1584. 'type' => 'boolean',
  1585. 'not null' => '1',
  1586. 'default' => 'als',
  1587. ),
  1588. ),
  1589. 'primary key' => array(
  1590. '0' => 'library_synonym_id',
  1591. ),
  1592. 'unique keys' => array(
  1593. 'library_synonym_c1' => array(
  1594. '0' => 'synonym_id',
  1595. '1' => 'library_id',
  1596. '2' => 'pub_id',
  1597. ),
  1598. ),
  1599. 'indexes' => array(
  1600. 'library_synonym_idx1' => array(
  1601. '0' => 'synonym_id',
  1602. ),
  1603. 'library_synonym_idx2' => array(
  1604. '0' => 'library_id',
  1605. ),
  1606. 'library_synonym_idx3' => array(
  1607. '0' => 'pub_id',
  1608. ),
  1609. ),
  1610. 'foreign keys' => array(
  1611. ),
  1612. );
  1613. return $description;
  1614. }
  1615. /**
  1616. * Implements hook_library_pub_schema()
  1617. * Purpose: To describe the structure of library_pub to tripal
  1618. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1619. * @see tripal_core.api.inc: tripal_core_chado_update()
  1620. * @see tripal_core.api.inc: tripal_core_chado_select()
  1621. *
  1622. * @return
  1623. * An array describing the current table
  1624. *
  1625. * @ingroup tripal_api
  1626. *
  1627. * @ingroup tripal_core
  1628. */
  1629. function tripal_core_chado_library_pub_schema () {
  1630. $description = array();
  1631. $description = array(
  1632. 'table' => 'library_pub',
  1633. // 'description' => 'TODO: please describe this table!',
  1634. 'fields' => array(
  1635. 'library_pub_id' => array(
  1636. // 'description' => 'TODO: please describe this field!',
  1637. 'type' => 'serial',
  1638. 'not null' => '1',
  1639. ),
  1640. 'library_id' => array(
  1641. // 'description' => 'TODO: please describe this field!',
  1642. 'type' => 'int',
  1643. 'not null' => '1',
  1644. ),
  1645. 'pub_id' => array(
  1646. // 'description' => 'TODO: please describe this field!',
  1647. 'type' => 'int',
  1648. 'not null' => '1',
  1649. ),
  1650. ),
  1651. 'primary key' => array(
  1652. '0' => 'library_pub_id',
  1653. ),
  1654. 'unique keys' => array(
  1655. 'library_pub_c1' => array(
  1656. '0' => 'library_id',
  1657. '1' => 'pub_id',
  1658. ),
  1659. ),
  1660. 'indexes' => array(
  1661. 'library_pub_idx1' => array(
  1662. '0' => 'library_id',
  1663. ),
  1664. 'library_pub_idx2' => array(
  1665. '0' => 'pub_id',
  1666. ),
  1667. ),
  1668. 'foreign keys' => array(
  1669. ),
  1670. );
  1671. return $description;
  1672. }
  1673. /**
  1674. * Implements hook_featureprop_pub_schema()
  1675. * Purpose: To describe the structure of featureprop_pub to tripal
  1676. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1677. * @see tripal_core.api.inc: tripal_core_chado_update()
  1678. * @see tripal_core.api.inc: tripal_core_chado_select()
  1679. *
  1680. * @return
  1681. * An array describing the current table
  1682. *
  1683. * @ingroup tripal_api
  1684. *
  1685. * @ingroup tripal_core
  1686. */
  1687. function tripal_core_chado_featureprop_pub_schema () {
  1688. $description = array();
  1689. $description = array(
  1690. 'table' => 'featureprop_pub',
  1691. // 'description' => 'TODO: please describe this table!',
  1692. 'fields' => array(
  1693. 'featureprop_pub_id' => array(
  1694. // 'description' => 'TODO: please describe this field!',
  1695. 'type' => 'serial',
  1696. 'not null' => '1',
  1697. ),
  1698. 'featureprop_id' => array(
  1699. // 'description' => 'TODO: please describe this field!',
  1700. 'type' => 'int',
  1701. 'not null' => '1',
  1702. ),
  1703. 'pub_id' => array(
  1704. // 'description' => 'TODO: please describe this field!',
  1705. 'type' => 'int',
  1706. 'not null' => '1',
  1707. ),
  1708. ),
  1709. 'primary key' => array(
  1710. '0' => 'featureprop_pub_id',
  1711. ),
  1712. 'unique keys' => array(
  1713. 'featureprop_pub_c1' => array(
  1714. '0' => 'featureprop_id',
  1715. '1' => 'pub_id',
  1716. ),
  1717. ),
  1718. 'indexes' => array(
  1719. 'featureprop_pub_idx1' => array(
  1720. '0' => 'featureprop_id',
  1721. ),
  1722. 'featureprop_pub_idx2' => array(
  1723. '0' => 'pub_id',
  1724. ),
  1725. ),
  1726. 'foreign keys' => array(
  1727. ),
  1728. );
  1729. return $description;
  1730. }
  1731. /**
  1732. * Implements hook_featureprop_schema()
  1733. * Purpose: To describe the structure of featureprop to tripal
  1734. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1735. * @see tripal_core.api.inc: tripal_core_chado_update()
  1736. * @see tripal_core.api.inc: tripal_core_chado_select()
  1737. *
  1738. * @return
  1739. * An array describing the current table
  1740. *
  1741. * @ingroup tripal_api
  1742. *
  1743. * @ingroup tripal_core
  1744. */
  1745. function tripal_core_chado_featureprop_schema () {
  1746. $description = array();
  1747. $description = array(
  1748. 'table' => 'featureprop',
  1749. // 'description' => 'TODO: please describe this table!',
  1750. 'fields' => array(
  1751. 'featureprop_id' => array(
  1752. // 'description' => 'TODO: please describe this field!',
  1753. 'type' => 'serial',
  1754. 'not null' => '1',
  1755. ),
  1756. 'feature_id' => array(
  1757. // 'description' => 'TODO: please describe this field!',
  1758. 'type' => 'int',
  1759. 'not null' => '1',
  1760. ),
  1761. 'type_id' => array(
  1762. // 'description' => 'TODO: please describe this field!',
  1763. 'type' => 'int',
  1764. 'not null' => '1',
  1765. ),
  1766. 'value' => array(
  1767. // 'description' => 'TODO: please describe this field!',
  1768. 'type' => 'text',
  1769. 'not null' => '',
  1770. ),
  1771. 'rank' => array(
  1772. // 'description' => 'TODO: please describe this field!',
  1773. 'type' => 'int',
  1774. 'not null' => '1',
  1775. 'default' => '0',
  1776. ),
  1777. ),
  1778. 'primary key' => array(
  1779. '0' => 'featureprop_id',
  1780. ),
  1781. 'unique keys' => array(
  1782. 'featureprop_c1' => array(
  1783. '0' => 'feature_id',
  1784. '1' => 'type_id',
  1785. '2' => 'rank',
  1786. ),
  1787. ),
  1788. 'indexes' => array(
  1789. 'featureprop_idx1' => array(
  1790. '0' => 'feature_id',
  1791. ),
  1792. 'featureprop_idx2' => array(
  1793. '0' => 'type_id',
  1794. ),
  1795. ),
  1796. 'foreign keys' => array(
  1797. ),
  1798. );
  1799. return $description;
  1800. }
  1801. /**
  1802. * Implements hook_featurerange_schema()
  1803. * Purpose: To describe the structure of featurerange to tripal
  1804. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1805. * @see tripal_core.api.inc: tripal_core_chado_update()
  1806. * @see tripal_core.api.inc: tripal_core_chado_select()
  1807. *
  1808. * @return
  1809. * An array describing the current table
  1810. *
  1811. * @ingroup tripal_api
  1812. *
  1813. * @ingroup tripal_core
  1814. */
  1815. function tripal_core_chado_featurerange_schema () {
  1816. $description = array();
  1817. $description = array(
  1818. 'table' => 'featurerange',
  1819. // 'description' => 'TODO: please describe this table!',
  1820. 'fields' => array(
  1821. 'featurerange_id' => array(
  1822. // 'description' => 'TODO: please describe this field!',
  1823. 'type' => 'serial',
  1824. 'not null' => '1',
  1825. ),
  1826. 'featuremap_id' => array(
  1827. // 'description' => 'TODO: please describe this field!',
  1828. 'type' => 'int',
  1829. 'not null' => '1',
  1830. ),
  1831. 'feature_id' => array(
  1832. // 'description' => 'TODO: please describe this field!',
  1833. 'type' => 'int',
  1834. 'not null' => '1',
  1835. ),
  1836. 'leftstartf_id' => array(
  1837. // 'description' => 'TODO: please describe this field!',
  1838. 'type' => 'int',
  1839. 'not null' => '1',
  1840. ),
  1841. 'leftendf_id' => array(
  1842. // 'description' => 'TODO: please describe this field!',
  1843. 'type' => 'int',
  1844. 'not null' => '',
  1845. ),
  1846. 'rightstartf_id' => array(
  1847. // 'description' => 'TODO: please describe this field!',
  1848. 'type' => 'int',
  1849. 'not null' => '',
  1850. ),
  1851. 'rightendf_id' => array(
  1852. // 'description' => 'TODO: please describe this field!',
  1853. 'type' => 'int',
  1854. 'not null' => '1',
  1855. ),
  1856. 'rangestr' => array(
  1857. // 'description' => 'TODO: please describe this field!',
  1858. 'type' => 'varchar',
  1859. 'length' => '255',
  1860. 'not null' => '',
  1861. ),
  1862. ),
  1863. 'primary key' => array(
  1864. '0' => 'featurerange_id',
  1865. ),
  1866. 'unique keys' => array(
  1867. ),
  1868. 'indexes' => array(
  1869. 'featurerange_idx1' => array(
  1870. '0' => 'featuremap_id',
  1871. ),
  1872. 'featurerange_idx2' => array(
  1873. '0' => 'feature_id',
  1874. ),
  1875. 'featurerange_idx3' => array(
  1876. '0' => 'leftstartf_id',
  1877. ),
  1878. 'featurerange_idx4' => array(
  1879. '0' => 'leftendf_id',
  1880. ),
  1881. 'featurerange_idx5' => array(
  1882. '0' => 'rightstartf_id',
  1883. ),
  1884. 'featurerange_idx6' => array(
  1885. '0' => 'rightendf_id',
  1886. ),
  1887. ),
  1888. 'foreign keys' => array(
  1889. ),
  1890. );
  1891. return $description;
  1892. }
  1893. /**
  1894. * Implements hook_featureset_meets_schema()
  1895. * Purpose: To describe the structure of featureset_meets to tripal
  1896. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1897. * @see tripal_core.api.inc: tripal_core_chado_update()
  1898. * @see tripal_core.api.inc: tripal_core_chado_select()
  1899. *
  1900. * @return
  1901. * An array describing the current table
  1902. *
  1903. * @ingroup tripal_api
  1904. *
  1905. * @ingroup tripal_core
  1906. */
  1907. function tripal_core_chado_featureset_meets_schema () {
  1908. $description = array();
  1909. $description = array(
  1910. 'table' => 'featureset_meets',
  1911. // 'description' => 'TODO: please describe this table!',
  1912. 'fields' => array(
  1913. 'subject_id' => array(
  1914. // 'description' => 'TODO: please describe this field!',
  1915. 'type' => 'int',
  1916. 'not null' => '',
  1917. ),
  1918. 'object_id' => array(
  1919. // 'description' => 'TODO: please describe this field!',
  1920. 'type' => 'int',
  1921. 'not null' => '',
  1922. ),
  1923. ),
  1924. 'primary key' => array(
  1925. ),
  1926. 'unique keys' => array(
  1927. ),
  1928. 'indexes' => array(
  1929. ),
  1930. 'foreign keys' => array(
  1931. ),
  1932. );
  1933. return $description;
  1934. }
  1935. /**
  1936. * Implements hook_fnr_type_schema()
  1937. * Purpose: To describe the structure of fnr_type to tripal
  1938. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1939. * @see tripal_core.api.inc: tripal_core_chado_update()
  1940. * @see tripal_core.api.inc: tripal_core_chado_select()
  1941. *
  1942. * @return
  1943. * An array describing the current table
  1944. *
  1945. * @ingroup tripal_api
  1946. *
  1947. * @ingroup tripal_core
  1948. */
  1949. function tripal_core_chado_fnr_type_schema () {
  1950. $description = array();
  1951. $description = array(
  1952. 'table' => 'fnr_type',
  1953. // 'description' => 'TODO: please describe this table!',
  1954. 'fields' => array(
  1955. 'feature_id' => array(
  1956. // 'description' => 'TODO: please describe this field!',
  1957. 'type' => 'int',
  1958. 'not null' => '',
  1959. ),
  1960. 'name' => array(
  1961. // 'description' => 'TODO: please describe this field!',
  1962. 'type' => 'varchar',
  1963. 'length' => '255',
  1964. 'not null' => '',
  1965. ),
  1966. 'dbxref_id' => array(
  1967. // 'description' => 'TODO: please describe this field!',
  1968. 'type' => 'int',
  1969. 'not null' => '',
  1970. ),
  1971. 'type' => array(
  1972. // 'description' => 'TODO: please describe this field!',
  1973. 'type' => 'varchar',
  1974. 'length' => '1024',
  1975. 'not null' => '',
  1976. ),
  1977. 'residues' => array(
  1978. // 'description' => 'TODO: please describe this field!',
  1979. 'type' => 'text',
  1980. 'not null' => '',
  1981. ),
  1982. 'seqlen' => array(
  1983. // 'description' => 'TODO: please describe this field!',
  1984. 'type' => 'int',
  1985. 'not null' => '',
  1986. ),
  1987. 'md5checksum' => array(
  1988. // 'description' => 'TODO: please describe this field!',
  1989. 'type' => 'char',
  1990. 'length' => '32',
  1991. 'not null' => '',
  1992. ),
  1993. 'type_id' => array(
  1994. // 'description' => 'TODO: please describe this field!',
  1995. 'type' => 'int',
  1996. 'not null' => '',
  1997. ),
  1998. 'timeaccessioned' => array(
  1999. // 'description' => 'TODO: please describe this field!',
  2000. 'type' => 'datetime',
  2001. 'not null' => '',
  2002. ),
  2003. 'timelastmodified' => array(
  2004. // 'description' => 'TODO: please describe this field!',
  2005. 'type' => 'datetime',
  2006. 'not null' => '',
  2007. ),
  2008. ),
  2009. 'primary key' => array(
  2010. ),
  2011. 'unique keys' => array(
  2012. ),
  2013. 'indexes' => array(
  2014. ),
  2015. 'foreign keys' => array(
  2016. ),
  2017. );
  2018. return $description;
  2019. }
  2020. /**
  2021. * Implements hook_featurepos_schema()
  2022. * Purpose: To describe the structure of featurepos to tripal
  2023. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2024. * @see tripal_core.api.inc: tripal_core_chado_update()
  2025. * @see tripal_core.api.inc: tripal_core_chado_select()
  2026. *
  2027. * @return
  2028. * An array describing the current table
  2029. *
  2030. * @ingroup tripal_api
  2031. *
  2032. * @ingroup tripal_core
  2033. */
  2034. function tripal_core_chado_featurepos_schema () {
  2035. $description = array();
  2036. $description = array(
  2037. 'table' => 'featurepos',
  2038. // 'description' => 'TODO: please describe this table!',
  2039. 'fields' => array(
  2040. 'featurepos_id' => array(
  2041. // 'description' => 'TODO: please describe this field!',
  2042. 'type' => 'serial',
  2043. 'not null' => '1',
  2044. ),
  2045. 'featuremap_id' => array(
  2046. // 'description' => 'TODO: please describe this field!',
  2047. 'type' => 'serial',
  2048. 'not null' => '1',
  2049. ),
  2050. 'feature_id' => array(
  2051. // 'description' => 'TODO: please describe this field!',
  2052. 'type' => 'int',
  2053. 'not null' => '1',
  2054. ),
  2055. 'map_feature_id' => array(
  2056. // 'description' => 'TODO: please describe this field!',
  2057. 'type' => 'int',
  2058. 'not null' => '1',
  2059. ),
  2060. 'mappos' => array(
  2061. // 'description' => 'TODO: please describe this field!',
  2062. 'type' => 'float',
  2063. 'size' => 'big',
  2064. 'not null' => '1',
  2065. ),
  2066. ),
  2067. 'primary key' => array(
  2068. '0' => 'featurepos_id',
  2069. ),
  2070. 'unique keys' => array(
  2071. ),
  2072. 'indexes' => array(
  2073. 'featurepos_idx1' => array(
  2074. '0' => 'featuremap_id',
  2075. ),
  2076. 'featurepos_idx2' => array(
  2077. '0' => 'feature_id',
  2078. ),
  2079. 'featurepos_idx3' => array(
  2080. '0' => 'map_feature_id',
  2081. ),
  2082. ),
  2083. 'foreign keys' => array(
  2084. ),
  2085. );
  2086. return $description;
  2087. }
  2088. /**
  2089. * Implements hook_featuremap_pub_schema()
  2090. * Purpose: To describe the structure of featuremap_pub to tripal
  2091. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2092. * @see tripal_core.api.inc: tripal_core_chado_update()
  2093. * @see tripal_core.api.inc: tripal_core_chado_select()
  2094. *
  2095. * @return
  2096. * An array describing the current table
  2097. *
  2098. * @ingroup tripal_api
  2099. *
  2100. * @ingroup tripal_core
  2101. */
  2102. function tripal_core_chado_featuremap_pub_schema () {
  2103. $description = array();
  2104. $description = array(
  2105. 'table' => 'featuremap_pub',
  2106. // 'description' => 'TODO: please describe this table!',
  2107. 'fields' => array(
  2108. 'featuremap_pub_id' => array(
  2109. // 'description' => 'TODO: please describe this field!',
  2110. 'type' => 'serial',
  2111. 'not null' => '1',
  2112. ),
  2113. 'featuremap_id' => array(
  2114. // 'description' => 'TODO: please describe this field!',
  2115. 'type' => 'int',
  2116. 'not null' => '1',
  2117. ),
  2118. 'pub_id' => array(
  2119. // 'description' => 'TODO: please describe this field!',
  2120. 'type' => 'int',
  2121. 'not null' => '1',
  2122. ),
  2123. ),
  2124. 'primary key' => array(
  2125. '0' => 'featuremap_pub_id',
  2126. ),
  2127. 'unique keys' => array(
  2128. ),
  2129. 'indexes' => array(
  2130. 'featuremap_pub_idx1' => array(
  2131. '0' => 'featuremap_id',
  2132. ),
  2133. 'featuremap_pub_idx2' => array(
  2134. '0' => 'pub_id',
  2135. ),
  2136. ),
  2137. 'foreign keys' => array(
  2138. ),
  2139. );
  2140. return $description;
  2141. }
  2142. /**
  2143. * Implements hook_feature_union_schema()
  2144. * Purpose: To describe the structure of feature_union to tripal
  2145. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2146. * @see tripal_core.api.inc: tripal_core_chado_update()
  2147. * @see tripal_core.api.inc: tripal_core_chado_select()
  2148. *
  2149. * @return
  2150. * An array describing the current table
  2151. *
  2152. * @ingroup tripal_api
  2153. *
  2154. * @ingroup tripal_core
  2155. */
  2156. function tripal_core_chado_feature_union_schema () {
  2157. $description = array();
  2158. $description = array(
  2159. 'table' => 'feature_union',
  2160. // 'description' => 'TODO: please describe this table!',
  2161. 'fields' => array(
  2162. 'subject_id' => array(
  2163. // 'description' => 'TODO: please describe this field!',
  2164. 'type' => 'int',
  2165. 'not null' => '',
  2166. ),
  2167. 'object_id' => array(
  2168. // 'description' => 'TODO: please describe this field!',
  2169. 'type' => 'int',
  2170. 'not null' => '',
  2171. ),
  2172. 'srcfeature_id' => array(
  2173. // 'description' => 'TODO: please describe this field!',
  2174. 'type' => 'int',
  2175. 'not null' => '',
  2176. ),
  2177. 'subject_strand' => array(
  2178. // 'description' => 'TODO: please describe this field!',
  2179. 'type' => 'int',
  2180. 'size' => 'small',
  2181. 'not null' => '',
  2182. ),
  2183. 'object_strand' => array(
  2184. // 'description' => 'TODO: please describe this field!',
  2185. 'type' => 'int',
  2186. 'size' => 'small',
  2187. 'not null' => '',
  2188. ),
  2189. 'fmin' => array(
  2190. // 'description' => 'TODO: please describe this field!',
  2191. 'type' => 'int',
  2192. 'not null' => '',
  2193. ),
  2194. 'fmax' => array(
  2195. // 'description' => 'TODO: please describe this field!',
  2196. 'type' => 'int',
  2197. 'not null' => '',
  2198. ),
  2199. ),
  2200. 'primary key' => array(
  2201. ),
  2202. 'unique keys' => array(
  2203. ),
  2204. 'indexes' => array(
  2205. ),
  2206. 'foreign keys' => array(
  2207. ),
  2208. );
  2209. return $description;
  2210. }
  2211. /**
  2212. * Implements hook_featureloc_schema()
  2213. * Purpose: To describe the structure of featureloc to tripal
  2214. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2215. * @see tripal_core.api.inc: tripal_core_chado_update()
  2216. * @see tripal_core.api.inc: tripal_core_chado_select()
  2217. *
  2218. * @return
  2219. * An array describing the current table
  2220. *
  2221. * @ingroup tripal_api
  2222. *
  2223. * @ingroup tripal_core
  2224. */
  2225. function tripal_core_chado_featureloc_schema () {
  2226. $description = array();
  2227. $description = array(
  2228. 'table' => 'featureloc',
  2229. // 'description' => 'TODO: please describe this table!',
  2230. 'fields' => array(
  2231. 'featureloc_id' => array(
  2232. // 'description' => 'TODO: please describe this field!',
  2233. 'type' => 'serial',
  2234. 'not null' => '1',
  2235. ),
  2236. 'feature_id' => array(
  2237. // 'description' => 'TODO: please describe this field!',
  2238. 'type' => 'int',
  2239. 'not null' => '1',
  2240. ),
  2241. 'srcfeature_id' => array(
  2242. // 'description' => 'TODO: please describe this field!',
  2243. 'type' => 'int',
  2244. 'not null' => '',
  2245. ),
  2246. 'fmin' => array(
  2247. // 'description' => 'TODO: please describe this field!',
  2248. 'type' => 'int',
  2249. 'not null' => '',
  2250. ),
  2251. 'is_fmin_partial' => array(
  2252. // 'description' => 'TODO: please describe this field!',
  2253. 'type' => 'boolean',
  2254. 'not null' => '1',
  2255. 'default' => 'als',
  2256. ),
  2257. 'fmax' => array(
  2258. // 'description' => 'TODO: please describe this field!',
  2259. 'type' => 'int',
  2260. 'not null' => '',
  2261. ),
  2262. 'is_fmax_partial' => array(
  2263. // 'description' => 'TODO: please describe this field!',
  2264. 'type' => 'boolean',
  2265. 'not null' => '1',
  2266. 'default' => 'als',
  2267. ),
  2268. 'strand' => array(
  2269. // 'description' => 'TODO: please describe this field!',
  2270. 'type' => 'int',
  2271. 'size' => 'small',
  2272. 'not null' => '',
  2273. ),
  2274. 'phase' => array(
  2275. // 'description' => 'TODO: please describe this field!',
  2276. 'type' => 'int',
  2277. 'not null' => '',
  2278. ),
  2279. 'residue_info' => array(
  2280. // 'description' => 'TODO: please describe this field!',
  2281. 'type' => 'text',
  2282. 'not null' => '',
  2283. ),
  2284. 'locgroup' => array(
  2285. // 'description' => 'TODO: please describe this field!',
  2286. 'type' => 'int',
  2287. 'not null' => '1',
  2288. 'default' => '0',
  2289. ),
  2290. 'rank' => array(
  2291. // 'description' => 'TODO: please describe this field!',
  2292. 'type' => 'int',
  2293. 'not null' => '1',
  2294. 'default' => '0',
  2295. ),
  2296. ),
  2297. 'primary key' => array(
  2298. '0' => 'featureloc_id',
  2299. ),
  2300. 'unique keys' => array(
  2301. 'featureloc_c1' => array(
  2302. '0' => 'feature_id',
  2303. '1' => 'locgroup',
  2304. '2' => 'rank',
  2305. ),
  2306. ),
  2307. 'indexes' => array(
  2308. 'binloc_boxrange' => array(
  2309. '0' => 'fmin',
  2310. ),
  2311. 'binloc_boxrange_src' => array(
  2312. '0' => 'srcfeature_id',
  2313. '1' => 'fmin',
  2314. ),
  2315. 'featureloc_idx1' => array(
  2316. '0' => 'feature_id',
  2317. ),
  2318. 'featureloc_idx2' => array(
  2319. '0' => 'srcfeature_id',
  2320. ),
  2321. 'featureloc_idx3' => array(
  2322. '0' => 'srcfeature_id',
  2323. '1' => 'fmin',
  2324. '2' => 'fmax',
  2325. ),
  2326. ),
  2327. 'foreign keys' => array(
  2328. ),
  2329. );
  2330. return $description;
  2331. }
  2332. /**
  2333. * Implements hook_featureloc_pub_schema()
  2334. * Purpose: To describe the structure of featureloc_pub to tripal
  2335. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2336. * @see tripal_core.api.inc: tripal_core_chado_update()
  2337. * @see tripal_core.api.inc: tripal_core_chado_select()
  2338. *
  2339. * @return
  2340. * An array describing the current table
  2341. *
  2342. * @ingroup tripal_api
  2343. *
  2344. * @ingroup tripal_core
  2345. */
  2346. function tripal_core_chado_featureloc_pub_schema () {
  2347. $description = array();
  2348. $description = array(
  2349. 'table' => 'featureloc_pub',
  2350. // 'description' => 'TODO: please describe this table!',
  2351. 'fields' => array(
  2352. 'featureloc_pub_id' => array(
  2353. // 'description' => 'TODO: please describe this field!',
  2354. 'type' => 'serial',
  2355. 'not null' => '1',
  2356. ),
  2357. 'featureloc_id' => array(
  2358. // 'description' => 'TODO: please describe this field!',
  2359. 'type' => 'int',
  2360. 'not null' => '1',
  2361. ),
  2362. 'pub_id' => array(
  2363. // 'description' => 'TODO: please describe this field!',
  2364. 'type' => 'int',
  2365. 'not null' => '1',
  2366. ),
  2367. ),
  2368. 'primary key' => array(
  2369. '0' => 'featureloc_pub_id',
  2370. ),
  2371. 'unique keys' => array(
  2372. 'featureloc_pub_c1' => array(
  2373. '0' => 'featureloc_id',
  2374. '1' => 'pub_id',
  2375. ),
  2376. ),
  2377. 'indexes' => array(
  2378. 'featureloc_pub_idx1' => array(
  2379. '0' => 'featureloc_id',
  2380. ),
  2381. 'featureloc_pub_idx2' => array(
  2382. '0' => 'pub_id',
  2383. ),
  2384. ),
  2385. 'foreign keys' => array(
  2386. ),
  2387. );
  2388. return $description;
  2389. }
  2390. /**
  2391. * Implements hook_featuremap_schema()
  2392. * Purpose: To describe the structure of featuremap to tripal
  2393. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2394. * @see tripal_core.api.inc: tripal_core_chado_update()
  2395. * @see tripal_core.api.inc: tripal_core_chado_select()
  2396. *
  2397. * @return
  2398. * An array describing the current table
  2399. *
  2400. * @ingroup tripal_api
  2401. *
  2402. * @ingroup tripal_core
  2403. */
  2404. function tripal_core_chado_featuremap_schema () {
  2405. $description = array();
  2406. $description = array(
  2407. 'table' => 'featuremap',
  2408. // 'description' => 'TODO: please describe this table!',
  2409. 'fields' => array(
  2410. 'featuremap_id' => array(
  2411. // 'description' => 'TODO: please describe this field!',
  2412. 'type' => 'serial',
  2413. 'not null' => '1',
  2414. ),
  2415. 'name' => array(
  2416. // 'description' => 'TODO: please describe this field!',
  2417. 'type' => 'varchar',
  2418. 'length' => '255',
  2419. 'not null' => '',
  2420. ),
  2421. 'description' => array(
  2422. // 'description' => 'TODO: please describe this field!',
  2423. 'type' => 'text',
  2424. 'not null' => '',
  2425. ),
  2426. 'unittype_id' => array(
  2427. // 'description' => 'TODO: please describe this field!',
  2428. 'type' => 'int',
  2429. 'not null' => '',
  2430. ),
  2431. ),
  2432. 'primary key' => array(
  2433. '0' => 'featuremap_id',
  2434. ),
  2435. 'unique keys' => array(
  2436. 'featuremap_c1' => array(
  2437. '0' => 'name',
  2438. ),
  2439. ),
  2440. 'indexes' => array(
  2441. ),
  2442. 'foreign keys' => array(
  2443. ),
  2444. );
  2445. return $description;
  2446. }
  2447. /**
  2448. * Implements hook_fp_key_schema()
  2449. * Purpose: To describe the structure of fp_key to tripal
  2450. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2451. * @see tripal_core.api.inc: tripal_core_chado_update()
  2452. * @see tripal_core.api.inc: tripal_core_chado_select()
  2453. *
  2454. * @return
  2455. * An array describing the current table
  2456. *
  2457. * @ingroup tripal_api
  2458. *
  2459. * @ingroup tripal_core
  2460. */
  2461. function tripal_core_chado_fp_key_schema () {
  2462. $description = array();
  2463. $description = array(
  2464. 'table' => 'fp_key',
  2465. // 'description' => 'TODO: please describe this table!',
  2466. 'fields' => array(
  2467. 'feature_id' => array(
  2468. // 'description' => 'TODO: please describe this field!',
  2469. 'type' => 'int',
  2470. 'not null' => '',
  2471. ),
  2472. 'pkey' => array(
  2473. // 'description' => 'TODO: please describe this field!',
  2474. 'type' => 'varchar',
  2475. 'length' => '1024',
  2476. 'not null' => '',
  2477. ),
  2478. 'value' => array(
  2479. // 'description' => 'TODO: please describe this field!',
  2480. 'type' => 'text',
  2481. 'not null' => '',
  2482. ),
  2483. ),
  2484. 'primary key' => array(
  2485. ),
  2486. 'unique keys' => array(
  2487. ),
  2488. 'indexes' => array(
  2489. ),
  2490. 'foreign keys' => array(
  2491. ),
  2492. );
  2493. return $description;
  2494. }
  2495. /**
  2496. * Implements hook_genotype_schema()
  2497. * Purpose: To describe the structure of genotype to tripal
  2498. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2499. * @see tripal_core.api.inc: tripal_core_chado_update()
  2500. * @see tripal_core.api.inc: tripal_core_chado_select()
  2501. *
  2502. * @return
  2503. * An array describing the current table
  2504. *
  2505. * @ingroup tripal_api
  2506. *
  2507. * @ingroup tripal_core
  2508. */
  2509. function tripal_core_chado_genotype_schema () {
  2510. $description = array();
  2511. $description = array(
  2512. 'table' => 'genotype',
  2513. // 'description' => 'TODO: please describe this table!',
  2514. 'fields' => array(
  2515. 'genotype_id' => array(
  2516. // 'description' => 'TODO: please describe this field!',
  2517. 'type' => 'serial',
  2518. 'not null' => '1',
  2519. ),
  2520. 'name' => array(
  2521. // 'description' => 'TODO: please describe this field!',
  2522. 'type' => 'text',
  2523. 'not null' => '',
  2524. ),
  2525. 'uniquename' => array(
  2526. // 'description' => 'TODO: please describe this field!',
  2527. 'type' => 'text',
  2528. 'not null' => '1',
  2529. ),
  2530. 'description' => array(
  2531. // 'description' => 'TODO: please describe this field!',
  2532. 'type' => 'varchar',
  2533. 'length' => '255',
  2534. 'not null' => '',
  2535. ),
  2536. ),
  2537. 'primary key' => array(
  2538. '0' => 'genotype_id',
  2539. ),
  2540. 'unique keys' => array(
  2541. 'genotype_c1' => array(
  2542. '0' => 'uniquename',
  2543. ),
  2544. ),
  2545. 'indexes' => array(
  2546. 'genotype_idx1' => array(
  2547. '0' => 'uniquename',
  2548. ),
  2549. 'genotype_idx2' => array(
  2550. '0' => 'name',
  2551. ),
  2552. ),
  2553. 'foreign keys' => array(
  2554. ),
  2555. );
  2556. return $description;
  2557. }
  2558. /**
  2559. * Implements hook_library_cvterm_schema()
  2560. * Purpose: To describe the structure of library_cvterm to tripal
  2561. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2562. * @see tripal_core.api.inc: tripal_core_chado_update()
  2563. * @see tripal_core.api.inc: tripal_core_chado_select()
  2564. *
  2565. * @return
  2566. * An array describing the current table
  2567. *
  2568. * @ingroup tripal_api
  2569. *
  2570. * @ingroup tripal_core
  2571. */
  2572. function tripal_core_chado_library_cvterm_schema () {
  2573. $description = array();
  2574. $description = array(
  2575. 'table' => 'library_cvterm',
  2576. // 'description' => 'TODO: please describe this table!',
  2577. 'fields' => array(
  2578. 'library_cvterm_id' => array(
  2579. // 'description' => 'TODO: please describe this field!',
  2580. 'type' => 'serial',
  2581. 'not null' => '1',
  2582. ),
  2583. 'library_id' => array(
  2584. // 'description' => 'TODO: please describe this field!',
  2585. 'type' => 'int',
  2586. 'not null' => '1',
  2587. ),
  2588. 'cvterm_id' => array(
  2589. // 'description' => 'TODO: please describe this field!',
  2590. 'type' => 'int',
  2591. 'not null' => '1',
  2592. ),
  2593. 'pub_id' => array(
  2594. // 'description' => 'TODO: please describe this field!',
  2595. 'type' => 'int',
  2596. 'not null' => '1',
  2597. ),
  2598. ),
  2599. 'primary key' => array(
  2600. '0' => 'library_cvterm_id',
  2601. ),
  2602. 'unique keys' => array(
  2603. 'library_cvterm_c1' => array(
  2604. '0' => 'library_id',
  2605. '1' => 'cvterm_id',
  2606. '2' => 'pub_id',
  2607. ),
  2608. ),
  2609. 'indexes' => array(
  2610. 'library_cvterm_idx1' => array(
  2611. '0' => 'library_id',
  2612. ),
  2613. 'library_cvterm_idx2' => array(
  2614. '0' => 'cvterm_id',
  2615. ),
  2616. 'library_cvterm_idx3' => array(
  2617. '0' => 'pub_id',
  2618. ),
  2619. ),
  2620. 'foreign keys' => array(
  2621. ),
  2622. );
  2623. return $description;
  2624. }
  2625. /**
  2626. * Implements hook_library_dbxref_schema()
  2627. * Purpose: To describe the structure of library_dbxref to tripal
  2628. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2629. * @see tripal_core.api.inc: tripal_core_chado_update()
  2630. * @see tripal_core.api.inc: tripal_core_chado_select()
  2631. *
  2632. * @return
  2633. * An array describing the current table
  2634. *
  2635. * @ingroup tripal_api
  2636. *
  2637. * @ingroup tripal_core
  2638. */
  2639. function tripal_core_chado_library_dbxref_schema () {
  2640. $description = array();
  2641. $description = array(
  2642. 'table' => 'library_dbxref',
  2643. // 'description' => 'TODO: please describe this table!',
  2644. 'fields' => array(
  2645. 'library_dbxref_id' => array(
  2646. // 'description' => 'TODO: please describe this field!',
  2647. 'type' => 'serial',
  2648. 'not null' => '1',
  2649. ),
  2650. 'library_id' => array(
  2651. // 'description' => 'TODO: please describe this field!',
  2652. 'type' => 'int',
  2653. 'not null' => '1',
  2654. ),
  2655. 'dbxref_id' => array(
  2656. // 'description' => 'TODO: please describe this field!',
  2657. 'type' => 'int',
  2658. 'not null' => '1',
  2659. ),
  2660. 'is_current' => array(
  2661. // 'description' => 'TODO: please describe this field!',
  2662. 'type' => 'boolean',
  2663. 'not null' => '1',
  2664. 'default' => 'ru',
  2665. ),
  2666. ),
  2667. 'primary key' => array(
  2668. '0' => 'library_dbxref_id',
  2669. ),
  2670. 'unique keys' => array(
  2671. 'library_dbxref_c1' => array(
  2672. '0' => 'library_id',
  2673. '1' => 'dbxref_id',
  2674. ),
  2675. ),
  2676. 'indexes' => array(
  2677. 'library_dbxref_idx1' => array(
  2678. '0' => 'library_id',
  2679. ),
  2680. 'library_dbxref_idx2' => array(
  2681. '0' => 'dbxref_id',
  2682. ),
  2683. ),
  2684. 'foreign keys' => array(
  2685. ),
  2686. );
  2687. return $description;
  2688. }
  2689. /**
  2690. * Implements hook_library_feature_schema()
  2691. * Purpose: To describe the structure of library_feature to tripal
  2692. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2693. * @see tripal_core.api.inc: tripal_core_chado_update()
  2694. * @see tripal_core.api.inc: tripal_core_chado_select()
  2695. *
  2696. * @return
  2697. * An array describing the current table
  2698. *
  2699. * @ingroup tripal_api
  2700. *
  2701. * @ingroup tripal_core
  2702. */
  2703. function tripal_core_chado_library_feature_schema () {
  2704. $description = array();
  2705. $description = array(
  2706. 'table' => 'library_feature',
  2707. // 'description' => 'TODO: please describe this table!',
  2708. 'fields' => array(
  2709. 'library_feature_id' => array(
  2710. // 'description' => 'TODO: please describe this field!',
  2711. 'type' => 'serial',
  2712. 'not null' => '1',
  2713. ),
  2714. 'library_id' => array(
  2715. // 'description' => 'TODO: please describe this field!',
  2716. 'type' => 'int',
  2717. 'not null' => '1',
  2718. ),
  2719. 'feature_id' => array(
  2720. // 'description' => 'TODO: please describe this field!',
  2721. 'type' => 'int',
  2722. 'not null' => '1',
  2723. ),
  2724. ),
  2725. 'primary key' => array(
  2726. '0' => 'library_feature_id',
  2727. ),
  2728. 'unique keys' => array(
  2729. 'library_feature_c1' => array(
  2730. '0' => 'library_id',
  2731. '1' => 'feature_id',
  2732. ),
  2733. ),
  2734. 'indexes' => array(
  2735. 'library_feature_idx1' => array(
  2736. '0' => 'library_id',
  2737. ),
  2738. 'library_feature_idx2' => array(
  2739. '0' => 'feature_id',
  2740. ),
  2741. ),
  2742. 'foreign keys' => array(
  2743. ),
  2744. );
  2745. return $description;
  2746. }
  2747. /**
  2748. * Implements hook_library_feature_count_schema()
  2749. * Purpose: To describe the structure of library_feature_count to tripal
  2750. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2751. * @see tripal_core.api.inc: tripal_core_chado_update()
  2752. * @see tripal_core.api.inc: tripal_core_chado_select()
  2753. *
  2754. * @return
  2755. * An array describing the current table
  2756. *
  2757. * @ingroup tripal_api
  2758. *
  2759. * @ingroup tripal_core
  2760. */
  2761. function tripal_core_chado_library_feature_count_schema () {
  2762. $description = array();
  2763. $description = array(
  2764. 'table' => 'library_feature_count',
  2765. // 'description' => 'TODO: please describe this table!',
  2766. 'fields' => array(
  2767. 'library_id' => array(
  2768. // 'description' => 'TODO: please describe this field!',
  2769. 'type' => 'int',
  2770. 'not null' => '',
  2771. ),
  2772. 'name' => array(
  2773. // 'description' => 'TODO: please describe this field!',
  2774. 'type' => 'varchar',
  2775. 'length' => '255',
  2776. 'not null' => '',
  2777. ),
  2778. 'num_features' => array(
  2779. // 'description' => 'TODO: please describe this field!',
  2780. 'type' => 'int',
  2781. 'not null' => '',
  2782. ),
  2783. 'feature_type' => array(
  2784. // 'description' => 'TODO: please describe this field!',
  2785. 'type' => 'varchar',
  2786. 'length' => '255',
  2787. 'not null' => '',
  2788. ),
  2789. ),
  2790. 'primary key' => array(
  2791. ),
  2792. 'unique keys' => array(
  2793. 'library_feature_count_index' => array(
  2794. '0' => 'library_id',
  2795. ),
  2796. ),
  2797. 'indexes' => array(
  2798. ),
  2799. 'foreign keys' => array(
  2800. ),
  2801. );
  2802. return $description;
  2803. }
  2804. /**
  2805. * Implements hook_library_schema()
  2806. * Purpose: To describe the structure of library to tripal
  2807. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2808. * @see tripal_core.api.inc: tripal_core_chado_update()
  2809. * @see tripal_core.api.inc: tripal_core_chado_select()
  2810. *
  2811. * @return
  2812. * An array describing the current table
  2813. *
  2814. * @ingroup tripal_api
  2815. *
  2816. * @ingroup tripal_core
  2817. */
  2818. function tripal_core_chado_library_schema () {
  2819. $description = array();
  2820. $description = array(
  2821. 'table' => 'library',
  2822. // 'description' => 'TODO: please describe this table!',
  2823. 'fields' => array(
  2824. 'library_id' => array(
  2825. // 'description' => 'TODO: please describe this field!',
  2826. 'type' => 'serial',
  2827. 'not null' => '1',
  2828. ),
  2829. 'organism_id' => array(
  2830. // 'description' => 'TODO: please describe this field!',
  2831. 'type' => 'int',
  2832. 'not null' => '1',
  2833. ),
  2834. 'name' => array(
  2835. // 'description' => 'TODO: please describe this field!',
  2836. 'type' => 'varchar',
  2837. 'length' => '255',
  2838. 'not null' => '',
  2839. ),
  2840. 'uniquename' => array(
  2841. // 'description' => 'TODO: please describe this field!',
  2842. 'type' => 'text',
  2843. 'not null' => '1',
  2844. ),
  2845. 'type_id' => array(
  2846. // 'description' => 'TODO: please describe this field!',
  2847. 'type' => 'int',
  2848. 'not null' => '1',
  2849. ),
  2850. 'is_obsolete' => array(
  2851. // 'description' => 'TODO: please describe this field!',
  2852. 'type' => 'int',
  2853. 'not null' => '1',
  2854. 'default' => '0',
  2855. ),
  2856. 'timeaccessioned' => array(
  2857. // 'description' => 'TODO: please describe this field!',
  2858. 'type' => 'datetime',
  2859. 'not null' => '1',
  2860. 'default' => 'ow(',
  2861. ),
  2862. 'timelastmodified' => array(
  2863. // 'description' => 'TODO: please describe this field!',
  2864. 'type' => 'datetime',
  2865. 'not null' => '1',
  2866. 'default' => 'ow(',
  2867. ),
  2868. ),
  2869. 'primary key' => array(
  2870. '0' => 'library_id',
  2871. ),
  2872. 'unique keys' => array(
  2873. 'library_c1' => array(
  2874. '0' => 'organism_id',
  2875. '1' => 'uniquename',
  2876. '2' => 'type_id',
  2877. ),
  2878. ),
  2879. 'indexes' => array(
  2880. 'library_idx1' => array(
  2881. '0' => 'organism_id',
  2882. ),
  2883. 'library_idx2' => array(
  2884. '0' => 'type_id',
  2885. ),
  2886. 'library_idx3' => array(
  2887. '0' => 'uniquename',
  2888. ),
  2889. 'library_name_ind1' => array(
  2890. '0' => 'name',
  2891. ),
  2892. ),
  2893. 'foreign keys' => array(
  2894. ),
  2895. );
  2896. return $description;
  2897. }
  2898. /**
  2899. * Implements hook_intronloc_view_schema()
  2900. * Purpose: To describe the structure of intronloc_view to tripal
  2901. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2902. * @see tripal_core.api.inc: tripal_core_chado_update()
  2903. * @see tripal_core.api.inc: tripal_core_chado_select()
  2904. *
  2905. * @return
  2906. * An array describing the current table
  2907. *
  2908. * @ingroup tripal_api
  2909. *
  2910. * @ingroup tripal_core
  2911. */
  2912. function tripal_core_chado_intronloc_view_schema () {
  2913. $description = array();
  2914. $description = array(
  2915. 'table' => 'intronloc_view',
  2916. // 'description' => 'TODO: please describe this table!',
  2917. 'fields' => array(
  2918. 'exon1_id' => array(
  2919. // 'description' => 'TODO: please describe this field!',
  2920. 'type' => 'int',
  2921. 'not null' => '',
  2922. ),
  2923. 'exon2_id' => array(
  2924. // 'description' => 'TODO: please describe this field!',
  2925. 'type' => 'int',
  2926. 'not null' => '',
  2927. ),
  2928. 'fmin' => array(
  2929. // 'description' => 'TODO: please describe this field!',
  2930. 'type' => 'int',
  2931. 'not null' => '',
  2932. ),
  2933. 'fmax' => array(
  2934. // 'description' => 'TODO: please describe this field!',
  2935. 'type' => 'int',
  2936. 'not null' => '',
  2937. ),
  2938. 'strand' => array(
  2939. // 'description' => 'TODO: please describe this field!',
  2940. 'type' => 'int',
  2941. 'size' => 'small',
  2942. 'not null' => '',
  2943. ),
  2944. 'srcfeature_id' => array(
  2945. // 'description' => 'TODO: please describe this field!',
  2946. 'type' => 'int',
  2947. 'not null' => '',
  2948. ),
  2949. ),
  2950. 'primary key' => array(
  2951. ),
  2952. 'unique keys' => array(
  2953. ),
  2954. 'indexes' => array(
  2955. ),
  2956. 'foreign keys' => array(
  2957. ),
  2958. );
  2959. return $description;
  2960. }
  2961. /**
  2962. * Implements hook_gff3atts_schema()
  2963. * Purpose: To describe the structure of gff3atts to tripal
  2964. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2965. * @see tripal_core.api.inc: tripal_core_chado_update()
  2966. * @see tripal_core.api.inc: tripal_core_chado_select()
  2967. *
  2968. * @return
  2969. * An array describing the current table
  2970. *
  2971. * @ingroup tripal_api
  2972. *
  2973. * @ingroup tripal_core
  2974. */
  2975. function tripal_core_chado_gff3atts_schema () {
  2976. $description = array();
  2977. $description = array(
  2978. 'table' => 'gff3atts',
  2979. // 'description' => 'TODO: please describe this table!',
  2980. 'fields' => array(
  2981. 'feature_id' => array(
  2982. // 'description' => 'TODO: please describe this field!',
  2983. 'type' => 'int',
  2984. 'not null' => '',
  2985. ),
  2986. 'type' => array(
  2987. // 'description' => 'TODO: please describe this field!',
  2988. 'type' => 'text',
  2989. 'not null' => '',
  2990. ),
  2991. 'attribute' => array(
  2992. // 'description' => 'TODO: please describe this field!',
  2993. 'type' => 'varchar',
  2994. 'not null' => '',
  2995. ),
  2996. ),
  2997. 'primary key' => array(
  2998. ),
  2999. 'unique keys' => array(
  3000. ),
  3001. 'indexes' => array(
  3002. ),
  3003. 'foreign keys' => array(
  3004. ),
  3005. );
  3006. return $description;
  3007. }
  3008. /**
  3009. * Implements hook_gff3view_schema()
  3010. * Purpose: To describe the structure of gff3view to tripal
  3011. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3012. * @see tripal_core.api.inc: tripal_core_chado_update()
  3013. * @see tripal_core.api.inc: tripal_core_chado_select()
  3014. *
  3015. * @return
  3016. * An array describing the current table
  3017. *
  3018. * @ingroup tripal_api
  3019. *
  3020. * @ingroup tripal_core
  3021. */
  3022. function tripal_core_chado_gff3view_schema () {
  3023. $description = array();
  3024. $description = array(
  3025. 'table' => 'gff3view',
  3026. // 'description' => 'TODO: please describe this table!',
  3027. 'fields' => array(
  3028. 'feature_id' => array(
  3029. // 'description' => 'TODO: please describe this field!',
  3030. 'type' => 'int',
  3031. 'not null' => '',
  3032. ),
  3033. 'ref' => array(
  3034. // 'description' => 'TODO: please describe this field!',
  3035. 'type' => 'varchar',
  3036. 'length' => '255',
  3037. 'not null' => '',
  3038. ),
  3039. 'source' => array(
  3040. // 'description' => 'TODO: please describe this field!',
  3041. 'type' => 'varchar',
  3042. 'length' => '255',
  3043. 'not null' => '',
  3044. ),
  3045. 'type' => array(
  3046. // 'description' => 'TODO: please describe this field!',
  3047. 'type' => 'varchar',
  3048. 'length' => '1024',
  3049. 'not null' => '',
  3050. ),
  3051. 'fstart' => array(
  3052. // 'description' => 'TODO: please describe this field!',
  3053. 'type' => 'int',
  3054. 'not null' => '',
  3055. ),
  3056. 'fend' => array(
  3057. // 'description' => 'TODO: please describe this field!',
  3058. 'type' => 'int',
  3059. 'not null' => '',
  3060. ),
  3061. 'score' => array(
  3062. // 'description' => 'TODO: please describe this field!',
  3063. 'type' => 'float',
  3064. 'size' => 'big',
  3065. 'not null' => '',
  3066. ),
  3067. 'strand' => array(
  3068. // 'description' => 'TODO: please describe this field!',
  3069. 'type' => 'int',
  3070. 'size' => 'small',
  3071. 'not null' => '',
  3072. ),
  3073. 'phase' => array(
  3074. // 'description' => 'TODO: please describe this field!',
  3075. 'type' => 'int',
  3076. 'not null' => '',
  3077. ),
  3078. 'seqlen' => array(
  3079. // 'description' => 'TODO: please describe this field!',
  3080. 'type' => 'int',
  3081. 'not null' => '',
  3082. ),
  3083. 'name' => array(
  3084. // 'description' => 'TODO: please describe this field!',
  3085. 'type' => 'varchar',
  3086. 'length' => '255',
  3087. 'not null' => '',
  3088. ),
  3089. 'organism_id' => array(
  3090. // 'description' => 'TODO: please describe this field!',
  3091. 'type' => 'int',
  3092. 'not null' => '',
  3093. ),
  3094. ),
  3095. 'primary key' => array(
  3096. ),
  3097. 'unique keys' => array(
  3098. ),
  3099. 'indexes' => array(
  3100. ),
  3101. 'foreign keys' => array(
  3102. ),
  3103. );
  3104. return $description;
  3105. }
  3106. /**
  3107. * Implements hook_gffatts_schema()
  3108. * Purpose: To describe the structure of gffatts to tripal
  3109. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3110. * @see tripal_core.api.inc: tripal_core_chado_update()
  3111. * @see tripal_core.api.inc: tripal_core_chado_select()
  3112. *
  3113. * @return
  3114. * An array describing the current table
  3115. *
  3116. * @ingroup tripal_api
  3117. *
  3118. * @ingroup tripal_core
  3119. */
  3120. function tripal_core_chado_gffatts_schema () {
  3121. $description = array();
  3122. $description = array(
  3123. 'table' => 'gffatts',
  3124. // 'description' => 'TODO: please describe this table!',
  3125. 'fields' => array(
  3126. 'feature_id' => array(
  3127. // 'description' => 'TODO: please describe this field!',
  3128. 'type' => 'int',
  3129. 'not null' => '',
  3130. ),
  3131. 'type' => array(
  3132. // 'description' => 'TODO: please describe this field!',
  3133. 'type' => 'text',
  3134. 'not null' => '',
  3135. ),
  3136. 'attribute' => array(
  3137. // 'description' => 'TODO: please describe this field!',
  3138. 'type' => 'varchar',
  3139. 'not null' => '',
  3140. ),
  3141. ),
  3142. 'primary key' => array(
  3143. ),
  3144. 'unique keys' => array(
  3145. ),
  3146. 'indexes' => array(
  3147. ),
  3148. 'foreign keys' => array(
  3149. ),
  3150. );
  3151. return $description;
  3152. }
  3153. /**
  3154. * Implements hook_intron_combined_view_schema()
  3155. * Purpose: To describe the structure of intron_combined_view to tripal
  3156. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3157. * @see tripal_core.api.inc: tripal_core_chado_update()
  3158. * @see tripal_core.api.inc: tripal_core_chado_select()
  3159. *
  3160. * @return
  3161. * An array describing the current table
  3162. *
  3163. * @ingroup tripal_api
  3164. *
  3165. * @ingroup tripal_core
  3166. */
  3167. function tripal_core_chado_intron_combined_view_schema () {
  3168. $description = array();
  3169. $description = array(
  3170. 'table' => 'intron_combined_view',
  3171. // 'description' => 'TODO: please describe this table!',
  3172. 'fields' => array(
  3173. 'exon1_id' => array(
  3174. // 'description' => 'TODO: please describe this field!',
  3175. 'type' => 'int',
  3176. 'not null' => '',
  3177. ),
  3178. 'exon2_id' => array(
  3179. // 'description' => 'TODO: please describe this field!',
  3180. 'type' => 'int',
  3181. 'not null' => '',
  3182. ),
  3183. 'fmin' => array(
  3184. // 'description' => 'TODO: please describe this field!',
  3185. 'type' => 'int',
  3186. 'not null' => '',
  3187. ),
  3188. 'fmax' => array(
  3189. // 'description' => 'TODO: please describe this field!',
  3190. 'type' => 'int',
  3191. 'not null' => '',
  3192. ),
  3193. 'strand' => array(
  3194. // 'description' => 'TODO: please describe this field!',
  3195. 'type' => 'int',
  3196. 'size' => 'small',
  3197. 'not null' => '',
  3198. ),
  3199. 'srcfeature_id' => array(
  3200. // 'description' => 'TODO: please describe this field!',
  3201. 'type' => 'int',
  3202. 'not null' => '',
  3203. ),
  3204. 'intron_rank' => array(
  3205. // 'description' => 'TODO: please describe this field!',
  3206. 'type' => 'int',
  3207. 'not null' => '',
  3208. ),
  3209. 'transcript_id' => array(
  3210. // 'description' => 'TODO: please describe this field!',
  3211. 'type' => 'int',
  3212. 'not null' => '',
  3213. ),
  3214. ),
  3215. 'primary key' => array(
  3216. ),
  3217. 'unique keys' => array(
  3218. ),
  3219. 'indexes' => array(
  3220. ),
  3221. 'foreign keys' => array(
  3222. ),
  3223. );
  3224. return $description;
  3225. }
  3226. /**
  3227. * Implements hook_project_schema()
  3228. * Purpose: To describe the structure of project to tripal
  3229. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3230. * @see tripal_core.api.inc: tripal_core_chado_update()
  3231. * @see tripal_core.api.inc: tripal_core_chado_select()
  3232. *
  3233. * @return
  3234. * An array describing the current table
  3235. *
  3236. * @ingroup tripal_api
  3237. *
  3238. * @ingroup tripal_core
  3239. */
  3240. function tripal_core_chado_project_schema () {
  3241. $description = array();
  3242. $description = array(
  3243. 'table' => 'project',
  3244. // 'description' => 'TODO: please describe this table!',
  3245. 'fields' => array(
  3246. 'project_id' => array(
  3247. // 'description' => 'TODO: please describe this field!',
  3248. 'type' => 'serial',
  3249. 'not null' => '1',
  3250. ),
  3251. 'name' => array(
  3252. // 'description' => 'TODO: please describe this field!',
  3253. 'type' => 'varchar',
  3254. 'length' => '255',
  3255. 'not null' => '1',
  3256. ),
  3257. 'description' => array(
  3258. // 'description' => 'TODO: please describe this field!',
  3259. 'type' => 'varchar',
  3260. 'length' => '255',
  3261. 'not null' => '1',
  3262. ),
  3263. ),
  3264. 'primary key' => array(
  3265. '0' => 'project_id',
  3266. ),
  3267. 'unique keys' => array(
  3268. 'project_c1' => array(
  3269. '0' => 'name',
  3270. ),
  3271. ),
  3272. 'indexes' => array(
  3273. ),
  3274. 'foreign keys' => array(
  3275. ),
  3276. );
  3277. return $description;
  3278. }
  3279. /**
  3280. * Implements hook_protein_coding_gene_schema()
  3281. * Purpose: To describe the structure of protein_coding_gene to tripal
  3282. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3283. * @see tripal_core.api.inc: tripal_core_chado_update()
  3284. * @see tripal_core.api.inc: tripal_core_chado_select()
  3285. *
  3286. * @return
  3287. * An array describing the current table
  3288. *
  3289. * @ingroup tripal_api
  3290. *
  3291. * @ingroup tripal_core
  3292. */
  3293. function tripal_core_chado_protein_coding_gene_schema () {
  3294. $description = array();
  3295. $description = array(
  3296. 'table' => 'protein_coding_gene',
  3297. // 'description' => 'TODO: please describe this table!',
  3298. 'fields' => array(
  3299. 'feature_id' => array(
  3300. // 'description' => 'TODO: please describe this field!',
  3301. 'type' => 'int',
  3302. 'not null' => '',
  3303. ),
  3304. 'dbxref_id' => array(
  3305. // 'description' => 'TODO: please describe this field!',
  3306. 'type' => 'int',
  3307. 'not null' => '',
  3308. ),
  3309. 'organism_id' => array(
  3310. // 'description' => 'TODO: please describe this field!',
  3311. 'type' => 'int',
  3312. 'not null' => '',
  3313. ),
  3314. 'name' => array(
  3315. // 'description' => 'TODO: please describe this field!',
  3316. 'type' => 'varchar',
  3317. 'length' => '255',
  3318. 'not null' => '',
  3319. ),
  3320. 'uniquename' => array(
  3321. // 'description' => 'TODO: please describe this field!',
  3322. 'type' => 'text',
  3323. 'not null' => '',
  3324. ),
  3325. 'residues' => array(
  3326. // 'description' => 'TODO: please describe this field!',
  3327. 'type' => 'text',
  3328. 'not null' => '',
  3329. ),
  3330. 'seqlen' => array(
  3331. // 'description' => 'TODO: please describe this field!',
  3332. 'type' => 'int',
  3333. 'not null' => '',
  3334. ),
  3335. 'md5checksum' => array(
  3336. // 'description' => 'TODO: please describe this field!',
  3337. 'type' => 'char',
  3338. 'length' => '32',
  3339. 'not null' => '',
  3340. ),
  3341. 'type_id' => array(
  3342. // 'description' => 'TODO: please describe this field!',
  3343. 'type' => 'int',
  3344. 'not null' => '',
  3345. ),
  3346. 'is_analysis' => array(
  3347. // 'description' => 'TODO: please describe this field!',
  3348. 'type' => 'boolean',
  3349. 'not null' => '',
  3350. ),
  3351. 'is_obsolete' => array(
  3352. // 'description' => 'TODO: please describe this field!',
  3353. 'type' => 'boolean',
  3354. 'not null' => '',
  3355. ),
  3356. 'timeaccessioned' => array(
  3357. // 'description' => 'TODO: please describe this field!',
  3358. 'type' => 'datetime',
  3359. 'not null' => '',
  3360. ),
  3361. 'timelastmodified' => array(
  3362. // 'description' => 'TODO: please describe this field!',
  3363. 'type' => 'datetime',
  3364. 'not null' => '',
  3365. ),
  3366. ),
  3367. 'primary key' => array(
  3368. ),
  3369. 'unique keys' => array(
  3370. ),
  3371. 'indexes' => array(
  3372. ),
  3373. 'foreign keys' => array(
  3374. ),
  3375. );
  3376. return $description;
  3377. }
  3378. /**
  3379. * Implements hook_studyfactorvalue_schema()
  3380. * Purpose: To describe the structure of studyfactorvalue to tripal
  3381. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3382. * @see tripal_core.api.inc: tripal_core_chado_update()
  3383. * @see tripal_core.api.inc: tripal_core_chado_select()
  3384. *
  3385. * @return
  3386. * An array describing the current table
  3387. *
  3388. * @ingroup tripal_api
  3389. *
  3390. * @ingroup tripal_core
  3391. */
  3392. function tripal_core_chado_studyfactorvalue_schema () {
  3393. $description = array();
  3394. $description = array(
  3395. 'table' => 'studyfactorvalue',
  3396. // 'description' => 'TODO: please describe this table!',
  3397. 'fields' => array(
  3398. 'studyfactorvalue_id' => array(
  3399. // 'description' => 'TODO: please describe this field!',
  3400. 'type' => 'serial',
  3401. 'not null' => '1',
  3402. ),
  3403. 'studyfactor_id' => array(
  3404. // 'description' => 'TODO: please describe this field!',
  3405. 'type' => 'int',
  3406. 'not null' => '1',
  3407. ),
  3408. 'assay_id' => array(
  3409. // 'description' => 'TODO: please describe this field!',
  3410. 'type' => 'int',
  3411. 'not null' => '1',
  3412. ),
  3413. 'factorvalue' => array(
  3414. // 'description' => 'TODO: please describe this field!',
  3415. 'type' => 'text',
  3416. 'not null' => '',
  3417. ),
  3418. 'name' => array(
  3419. // 'description' => 'TODO: please describe this field!',
  3420. 'type' => 'text',
  3421. 'not null' => '',
  3422. ),
  3423. 'rank' => array(
  3424. // 'description' => 'TODO: please describe this field!',
  3425. 'type' => 'int',
  3426. 'not null' => '1',
  3427. 'default' => '0',
  3428. ),
  3429. ),
  3430. 'primary key' => array(
  3431. '0' => 'studyfactorvalue_id',
  3432. ),
  3433. 'unique keys' => array(
  3434. ),
  3435. 'indexes' => array(
  3436. 'studyfactorvalue_idx1' => array(
  3437. '0' => 'studyfactor_id',
  3438. ),
  3439. 'studyfactorvalue_idx2' => array(
  3440. '0' => 'assay_id',
  3441. ),
  3442. ),
  3443. 'foreign keys' => array(
  3444. ),
  3445. );
  3446. return $description;
  3447. }
  3448. /**
  3449. * Implements hook_studyfactor_schema()
  3450. * Purpose: To describe the structure of studyfactor to tripal
  3451. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3452. * @see tripal_core.api.inc: tripal_core_chado_update()
  3453. * @see tripal_core.api.inc: tripal_core_chado_select()
  3454. *
  3455. * @return
  3456. * An array describing the current table
  3457. *
  3458. * @ingroup tripal_api
  3459. *
  3460. * @ingroup tripal_core
  3461. */
  3462. function tripal_core_chado_studyfactor_schema () {
  3463. $description = array();
  3464. $description = array(
  3465. 'table' => 'studyfactor',
  3466. // 'description' => 'TODO: please describe this table!',
  3467. 'fields' => array(
  3468. 'studyfactor_id' => array(
  3469. // 'description' => 'TODO: please describe this field!',
  3470. 'type' => 'serial',
  3471. 'not null' => '1',
  3472. ),
  3473. 'studydesign_id' => array(
  3474. // 'description' => 'TODO: please describe this field!',
  3475. 'type' => 'int',
  3476. 'not null' => '1',
  3477. ),
  3478. 'type_id' => array(
  3479. // 'description' => 'TODO: please describe this field!',
  3480. 'type' => 'int',
  3481. 'not null' => '',
  3482. ),
  3483. 'name' => array(
  3484. // 'description' => 'TODO: please describe this field!',
  3485. 'type' => 'text',
  3486. 'not null' => '1',
  3487. ),
  3488. 'description' => array(
  3489. // 'description' => 'TODO: please describe this field!',
  3490. 'type' => 'text',
  3491. 'not null' => '',
  3492. ),
  3493. ),
  3494. 'primary key' => array(
  3495. '0' => 'studyfactor_id',
  3496. ),
  3497. 'unique keys' => array(
  3498. ),
  3499. 'indexes' => array(
  3500. 'studyfactor_idx1' => array(
  3501. '0' => 'studydesign_id',
  3502. ),
  3503. 'studyfactor_idx2' => array(
  3504. '0' => 'type_id',
  3505. ),
  3506. ),
  3507. 'foreign keys' => array(
  3508. ),
  3509. );
  3510. return $description;
  3511. }
  3512. /**
  3513. * Implements hook_studyprop_schema()
  3514. * Purpose: To describe the structure of studyprop to tripal
  3515. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3516. * @see tripal_core.api.inc: tripal_core_chado_update()
  3517. * @see tripal_core.api.inc: tripal_core_chado_select()
  3518. *
  3519. * @return
  3520. * An array describing the current table
  3521. *
  3522. * @ingroup tripal_api
  3523. *
  3524. * @ingroup tripal_core
  3525. */
  3526. function tripal_core_chado_studyprop_schema () {
  3527. $description = array();
  3528. $description = array(
  3529. 'table' => 'studyprop',
  3530. // 'description' => 'TODO: please describe this table!',
  3531. 'fields' => array(
  3532. 'studyprop_id' => array(
  3533. // 'description' => 'TODO: please describe this field!',
  3534. 'type' => 'serial',
  3535. 'not null' => '1',
  3536. ),
  3537. 'study_id' => array(
  3538. // 'description' => 'TODO: please describe this field!',
  3539. 'type' => 'int',
  3540. 'not null' => '1',
  3541. ),
  3542. 'type_id' => array(
  3543. // 'description' => 'TODO: please describe this field!',
  3544. 'type' => 'int',
  3545. 'not null' => '1',
  3546. ),
  3547. 'value' => array(
  3548. // 'description' => 'TODO: please describe this field!',
  3549. 'type' => 'text',
  3550. 'not null' => '',
  3551. ),
  3552. 'rank' => array(
  3553. // 'description' => 'TODO: please describe this field!',
  3554. 'type' => 'int',
  3555. 'not null' => '1',
  3556. 'default' => '0',
  3557. ),
  3558. ),
  3559. 'primary key' => array(
  3560. '0' => 'studyprop_id',
  3561. ),
  3562. 'unique keys' => array(
  3563. 'study_id' => array(
  3564. '0' => 'study_id',
  3565. '1' => 'type_id',
  3566. '2' => 'rank',
  3567. ),
  3568. ),
  3569. 'indexes' => array(
  3570. 'studyprop_idx1' => array(
  3571. '0' => 'study_id',
  3572. ),
  3573. 'studyprop_idx2' => array(
  3574. '0' => 'type_id',
  3575. ),
  3576. ),
  3577. 'foreign keys' => array(
  3578. ),
  3579. );
  3580. return $description;
  3581. }
  3582. /**
  3583. * Implements hook_studyprop_feature_schema()
  3584. * Purpose: To describe the structure of studyprop_feature to tripal
  3585. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3586. * @see tripal_core.api.inc: tripal_core_chado_update()
  3587. * @see tripal_core.api.inc: tripal_core_chado_select()
  3588. *
  3589. * @return
  3590. * An array describing the current table
  3591. *
  3592. * @ingroup tripal_api
  3593. *
  3594. * @ingroup tripal_core
  3595. */
  3596. function tripal_core_chado_studyprop_feature_schema () {
  3597. $description = array();
  3598. $description = array(
  3599. 'table' => 'studyprop_feature',
  3600. // 'description' => 'TODO: please describe this table!',
  3601. 'fields' => array(
  3602. 'studyprop_feature_id' => array(
  3603. // 'description' => 'TODO: please describe this field!',
  3604. 'type' => 'serial',
  3605. 'not null' => '1',
  3606. ),
  3607. 'studyprop_id' => array(
  3608. // 'description' => 'TODO: please describe this field!',
  3609. 'type' => 'int',
  3610. 'not null' => '1',
  3611. ),
  3612. 'feature_id' => array(
  3613. // 'description' => 'TODO: please describe this field!',
  3614. 'type' => 'int',
  3615. 'not null' => '1',
  3616. ),
  3617. 'type_id' => array(
  3618. // 'description' => 'TODO: please describe this field!',
  3619. 'type' => 'int',
  3620. 'not null' => '',
  3621. ),
  3622. ),
  3623. 'primary key' => array(
  3624. '0' => 'studyprop_feature_id',
  3625. ),
  3626. 'unique keys' => array(
  3627. 'studyprop_id' => array(
  3628. '0' => 'studyprop_id',
  3629. '1' => 'feature_id',
  3630. ),
  3631. ),
  3632. 'indexes' => array(
  3633. 'studyprop_feature_idx1' => array(
  3634. '0' => 'studyprop_id',
  3635. ),
  3636. 'studyprop_feature_idx2' => array(
  3637. '0' => 'feature_id',
  3638. ),
  3639. ),
  3640. 'foreign keys' => array(
  3641. ),
  3642. );
  3643. return $description;
  3644. }
  3645. /**
  3646. * Implements hook_synonym_schema()
  3647. * Purpose: To describe the structure of synonym to tripal
  3648. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3649. * @see tripal_core.api.inc: tripal_core_chado_update()
  3650. * @see tripal_core.api.inc: tripal_core_chado_select()
  3651. *
  3652. * @return
  3653. * An array describing the current table
  3654. *
  3655. * @ingroup tripal_api
  3656. *
  3657. * @ingroup tripal_core
  3658. */
  3659. function tripal_core_chado_synonym_schema () {
  3660. $description = array();
  3661. $description = array(
  3662. 'table' => 'synonym',
  3663. // 'description' => 'TODO: please describe this table!',
  3664. 'fields' => array(
  3665. 'synonym_id' => array(
  3666. // 'description' => 'TODO: please describe this field!',
  3667. 'type' => 'serial',
  3668. 'not null' => '1',
  3669. ),
  3670. 'name' => array(
  3671. // 'description' => 'TODO: please describe this field!',
  3672. 'type' => 'varchar',
  3673. 'length' => '255',
  3674. 'not null' => '1',
  3675. ),
  3676. 'type_id' => array(
  3677. // 'description' => 'TODO: please describe this field!',
  3678. 'type' => 'int',
  3679. 'not null' => '1',
  3680. ),
  3681. 'synonym_sgml' => array(
  3682. // 'description' => 'TODO: please describe this field!',
  3683. 'type' => 'varchar',
  3684. 'length' => '255',
  3685. 'not null' => '1',
  3686. ),
  3687. ),
  3688. 'primary key' => array(
  3689. '0' => 'synonym_id',
  3690. ),
  3691. 'unique keys' => array(
  3692. 'synonym_c1' => array(
  3693. '0' => 'name',
  3694. '1' => 'type_id',
  3695. ),
  3696. ),
  3697. 'indexes' => array(
  3698. 'synonym_idx1' => array(
  3699. '0' => 'type_id',
  3700. ),
  3701. ),
  3702. 'foreign keys' => array(
  3703. ),
  3704. );
  3705. return $description;
  3706. }
  3707. /**
  3708. * Implements hook_studydesignprop_schema()
  3709. * Purpose: To describe the structure of studydesignprop to tripal
  3710. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3711. * @see tripal_core.api.inc: tripal_core_chado_update()
  3712. * @see tripal_core.api.inc: tripal_core_chado_select()
  3713. *
  3714. * @return
  3715. * An array describing the current table
  3716. *
  3717. * @ingroup tripal_api
  3718. *
  3719. * @ingroup tripal_core
  3720. */
  3721. function tripal_core_chado_studydesignprop_schema () {
  3722. $description = array();
  3723. $description = array(
  3724. 'table' => 'studydesignprop',
  3725. // 'description' => 'TODO: please describe this table!',
  3726. 'fields' => array(
  3727. 'studydesignprop_id' => array(
  3728. // 'description' => 'TODO: please describe this field!',
  3729. 'type' => 'serial',
  3730. 'not null' => '1',
  3731. ),
  3732. 'studydesign_id' => array(
  3733. // 'description' => 'TODO: please describe this field!',
  3734. 'type' => 'int',
  3735. 'not null' => '1',
  3736. ),
  3737. 'type_id' => array(
  3738. // 'description' => 'TODO: please describe this field!',
  3739. 'type' => 'int',
  3740. 'not null' => '1',
  3741. ),
  3742. 'value' => array(
  3743. // 'description' => 'TODO: please describe this field!',
  3744. 'type' => 'text',
  3745. 'not null' => '',
  3746. ),
  3747. 'rank' => array(
  3748. // 'description' => 'TODO: please describe this field!',
  3749. 'type' => 'int',
  3750. 'not null' => '1',
  3751. 'default' => '0',
  3752. ),
  3753. ),
  3754. 'primary key' => array(
  3755. '0' => 'studydesignprop_id',
  3756. ),
  3757. 'unique keys' => array(
  3758. 'studydesignprop_c1' => array(
  3759. '0' => 'studydesign_id',
  3760. '1' => 'type_id',
  3761. '2' => 'rank',
  3762. ),
  3763. ),
  3764. 'indexes' => array(
  3765. 'studydesignprop_idx1' => array(
  3766. '0' => 'studydesign_id',
  3767. ),
  3768. 'studydesignprop_idx2' => array(
  3769. '0' => 'type_id',
  3770. ),
  3771. ),
  3772. 'foreign keys' => array(
  3773. ),
  3774. );
  3775. return $description;
  3776. }
  3777. /**
  3778. * Implements hook_studydesign_schema()
  3779. * Purpose: To describe the structure of studydesign to tripal
  3780. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3781. * @see tripal_core.api.inc: tripal_core_chado_update()
  3782. * @see tripal_core.api.inc: tripal_core_chado_select()
  3783. *
  3784. * @return
  3785. * An array describing the current table
  3786. *
  3787. * @ingroup tripal_api
  3788. *
  3789. * @ingroup tripal_core
  3790. */
  3791. function tripal_core_chado_studydesign_schema () {
  3792. $description = array();
  3793. $description = array(
  3794. 'table' => 'studydesign',
  3795. // 'description' => 'TODO: please describe this table!',
  3796. 'fields' => array(
  3797. 'studydesign_id' => array(
  3798. // 'description' => 'TODO: please describe this field!',
  3799. 'type' => 'serial',
  3800. 'not null' => '1',
  3801. ),
  3802. 'study_id' => array(
  3803. // 'description' => 'TODO: please describe this field!',
  3804. 'type' => 'int',
  3805. 'not null' => '1',
  3806. ),
  3807. 'description' => array(
  3808. // 'description' => 'TODO: please describe this field!',
  3809. 'type' => 'text',
  3810. 'not null' => '',
  3811. ),
  3812. ),
  3813. 'primary key' => array(
  3814. '0' => 'studydesign_id',
  3815. ),
  3816. 'unique keys' => array(
  3817. ),
  3818. 'indexes' => array(
  3819. 'studydesign_idx1' => array(
  3820. '0' => 'study_id',
  3821. ),
  3822. ),
  3823. 'foreign keys' => array(
  3824. ),
  3825. );
  3826. return $description;
  3827. }
  3828. /**
  3829. * Implements hook_stockprop_schema()
  3830. * Purpose: To describe the structure of stockprop to tripal
  3831. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3832. * @see tripal_core.api.inc: tripal_core_chado_update()
  3833. * @see tripal_core.api.inc: tripal_core_chado_select()
  3834. *
  3835. * @return
  3836. * An array describing the current table
  3837. *
  3838. * @ingroup tripal_api
  3839. *
  3840. * @ingroup tripal_core
  3841. */
  3842. function tripal_core_chado_stockprop_schema () {
  3843. $description = array();
  3844. $description = array(
  3845. 'table' => 'stockprop',
  3846. // 'description' => 'TODO: please describe this table!',
  3847. 'fields' => array(
  3848. 'stockprop_id' => array(
  3849. // 'description' => 'TODO: please describe this field!',
  3850. 'type' => 'serial',
  3851. 'not null' => '1',
  3852. ),
  3853. 'stock_id' => array(
  3854. // 'description' => 'TODO: please describe this field!',
  3855. 'type' => 'int',
  3856. 'not null' => '1',
  3857. ),
  3858. 'type_id' => array(
  3859. // 'description' => 'TODO: please describe this field!',
  3860. 'type' => 'int',
  3861. 'not null' => '1',
  3862. ),
  3863. 'value' => array(
  3864. // 'description' => 'TODO: please describe this field!',
  3865. 'type' => 'text',
  3866. 'not null' => '',
  3867. ),
  3868. 'rank' => array(
  3869. // 'description' => 'TODO: please describe this field!',
  3870. 'type' => 'int',
  3871. 'not null' => '1',
  3872. 'default' => '0',
  3873. ),
  3874. ),
  3875. 'primary key' => array(
  3876. '0' => 'stockprop_id',
  3877. ),
  3878. 'unique keys' => array(
  3879. 'stockprop_c1' => array(
  3880. '0' => 'stock_id',
  3881. '1' => 'type_id',
  3882. '2' => 'rank',
  3883. ),
  3884. ),
  3885. 'indexes' => array(
  3886. 'stockprop_idx1' => array(
  3887. '0' => 'stock_id',
  3888. ),
  3889. 'stockprop_idx2' => array(
  3890. '0' => 'type_id',
  3891. ),
  3892. ),
  3893. 'foreign keys' => array(
  3894. ),
  3895. );
  3896. return $description;
  3897. }
  3898. /**
  3899. * Implements hook_stockprop_pub_schema()
  3900. * Purpose: To describe the structure of stockprop_pub to tripal
  3901. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3902. * @see tripal_core.api.inc: tripal_core_chado_update()
  3903. * @see tripal_core.api.inc: tripal_core_chado_select()
  3904. *
  3905. * @return
  3906. * An array describing the current table
  3907. *
  3908. * @ingroup tripal_api
  3909. *
  3910. * @ingroup tripal_core
  3911. */
  3912. function tripal_core_chado_stockprop_pub_schema () {
  3913. $description = array();
  3914. $description = array(
  3915. 'table' => 'stockprop_pub',
  3916. // 'description' => 'TODO: please describe this table!',
  3917. 'fields' => array(
  3918. 'stockprop_pub_id' => array(
  3919. // 'description' => 'TODO: please describe this field!',
  3920. 'type' => 'serial',
  3921. 'not null' => '1',
  3922. ),
  3923. 'stockprop_id' => array(
  3924. // 'description' => 'TODO: please describe this field!',
  3925. 'type' => 'int',
  3926. 'not null' => '1',
  3927. ),
  3928. 'pub_id' => array(
  3929. // 'description' => 'TODO: please describe this field!',
  3930. 'type' => 'int',
  3931. 'not null' => '1',
  3932. ),
  3933. ),
  3934. 'primary key' => array(
  3935. '0' => 'stockprop_pub_id',
  3936. ),
  3937. 'unique keys' => array(
  3938. 'stockprop_pub_c1' => array(
  3939. '0' => 'stockprop_id',
  3940. '1' => 'pub_id',
  3941. ),
  3942. ),
  3943. 'indexes' => array(
  3944. 'stockprop_pub_idx1' => array(
  3945. '0' => 'stockprop_id',
  3946. ),
  3947. 'stockprop_pub_idx2' => array(
  3948. '0' => 'pub_id',
  3949. ),
  3950. ),
  3951. 'foreign keys' => array(
  3952. ),
  3953. );
  3954. return $description;
  3955. }
  3956. /**
  3957. * Implements hook_study_schema()
  3958. * Purpose: To describe the structure of study to tripal
  3959. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3960. * @see tripal_core.api.inc: tripal_core_chado_update()
  3961. * @see tripal_core.api.inc: tripal_core_chado_select()
  3962. *
  3963. * @return
  3964. * An array describing the current table
  3965. *
  3966. * @ingroup tripal_api
  3967. *
  3968. * @ingroup tripal_core
  3969. */
  3970. function tripal_core_chado_study_schema () {
  3971. $description = array();
  3972. $description = array(
  3973. 'table' => 'study',
  3974. // 'description' => 'TODO: please describe this table!',
  3975. 'fields' => array(
  3976. 'study_id' => array(
  3977. // 'description' => 'TODO: please describe this field!',
  3978. 'type' => 'serial',
  3979. 'not null' => '1',
  3980. ),
  3981. 'contact_id' => array(
  3982. // 'description' => 'TODO: please describe this field!',
  3983. 'type' => 'int',
  3984. 'not null' => '1',
  3985. ),
  3986. 'pub_id' => array(
  3987. // 'description' => 'TODO: please describe this field!',
  3988. 'type' => 'int',
  3989. 'not null' => '',
  3990. ),
  3991. 'dbxref_id' => array(
  3992. // 'description' => 'TODO: please describe this field!',
  3993. 'type' => 'int',
  3994. 'not null' => '',
  3995. ),
  3996. 'name' => array(
  3997. // 'description' => 'TODO: please describe this field!',
  3998. 'type' => 'text',
  3999. 'not null' => '1',
  4000. ),
  4001. 'description' => array(
  4002. // 'description' => 'TODO: please describe this field!',
  4003. 'type' => 'text',
  4004. 'not null' => '',
  4005. ),
  4006. ),
  4007. 'primary key' => array(
  4008. '0' => 'study_id',
  4009. ),
  4010. 'unique keys' => array(
  4011. 'study_c1' => array(
  4012. '0' => 'name',
  4013. ),
  4014. ),
  4015. 'indexes' => array(
  4016. 'study_idx1' => array(
  4017. '0' => 'contact_id',
  4018. ),
  4019. 'study_idx2' => array(
  4020. '0' => 'pub_id',
  4021. ),
  4022. 'study_idx3' => array(
  4023. '0' => 'dbxref_id',
  4024. ),
  4025. ),
  4026. 'foreign keys' => array(
  4027. ),
  4028. );
  4029. return $description;
  4030. }
  4031. /**
  4032. * Implements hook_study_assay_schema()
  4033. * Purpose: To describe the structure of study_assay to tripal
  4034. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4035. * @see tripal_core.api.inc: tripal_core_chado_update()
  4036. * @see tripal_core.api.inc: tripal_core_chado_select()
  4037. *
  4038. * @return
  4039. * An array describing the current table
  4040. *
  4041. * @ingroup tripal_api
  4042. *
  4043. * @ingroup tripal_core
  4044. */
  4045. function tripal_core_chado_study_assay_schema () {
  4046. $description = array();
  4047. $description = array(
  4048. 'table' => 'study_assay',
  4049. // 'description' => 'TODO: please describe this table!',
  4050. 'fields' => array(
  4051. 'study_assay_id' => array(
  4052. // 'description' => 'TODO: please describe this field!',
  4053. 'type' => 'serial',
  4054. 'not null' => '1',
  4055. ),
  4056. 'study_id' => array(
  4057. // 'description' => 'TODO: please describe this field!',
  4058. 'type' => 'int',
  4059. 'not null' => '1',
  4060. ),
  4061. 'assay_id' => array(
  4062. // 'description' => 'TODO: please describe this field!',
  4063. 'type' => 'int',
  4064. 'not null' => '1',
  4065. ),
  4066. ),
  4067. 'primary key' => array(
  4068. '0' => 'study_assay_id',
  4069. ),
  4070. 'unique keys' => array(
  4071. 'study_assay_c1' => array(
  4072. '0' => 'study_id',
  4073. '1' => 'assay_id',
  4074. ),
  4075. ),
  4076. 'indexes' => array(
  4077. 'study_assay_idx1' => array(
  4078. '0' => 'study_id',
  4079. ),
  4080. 'study_assay_idx2' => array(
  4081. '0' => 'assay_id',
  4082. ),
  4083. ),
  4084. 'foreign keys' => array(
  4085. ),
  4086. );
  4087. return $description;
  4088. }
  4089. /**
  4090. * Implements hook_tableinfo_schema()
  4091. * Purpose: To describe the structure of tableinfo to tripal
  4092. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4093. * @see tripal_core.api.inc: tripal_core_chado_update()
  4094. * @see tripal_core.api.inc: tripal_core_chado_select()
  4095. *
  4096. * @return
  4097. * An array describing the current table
  4098. *
  4099. * @ingroup tripal_api
  4100. *
  4101. * @ingroup tripal_core
  4102. */
  4103. function tripal_core_chado_tableinfo_schema () {
  4104. $description = array();
  4105. $description = array(
  4106. 'table' => 'tableinfo',
  4107. // 'description' => 'TODO: please describe this table!',
  4108. 'fields' => array(
  4109. 'tableinfo_id' => array(
  4110. // 'description' => 'TODO: please describe this field!',
  4111. 'type' => 'serial',
  4112. 'not null' => '1',
  4113. ),
  4114. 'name' => array(
  4115. // 'description' => 'TODO: please describe this field!',
  4116. 'type' => 'varchar',
  4117. 'length' => '30',
  4118. 'not null' => '1',
  4119. ),
  4120. 'primary_key_column' => array(
  4121. // 'description' => 'TODO: please describe this field!',
  4122. 'type' => 'varchar',
  4123. 'length' => '30',
  4124. 'not null' => '',
  4125. ),
  4126. 'is_view' => array(
  4127. // 'description' => 'TODO: please describe this field!',
  4128. 'type' => 'int',
  4129. 'not null' => '1',
  4130. 'default' => '0',
  4131. ),
  4132. 'view_on_table_id' => array(
  4133. // 'description' => 'TODO: please describe this field!',
  4134. 'type' => 'int',
  4135. 'not null' => '',
  4136. ),
  4137. 'superclass_table_id' => array(
  4138. // 'description' => 'TODO: please describe this field!',
  4139. 'type' => 'int',
  4140. 'not null' => '',
  4141. ),
  4142. 'is_updateable' => array(
  4143. // 'description' => 'TODO: please describe this field!',
  4144. 'type' => 'int',
  4145. 'not null' => '1',
  4146. 'default' => '1',
  4147. ),
  4148. 'modification_date' => array(
  4149. // 'description' => 'TODO: please describe this field!',
  4150. 'type' => 'date',
  4151. 'not null' => '1',
  4152. 'default' => 'ow(',
  4153. ),
  4154. ),
  4155. 'primary key' => array(
  4156. '0' => 'tableinfo_id',
  4157. ),
  4158. 'unique keys' => array(
  4159. 'tableinfo_c1' => array(
  4160. '0' => 'name',
  4161. ),
  4162. ),
  4163. 'indexes' => array(
  4164. ),
  4165. 'foreign keys' => array(
  4166. ),
  4167. );
  4168. return $description;
  4169. }
  4170. /**
  4171. * Implements hook_treatment_schema()
  4172. * Purpose: To describe the structure of treatment to tripal
  4173. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4174. * @see tripal_core.api.inc: tripal_core_chado_update()
  4175. * @see tripal_core.api.inc: tripal_core_chado_select()
  4176. *
  4177. * @return
  4178. * An array describing the current table
  4179. *
  4180. * @ingroup tripal_api
  4181. *
  4182. * @ingroup tripal_core
  4183. */
  4184. function tripal_core_chado_treatment_schema () {
  4185. $description = array();
  4186. $description = array(
  4187. 'table' => 'treatment',
  4188. // 'description' => 'TODO: please describe this table!',
  4189. 'fields' => array(
  4190. 'treatment_id' => array(
  4191. // 'description' => 'TODO: please describe this field!',
  4192. 'type' => 'serial',
  4193. 'not null' => '1',
  4194. ),
  4195. 'rank' => array(
  4196. // 'description' => 'TODO: please describe this field!',
  4197. 'type' => 'int',
  4198. 'not null' => '1',
  4199. 'default' => '0',
  4200. ),
  4201. 'biomaterial_id' => array(
  4202. // 'description' => 'TODO: please describe this field!',
  4203. 'type' => 'int',
  4204. 'not null' => '1',
  4205. ),
  4206. 'type_id' => array(
  4207. // 'description' => 'TODO: please describe this field!',
  4208. 'type' => 'int',
  4209. 'not null' => '1',
  4210. ),
  4211. 'protocol_id' => array(
  4212. // 'description' => 'TODO: please describe this field!',
  4213. 'type' => 'int',
  4214. 'not null' => '',
  4215. ),
  4216. 'name' => array(
  4217. // 'description' => 'TODO: please describe this field!',
  4218. 'type' => 'text',
  4219. 'not null' => '',
  4220. ),
  4221. ),
  4222. 'primary key' => array(
  4223. '0' => 'treatment_id',
  4224. ),
  4225. 'unique keys' => array(
  4226. ),
  4227. 'indexes' => array(
  4228. 'treatment_idx1' => array(
  4229. '0' => 'biomaterial_id',
  4230. ),
  4231. 'treatment_idx2' => array(
  4232. '0' => 'type_id',
  4233. ),
  4234. 'treatment_idx3' => array(
  4235. '0' => 'protocol_id',
  4236. ),
  4237. ),
  4238. 'foreign keys' => array(
  4239. ),
  4240. );
  4241. return $description;
  4242. }
  4243. /**
  4244. * Implements hook_tripal_obo_schema()
  4245. * Purpose: To describe the structure of tripal_obo to tripal
  4246. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4247. * @see tripal_core.api.inc: tripal_core_chado_update()
  4248. * @see tripal_core.api.inc: tripal_core_chado_select()
  4249. *
  4250. * @return
  4251. * An array describing the current table
  4252. *
  4253. * @ingroup tripal_api
  4254. *
  4255. * @ingroup tripal_core
  4256. */
  4257. function tripal_core_chado_tripal_obo_schema () {
  4258. $description = array();
  4259. $description = array(
  4260. 'table' => 'tripal_obo',
  4261. // 'description' => 'TODO: please describe this table!',
  4262. 'fields' => array(
  4263. 'cv_id' => array(
  4264. // 'description' => 'TODO: please describe this field!',
  4265. 'type' => 'int',
  4266. 'unsigned' => '1',
  4267. 'not null' => '1',
  4268. 'default' => '0',
  4269. ),
  4270. 'file' => array(
  4271. // 'description' => 'TODO: please describe this field!',
  4272. 'type' => 'varchar',
  4273. 'length' => '1024',
  4274. 'not null' => '',
  4275. ),
  4276. 'url' => array(
  4277. // 'description' => 'TODO: please describe this field!',
  4278. 'type' => 'varchar',
  4279. 'length' => '1024',
  4280. 'not null' => '',
  4281. ),
  4282. ),
  4283. 'primary key' => array(
  4284. '0' => 'cv_id',
  4285. ),
  4286. 'unique keys' => array(
  4287. ),
  4288. 'indexes' => array(
  4289. 'cv_id' => array(
  4290. '0' => 'cv_id',
  4291. ),
  4292. ),
  4293. 'foreign keys' => array(
  4294. ),
  4295. );
  4296. return $description;
  4297. }
  4298. /**
  4299. * Implements hook_tripal_organism_views_common_name_schema()
  4300. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4301. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4302. * @see tripal_core.api.inc: tripal_core_chado_update()
  4303. * @see tripal_core.api.inc: tripal_core_chado_select()
  4304. *
  4305. * @return
  4306. * An array describing the current table
  4307. *
  4308. * @ingroup tripal_api
  4309. *
  4310. * @ingroup tripal_core
  4311. */
  4312. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4313. $description = array();
  4314. $description = array(
  4315. 'table' => 'tripal_organism_views_common_name',
  4316. // 'description' => 'TODO: please describe this table!',
  4317. 'fields' => array(
  4318. 'nid' => array(
  4319. // 'description' => 'TODO: please describe this field!',
  4320. 'type' => 'int',
  4321. 'unsigned' => '1',
  4322. 'not null' => '1',
  4323. 'default' => '0',
  4324. ),
  4325. 'common_name' => array(
  4326. // 'description' => 'TODO: please describe this field!',
  4327. 'type' => 'varchar',
  4328. 'length' => '255',
  4329. 'not null' => '1',
  4330. 'default' => 'NA',
  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_type_feature_count_schema()
  4346. * Purpose: To describe the structure of type_feature_count 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_api
  4355. *
  4356. * @ingroup tripal_core
  4357. */
  4358. function tripal_core_chado_type_feature_count_schema () {
  4359. $description = array();
  4360. $description = array(
  4361. 'table' => 'type_feature_count',
  4362. // 'description' => 'TODO: please describe this table!',
  4363. 'fields' => array(
  4364. 'type' => array(
  4365. // 'description' => 'TODO: please describe this field!',
  4366. 'type' => 'varchar',
  4367. 'length' => '1024',
  4368. 'not null' => '',
  4369. ),
  4370. 'num_features' => array(
  4371. // 'description' => 'TODO: please describe this field!',
  4372. 'type' => 'int',
  4373. 'size' => 'big',
  4374. 'not null' => '',
  4375. ),
  4376. ),
  4377. 'primary key' => array(
  4378. ),
  4379. 'unique keys' => array(
  4380. ),
  4381. 'indexes' => array(
  4382. ),
  4383. 'foreign keys' => array(
  4384. ),
  4385. );
  4386. return $description;
  4387. }
  4388. /**
  4389. * Implements hook_stockcollectionprop_schema()
  4390. * Purpose: To describe the structure of stockcollectionprop to tripal
  4391. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4392. * @see tripal_core.api.inc: tripal_core_chado_update()
  4393. * @see tripal_core.api.inc: tripal_core_chado_select()
  4394. *
  4395. * @return
  4396. * An array describing the current table
  4397. *
  4398. * @ingroup tripal_api
  4399. *
  4400. * @ingroup tripal_core
  4401. */
  4402. function tripal_core_chado_stockcollectionprop_schema () {
  4403. $description = array();
  4404. $description = array(
  4405. 'table' => 'stockcollectionprop',
  4406. // 'description' => 'TODO: please describe this table!',
  4407. 'fields' => array(
  4408. 'stockcollectionprop_id' => array(
  4409. // 'description' => 'TODO: please describe this field!',
  4410. 'type' => 'serial',
  4411. 'not null' => '1',
  4412. ),
  4413. 'stockcollection_id' => array(
  4414. // 'description' => 'TODO: please describe this field!',
  4415. 'type' => 'int',
  4416. 'not null' => '1',
  4417. ),
  4418. 'type_id' => array(
  4419. // 'description' => 'TODO: please describe this field!',
  4420. 'type' => 'int',
  4421. 'not null' => '1',
  4422. ),
  4423. 'value' => array(
  4424. // 'description' => 'TODO: please describe this field!',
  4425. 'type' => 'text',
  4426. 'not null' => '',
  4427. ),
  4428. 'rank' => array(
  4429. // 'description' => 'TODO: please describe this field!',
  4430. 'type' => 'int',
  4431. 'not null' => '1',
  4432. 'default' => '0',
  4433. ),
  4434. ),
  4435. 'primary key' => array(
  4436. '0' => 'stockcollectionprop_id',
  4437. ),
  4438. 'unique keys' => array(
  4439. 'stockcollectionprop_c1' => array(
  4440. '0' => 'stockcollection_id',
  4441. '1' => 'type_id',
  4442. '2' => 'rank',
  4443. ),
  4444. ),
  4445. 'indexes' => array(
  4446. 'stockcollectionprop_idx1' => array(
  4447. '0' => 'stockcollection_id',
  4448. ),
  4449. 'stockcollectionprop_idx2' => array(
  4450. '0' => 'type_id',
  4451. ),
  4452. ),
  4453. 'foreign keys' => array(
  4454. ),
  4455. );
  4456. return $description;
  4457. }
  4458. /**
  4459. * Implements hook_stockcollection_stock_schema()
  4460. * Purpose: To describe the structure of stockcollection_stock to tripal
  4461. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4462. * @see tripal_core.api.inc: tripal_core_chado_update()
  4463. * @see tripal_core.api.inc: tripal_core_chado_select()
  4464. *
  4465. * @return
  4466. * An array describing the current table
  4467. *
  4468. * @ingroup tripal_api
  4469. *
  4470. * @ingroup tripal_core
  4471. */
  4472. function tripal_core_chado_stockcollection_stock_schema () {
  4473. $description = array();
  4474. $description = array(
  4475. 'table' => 'stockcollection_stock',
  4476. // 'description' => 'TODO: please describe this table!',
  4477. 'fields' => array(
  4478. 'stockcollection_stock_id' => array(
  4479. // 'description' => 'TODO: please describe this field!',
  4480. 'type' => 'serial',
  4481. 'not null' => '1',
  4482. ),
  4483. 'stockcollection_id' => array(
  4484. // 'description' => 'TODO: please describe this field!',
  4485. 'type' => 'int',
  4486. 'not null' => '1',
  4487. ),
  4488. 'stock_id' => array(
  4489. // 'description' => 'TODO: please describe this field!',
  4490. 'type' => 'int',
  4491. 'not null' => '1',
  4492. ),
  4493. ),
  4494. 'primary key' => array(
  4495. '0' => 'stockcollection_stock_id',
  4496. ),
  4497. 'unique keys' => array(
  4498. 'stockcollection_stock_c1' => array(
  4499. '0' => 'stockcollection_id',
  4500. '1' => 'stock_id',
  4501. ),
  4502. ),
  4503. 'indexes' => array(
  4504. 'stockcollection_stock_idx1' => array(
  4505. '0' => 'stockcollection_id',
  4506. ),
  4507. 'stockcollection_stock_idx2' => array(
  4508. '0' => 'stock_id',
  4509. ),
  4510. ),
  4511. 'foreign keys' => array(
  4512. ),
  4513. );
  4514. return $description;
  4515. }
  4516. /**
  4517. * Implements hook_public_feature_schema()
  4518. * Purpose: To describe the structure of public_feature to tripal
  4519. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4520. * @see tripal_core.api.inc: tripal_core_chado_update()
  4521. * @see tripal_core.api.inc: tripal_core_chado_select()
  4522. *
  4523. * @return
  4524. * An array describing the current table
  4525. *
  4526. * @ingroup tripal_api
  4527. *
  4528. * @ingroup tripal_core
  4529. */
  4530. function tripal_core_chado_public_feature_schema () {
  4531. $description = array();
  4532. $description = array(
  4533. 'table' => 'public_feature',
  4534. // 'description' => 'TODO: please describe this table!',
  4535. 'fields' => array(
  4536. 'vid' => array(
  4537. // 'description' => 'TODO: please describe this field!',
  4538. 'type' => 'int',
  4539. 'unsigned' => '1',
  4540. 'not null' => '1',
  4541. 'default' => '0',
  4542. ),
  4543. 'nid' => array(
  4544. // 'description' => 'TODO: please describe this field!',
  4545. 'type' => 'int',
  4546. 'unsigned' => '1',
  4547. 'not null' => '1',
  4548. 'default' => '0',
  4549. ),
  4550. 'feature_id' => array(
  4551. // 'description' => 'TODO: please describe this field!',
  4552. 'type' => 'int',
  4553. 'not null' => '1',
  4554. 'default' => '0',
  4555. ),
  4556. 'sync_date' => array(
  4557. // 'description' => 'TODO: please describe this field!',
  4558. 'type' => 'int',
  4559. 'not null' => '',
  4560. ),
  4561. ),
  4562. 'primary key' => array(
  4563. '0' => 'nid',
  4564. ),
  4565. 'unique keys' => array(
  4566. 'nid_vid' => array(
  4567. '0' => 'nid',
  4568. '1' => 'vid',
  4569. ),
  4570. 'vid' => array(
  4571. '0' => 'vid',
  4572. ),
  4573. ),
  4574. 'indexes' => array(
  4575. 'feature_id' => array(
  4576. '0' => 'feature_id',
  4577. ),
  4578. ),
  4579. 'foreign keys' => array(
  4580. ),
  4581. );
  4582. return $description;
  4583. }
  4584. /**
  4585. * Implements hook_public_library_schema()
  4586. * Purpose: To describe the structure of public_library to tripal
  4587. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4588. * @see tripal_core.api.inc: tripal_core_chado_update()
  4589. * @see tripal_core.api.inc: tripal_core_chado_select()
  4590. *
  4591. * @return
  4592. * An array describing the current table
  4593. *
  4594. * @ingroup tripal_api
  4595. *
  4596. * @ingroup tripal_core
  4597. */
  4598. function tripal_core_chado_public_library_schema () {
  4599. $description = array();
  4600. $description = array(
  4601. 'table' => 'public_library',
  4602. // 'description' => 'TODO: please describe this table!',
  4603. 'fields' => array(
  4604. 'vid' => array(
  4605. // 'description' => 'TODO: please describe this field!',
  4606. 'type' => 'int',
  4607. 'unsigned' => '1',
  4608. 'not null' => '1',
  4609. 'default' => '0',
  4610. ),
  4611. 'nid' => array(
  4612. // 'description' => 'TODO: please describe this field!',
  4613. 'type' => 'int',
  4614. 'unsigned' => '1',
  4615. 'not null' => '1',
  4616. 'default' => '0',
  4617. ),
  4618. 'library_id' => array(
  4619. // 'description' => 'TODO: please describe this field!',
  4620. 'type' => 'int',
  4621. 'not null' => '1',
  4622. 'default' => '0',
  4623. ),
  4624. ),
  4625. 'primary key' => array(
  4626. '0' => 'nid',
  4627. ),
  4628. 'unique keys' => array(
  4629. 'nid_vid' => array(
  4630. '0' => 'nid',
  4631. '1' => 'vid',
  4632. ),
  4633. 'vid' => array(
  4634. '0' => 'vid',
  4635. ),
  4636. ),
  4637. 'indexes' => array(
  4638. 'library_id' => array(
  4639. '0' => 'library_id',
  4640. ),
  4641. ),
  4642. 'foreign keys' => array(
  4643. ),
  4644. );
  4645. return $description;
  4646. }
  4647. /**
  4648. * Implements hook_public_organism_schema()
  4649. * Purpose: To describe the structure of public_organism to tripal
  4650. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4651. * @see tripal_core.api.inc: tripal_core_chado_update()
  4652. * @see tripal_core.api.inc: tripal_core_chado_select()
  4653. *
  4654. * @return
  4655. * An array describing the current table
  4656. *
  4657. * @ingroup tripal_api
  4658. *
  4659. * @ingroup tripal_core
  4660. */
  4661. function tripal_core_chado_public_organism_schema () {
  4662. $description = array();
  4663. $description = array(
  4664. 'table' => 'public_organism',
  4665. // 'description' => 'TODO: please describe this table!',
  4666. 'fields' => array(
  4667. 'vid' => array(
  4668. // 'description' => 'TODO: please describe this field!',
  4669. 'type' => 'int',
  4670. 'unsigned' => '1',
  4671. 'not null' => '1',
  4672. 'default' => '0',
  4673. ),
  4674. 'nid' => array(
  4675. // 'description' => 'TODO: please describe this field!',
  4676. 'type' => 'int',
  4677. 'unsigned' => '1',
  4678. 'not null' => '1',
  4679. 'default' => '0',
  4680. ),
  4681. 'organism_id' => array(
  4682. // 'description' => 'TODO: please describe this field!',
  4683. 'type' => 'int',
  4684. 'not null' => '1',
  4685. 'default' => '0',
  4686. ),
  4687. ),
  4688. 'primary key' => array(
  4689. '0' => 'nid',
  4690. ),
  4691. 'unique keys' => array(
  4692. 'nid_vid' => array(
  4693. '0' => 'nid',
  4694. '1' => 'vid',
  4695. ),
  4696. 'vid' => array(
  4697. '0' => 'vid',
  4698. ),
  4699. ),
  4700. 'indexes' => array(
  4701. 'organism_id' => array(
  4702. '0' => 'organism_id',
  4703. ),
  4704. ),
  4705. 'foreign keys' => array(
  4706. ),
  4707. );
  4708. return $description;
  4709. }
  4710. /**
  4711. * Implements hook_pubprop_schema()
  4712. * Purpose: To describe the structure of pubprop to tripal
  4713. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4714. * @see tripal_core.api.inc: tripal_core_chado_update()
  4715. * @see tripal_core.api.inc: tripal_core_chado_select()
  4716. *
  4717. * @return
  4718. * An array describing the current table
  4719. *
  4720. * @ingroup tripal_api
  4721. *
  4722. * @ingroup tripal_core
  4723. */
  4724. function tripal_core_chado_pubprop_schema () {
  4725. $description = array();
  4726. $description = array(
  4727. 'table' => 'pubprop',
  4728. // 'description' => 'TODO: please describe this table!',
  4729. 'fields' => array(
  4730. 'pubprop_id' => array(
  4731. // 'description' => 'TODO: please describe this field!',
  4732. 'type' => 'serial',
  4733. 'not null' => '1',
  4734. ),
  4735. 'pub_id' => array(
  4736. // 'description' => 'TODO: please describe this field!',
  4737. 'type' => 'int',
  4738. 'not null' => '1',
  4739. ),
  4740. 'type_id' => array(
  4741. // 'description' => 'TODO: please describe this field!',
  4742. 'type' => 'int',
  4743. 'not null' => '1',
  4744. ),
  4745. 'value' => array(
  4746. // 'description' => 'TODO: please describe this field!',
  4747. 'type' => 'text',
  4748. 'not null' => '1',
  4749. ),
  4750. 'rank' => array(
  4751. // 'description' => 'TODO: please describe this field!',
  4752. 'type' => 'int',
  4753. 'not null' => '',
  4754. ),
  4755. ),
  4756. 'primary key' => array(
  4757. '0' => 'pubprop_id',
  4758. ),
  4759. 'unique keys' => array(
  4760. 'pubprop_c1' => array(
  4761. '0' => 'pub_id',
  4762. '1' => 'type_id',
  4763. '2' => 'rank',
  4764. ),
  4765. ),
  4766. 'indexes' => array(
  4767. 'pubprop_idx1' => array(
  4768. '0' => 'pub_id',
  4769. ),
  4770. 'pubprop_idx2' => array(
  4771. '0' => 'type_id',
  4772. ),
  4773. ),
  4774. 'foreign keys' => array(
  4775. ),
  4776. );
  4777. return $description;
  4778. }
  4779. /**
  4780. * Implements hook_pubauthor_schema()
  4781. * Purpose: To describe the structure of pubauthor to tripal
  4782. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4783. * @see tripal_core.api.inc: tripal_core_chado_update()
  4784. * @see tripal_core.api.inc: tripal_core_chado_select()
  4785. *
  4786. * @return
  4787. * An array describing the current table
  4788. *
  4789. * @ingroup tripal_api
  4790. *
  4791. * @ingroup tripal_core
  4792. */
  4793. function tripal_core_chado_pubauthor_schema () {
  4794. $description = array();
  4795. $description = array(
  4796. 'table' => 'pubauthor',
  4797. // 'description' => 'TODO: please describe this table!',
  4798. 'fields' => array(
  4799. 'pubauthor_id' => array(
  4800. // 'description' => 'TODO: please describe this field!',
  4801. 'type' => 'serial',
  4802. 'not null' => '1',
  4803. ),
  4804. 'pub_id' => array(
  4805. // 'description' => 'TODO: please describe this field!',
  4806. 'type' => 'int',
  4807. 'not null' => '1',
  4808. ),
  4809. 'rank' => array(
  4810. // 'description' => 'TODO: please describe this field!',
  4811. 'type' => 'int',
  4812. 'not null' => '1',
  4813. ),
  4814. 'editor' => array(
  4815. // 'description' => 'TODO: please describe this field!',
  4816. 'type' => 'boolean',
  4817. 'not null' => '',
  4818. 'default' => 'als',
  4819. ),
  4820. 'surname' => array(
  4821. // 'description' => 'TODO: please describe this field!',
  4822. 'type' => 'varchar',
  4823. 'length' => '100',
  4824. 'not null' => '1',
  4825. ),
  4826. 'givennames' => array(
  4827. // 'description' => 'TODO: please describe this field!',
  4828. 'type' => 'varchar',
  4829. 'length' => '100',
  4830. 'not null' => '',
  4831. ),
  4832. 'suffix' => array(
  4833. // 'description' => 'TODO: please describe this field!',
  4834. 'type' => 'varchar',
  4835. 'length' => '100',
  4836. 'not null' => '',
  4837. ),
  4838. ),
  4839. 'primary key' => array(
  4840. '0' => 'pubauthor_id',
  4841. ),
  4842. 'unique keys' => array(
  4843. 'pubauthor_c1' => array(
  4844. '0' => 'pub_id',
  4845. '1' => 'rank',
  4846. ),
  4847. ),
  4848. 'indexes' => array(
  4849. 'pubauthor_idx2' => array(
  4850. '0' => 'pub_id',
  4851. ),
  4852. ),
  4853. 'foreign keys' => array(
  4854. ),
  4855. );
  4856. return $description;
  4857. }
  4858. /**
  4859. * Implements hook_pub_relationship_schema()
  4860. * Purpose: To describe the structure of pub_relationship to tripal
  4861. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4862. * @see tripal_core.api.inc: tripal_core_chado_update()
  4863. * @see tripal_core.api.inc: tripal_core_chado_select()
  4864. *
  4865. * @return
  4866. * An array describing the current table
  4867. *
  4868. * @ingroup tripal_api
  4869. *
  4870. * @ingroup tripal_core
  4871. */
  4872. function tripal_core_chado_pub_relationship_schema () {
  4873. $description = array();
  4874. $description = array(
  4875. 'table' => 'pub_relationship',
  4876. // 'description' => 'TODO: please describe this table!',
  4877. 'fields' => array(
  4878. 'pub_relationship_id' => array(
  4879. // 'description' => 'TODO: please describe this field!',
  4880. 'type' => 'serial',
  4881. 'not null' => '1',
  4882. ),
  4883. 'subject_id' => array(
  4884. // 'description' => 'TODO: please describe this field!',
  4885. 'type' => 'int',
  4886. 'not null' => '1',
  4887. ),
  4888. 'object_id' => array(
  4889. // 'description' => 'TODO: please describe this field!',
  4890. 'type' => 'int',
  4891. 'not null' => '1',
  4892. ),
  4893. 'type_id' => array(
  4894. // 'description' => 'TODO: please describe this field!',
  4895. 'type' => 'int',
  4896. 'not null' => '1',
  4897. ),
  4898. ),
  4899. 'primary key' => array(
  4900. '0' => 'pub_relationship_id',
  4901. ),
  4902. 'unique keys' => array(
  4903. 'pub_relationship_c1' => array(
  4904. '0' => 'subject_id',
  4905. '1' => 'object_id',
  4906. '2' => 'type_id',
  4907. ),
  4908. ),
  4909. 'indexes' => array(
  4910. 'pub_relationship_idx1' => array(
  4911. '0' => 'subject_id',
  4912. ),
  4913. 'pub_relationship_idx2' => array(
  4914. '0' => 'object_id',
  4915. ),
  4916. 'pub_relationship_idx3' => array(
  4917. '0' => 'type_id',
  4918. ),
  4919. ),
  4920. 'foreign keys' => array(
  4921. ),
  4922. );
  4923. return $description;
  4924. }
  4925. /**
  4926. * Implements hook_protocol_schema()
  4927. * Purpose: To describe the structure of protocol to tripal
  4928. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4929. * @see tripal_core.api.inc: tripal_core_chado_update()
  4930. * @see tripal_core.api.inc: tripal_core_chado_select()
  4931. *
  4932. * @return
  4933. * An array describing the current table
  4934. *
  4935. * @ingroup tripal_api
  4936. *
  4937. * @ingroup tripal_core
  4938. */
  4939. function tripal_core_chado_protocol_schema () {
  4940. $description = array();
  4941. $description = array(
  4942. 'table' => 'protocol',
  4943. // 'description' => 'TODO: please describe this table!',
  4944. 'fields' => array(
  4945. 'protocol_id' => array(
  4946. // 'description' => 'TODO: please describe this field!',
  4947. 'type' => 'serial',
  4948. 'not null' => '1',
  4949. ),
  4950. 'type_id' => array(
  4951. // 'description' => 'TODO: please describe this field!',
  4952. 'type' => 'int',
  4953. 'not null' => '1',
  4954. ),
  4955. 'pub_id' => array(
  4956. // 'description' => 'TODO: please describe this field!',
  4957. 'type' => 'int',
  4958. 'not null' => '',
  4959. ),
  4960. 'dbxref_id' => array(
  4961. // 'description' => 'TODO: please describe this field!',
  4962. 'type' => 'int',
  4963. 'not null' => '',
  4964. ),
  4965. 'name' => array(
  4966. // 'description' => 'TODO: please describe this field!',
  4967. 'type' => 'text',
  4968. 'not null' => '1',
  4969. ),
  4970. 'uri' => array(
  4971. // 'description' => 'TODO: please describe this field!',
  4972. 'type' => 'text',
  4973. 'not null' => '',
  4974. ),
  4975. 'protocoldescription' => array(
  4976. // 'description' => 'TODO: please describe this field!',
  4977. 'type' => 'text',
  4978. 'not null' => '',
  4979. ),
  4980. 'hardwaredescription' => array(
  4981. // 'description' => 'TODO: please describe this field!',
  4982. 'type' => 'text',
  4983. 'not null' => '',
  4984. ),
  4985. 'softwaredescription' => array(
  4986. // 'description' => 'TODO: please describe this field!',
  4987. 'type' => 'text',
  4988. 'not null' => '',
  4989. ),
  4990. ),
  4991. 'primary key' => array(
  4992. '0' => 'protocol_id',
  4993. ),
  4994. 'unique keys' => array(
  4995. 'protocol_c1' => array(
  4996. '0' => 'name',
  4997. ),
  4998. ),
  4999. 'indexes' => array(
  5000. 'protocol_idx1' => array(
  5001. '0' => 'type_id',
  5002. ),
  5003. 'protocol_idx2' => array(
  5004. '0' => 'pub_id',
  5005. ),
  5006. 'protocol_idx3' => array(
  5007. '0' => 'dbxref_id',
  5008. ),
  5009. ),
  5010. 'foreign keys' => array(
  5011. ),
  5012. );
  5013. return $description;
  5014. }
  5015. /**
  5016. * Implements hook_protocolparam_schema()
  5017. * Purpose: To describe the structure of protocolparam to tripal
  5018. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5019. * @see tripal_core.api.inc: tripal_core_chado_update()
  5020. * @see tripal_core.api.inc: tripal_core_chado_select()
  5021. *
  5022. * @return
  5023. * An array describing the current table
  5024. *
  5025. * @ingroup tripal_api
  5026. *
  5027. * @ingroup tripal_core
  5028. */
  5029. function tripal_core_chado_protocolparam_schema () {
  5030. $description = array();
  5031. $description = array(
  5032. 'table' => 'protocolparam',
  5033. // 'description' => 'TODO: please describe this table!',
  5034. 'fields' => array(
  5035. 'protocolparam_id' => array(
  5036. // 'description' => 'TODO: please describe this field!',
  5037. 'type' => 'serial',
  5038. 'not null' => '1',
  5039. ),
  5040. 'protocol_id' => array(
  5041. // 'description' => 'TODO: please describe this field!',
  5042. 'type' => 'int',
  5043. 'not null' => '1',
  5044. ),
  5045. 'name' => array(
  5046. // 'description' => 'TODO: please describe this field!',
  5047. 'type' => 'text',
  5048. 'not null' => '1',
  5049. ),
  5050. 'datatype_id' => array(
  5051. // 'description' => 'TODO: please describe this field!',
  5052. 'type' => 'int',
  5053. 'not null' => '',
  5054. ),
  5055. 'unittype_id' => array(
  5056. // 'description' => 'TODO: please describe this field!',
  5057. 'type' => 'int',
  5058. 'not null' => '',
  5059. ),
  5060. 'value' => array(
  5061. // 'description' => 'TODO: please describe this field!',
  5062. 'type' => 'text',
  5063. 'not null' => '',
  5064. ),
  5065. 'rank' => array(
  5066. // 'description' => 'TODO: please describe this field!',
  5067. 'type' => 'int',
  5068. 'not null' => '1',
  5069. 'default' => '0',
  5070. ),
  5071. ),
  5072. 'primary key' => array(
  5073. '0' => 'protocolparam_id',
  5074. ),
  5075. 'unique keys' => array(
  5076. ),
  5077. 'indexes' => array(
  5078. 'protocolparam_idx1' => array(
  5079. '0' => 'protocol_id',
  5080. ),
  5081. 'protocolparam_idx2' => array(
  5082. '0' => 'datatype_id',
  5083. ),
  5084. 'protocolparam_idx3' => array(
  5085. '0' => 'unittype_id',
  5086. ),
  5087. ),
  5088. 'foreign keys' => array(
  5089. ),
  5090. );
  5091. return $description;
  5092. }
  5093. /**
  5094. * Implements hook_pub_schema()
  5095. * Purpose: To describe the structure of pub to tripal
  5096. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5097. * @see tripal_core.api.inc: tripal_core_chado_update()
  5098. * @see tripal_core.api.inc: tripal_core_chado_select()
  5099. *
  5100. * @return
  5101. * An array describing the current table
  5102. *
  5103. * @ingroup tripal_api
  5104. *
  5105. * @ingroup tripal_core
  5106. */
  5107. function tripal_core_chado_pub_schema () {
  5108. $description = array();
  5109. $description = array(
  5110. 'table' => 'pub',
  5111. // 'description' => 'TODO: please describe this table!',
  5112. 'fields' => array(
  5113. 'pub_id' => array(
  5114. // 'description' => 'TODO: please describe this field!',
  5115. 'type' => 'serial',
  5116. 'not null' => '1',
  5117. ),
  5118. 'title' => array(
  5119. // 'description' => 'TODO: please describe this field!',
  5120. 'type' => 'text',
  5121. 'not null' => '',
  5122. ),
  5123. 'volumetitle' => array(
  5124. // 'description' => 'TODO: please describe this field!',
  5125. 'type' => 'text',
  5126. 'not null' => '',
  5127. ),
  5128. 'volume' => array(
  5129. // 'description' => 'TODO: please describe this field!',
  5130. 'type' => 'varchar',
  5131. 'length' => '255',
  5132. 'not null' => '',
  5133. ),
  5134. 'series_name' => array(
  5135. // 'description' => 'TODO: please describe this field!',
  5136. 'type' => 'varchar',
  5137. 'length' => '255',
  5138. 'not null' => '',
  5139. ),
  5140. 'issue' => array(
  5141. // 'description' => 'TODO: please describe this field!',
  5142. 'type' => 'varchar',
  5143. 'length' => '255',
  5144. 'not null' => '',
  5145. ),
  5146. 'pyear' => array(
  5147. // 'description' => 'TODO: please describe this field!',
  5148. 'type' => 'varchar',
  5149. 'length' => '255',
  5150. 'not null' => '',
  5151. ),
  5152. 'pages' => array(
  5153. // 'description' => 'TODO: please describe this field!',
  5154. 'type' => 'varchar',
  5155. 'length' => '255',
  5156. 'not null' => '',
  5157. ),
  5158. 'miniref' => array(
  5159. // 'description' => 'TODO: please describe this field!',
  5160. 'type' => 'varchar',
  5161. 'length' => '255',
  5162. 'not null' => '',
  5163. ),
  5164. 'uniquename' => array(
  5165. // 'description' => 'TODO: please describe this field!',
  5166. 'type' => 'text',
  5167. 'not null' => '1',
  5168. ),
  5169. 'type_id' => array(
  5170. // 'description' => 'TODO: please describe this field!',
  5171. 'type' => 'int',
  5172. 'not null' => '1',
  5173. ),
  5174. 'is_obsolete' => array(
  5175. // 'description' => 'TODO: please describe this field!',
  5176. 'type' => 'boolean',
  5177. 'not null' => '',
  5178. 'default' => 'als',
  5179. ),
  5180. 'publisher' => array(
  5181. // 'description' => 'TODO: please describe this field!',
  5182. 'type' => 'varchar',
  5183. 'length' => '255',
  5184. 'not null' => '',
  5185. ),
  5186. 'pubplace' => array(
  5187. // 'description' => 'TODO: please describe this field!',
  5188. 'type' => 'varchar',
  5189. 'length' => '255',
  5190. 'not null' => '',
  5191. ),
  5192. ),
  5193. 'primary key' => array(
  5194. '0' => 'pub_id',
  5195. ),
  5196. 'unique keys' => array(
  5197. 'pub_c1' => array(
  5198. '0' => 'uniquename',
  5199. ),
  5200. ),
  5201. 'indexes' => array(
  5202. 'pub_idx1' => array(
  5203. '0' => 'type_id',
  5204. ),
  5205. ),
  5206. 'foreign keys' => array(
  5207. ),
  5208. );
  5209. return $description;
  5210. }
  5211. /**
  5212. * Implements hook_pub_dbxref_schema()
  5213. * Purpose: To describe the structure of pub_dbxref to tripal
  5214. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5215. * @see tripal_core.api.inc: tripal_core_chado_update()
  5216. * @see tripal_core.api.inc: tripal_core_chado_select()
  5217. *
  5218. * @return
  5219. * An array describing the current table
  5220. *
  5221. * @ingroup tripal_api
  5222. *
  5223. * @ingroup tripal_core
  5224. */
  5225. function tripal_core_chado_pub_dbxref_schema () {
  5226. $description = array();
  5227. $description = array(
  5228. 'table' => 'pub_dbxref',
  5229. // 'description' => 'TODO: please describe this table!',
  5230. 'fields' => array(
  5231. 'pub_dbxref_id' => array(
  5232. // 'description' => 'TODO: please describe this field!',
  5233. 'type' => 'serial',
  5234. 'not null' => '1',
  5235. ),
  5236. 'pub_id' => array(
  5237. // 'description' => 'TODO: please describe this field!',
  5238. 'type' => 'int',
  5239. 'not null' => '1',
  5240. ),
  5241. 'dbxref_id' => array(
  5242. // 'description' => 'TODO: please describe this field!',
  5243. 'type' => 'int',
  5244. 'not null' => '1',
  5245. ),
  5246. 'is_current' => array(
  5247. // 'description' => 'TODO: please describe this field!',
  5248. 'type' => 'boolean',
  5249. 'not null' => '1',
  5250. 'default' => 'ru',
  5251. ),
  5252. ),
  5253. 'primary key' => array(
  5254. '0' => 'pub_dbxref_id',
  5255. ),
  5256. 'unique keys' => array(
  5257. 'pub_dbxref_c1' => array(
  5258. '0' => 'pub_id',
  5259. '1' => 'dbxref_id',
  5260. ),
  5261. ),
  5262. 'indexes' => array(
  5263. 'pub_dbxref_idx1' => array(
  5264. '0' => 'pub_id',
  5265. ),
  5266. 'pub_dbxref_idx2' => array(
  5267. '0' => 'dbxref_id',
  5268. ),
  5269. ),
  5270. 'foreign keys' => array(
  5271. ),
  5272. );
  5273. return $description;
  5274. }
  5275. /**
  5276. * Implements hook_quantification_schema()
  5277. * Purpose: To describe the structure of quantification to tripal
  5278. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5279. * @see tripal_core.api.inc: tripal_core_chado_update()
  5280. * @see tripal_core.api.inc: tripal_core_chado_select()
  5281. *
  5282. * @return
  5283. * An array describing the current table
  5284. *
  5285. * @ingroup tripal_api
  5286. *
  5287. * @ingroup tripal_core
  5288. */
  5289. function tripal_core_chado_quantification_schema () {
  5290. $description = array();
  5291. $description = array(
  5292. 'table' => 'quantification',
  5293. // 'description' => 'TODO: please describe this table!',
  5294. 'fields' => array(
  5295. 'quantification_id' => array(
  5296. // 'description' => 'TODO: please describe this field!',
  5297. 'type' => 'serial',
  5298. 'not null' => '1',
  5299. ),
  5300. 'acquisition_id' => array(
  5301. // 'description' => 'TODO: please describe this field!',
  5302. 'type' => 'int',
  5303. 'not null' => '1',
  5304. ),
  5305. 'operator_id' => array(
  5306. // 'description' => 'TODO: please describe this field!',
  5307. 'type' => 'int',
  5308. 'not null' => '',
  5309. ),
  5310. 'protocol_id' => array(
  5311. // 'description' => 'TODO: please describe this field!',
  5312. 'type' => 'int',
  5313. 'not null' => '',
  5314. ),
  5315. 'analysis_id' => array(
  5316. // 'description' => 'TODO: please describe this field!',
  5317. 'type' => 'int',
  5318. 'not null' => '1',
  5319. ),
  5320. 'quantificationdate' => array(
  5321. // 'description' => 'TODO: please describe this field!',
  5322. 'type' => 'datetime',
  5323. 'not null' => '',
  5324. 'default' => 'ow(',
  5325. ),
  5326. 'name' => array(
  5327. // 'description' => 'TODO: please describe this field!',
  5328. 'type' => 'text',
  5329. 'not null' => '',
  5330. ),
  5331. 'uri' => array(
  5332. // 'description' => 'TODO: please describe this field!',
  5333. 'type' => 'text',
  5334. 'not null' => '',
  5335. ),
  5336. ),
  5337. 'primary key' => array(
  5338. '0' => 'quantification_id',
  5339. ),
  5340. 'unique keys' => array(
  5341. 'quantification_c1' => array(
  5342. '0' => 'name',
  5343. '1' => 'analysis_id',
  5344. ),
  5345. ),
  5346. 'indexes' => array(
  5347. 'quantification_idx1' => array(
  5348. '0' => 'acquisition_id',
  5349. ),
  5350. 'quantification_idx2' => array(
  5351. '0' => 'operator_id',
  5352. ),
  5353. 'quantification_idx3' => array(
  5354. '0' => 'protocol_id',
  5355. ),
  5356. 'quantification_idx4' => array(
  5357. '0' => 'analysis_id',
  5358. ),
  5359. ),
  5360. 'foreign keys' => array(
  5361. ),
  5362. );
  5363. return $description;
  5364. }
  5365. /**
  5366. * Implements hook_quantification_relationship_schema()
  5367. * Purpose: To describe the structure of quantification_relationship to tripal
  5368. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5369. * @see tripal_core.api.inc: tripal_core_chado_update()
  5370. * @see tripal_core.api.inc: tripal_core_chado_select()
  5371. *
  5372. * @return
  5373. * An array describing the current table
  5374. *
  5375. * @ingroup tripal_api
  5376. *
  5377. * @ingroup tripal_core
  5378. */
  5379. function tripal_core_chado_quantification_relationship_schema () {
  5380. $description = array();
  5381. $description = array(
  5382. 'table' => 'quantification_relationship',
  5383. // 'description' => 'TODO: please describe this table!',
  5384. 'fields' => array(
  5385. 'quantification_relationship_id' => array(
  5386. // 'description' => 'TODO: please describe this field!',
  5387. 'type' => 'serial',
  5388. 'not null' => '1',
  5389. ),
  5390. 'subject_id' => array(
  5391. // 'description' => 'TODO: please describe this field!',
  5392. 'type' => 'int',
  5393. 'not null' => '1',
  5394. ),
  5395. 'type_id' => array(
  5396. // 'description' => 'TODO: please describe this field!',
  5397. 'type' => 'int',
  5398. 'not null' => '1',
  5399. ),
  5400. 'object_id' => array(
  5401. // 'description' => 'TODO: please describe this field!',
  5402. 'type' => 'int',
  5403. 'not null' => '1',
  5404. ),
  5405. ),
  5406. 'primary key' => array(
  5407. '0' => 'quantification_relationship_id',
  5408. ),
  5409. 'unique keys' => array(
  5410. 'quantification_relationship_c1' => array(
  5411. '0' => 'subject_id',
  5412. '1' => 'object_id',
  5413. '2' => 'type_id',
  5414. ),
  5415. ),
  5416. 'indexes' => array(
  5417. 'quantification_relationship_idx1' => array(
  5418. '0' => 'subject_id',
  5419. ),
  5420. 'quantification_relationship_idx2' => array(
  5421. '0' => 'type_id',
  5422. ),
  5423. 'quantification_relationship_idx3' => array(
  5424. '0' => 'object_id',
  5425. ),
  5426. ),
  5427. 'foreign keys' => array(
  5428. ),
  5429. );
  5430. return $description;
  5431. }
  5432. /**
  5433. * Implements hook_stock_pub_schema()
  5434. * Purpose: To describe the structure of stock_pub to tripal
  5435. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5436. * @see tripal_core.api.inc: tripal_core_chado_update()
  5437. * @see tripal_core.api.inc: tripal_core_chado_select()
  5438. *
  5439. * @return
  5440. * An array describing the current table
  5441. *
  5442. * @ingroup tripal_api
  5443. *
  5444. * @ingroup tripal_core
  5445. */
  5446. function tripal_core_chado_stock_pub_schema () {
  5447. $description = array();
  5448. $description = array(
  5449. 'table' => 'stock_pub',
  5450. // 'description' => 'TODO: please describe this table!',
  5451. 'fields' => array(
  5452. 'stock_pub_id' => array(
  5453. // 'description' => 'TODO: please describe this field!',
  5454. 'type' => 'serial',
  5455. 'not null' => '1',
  5456. ),
  5457. 'stock_id' => array(
  5458. // 'description' => 'TODO: please describe this field!',
  5459. 'type' => 'int',
  5460. 'not null' => '1',
  5461. ),
  5462. 'pub_id' => array(
  5463. // 'description' => 'TODO: please describe this field!',
  5464. 'type' => 'int',
  5465. 'not null' => '1',
  5466. ),
  5467. ),
  5468. 'primary key' => array(
  5469. '0' => 'stock_pub_id',
  5470. ),
  5471. 'unique keys' => array(
  5472. 'stock_pub_c1' => array(
  5473. '0' => 'stock_id',
  5474. '1' => 'pub_id',
  5475. ),
  5476. ),
  5477. 'indexes' => array(
  5478. 'stock_pub_idx1' => array(
  5479. '0' => 'stock_id',
  5480. ),
  5481. 'stock_pub_idx2' => array(
  5482. '0' => 'pub_id',
  5483. ),
  5484. ),
  5485. 'foreign keys' => array(
  5486. ),
  5487. );
  5488. return $description;
  5489. }
  5490. /**
  5491. * Implements hook_stock_relationship_schema()
  5492. * Purpose: To describe the structure of stock_relationship to tripal
  5493. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5494. * @see tripal_core.api.inc: tripal_core_chado_update()
  5495. * @see tripal_core.api.inc: tripal_core_chado_select()
  5496. *
  5497. * @return
  5498. * An array describing the current table
  5499. *
  5500. * @ingroup tripal_api
  5501. *
  5502. * @ingroup tripal_core
  5503. */
  5504. function tripal_core_chado_stock_relationship_schema () {
  5505. $description = array();
  5506. $description = array(
  5507. 'table' => 'stock_relationship',
  5508. // 'description' => 'TODO: please describe this table!',
  5509. 'fields' => array(
  5510. 'stock_relationship_id' => array(
  5511. // 'description' => 'TODO: please describe this field!',
  5512. 'type' => 'serial',
  5513. 'not null' => '1',
  5514. ),
  5515. 'subject_id' => array(
  5516. // 'description' => 'TODO: please describe this field!',
  5517. 'type' => 'int',
  5518. 'not null' => '1',
  5519. ),
  5520. 'object_id' => array(
  5521. // 'description' => 'TODO: please describe this field!',
  5522. 'type' => 'int',
  5523. 'not null' => '1',
  5524. ),
  5525. 'type_id' => array(
  5526. // 'description' => 'TODO: please describe this field!',
  5527. 'type' => 'int',
  5528. 'not null' => '1',
  5529. ),
  5530. 'value' => array(
  5531. // 'description' => 'TODO: please describe this field!',
  5532. 'type' => 'text',
  5533. 'not null' => '',
  5534. ),
  5535. 'rank' => array(
  5536. // 'description' => 'TODO: please describe this field!',
  5537. 'type' => 'int',
  5538. 'not null' => '1',
  5539. 'default' => '0',
  5540. ),
  5541. ),
  5542. 'primary key' => array(
  5543. '0' => 'stock_relationship_id',
  5544. ),
  5545. 'unique keys' => array(
  5546. 'stock_relationship_c1' => array(
  5547. '0' => 'subject_id',
  5548. '1' => 'object_id',
  5549. '2' => 'type_id',
  5550. '3' => 'rank',
  5551. ),
  5552. ),
  5553. 'indexes' => array(
  5554. 'stock_relationship_idx1' => array(
  5555. '0' => 'subject_id',
  5556. ),
  5557. 'stock_relationship_idx2' => array(
  5558. '0' => 'object_id',
  5559. ),
  5560. 'stock_relationship_idx3' => array(
  5561. '0' => 'type_id',
  5562. ),
  5563. ),
  5564. 'foreign keys' => array(
  5565. ),
  5566. );
  5567. return $description;
  5568. }
  5569. /**
  5570. * Implements hook_stock_relationship_pub_schema()
  5571. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5572. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5573. * @see tripal_core.api.inc: tripal_core_chado_update()
  5574. * @see tripal_core.api.inc: tripal_core_chado_select()
  5575. *
  5576. * @return
  5577. * An array describing the current table
  5578. *
  5579. * @ingroup tripal_api
  5580. *
  5581. * @ingroup tripal_core
  5582. */
  5583. function tripal_core_chado_stock_relationship_pub_schema () {
  5584. $description = array();
  5585. $description = array(
  5586. 'table' => 'stock_relationship_pub',
  5587. // 'description' => 'TODO: please describe this table!',
  5588. 'fields' => array(
  5589. 'stock_relationship_pub_id' => array(
  5590. // 'description' => 'TODO: please describe this field!',
  5591. 'type' => 'serial',
  5592. 'not null' => '1',
  5593. ),
  5594. 'stock_relationship_id' => array(
  5595. // 'description' => 'TODO: please describe this field!',
  5596. 'type' => 'int',
  5597. 'not null' => '1',
  5598. ),
  5599. 'pub_id' => array(
  5600. // 'description' => 'TODO: please describe this field!',
  5601. 'type' => 'int',
  5602. 'not null' => '1',
  5603. ),
  5604. ),
  5605. 'primary key' => array(
  5606. '0' => 'stock_relationship_pub_id',
  5607. ),
  5608. 'unique keys' => array(
  5609. 'stock_relationship_pub_c1' => array(
  5610. '0' => 'stock_relationship_id',
  5611. '1' => 'pub_id',
  5612. ),
  5613. ),
  5614. 'indexes' => array(
  5615. 'stock_relationship_pub_idx1' => array(
  5616. '0' => 'stock_relationship_id',
  5617. ),
  5618. 'stock_relationship_pub_idx2' => array(
  5619. '0' => 'pub_id',
  5620. ),
  5621. ),
  5622. 'foreign keys' => array(
  5623. ),
  5624. );
  5625. return $description;
  5626. }
  5627. /**
  5628. * Implements hook_stockcollection_schema()
  5629. * Purpose: To describe the structure of stockcollection to tripal
  5630. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5631. * @see tripal_core.api.inc: tripal_core_chado_update()
  5632. * @see tripal_core.api.inc: tripal_core_chado_select()
  5633. *
  5634. * @return
  5635. * An array describing the current table
  5636. *
  5637. * @ingroup tripal_api
  5638. *
  5639. * @ingroup tripal_core
  5640. */
  5641. function tripal_core_chado_stockcollection_schema () {
  5642. $description = array();
  5643. $description = array(
  5644. 'table' => 'stockcollection',
  5645. // 'description' => 'TODO: please describe this table!',
  5646. 'fields' => array(
  5647. 'stockcollection_id' => array(
  5648. // 'description' => 'TODO: please describe this field!',
  5649. 'type' => 'serial',
  5650. 'not null' => '1',
  5651. ),
  5652. 'type_id' => array(
  5653. // 'description' => 'TODO: please describe this field!',
  5654. 'type' => 'int',
  5655. 'not null' => '1',
  5656. ),
  5657. 'contact_id' => array(
  5658. // 'description' => 'TODO: please describe this field!',
  5659. 'type' => 'int',
  5660. 'not null' => '',
  5661. ),
  5662. 'name' => array(
  5663. // 'description' => 'TODO: please describe this field!',
  5664. 'type' => 'varchar',
  5665. 'length' => '255',
  5666. 'not null' => '',
  5667. ),
  5668. 'uniquename' => array(
  5669. // 'description' => 'TODO: please describe this field!',
  5670. 'type' => 'text',
  5671. 'not null' => '1',
  5672. ),
  5673. ),
  5674. 'primary key' => array(
  5675. '0' => 'stockcollection_id',
  5676. ),
  5677. 'unique keys' => array(
  5678. 'stockcollection_c1' => array(
  5679. '0' => 'uniquename',
  5680. '1' => 'type_id',
  5681. ),
  5682. ),
  5683. 'indexes' => array(
  5684. 'stockcollection_idx1' => array(
  5685. '0' => 'contact_id',
  5686. ),
  5687. 'stockcollection_idx2' => array(
  5688. '0' => 'type_id',
  5689. ),
  5690. 'stockcollection_idx3' => array(
  5691. '0' => 'uniquename',
  5692. ),
  5693. 'stockcollection_name_ind1' => array(
  5694. '0' => 'name',
  5695. ),
  5696. ),
  5697. 'foreign keys' => array(
  5698. ),
  5699. );
  5700. return $description;
  5701. }
  5702. /**
  5703. * Implements hook_stock_genotype_schema()
  5704. * Purpose: To describe the structure of stock_genotype to tripal
  5705. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5706. * @see tripal_core.api.inc: tripal_core_chado_update()
  5707. * @see tripal_core.api.inc: tripal_core_chado_select()
  5708. *
  5709. * @return
  5710. * An array describing the current table
  5711. *
  5712. * @ingroup tripal_api
  5713. *
  5714. * @ingroup tripal_core
  5715. */
  5716. function tripal_core_chado_stock_genotype_schema () {
  5717. $description = array();
  5718. $description = array(
  5719. 'table' => 'stock_genotype',
  5720. // 'description' => 'TODO: please describe this table!',
  5721. 'fields' => array(
  5722. 'stock_genotype_id' => array(
  5723. // 'description' => 'TODO: please describe this field!',
  5724. 'type' => 'serial',
  5725. 'not null' => '1',
  5726. ),
  5727. 'stock_id' => array(
  5728. // 'description' => 'TODO: please describe this field!',
  5729. 'type' => 'int',
  5730. 'not null' => '1',
  5731. ),
  5732. 'genotype_id' => array(
  5733. // 'description' => 'TODO: please describe this field!',
  5734. 'type' => 'int',
  5735. 'not null' => '1',
  5736. ),
  5737. ),
  5738. 'primary key' => array(
  5739. '0' => 'stock_genotype_id',
  5740. ),
  5741. 'unique keys' => array(
  5742. 'stock_genotype_c1' => array(
  5743. '0' => 'stock_id',
  5744. '1' => 'genotype_id',
  5745. ),
  5746. ),
  5747. 'indexes' => array(
  5748. 'stock_genotype_idx1' => array(
  5749. '0' => 'stock_id',
  5750. ),
  5751. 'stock_genotype_idx2' => array(
  5752. '0' => 'genotype_id',
  5753. ),
  5754. ),
  5755. 'foreign keys' => array(
  5756. ),
  5757. );
  5758. return $description;
  5759. }
  5760. /**
  5761. * Implements hook_stock_dbxref_schema()
  5762. * Purpose: To describe the structure of stock_dbxref 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_api
  5771. *
  5772. * @ingroup tripal_core
  5773. */
  5774. function tripal_core_chado_stock_dbxref_schema () {
  5775. $description = array();
  5776. $description = array(
  5777. 'table' => 'stock_dbxref',
  5778. // 'description' => 'TODO: please describe this table!',
  5779. 'fields' => array(
  5780. 'stock_dbxref_id' => array(
  5781. // 'description' => 'TODO: please describe this field!',
  5782. 'type' => 'serial',
  5783. 'not null' => '1',
  5784. ),
  5785. 'stock_id' => array(
  5786. // 'description' => 'TODO: please describe this field!',
  5787. 'type' => 'int',
  5788. 'not null' => '1',
  5789. ),
  5790. 'dbxref_id' => array(
  5791. // 'description' => 'TODO: please describe this field!',
  5792. 'type' => 'int',
  5793. 'not null' => '1',
  5794. ),
  5795. 'is_current' => array(
  5796. // 'description' => 'TODO: please describe this field!',
  5797. 'type' => 'boolean',
  5798. 'not null' => '1',
  5799. 'default' => 'ru',
  5800. ),
  5801. ),
  5802. 'primary key' => array(
  5803. '0' => 'stock_dbxref_id',
  5804. ),
  5805. 'unique keys' => array(
  5806. 'stock_dbxref_c1' => array(
  5807. '0' => 'stock_id',
  5808. '1' => 'dbxref_id',
  5809. ),
  5810. ),
  5811. 'indexes' => array(
  5812. 'stock_dbxref_idx1' => array(
  5813. '0' => 'stock_id',
  5814. ),
  5815. 'stock_dbxref_idx2' => array(
  5816. '0' => 'dbxref_id',
  5817. ),
  5818. ),
  5819. 'foreign keys' => array(
  5820. ),
  5821. );
  5822. return $description;
  5823. }
  5824. /**
  5825. * Implements hook_quantificationprop_schema()
  5826. * Purpose: To describe the structure of quantificationprop to tripal
  5827. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5828. * @see tripal_core.api.inc: tripal_core_chado_update()
  5829. * @see tripal_core.api.inc: tripal_core_chado_select()
  5830. *
  5831. * @return
  5832. * An array describing the current table
  5833. *
  5834. * @ingroup tripal_api
  5835. *
  5836. * @ingroup tripal_core
  5837. */
  5838. function tripal_core_chado_quantificationprop_schema () {
  5839. $description = array();
  5840. $description = array(
  5841. 'table' => 'quantificationprop',
  5842. // 'description' => 'TODO: please describe this table!',
  5843. 'fields' => array(
  5844. 'quantificationprop_id' => array(
  5845. // 'description' => 'TODO: please describe this field!',
  5846. 'type' => 'serial',
  5847. 'not null' => '1',
  5848. ),
  5849. 'quantification_id' => array(
  5850. // 'description' => 'TODO: please describe this field!',
  5851. 'type' => 'int',
  5852. 'not null' => '1',
  5853. ),
  5854. 'type_id' => array(
  5855. // 'description' => 'TODO: please describe this field!',
  5856. 'type' => 'int',
  5857. 'not null' => '1',
  5858. ),
  5859. 'value' => array(
  5860. // 'description' => 'TODO: please describe this field!',
  5861. 'type' => 'text',
  5862. 'not null' => '',
  5863. ),
  5864. 'rank' => array(
  5865. // 'description' => 'TODO: please describe this field!',
  5866. 'type' => 'int',
  5867. 'not null' => '1',
  5868. 'default' => '0',
  5869. ),
  5870. ),
  5871. 'primary key' => array(
  5872. '0' => 'quantificationprop_id',
  5873. ),
  5874. 'unique keys' => array(
  5875. 'quantificationprop_c1' => array(
  5876. '0' => 'quantification_id',
  5877. '1' => 'type_id',
  5878. '2' => 'rank',
  5879. ),
  5880. ),
  5881. 'indexes' => array(
  5882. 'quantificationprop_idx1' => array(
  5883. '0' => 'quantification_id',
  5884. ),
  5885. 'quantificationprop_idx2' => array(
  5886. '0' => 'type_id',
  5887. ),
  5888. ),
  5889. 'foreign keys' => array(
  5890. ),
  5891. );
  5892. return $description;
  5893. }
  5894. /**
  5895. * Implements hook_stats_paths_to_root_schema()
  5896. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5897. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5898. * @see tripal_core.api.inc: tripal_core_chado_update()
  5899. * @see tripal_core.api.inc: tripal_core_chado_select()
  5900. *
  5901. * @return
  5902. * An array describing the current table
  5903. *
  5904. * @ingroup tripal_api
  5905. *
  5906. * @ingroup tripal_core
  5907. */
  5908. function tripal_core_chado_stats_paths_to_root_schema () {
  5909. $description = array();
  5910. $description = array(
  5911. 'table' => 'stats_paths_to_root',
  5912. // 'description' => 'TODO: please describe this table!',
  5913. 'fields' => array(
  5914. 'cvterm_id' => array(
  5915. // 'description' => 'TODO: please describe this field!',
  5916. 'type' => 'int',
  5917. 'not null' => '',
  5918. ),
  5919. 'total_paths' => array(
  5920. // 'description' => 'TODO: please describe this field!',
  5921. 'type' => 'int',
  5922. 'size' => 'big',
  5923. 'not null' => '',
  5924. ),
  5925. 'avg_distance' => array(
  5926. // 'description' => 'TODO: please describe this field!',
  5927. 'type' => 'numeric',
  5928. 'not null' => '',
  5929. 'precision' => '0',
  5930. 'scale' => '0',
  5931. ),
  5932. 'min_distance' => array(
  5933. // 'description' => 'TODO: please describe this field!',
  5934. 'type' => 'int',
  5935. 'not null' => '',
  5936. ),
  5937. 'max_distance' => array(
  5938. // 'description' => 'TODO: please describe this field!',
  5939. 'type' => 'int',
  5940. 'not null' => '',
  5941. ),
  5942. ),
  5943. 'primary key' => array(
  5944. ),
  5945. 'unique keys' => array(
  5946. ),
  5947. 'indexes' => array(
  5948. ),
  5949. 'foreign keys' => array(
  5950. ),
  5951. );
  5952. return $description;
  5953. }
  5954. /**
  5955. * Implements hook_stock_schema()
  5956. * Purpose: To describe the structure of stock to tripal
  5957. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5958. * @see tripal_core.api.inc: tripal_core_chado_update()
  5959. * @see tripal_core.api.inc: tripal_core_chado_select()
  5960. *
  5961. * @return
  5962. * An array describing the current table
  5963. *
  5964. * @ingroup tripal_api
  5965. *
  5966. * @ingroup tripal_core
  5967. */
  5968. function tripal_core_chado_stock_schema () {
  5969. $description = array();
  5970. $description = array(
  5971. 'table' => 'stock',
  5972. // 'description' => 'TODO: please describe this table!',
  5973. 'fields' => array(
  5974. 'stock_id' => array(
  5975. // 'description' => 'TODO: please describe this field!',
  5976. 'type' => 'serial',
  5977. 'not null' => '1',
  5978. ),
  5979. 'dbxref_id' => array(
  5980. // 'description' => 'TODO: please describe this field!',
  5981. 'type' => 'int',
  5982. 'not null' => '',
  5983. ),
  5984. 'organism_id' => array(
  5985. // 'description' => 'TODO: please describe this field!',
  5986. 'type' => 'int',
  5987. 'not null' => '1',
  5988. ),
  5989. 'name' => array(
  5990. // 'description' => 'TODO: please describe this field!',
  5991. 'type' => 'varchar',
  5992. 'length' => '255',
  5993. 'not null' => '',
  5994. ),
  5995. 'uniquename' => array(
  5996. // 'description' => 'TODO: please describe this field!',
  5997. 'type' => 'text',
  5998. 'not null' => '1',
  5999. ),
  6000. 'description' => array(
  6001. // 'description' => 'TODO: please describe this field!',
  6002. 'type' => 'text',
  6003. 'not null' => '',
  6004. ),
  6005. 'type_id' => array(
  6006. // 'description' => 'TODO: please describe this field!',
  6007. 'type' => 'int',
  6008. 'not null' => '1',
  6009. ),
  6010. 'is_obsolete' => array(
  6011. // 'description' => 'TODO: please describe this field!',
  6012. 'type' => 'boolean',
  6013. 'not null' => '1',
  6014. 'default' => 'als',
  6015. ),
  6016. ),
  6017. 'primary key' => array(
  6018. '0' => 'stock_id',
  6019. ),
  6020. 'unique keys' => array(
  6021. 'stock_c1' => array(
  6022. '0' => 'organism_id',
  6023. '1' => 'uniquename',
  6024. '2' => 'type_id',
  6025. ),
  6026. ),
  6027. 'indexes' => array(
  6028. 'stock_idx1' => array(
  6029. '0' => 'dbxref_id',
  6030. ),
  6031. 'stock_idx2' => array(
  6032. '0' => 'organism_id',
  6033. ),
  6034. 'stock_idx3' => array(
  6035. '0' => 'type_id',
  6036. ),
  6037. 'stock_idx4' => array(
  6038. '0' => 'uniquename',
  6039. ),
  6040. 'stock_name_ind1' => array(
  6041. '0' => 'name',
  6042. ),
  6043. ),
  6044. 'foreign keys' => array(
  6045. ),
  6046. );
  6047. return $description;
  6048. }
  6049. /**
  6050. * Implements hook_stock_cvterm_schema()
  6051. * Purpose: To describe the structure of stock_cvterm to tripal
  6052. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6053. * @see tripal_core.api.inc: tripal_core_chado_update()
  6054. * @see tripal_core.api.inc: tripal_core_chado_select()
  6055. *
  6056. * @return
  6057. * An array describing the current table
  6058. *
  6059. * @ingroup tripal_api
  6060. *
  6061. * @ingroup tripal_core
  6062. */
  6063. function tripal_core_chado_stock_cvterm_schema () {
  6064. $description = array();
  6065. $description = array(
  6066. 'table' => 'stock_cvterm',
  6067. // 'description' => 'TODO: please describe this table!',
  6068. 'fields' => array(
  6069. 'stock_cvterm_id' => array(
  6070. // 'description' => 'TODO: please describe this field!',
  6071. 'type' => 'serial',
  6072. 'not null' => '1',
  6073. ),
  6074. 'stock_id' => array(
  6075. // 'description' => 'TODO: please describe this field!',
  6076. 'type' => 'int',
  6077. 'not null' => '1',
  6078. ),
  6079. 'cvterm_id' => array(
  6080. // 'description' => 'TODO: please describe this field!',
  6081. 'type' => 'int',
  6082. 'not null' => '1',
  6083. ),
  6084. 'pub_id' => array(
  6085. // 'description' => 'TODO: please describe this field!',
  6086. 'type' => 'int',
  6087. 'not null' => '1',
  6088. ),
  6089. ),
  6090. 'primary key' => array(
  6091. '0' => 'stock_cvterm_id',
  6092. ),
  6093. 'unique keys' => array(
  6094. 'stock_cvterm_c1' => array(
  6095. '0' => 'stock_id',
  6096. '1' => 'cvterm_id',
  6097. '2' => 'pub_id',
  6098. ),
  6099. ),
  6100. 'indexes' => array(
  6101. 'stock_cvterm_idx1' => array(
  6102. '0' => 'stock_id',
  6103. ),
  6104. 'stock_cvterm_idx2' => array(
  6105. '0' => 'cvterm_id',
  6106. ),
  6107. 'stock_cvterm_idx3' => array(
  6108. '0' => 'pub_id',
  6109. ),
  6110. ),
  6111. 'foreign keys' => array(
  6112. ),
  6113. );
  6114. return $description;
  6115. }
  6116. /**
  6117. * Implements hook_feature_synonym_schema()
  6118. * Purpose: To describe the structure of feature_synonym to tripal
  6119. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6120. * @see tripal_core.api.inc: tripal_core_chado_update()
  6121. * @see tripal_core.api.inc: tripal_core_chado_select()
  6122. *
  6123. * @return
  6124. * An array describing the current table
  6125. *
  6126. * @ingroup tripal_api
  6127. *
  6128. * @ingroup tripal_core
  6129. */
  6130. function tripal_core_chado_feature_synonym_schema () {
  6131. $description = array();
  6132. $description = array(
  6133. 'table' => 'feature_synonym',
  6134. // 'description' => 'TODO: please describe this table!',
  6135. 'fields' => array(
  6136. 'feature_synonym_id' => array(
  6137. // 'description' => 'TODO: please describe this field!',
  6138. 'type' => 'serial',
  6139. 'not null' => '1',
  6140. ),
  6141. 'synonym_id' => array(
  6142. // 'description' => 'TODO: please describe this field!',
  6143. 'type' => 'int',
  6144. 'not null' => '1',
  6145. ),
  6146. 'feature_id' => array(
  6147. // 'description' => 'TODO: please describe this field!',
  6148. 'type' => 'int',
  6149. 'not null' => '1',
  6150. ),
  6151. 'pub_id' => array(
  6152. // 'description' => 'TODO: please describe this field!',
  6153. 'type' => 'int',
  6154. 'not null' => '1',
  6155. ),
  6156. 'is_current' => array(
  6157. // 'description' => 'TODO: please describe this field!',
  6158. 'type' => 'boolean',
  6159. 'not null' => '1',
  6160. 'default' => 'als',
  6161. ),
  6162. 'is_internal' => array(
  6163. // 'description' => 'TODO: please describe this field!',
  6164. 'type' => 'boolean',
  6165. 'not null' => '1',
  6166. 'default' => 'als',
  6167. ),
  6168. ),
  6169. 'primary key' => array(
  6170. '0' => 'feature_synonym_id',
  6171. ),
  6172. 'unique keys' => array(
  6173. 'feature_synonym_c1' => array(
  6174. '0' => 'synonym_id',
  6175. '1' => 'feature_id',
  6176. '2' => 'pub_id',
  6177. ),
  6178. ),
  6179. 'indexes' => array(
  6180. 'feature_synonym_idx1' => array(
  6181. '0' => 'synonym_id',
  6182. ),
  6183. 'feature_synonym_idx2' => array(
  6184. '0' => 'feature_id',
  6185. ),
  6186. 'feature_synonym_idx3' => array(
  6187. '0' => 'pub_id',
  6188. ),
  6189. ),
  6190. 'foreign keys' => array(
  6191. ),
  6192. );
  6193. return $description;
  6194. }
  6195. /**
  6196. * Implements hook_feature_relationshipprop_pub_schema()
  6197. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6198. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6199. * @see tripal_core.api.inc: tripal_core_chado_update()
  6200. * @see tripal_core.api.inc: tripal_core_chado_select()
  6201. *
  6202. * @return
  6203. * An array describing the current table
  6204. *
  6205. * @ingroup tripal_api
  6206. *
  6207. * @ingroup tripal_core
  6208. */
  6209. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6210. $description = array();
  6211. $description = array(
  6212. 'table' => 'feature_relationshipprop_pub',
  6213. // 'description' => 'TODO: please describe this table!',
  6214. 'fields' => array(
  6215. 'feature_relationshipprop_pub_id' => array(
  6216. // 'description' => 'TODO: please describe this field!',
  6217. 'type' => 'serial',
  6218. 'not null' => '1',
  6219. ),
  6220. 'feature_relationshipprop_id' => array(
  6221. // 'description' => 'TODO: please describe this field!',
  6222. 'type' => 'int',
  6223. 'not null' => '1',
  6224. ),
  6225. 'pub_id' => array(
  6226. // 'description' => 'TODO: please describe this field!',
  6227. 'type' => 'int',
  6228. 'not null' => '1',
  6229. ),
  6230. ),
  6231. 'primary key' => array(
  6232. '0' => 'feature_relationshipprop_pub_id',
  6233. ),
  6234. 'unique keys' => array(
  6235. 'feature_relationshipprop_pub_c1' => array(
  6236. '0' => 'feature_relationshipprop_id',
  6237. '1' => 'pub_id',
  6238. ),
  6239. ),
  6240. 'indexes' => array(
  6241. 'feature_relationshipprop_pub_idx1' => array(
  6242. '0' => 'feature_relationshipprop_id',
  6243. ),
  6244. 'feature_relationshipprop_pub_idx2' => array(
  6245. '0' => 'pub_id',
  6246. ),
  6247. ),
  6248. 'foreign keys' => array(
  6249. ),
  6250. );
  6251. return $description;
  6252. }
  6253. /**
  6254. * Implements hook_cell_line_relationship_schema()
  6255. * Purpose: To describe the structure of cell_line_relationship to tripal
  6256. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6257. * @see tripal_core.api.inc: tripal_core_chado_update()
  6258. * @see tripal_core.api.inc: tripal_core_chado_select()
  6259. *
  6260. * @return
  6261. * An array describing the current table
  6262. *
  6263. * @ingroup tripal_api
  6264. *
  6265. * @ingroup tripal_core
  6266. */
  6267. function tripal_core_chado_cell_line_relationship_schema () {
  6268. $description = array();
  6269. $description = array(
  6270. 'table' => 'cell_line_relationship',
  6271. // 'description' => 'TODO: please describe this table!',
  6272. 'fields' => array(
  6273. 'cell_line_relationship_id' => array(
  6274. // 'description' => 'TODO: please describe this field!',
  6275. 'type' => 'serial',
  6276. 'not null' => '1',
  6277. ),
  6278. 'subject_id' => array(
  6279. // 'description' => 'TODO: please describe this field!',
  6280. 'type' => 'int',
  6281. 'not null' => '1',
  6282. ),
  6283. 'object_id' => array(
  6284. // 'description' => 'TODO: please describe this field!',
  6285. 'type' => 'int',
  6286. 'not null' => '1',
  6287. ),
  6288. 'type_id' => array(
  6289. // 'description' => 'TODO: please describe this field!',
  6290. 'type' => 'int',
  6291. 'not null' => '1',
  6292. ),
  6293. ),
  6294. 'primary key' => array(
  6295. '0' => 'cell_line_relationship_id',
  6296. ),
  6297. 'unique keys' => array(
  6298. 'cell_line_relationship_c1' => array(
  6299. '0' => 'subject_id',
  6300. '1' => 'object_id',
  6301. '2' => 'type_id',
  6302. ),
  6303. ),
  6304. 'indexes' => array(
  6305. ),
  6306. 'foreign keys' => array(
  6307. ),
  6308. );
  6309. return $description;
  6310. }
  6311. /**
  6312. * Implements hook_cell_line_pub_schema()
  6313. * Purpose: To describe the structure of cell_line_pub to tripal
  6314. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6315. * @see tripal_core.api.inc: tripal_core_chado_update()
  6316. * @see tripal_core.api.inc: tripal_core_chado_select()
  6317. *
  6318. * @return
  6319. * An array describing the current table
  6320. *
  6321. * @ingroup tripal_api
  6322. *
  6323. * @ingroup tripal_core
  6324. */
  6325. function tripal_core_chado_cell_line_pub_schema () {
  6326. $description = array();
  6327. $description = array(
  6328. 'table' => 'cell_line_pub',
  6329. // 'description' => 'TODO: please describe this table!',
  6330. 'fields' => array(
  6331. 'cell_line_pub_id' => array(
  6332. // 'description' => 'TODO: please describe this field!',
  6333. 'type' => 'serial',
  6334. 'not null' => '1',
  6335. ),
  6336. 'cell_line_id' => array(
  6337. // 'description' => 'TODO: please describe this field!',
  6338. 'type' => 'int',
  6339. 'not null' => '1',
  6340. ),
  6341. 'pub_id' => array(
  6342. // 'description' => 'TODO: please describe this field!',
  6343. 'type' => 'int',
  6344. 'not null' => '1',
  6345. ),
  6346. ),
  6347. 'primary key' => array(
  6348. '0' => 'cell_line_pub_id',
  6349. ),
  6350. 'unique keys' => array(
  6351. 'cell_line_pub_c1' => array(
  6352. '0' => 'cell_line_id',
  6353. '1' => 'pub_id',
  6354. ),
  6355. ),
  6356. 'indexes' => array(
  6357. ),
  6358. 'foreign keys' => array(
  6359. ),
  6360. );
  6361. return $description;
  6362. }
  6363. /**
  6364. * Implements hook_cell_line_synonym_schema()
  6365. * Purpose: To describe the structure of cell_line_synonym to tripal
  6366. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6367. * @see tripal_core.api.inc: tripal_core_chado_update()
  6368. * @see tripal_core.api.inc: tripal_core_chado_select()
  6369. *
  6370. * @return
  6371. * An array describing the current table
  6372. *
  6373. * @ingroup tripal_api
  6374. *
  6375. * @ingroup tripal_core
  6376. */
  6377. function tripal_core_chado_cell_line_synonym_schema () {
  6378. $description = array();
  6379. $description = array(
  6380. 'table' => 'cell_line_synonym',
  6381. // 'description' => 'TODO: please describe this table!',
  6382. 'fields' => array(
  6383. 'cell_line_synonym_id' => array(
  6384. // 'description' => 'TODO: please describe this field!',
  6385. 'type' => 'serial',
  6386. 'not null' => '1',
  6387. ),
  6388. 'cell_line_id' => array(
  6389. // 'description' => 'TODO: please describe this field!',
  6390. 'type' => 'int',
  6391. 'not null' => '1',
  6392. ),
  6393. 'synonym_id' => array(
  6394. // 'description' => 'TODO: please describe this field!',
  6395. 'type' => 'int',
  6396. 'not null' => '1',
  6397. ),
  6398. 'pub_id' => array(
  6399. // 'description' => 'TODO: please describe this field!',
  6400. 'type' => 'int',
  6401. 'not null' => '1',
  6402. ),
  6403. 'is_current' => array(
  6404. // 'description' => 'TODO: please describe this field!',
  6405. 'type' => 'boolean',
  6406. 'not null' => '1',
  6407. 'default' => 'als',
  6408. ),
  6409. 'is_internal' => array(
  6410. // 'description' => 'TODO: please describe this field!',
  6411. 'type' => 'boolean',
  6412. 'not null' => '1',
  6413. 'default' => 'als',
  6414. ),
  6415. ),
  6416. 'primary key' => array(
  6417. '0' => 'cell_line_synonym_id',
  6418. ),
  6419. 'unique keys' => array(
  6420. 'cell_line_synonym_c1' => array(
  6421. '0' => 'synonym_id',
  6422. '1' => 'cell_line_id',
  6423. '2' => 'pub_id',
  6424. ),
  6425. ),
  6426. 'indexes' => array(
  6427. ),
  6428. 'foreign keys' => array(
  6429. ),
  6430. );
  6431. return $description;
  6432. }
  6433. /**
  6434. * Implements hook_cell_lineprop_schema()
  6435. * Purpose: To describe the structure of cell_lineprop to tripal
  6436. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6437. * @see tripal_core.api.inc: tripal_core_chado_update()
  6438. * @see tripal_core.api.inc: tripal_core_chado_select()
  6439. *
  6440. * @return
  6441. * An array describing the current table
  6442. *
  6443. * @ingroup tripal_api
  6444. *
  6445. * @ingroup tripal_core
  6446. */
  6447. function tripal_core_chado_cell_lineprop_schema () {
  6448. $description = array();
  6449. $description = array(
  6450. 'table' => 'cell_lineprop',
  6451. // 'description' => 'TODO: please describe this table!',
  6452. 'fields' => array(
  6453. 'cell_lineprop_id' => array(
  6454. // 'description' => 'TODO: please describe this field!',
  6455. 'type' => 'serial',
  6456. 'not null' => '1',
  6457. ),
  6458. 'cell_line_id' => array(
  6459. // 'description' => 'TODO: please describe this field!',
  6460. 'type' => 'int',
  6461. 'not null' => '1',
  6462. ),
  6463. 'type_id' => array(
  6464. // 'description' => 'TODO: please describe this field!',
  6465. 'type' => 'int',
  6466. 'not null' => '1',
  6467. ),
  6468. 'value' => array(
  6469. // 'description' => 'TODO: please describe this field!',
  6470. 'type' => 'text',
  6471. 'not null' => '',
  6472. ),
  6473. 'rank' => array(
  6474. // 'description' => 'TODO: please describe this field!',
  6475. 'type' => 'int',
  6476. 'not null' => '1',
  6477. 'default' => '0',
  6478. ),
  6479. ),
  6480. 'primary key' => array(
  6481. '0' => 'cell_lineprop_id',
  6482. ),
  6483. 'unique keys' => array(
  6484. 'cell_lineprop_c1' => array(
  6485. '0' => 'cell_line_id',
  6486. '1' => 'type_id',
  6487. '2' => 'rank',
  6488. ),
  6489. ),
  6490. 'indexes' => array(
  6491. ),
  6492. 'foreign keys' => array(
  6493. ),
  6494. );
  6495. return $description;
  6496. }
  6497. /**
  6498. * Implements hook_cell_lineprop_pub_schema()
  6499. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6500. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6501. * @see tripal_core.api.inc: tripal_core_chado_update()
  6502. * @see tripal_core.api.inc: tripal_core_chado_select()
  6503. *
  6504. * @return
  6505. * An array describing the current table
  6506. *
  6507. * @ingroup tripal_api
  6508. *
  6509. * @ingroup tripal_core
  6510. */
  6511. function tripal_core_chado_cell_lineprop_pub_schema () {
  6512. $description = array();
  6513. $description = array(
  6514. 'table' => 'cell_lineprop_pub',
  6515. // 'description' => 'TODO: please describe this table!',
  6516. 'fields' => array(
  6517. 'cell_lineprop_pub_id' => array(
  6518. // 'description' => 'TODO: please describe this field!',
  6519. 'type' => 'serial',
  6520. 'not null' => '1',
  6521. ),
  6522. 'cell_lineprop_id' => array(
  6523. // 'description' => 'TODO: please describe this field!',
  6524. 'type' => 'int',
  6525. 'not null' => '1',
  6526. ),
  6527. 'pub_id' => array(
  6528. // 'description' => 'TODO: please describe this field!',
  6529. 'type' => 'int',
  6530. 'not null' => '1',
  6531. ),
  6532. ),
  6533. 'primary key' => array(
  6534. '0' => 'cell_lineprop_pub_id',
  6535. ),
  6536. 'unique keys' => array(
  6537. 'cell_lineprop_pub_c1' => array(
  6538. '0' => 'cell_lineprop_id',
  6539. '1' => 'pub_id',
  6540. ),
  6541. ),
  6542. 'indexes' => array(
  6543. ),
  6544. 'foreign keys' => array(
  6545. ),
  6546. );
  6547. return $description;
  6548. }
  6549. /**
  6550. * Implements hook_cell_line_library_schema()
  6551. * Purpose: To describe the structure of cell_line_library to tripal
  6552. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6553. * @see tripal_core.api.inc: tripal_core_chado_update()
  6554. * @see tripal_core.api.inc: tripal_core_chado_select()
  6555. *
  6556. * @return
  6557. * An array describing the current table
  6558. *
  6559. * @ingroup tripal_api
  6560. *
  6561. * @ingroup tripal_core
  6562. */
  6563. function tripal_core_chado_cell_line_library_schema () {
  6564. $description = array();
  6565. $description = array(
  6566. 'table' => 'cell_line_library',
  6567. // 'description' => 'TODO: please describe this table!',
  6568. 'fields' => array(
  6569. 'cell_line_library_id' => array(
  6570. // 'description' => 'TODO: please describe this field!',
  6571. 'type' => 'serial',
  6572. 'not null' => '1',
  6573. ),
  6574. 'cell_line_id' => array(
  6575. // 'description' => 'TODO: please describe this field!',
  6576. 'type' => 'int',
  6577. 'not null' => '1',
  6578. ),
  6579. 'library_id' => array(
  6580. // 'description' => 'TODO: please describe this field!',
  6581. 'type' => 'int',
  6582. 'not null' => '1',
  6583. ),
  6584. 'pub_id' => array(
  6585. // 'description' => 'TODO: please describe this field!',
  6586. 'type' => 'int',
  6587. 'not null' => '1',
  6588. ),
  6589. ),
  6590. 'primary key' => array(
  6591. '0' => 'cell_line_library_id',
  6592. ),
  6593. 'unique keys' => array(
  6594. 'cell_line_library_c1' => array(
  6595. '0' => 'cell_line_id',
  6596. '1' => 'library_id',
  6597. '2' => 'pub_id',
  6598. ),
  6599. ),
  6600. 'indexes' => array(
  6601. ),
  6602. 'foreign keys' => array(
  6603. ),
  6604. );
  6605. return $description;
  6606. }
  6607. /**
  6608. * Implements hook_cell_line_feature_schema()
  6609. * Purpose: To describe the structure of cell_line_feature to tripal
  6610. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6611. * @see tripal_core.api.inc: tripal_core_chado_update()
  6612. * @see tripal_core.api.inc: tripal_core_chado_select()
  6613. *
  6614. * @return
  6615. * An array describing the current table
  6616. *
  6617. * @ingroup tripal_api
  6618. *
  6619. * @ingroup tripal_core
  6620. */
  6621. function tripal_core_chado_cell_line_feature_schema () {
  6622. $description = array();
  6623. $description = array(
  6624. 'table' => 'cell_line_feature',
  6625. // 'description' => 'TODO: please describe this table!',
  6626. 'fields' => array(
  6627. 'cell_line_feature_id' => array(
  6628. // 'description' => 'TODO: please describe this field!',
  6629. 'type' => 'serial',
  6630. 'not null' => '1',
  6631. ),
  6632. 'cell_line_id' => array(
  6633. // 'description' => 'TODO: please describe this field!',
  6634. 'type' => 'int',
  6635. 'not null' => '1',
  6636. ),
  6637. 'feature_id' => array(
  6638. // 'description' => 'TODO: please describe this field!',
  6639. 'type' => 'int',
  6640. 'not null' => '1',
  6641. ),
  6642. 'pub_id' => array(
  6643. // 'description' => 'TODO: please describe this field!',
  6644. 'type' => 'int',
  6645. 'not null' => '1',
  6646. ),
  6647. ),
  6648. 'primary key' => array(
  6649. '0' => 'cell_line_feature_id',
  6650. ),
  6651. 'unique keys' => array(
  6652. 'cell_line_feature_c1' => array(
  6653. '0' => 'cell_line_id',
  6654. '1' => 'feature_id',
  6655. '2' => 'pub_id',
  6656. ),
  6657. ),
  6658. 'indexes' => array(
  6659. ),
  6660. 'foreign keys' => array(
  6661. ),
  6662. );
  6663. return $description;
  6664. }
  6665. /**
  6666. * Implements hook_cell_line_schema()
  6667. * Purpose: To describe the structure of cell_line to tripal
  6668. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6669. * @see tripal_core.api.inc: tripal_core_chado_update()
  6670. * @see tripal_core.api.inc: tripal_core_chado_select()
  6671. *
  6672. * @return
  6673. * An array describing the current table
  6674. *
  6675. * @ingroup tripal_api
  6676. *
  6677. * @ingroup tripal_core
  6678. */
  6679. function tripal_core_chado_cell_line_schema () {
  6680. $description = array();
  6681. $description = array(
  6682. 'table' => 'cell_line',
  6683. // 'description' => 'TODO: please describe this table!',
  6684. 'fields' => array(
  6685. 'cell_line_id' => array(
  6686. // 'description' => 'TODO: please describe this field!',
  6687. 'type' => 'serial',
  6688. 'not null' => '1',
  6689. ),
  6690. 'name' => array(
  6691. // 'description' => 'TODO: please describe this field!',
  6692. 'type' => 'varchar',
  6693. 'length' => '255',
  6694. 'not null' => '',
  6695. ),
  6696. 'uniquename' => array(
  6697. // 'description' => 'TODO: please describe this field!',
  6698. 'type' => 'varchar',
  6699. 'length' => '255',
  6700. 'not null' => '1',
  6701. ),
  6702. 'organism_id' => array(
  6703. // 'description' => 'TODO: please describe this field!',
  6704. 'type' => 'int',
  6705. 'not null' => '1',
  6706. ),
  6707. 'timeaccessioned' => array(
  6708. // 'description' => 'TODO: please describe this field!',
  6709. 'type' => 'datetime',
  6710. 'not null' => '1',
  6711. 'default' => 'ow(',
  6712. ),
  6713. 'timelastmodified' => array(
  6714. // 'description' => 'TODO: please describe this field!',
  6715. 'type' => 'datetime',
  6716. 'not null' => '1',
  6717. 'default' => 'ow(',
  6718. ),
  6719. ),
  6720. 'primary key' => array(
  6721. '0' => 'cell_line_id',
  6722. ),
  6723. 'unique keys' => array(
  6724. 'cell_line_c1' => array(
  6725. '0' => 'uniquename',
  6726. '1' => 'organism_id',
  6727. ),
  6728. ),
  6729. 'indexes' => array(
  6730. ),
  6731. 'foreign keys' => array(
  6732. ),
  6733. );
  6734. return $description;
  6735. }
  6736. /**
  6737. * Implements hook_cell_line_cvterm_schema()
  6738. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6739. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6740. * @see tripal_core.api.inc: tripal_core_chado_update()
  6741. * @see tripal_core.api.inc: tripal_core_chado_select()
  6742. *
  6743. * @return
  6744. * An array describing the current table
  6745. *
  6746. * @ingroup tripal_api
  6747. *
  6748. * @ingroup tripal_core
  6749. */
  6750. function tripal_core_chado_cell_line_cvterm_schema () {
  6751. $description = array();
  6752. $description = array(
  6753. 'table' => 'cell_line_cvterm',
  6754. // 'description' => 'TODO: please describe this table!',
  6755. 'fields' => array(
  6756. 'cell_line_cvterm_id' => array(
  6757. // 'description' => 'TODO: please describe this field!',
  6758. 'type' => 'serial',
  6759. 'not null' => '1',
  6760. ),
  6761. 'cell_line_id' => array(
  6762. // 'description' => 'TODO: please describe this field!',
  6763. 'type' => 'int',
  6764. 'not null' => '1',
  6765. ),
  6766. 'cvterm_id' => array(
  6767. // 'description' => 'TODO: please describe this field!',
  6768. 'type' => 'int',
  6769. 'not null' => '1',
  6770. ),
  6771. 'pub_id' => array(
  6772. // 'description' => 'TODO: please describe this field!',
  6773. 'type' => 'int',
  6774. 'not null' => '1',
  6775. ),
  6776. 'rank' => array(
  6777. // 'description' => 'TODO: please describe this field!',
  6778. 'type' => 'int',
  6779. 'not null' => '1',
  6780. 'default' => '0',
  6781. ),
  6782. ),
  6783. 'primary key' => array(
  6784. '0' => 'cell_line_cvterm_id',
  6785. ),
  6786. 'unique keys' => array(
  6787. 'cell_line_cvterm_c1' => array(
  6788. '0' => 'cell_line_id',
  6789. '1' => 'cvterm_id',
  6790. '2' => 'pub_id',
  6791. '3' => 'rank',
  6792. ),
  6793. ),
  6794. 'indexes' => array(
  6795. ),
  6796. 'foreign keys' => array(
  6797. ),
  6798. );
  6799. return $description;
  6800. }
  6801. /**
  6802. * Implements hook_cell_line_cvtermprop_schema()
  6803. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6804. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6805. * @see tripal_core.api.inc: tripal_core_chado_update()
  6806. * @see tripal_core.api.inc: tripal_core_chado_select()
  6807. *
  6808. * @return
  6809. * An array describing the current table
  6810. *
  6811. * @ingroup tripal_api
  6812. *
  6813. * @ingroup tripal_core
  6814. */
  6815. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6816. $description = array();
  6817. $description = array(
  6818. 'table' => 'cell_line_cvtermprop',
  6819. // 'description' => 'TODO: please describe this table!',
  6820. 'fields' => array(
  6821. 'cell_line_cvtermprop_id' => array(
  6822. // 'description' => 'TODO: please describe this field!',
  6823. 'type' => 'serial',
  6824. 'not null' => '1',
  6825. ),
  6826. 'cell_line_cvterm_id' => array(
  6827. // 'description' => 'TODO: please describe this field!',
  6828. 'type' => 'int',
  6829. 'not null' => '1',
  6830. ),
  6831. 'type_id' => array(
  6832. // 'description' => 'TODO: please describe this field!',
  6833. 'type' => 'int',
  6834. 'not null' => '1',
  6835. ),
  6836. 'value' => array(
  6837. // 'description' => 'TODO: please describe this field!',
  6838. 'type' => 'text',
  6839. 'not null' => '',
  6840. ),
  6841. 'rank' => array(
  6842. // 'description' => 'TODO: please describe this field!',
  6843. 'type' => 'int',
  6844. 'not null' => '1',
  6845. 'default' => '0',
  6846. ),
  6847. ),
  6848. 'primary key' => array(
  6849. '0' => 'cell_line_cvtermprop_id',
  6850. ),
  6851. 'unique keys' => array(
  6852. 'cell_line_cvtermprop_c1' => array(
  6853. '0' => 'cell_line_cvterm_id',
  6854. '1' => 'type_id',
  6855. '2' => 'rank',
  6856. ),
  6857. ),
  6858. 'indexes' => array(
  6859. ),
  6860. 'foreign keys' => array(
  6861. ),
  6862. );
  6863. return $description;
  6864. }
  6865. /**
  6866. * Implements hook_cell_line_dbxref_schema()
  6867. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6868. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6869. * @see tripal_core.api.inc: tripal_core_chado_update()
  6870. * @see tripal_core.api.inc: tripal_core_chado_select()
  6871. *
  6872. * @return
  6873. * An array describing the current table
  6874. *
  6875. * @ingroup tripal_api
  6876. *
  6877. * @ingroup tripal_core
  6878. */
  6879. function tripal_core_chado_cell_line_dbxref_schema () {
  6880. $description = array();
  6881. $description = array(
  6882. 'table' => 'cell_line_dbxref',
  6883. // 'description' => 'TODO: please describe this table!',
  6884. 'fields' => array(
  6885. 'cell_line_dbxref_id' => array(
  6886. // 'description' => 'TODO: please describe this field!',
  6887. 'type' => 'serial',
  6888. 'not null' => '1',
  6889. ),
  6890. 'cell_line_id' => array(
  6891. // 'description' => 'TODO: please describe this field!',
  6892. 'type' => 'int',
  6893. 'not null' => '1',
  6894. ),
  6895. 'dbxref_id' => array(
  6896. // 'description' => 'TODO: please describe this field!',
  6897. 'type' => 'int',
  6898. 'not null' => '1',
  6899. ),
  6900. 'is_current' => array(
  6901. // 'description' => 'TODO: please describe this field!',
  6902. 'type' => 'boolean',
  6903. 'not null' => '1',
  6904. 'default' => 'ru',
  6905. ),
  6906. ),
  6907. 'primary key' => array(
  6908. '0' => 'cell_line_dbxref_id',
  6909. ),
  6910. 'unique keys' => array(
  6911. 'cell_line_dbxref_c1' => array(
  6912. '0' => 'cell_line_id',
  6913. '1' => 'dbxref_id',
  6914. ),
  6915. ),
  6916. 'indexes' => array(
  6917. ),
  6918. 'foreign keys' => array(
  6919. ),
  6920. );
  6921. return $description;
  6922. }
  6923. /**
  6924. * Implements hook_channel_schema()
  6925. * Purpose: To describe the structure of channel to tripal
  6926. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6927. * @see tripal_core.api.inc: tripal_core_chado_update()
  6928. * @see tripal_core.api.inc: tripal_core_chado_select()
  6929. *
  6930. * @return
  6931. * An array describing the current table
  6932. *
  6933. * @ingroup tripal_api
  6934. *
  6935. * @ingroup tripal_core
  6936. */
  6937. function tripal_core_chado_channel_schema () {
  6938. $description = array();
  6939. $description = array(
  6940. 'table' => 'channel',
  6941. // 'description' => 'TODO: please describe this table!',
  6942. 'fields' => array(
  6943. 'channel_id' => array(
  6944. // 'description' => 'TODO: please describe this field!',
  6945. 'type' => 'serial',
  6946. 'not null' => '1',
  6947. ),
  6948. 'name' => array(
  6949. // 'description' => 'TODO: please describe this field!',
  6950. 'type' => 'text',
  6951. 'not null' => '1',
  6952. ),
  6953. 'definition' => array(
  6954. // 'description' => 'TODO: please describe this field!',
  6955. 'type' => 'text',
  6956. 'not null' => '1',
  6957. ),
  6958. ),
  6959. 'primary key' => array(
  6960. '0' => 'channel_id',
  6961. ),
  6962. 'unique keys' => array(
  6963. 'channel_c1' => array(
  6964. '0' => 'name',
  6965. ),
  6966. ),
  6967. 'indexes' => array(
  6968. ),
  6969. 'foreign keys' => array(
  6970. ),
  6971. );
  6972. return $description;
  6973. }
  6974. /**
  6975. * Implements hook_common_ancestor_cvterm_schema()
  6976. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6977. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6978. * @see tripal_core.api.inc: tripal_core_chado_update()
  6979. * @see tripal_core.api.inc: tripal_core_chado_select()
  6980. *
  6981. * @return
  6982. * An array describing the current table
  6983. *
  6984. * @ingroup tripal_api
  6985. *
  6986. * @ingroup tripal_core
  6987. */
  6988. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6989. $description = array();
  6990. $description = array(
  6991. 'table' => 'common_ancestor_cvterm',
  6992. // 'description' => 'TODO: please describe this table!',
  6993. 'fields' => array(
  6994. 'cvterm1_id' => array(
  6995. // 'description' => 'TODO: please describe this field!',
  6996. 'type' => 'int',
  6997. 'not null' => '',
  6998. ),
  6999. 'cvterm2_id' => array(
  7000. // 'description' => 'TODO: please describe this field!',
  7001. 'type' => 'int',
  7002. 'not null' => '',
  7003. ),
  7004. 'ancestor_cvterm_id' => array(
  7005. // 'description' => 'TODO: please describe this field!',
  7006. 'type' => 'int',
  7007. 'not null' => '',
  7008. ),
  7009. 'pathdistance1' => array(
  7010. // 'description' => 'TODO: please describe this field!',
  7011. 'type' => 'int',
  7012. 'not null' => '',
  7013. ),
  7014. 'pathdistance2' => array(
  7015. // 'description' => 'TODO: please describe this field!',
  7016. 'type' => 'int',
  7017. 'not null' => '',
  7018. ),
  7019. 'total_pathdistance' => array(
  7020. // 'description' => 'TODO: please describe this field!',
  7021. 'type' => 'int',
  7022. 'not null' => '',
  7023. ),
  7024. ),
  7025. 'primary key' => array(
  7026. ),
  7027. 'unique keys' => array(
  7028. ),
  7029. 'indexes' => array(
  7030. ),
  7031. 'foreign keys' => array(
  7032. ),
  7033. );
  7034. return $description;
  7035. }
  7036. /**
  7037. * Implements hook_cv_cvterm_count_with_obs_schema()
  7038. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  7039. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7040. * @see tripal_core.api.inc: tripal_core_chado_update()
  7041. * @see tripal_core.api.inc: tripal_core_chado_select()
  7042. *
  7043. * @return
  7044. * An array describing the current table
  7045. *
  7046. * @ingroup tripal_api
  7047. *
  7048. * @ingroup tripal_core
  7049. */
  7050. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  7051. $description = array();
  7052. $description = array(
  7053. 'table' => 'cv_cvterm_count_with_obs',
  7054. // 'description' => 'TODO: please describe this table!',
  7055. 'fields' => array(
  7056. 'name' => array(
  7057. // 'description' => 'TODO: please describe this field!',
  7058. 'type' => 'varchar',
  7059. 'length' => '255',
  7060. 'not null' => '',
  7061. ),
  7062. 'num_terms_incl_obs' => array(
  7063. // 'description' => 'TODO: please describe this field!',
  7064. 'type' => 'int',
  7065. 'size' => 'big',
  7066. 'not null' => '',
  7067. ),
  7068. ),
  7069. 'primary key' => array(
  7070. ),
  7071. 'unique keys' => array(
  7072. ),
  7073. 'indexes' => array(
  7074. ),
  7075. 'foreign keys' => array(
  7076. ),
  7077. );
  7078. return $description;
  7079. }
  7080. /**
  7081. * Implements hook_cv_leaf_schema()
  7082. * Purpose: To describe the structure of cv_leaf to tripal
  7083. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7084. * @see tripal_core.api.inc: tripal_core_chado_update()
  7085. * @see tripal_core.api.inc: tripal_core_chado_select()
  7086. *
  7087. * @return
  7088. * An array describing the current table
  7089. *
  7090. * @ingroup tripal_api
  7091. *
  7092. * @ingroup tripal_core
  7093. */
  7094. function tripal_core_chado_cv_leaf_schema () {
  7095. $description = array();
  7096. $description = array(
  7097. 'table' => 'cv_leaf',
  7098. // 'description' => 'TODO: please describe this table!',
  7099. 'fields' => array(
  7100. 'cv_id' => array(
  7101. // 'description' => 'TODO: please describe this field!',
  7102. 'type' => 'int',
  7103. 'not null' => '',
  7104. ),
  7105. 'cvterm_id' => array(
  7106. // 'description' => 'TODO: please describe this field!',
  7107. 'type' => 'int',
  7108. 'not null' => '',
  7109. ),
  7110. ),
  7111. 'primary key' => array(
  7112. ),
  7113. 'unique keys' => array(
  7114. ),
  7115. 'indexes' => array(
  7116. ),
  7117. 'foreign keys' => array(
  7118. ),
  7119. );
  7120. return $description;
  7121. }
  7122. /**
  7123. * Implements hook_cv_link_count_schema()
  7124. * Purpose: To describe the structure of cv_link_count to tripal
  7125. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7126. * @see tripal_core.api.inc: tripal_core_chado_update()
  7127. * @see tripal_core.api.inc: tripal_core_chado_select()
  7128. *
  7129. * @return
  7130. * An array describing the current table
  7131. *
  7132. * @ingroup tripal_api
  7133. *
  7134. * @ingroup tripal_core
  7135. */
  7136. function tripal_core_chado_cv_link_count_schema () {
  7137. $description = array();
  7138. $description = array(
  7139. 'table' => 'cv_link_count',
  7140. // 'description' => 'TODO: please describe this table!',
  7141. 'fields' => array(
  7142. 'cv_name' => array(
  7143. // 'description' => 'TODO: please describe this field!',
  7144. 'type' => 'varchar',
  7145. 'length' => '255',
  7146. 'not null' => '',
  7147. ),
  7148. 'relation_name' => array(
  7149. // 'description' => 'TODO: please describe this field!',
  7150. 'type' => 'varchar',
  7151. 'length' => '1024',
  7152. 'not null' => '',
  7153. ),
  7154. 'relation_cv_name' => array(
  7155. // 'description' => 'TODO: please describe this field!',
  7156. 'type' => 'varchar',
  7157. 'length' => '255',
  7158. 'not null' => '',
  7159. ),
  7160. 'num_links' => array(
  7161. // 'description' => 'TODO: please describe this field!',
  7162. 'type' => 'int',
  7163. 'size' => 'big',
  7164. 'not null' => '',
  7165. ),
  7166. ),
  7167. 'primary key' => array(
  7168. ),
  7169. 'unique keys' => array(
  7170. ),
  7171. 'indexes' => array(
  7172. ),
  7173. 'foreign keys' => array(
  7174. ),
  7175. );
  7176. return $description;
  7177. }
  7178. /**
  7179. * Implements hook_cv_path_count_schema()
  7180. * Purpose: To describe the structure of cv_path_count to tripal
  7181. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7182. * @see tripal_core.api.inc: tripal_core_chado_update()
  7183. * @see tripal_core.api.inc: tripal_core_chado_select()
  7184. *
  7185. * @return
  7186. * An array describing the current table
  7187. *
  7188. * @ingroup tripal_api
  7189. *
  7190. * @ingroup tripal_core
  7191. */
  7192. function tripal_core_chado_cv_path_count_schema () {
  7193. $description = array();
  7194. $description = array(
  7195. 'table' => 'cv_path_count',
  7196. // 'description' => 'TODO: please describe this table!',
  7197. 'fields' => array(
  7198. 'cv_name' => array(
  7199. // 'description' => 'TODO: please describe this field!',
  7200. 'type' => 'varchar',
  7201. 'length' => '255',
  7202. 'not null' => '',
  7203. ),
  7204. 'relation_name' => array(
  7205. // 'description' => 'TODO: please describe this field!',
  7206. 'type' => 'varchar',
  7207. 'length' => '1024',
  7208. 'not null' => '',
  7209. ),
  7210. 'relation_cv_name' => array(
  7211. // 'description' => 'TODO: please describe this field!',
  7212. 'type' => 'varchar',
  7213. 'length' => '255',
  7214. 'not null' => '',
  7215. ),
  7216. 'num_paths' => array(
  7217. // 'description' => 'TODO: please describe this field!',
  7218. 'type' => 'int',
  7219. 'size' => 'big',
  7220. 'not null' => '',
  7221. ),
  7222. ),
  7223. 'primary key' => array(
  7224. ),
  7225. 'unique keys' => array(
  7226. ),
  7227. 'indexes' => array(
  7228. ),
  7229. 'foreign keys' => array(
  7230. ),
  7231. );
  7232. return $description;
  7233. }
  7234. /**
  7235. * Implements hook_cv_cvterm_count_schema()
  7236. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7237. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7238. * @see tripal_core.api.inc: tripal_core_chado_update()
  7239. * @see tripal_core.api.inc: tripal_core_chado_select()
  7240. *
  7241. * @return
  7242. * An array describing the current table
  7243. *
  7244. * @ingroup tripal_api
  7245. *
  7246. * @ingroup tripal_core
  7247. */
  7248. function tripal_core_chado_cv_cvterm_count_schema () {
  7249. $description = array();
  7250. $description = array(
  7251. 'table' => 'cv_cvterm_count',
  7252. // 'description' => 'TODO: please describe this table!',
  7253. 'fields' => array(
  7254. 'name' => array(
  7255. // 'description' => 'TODO: please describe this field!',
  7256. 'type' => 'varchar',
  7257. 'length' => '255',
  7258. 'not null' => '',
  7259. ),
  7260. 'num_terms_excl_obs' => array(
  7261. // 'description' => 'TODO: please describe this field!',
  7262. 'type' => 'int',
  7263. 'size' => 'big',
  7264. 'not null' => '',
  7265. ),
  7266. ),
  7267. 'primary key' => array(
  7268. ),
  7269. 'unique keys' => array(
  7270. ),
  7271. 'indexes' => array(
  7272. ),
  7273. 'foreign keys' => array(
  7274. ),
  7275. );
  7276. return $description;
  7277. }
  7278. /**
  7279. * Implements hook_cv_schema()
  7280. * Purpose: To describe the structure of cv to tripal
  7281. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7282. * @see tripal_core.api.inc: tripal_core_chado_update()
  7283. * @see tripal_core.api.inc: tripal_core_chado_select()
  7284. *
  7285. * @return
  7286. * An array describing the current table
  7287. *
  7288. * @ingroup tripal_api
  7289. *
  7290. * @ingroup tripal_core
  7291. */
  7292. function tripal_core_chado_cv_schema () {
  7293. $description = array();
  7294. $description = array(
  7295. 'table' => 'cv',
  7296. // 'description' => 'TODO: please describe this table!',
  7297. 'fields' => array(
  7298. 'cv_id' => array(
  7299. // 'description' => 'TODO: please describe this field!',
  7300. 'type' => 'serial',
  7301. 'not null' => '1',
  7302. ),
  7303. 'name' => array(
  7304. // 'description' => 'TODO: please describe this field!',
  7305. 'type' => 'varchar',
  7306. 'length' => '255',
  7307. 'not null' => '1',
  7308. ),
  7309. 'definition' => array(
  7310. // 'description' => 'TODO: please describe this field!',
  7311. 'type' => 'text',
  7312. 'not null' => '',
  7313. ),
  7314. ),
  7315. 'primary key' => array(
  7316. '0' => 'cv_id',
  7317. ),
  7318. 'unique keys' => array(
  7319. 'cv_c1' => array(
  7320. '0' => 'name',
  7321. ),
  7322. ),
  7323. 'indexes' => array(
  7324. ),
  7325. 'foreign keys' => array(
  7326. ),
  7327. );
  7328. return $description;
  7329. }
  7330. /**
  7331. * Implements hook_common_descendant_cvterm_schema()
  7332. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7333. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7334. * @see tripal_core.api.inc: tripal_core_chado_update()
  7335. * @see tripal_core.api.inc: tripal_core_chado_select()
  7336. *
  7337. * @return
  7338. * An array describing the current table
  7339. *
  7340. * @ingroup tripal_api
  7341. *
  7342. * @ingroup tripal_core
  7343. */
  7344. function tripal_core_chado_common_descendant_cvterm_schema () {
  7345. $description = array();
  7346. $description = array(
  7347. 'table' => 'common_descendant_cvterm',
  7348. // 'description' => 'TODO: please describe this table!',
  7349. 'fields' => array(
  7350. 'cvterm1_id' => array(
  7351. // 'description' => 'TODO: please describe this field!',
  7352. 'type' => 'int',
  7353. 'not null' => '',
  7354. ),
  7355. 'cvterm2_id' => array(
  7356. // 'description' => 'TODO: please describe this field!',
  7357. 'type' => 'int',
  7358. 'not null' => '',
  7359. ),
  7360. 'ancestor_cvterm_id' => array(
  7361. // 'description' => 'TODO: please describe this field!',
  7362. 'type' => 'int',
  7363. 'not null' => '',
  7364. ),
  7365. 'pathdistance1' => array(
  7366. // 'description' => 'TODO: please describe this field!',
  7367. 'type' => 'int',
  7368. 'not null' => '',
  7369. ),
  7370. 'pathdistance2' => array(
  7371. // 'description' => 'TODO: please describe this field!',
  7372. 'type' => 'int',
  7373. 'not null' => '',
  7374. ),
  7375. 'total_pathdistance' => array(
  7376. // 'description' => 'TODO: please describe this field!',
  7377. 'type' => 'int',
  7378. 'not null' => '',
  7379. ),
  7380. ),
  7381. 'primary key' => array(
  7382. ),
  7383. 'unique keys' => array(
  7384. ),
  7385. 'indexes' => array(
  7386. ),
  7387. 'foreign keys' => array(
  7388. ),
  7389. );
  7390. return $description;
  7391. }
  7392. /**
  7393. * Implements hook_contact_schema()
  7394. * Purpose: To describe the structure of contact to tripal
  7395. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7396. * @see tripal_core.api.inc: tripal_core_chado_update()
  7397. * @see tripal_core.api.inc: tripal_core_chado_select()
  7398. *
  7399. * @return
  7400. * An array describing the current table
  7401. *
  7402. * @ingroup tripal_api
  7403. *
  7404. * @ingroup tripal_core
  7405. */
  7406. function tripal_core_chado_contact_schema () {
  7407. $description = array();
  7408. $description = array(
  7409. 'table' => 'contact',
  7410. // 'description' => 'TODO: please describe this table!',
  7411. 'fields' => array(
  7412. 'contact_id' => array(
  7413. // 'description' => 'TODO: please describe this field!',
  7414. 'type' => 'serial',
  7415. 'not null' => '1',
  7416. ),
  7417. 'type_id' => array(
  7418. // 'description' => 'TODO: please describe this field!',
  7419. 'type' => 'int',
  7420. 'not null' => '',
  7421. ),
  7422. 'name' => array(
  7423. // 'description' => 'TODO: please describe this field!',
  7424. 'type' => 'varchar',
  7425. 'length' => '255',
  7426. 'not null' => '1',
  7427. ),
  7428. 'description' => array(
  7429. // 'description' => 'TODO: please describe this field!',
  7430. 'type' => 'varchar',
  7431. 'length' => '255',
  7432. 'not null' => '',
  7433. ),
  7434. ),
  7435. 'primary key' => array(
  7436. '0' => 'contact_id',
  7437. ),
  7438. 'unique keys' => array(
  7439. 'contact_c1' => array(
  7440. '0' => 'name',
  7441. ),
  7442. ),
  7443. 'indexes' => array(
  7444. ),
  7445. 'foreign keys' => array(
  7446. ),
  7447. );
  7448. return $description;
  7449. }
  7450. /**
  7451. * Implements hook_contact_relationship_schema()
  7452. * Purpose: To describe the structure of contact_relationship to tripal
  7453. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7454. * @see tripal_core.api.inc: tripal_core_chado_update()
  7455. * @see tripal_core.api.inc: tripal_core_chado_select()
  7456. *
  7457. * @return
  7458. * An array describing the current table
  7459. *
  7460. * @ingroup tripal_api
  7461. *
  7462. * @ingroup tripal_core
  7463. */
  7464. function tripal_core_chado_contact_relationship_schema () {
  7465. $description = array();
  7466. $description = array(
  7467. 'table' => 'contact_relationship',
  7468. // 'description' => 'TODO: please describe this table!',
  7469. 'fields' => array(
  7470. 'contact_relationship_id' => array(
  7471. // 'description' => 'TODO: please describe this field!',
  7472. 'type' => 'serial',
  7473. 'not null' => '1',
  7474. ),
  7475. 'type_id' => array(
  7476. // 'description' => 'TODO: please describe this field!',
  7477. 'type' => 'int',
  7478. 'not null' => '1',
  7479. ),
  7480. 'subject_id' => array(
  7481. // 'description' => 'TODO: please describe this field!',
  7482. 'type' => 'int',
  7483. 'not null' => '1',
  7484. ),
  7485. 'object_id' => array(
  7486. // 'description' => 'TODO: please describe this field!',
  7487. 'type' => 'int',
  7488. 'not null' => '1',
  7489. ),
  7490. ),
  7491. 'primary key' => array(
  7492. '0' => 'contact_relationship_id',
  7493. ),
  7494. 'unique keys' => array(
  7495. 'contact_relationship_c1' => array(
  7496. '0' => 'subject_id',
  7497. '1' => 'object_id',
  7498. '2' => 'type_id',
  7499. ),
  7500. ),
  7501. 'indexes' => array(
  7502. 'contact_relationship_idx1' => array(
  7503. '0' => 'type_id',
  7504. ),
  7505. 'contact_relationship_idx2' => array(
  7506. '0' => 'subject_id',
  7507. ),
  7508. 'contact_relationship_idx3' => array(
  7509. '0' => 'object_id',
  7510. ),
  7511. ),
  7512. 'foreign keys' => array(
  7513. ),
  7514. );
  7515. return $description;
  7516. }
  7517. /**
  7518. * Implements hook_control_schema()
  7519. * Purpose: To describe the structure of control to tripal
  7520. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7521. * @see tripal_core.api.inc: tripal_core_chado_update()
  7522. * @see tripal_core.api.inc: tripal_core_chado_select()
  7523. *
  7524. * @return
  7525. * An array describing the current table
  7526. *
  7527. * @ingroup tripal_api
  7528. *
  7529. * @ingroup tripal_core
  7530. */
  7531. function tripal_core_chado_control_schema () {
  7532. $description = array();
  7533. $description = array(
  7534. 'table' => 'control',
  7535. // 'description' => 'TODO: please describe this table!',
  7536. 'fields' => array(
  7537. 'control_id' => array(
  7538. // 'description' => 'TODO: please describe this field!',
  7539. 'type' => 'serial',
  7540. 'not null' => '1',
  7541. ),
  7542. 'type_id' => array(
  7543. // 'description' => 'TODO: please describe this field!',
  7544. 'type' => 'int',
  7545. 'not null' => '1',
  7546. ),
  7547. 'assay_id' => array(
  7548. // 'description' => 'TODO: please describe this field!',
  7549. 'type' => 'int',
  7550. 'not null' => '1',
  7551. ),
  7552. 'tableinfo_id' => array(
  7553. // 'description' => 'TODO: please describe this field!',
  7554. 'type' => 'int',
  7555. 'not null' => '1',
  7556. ),
  7557. 'row_id' => array(
  7558. // 'description' => 'TODO: please describe this field!',
  7559. 'type' => 'int',
  7560. 'not null' => '1',
  7561. ),
  7562. 'name' => array(
  7563. // 'description' => 'TODO: please describe this field!',
  7564. 'type' => 'text',
  7565. 'not null' => '',
  7566. ),
  7567. 'value' => array(
  7568. // 'description' => 'TODO: please describe this field!',
  7569. 'type' => 'text',
  7570. 'not null' => '',
  7571. ),
  7572. 'rank' => array(
  7573. // 'description' => 'TODO: please describe this field!',
  7574. 'type' => 'int',
  7575. 'not null' => '1',
  7576. 'default' => '0',
  7577. ),
  7578. ),
  7579. 'primary key' => array(
  7580. '0' => 'control_id',
  7581. ),
  7582. 'unique keys' => array(
  7583. ),
  7584. 'indexes' => array(
  7585. 'control_idx1' => array(
  7586. '0' => 'type_id',
  7587. ),
  7588. 'control_idx2' => array(
  7589. '0' => 'assay_id',
  7590. ),
  7591. 'control_idx3' => array(
  7592. '0' => 'tableinfo_id',
  7593. ),
  7594. 'control_idx4' => array(
  7595. '0' => 'row_id',
  7596. ),
  7597. ),
  7598. 'foreign keys' => array(
  7599. ),
  7600. );
  7601. return $description;
  7602. }
  7603. /**
  7604. * Implements hook_biomaterialprop_schema()
  7605. * Purpose: To describe the structure of biomaterialprop to tripal
  7606. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7607. * @see tripal_core.api.inc: tripal_core_chado_update()
  7608. * @see tripal_core.api.inc: tripal_core_chado_select()
  7609. *
  7610. * @return
  7611. * An array describing the current table
  7612. *
  7613. * @ingroup tripal_api
  7614. *
  7615. * @ingroup tripal_core
  7616. */
  7617. function tripal_core_chado_biomaterialprop_schema () {
  7618. $description = array();
  7619. $description = array(
  7620. 'table' => 'biomaterialprop',
  7621. // 'description' => 'TODO: please describe this table!',
  7622. 'fields' => array(
  7623. 'biomaterialprop_id' => array(
  7624. // 'description' => 'TODO: please describe this field!',
  7625. 'type' => 'serial',
  7626. 'not null' => '1',
  7627. ),
  7628. 'biomaterial_id' => array(
  7629. // 'description' => 'TODO: please describe this field!',
  7630. 'type' => 'int',
  7631. 'not null' => '1',
  7632. ),
  7633. 'type_id' => array(
  7634. // 'description' => 'TODO: please describe this field!',
  7635. 'type' => 'int',
  7636. 'not null' => '1',
  7637. ),
  7638. 'value' => array(
  7639. // 'description' => 'TODO: please describe this field!',
  7640. 'type' => 'text',
  7641. 'not null' => '',
  7642. ),
  7643. 'rank' => array(
  7644. // 'description' => 'TODO: please describe this field!',
  7645. 'type' => 'int',
  7646. 'not null' => '1',
  7647. 'default' => '0',
  7648. ),
  7649. ),
  7650. 'primary key' => array(
  7651. '0' => 'biomaterialprop_id',
  7652. ),
  7653. 'unique keys' => array(
  7654. 'biomaterialprop_c1' => array(
  7655. '0' => 'biomaterial_id',
  7656. '1' => 'type_id',
  7657. '2' => 'rank',
  7658. ),
  7659. ),
  7660. 'indexes' => array(
  7661. 'biomaterialprop_idx1' => array(
  7662. '0' => 'biomaterial_id',
  7663. ),
  7664. 'biomaterialprop_idx2' => array(
  7665. '0' => 'type_id',
  7666. ),
  7667. ),
  7668. 'foreign keys' => array(
  7669. ),
  7670. );
  7671. return $description;
  7672. }
  7673. /**
  7674. * Implements hook_biomaterial_treatment_schema()
  7675. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7676. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7677. * @see tripal_core.api.inc: tripal_core_chado_update()
  7678. * @see tripal_core.api.inc: tripal_core_chado_select()
  7679. *
  7680. * @return
  7681. * An array describing the current table
  7682. *
  7683. * @ingroup tripal_api
  7684. *
  7685. * @ingroup tripal_core
  7686. */
  7687. function tripal_core_chado_biomaterial_treatment_schema () {
  7688. $description = array();
  7689. $description = array(
  7690. 'table' => 'biomaterial_treatment',
  7691. // 'description' => 'TODO: please describe this table!',
  7692. 'fields' => array(
  7693. 'biomaterial_treatment_id' => array(
  7694. // 'description' => 'TODO: please describe this field!',
  7695. 'type' => 'serial',
  7696. 'not null' => '1',
  7697. ),
  7698. 'biomaterial_id' => array(
  7699. // 'description' => 'TODO: please describe this field!',
  7700. 'type' => 'int',
  7701. 'not null' => '1',
  7702. ),
  7703. 'treatment_id' => array(
  7704. // 'description' => 'TODO: please describe this field!',
  7705. 'type' => 'int',
  7706. 'not null' => '1',
  7707. ),
  7708. 'unittype_id' => array(
  7709. // 'description' => 'TODO: please describe this field!',
  7710. 'type' => 'int',
  7711. 'not null' => '',
  7712. ),
  7713. 'value' => array(
  7714. // 'description' => 'TODO: please describe this field!',
  7715. 'type' => 'float',
  7716. 'not null' => '',
  7717. ),
  7718. 'rank' => array(
  7719. // 'description' => 'TODO: please describe this field!',
  7720. 'type' => 'int',
  7721. 'not null' => '1',
  7722. 'default' => '0',
  7723. ),
  7724. ),
  7725. 'primary key' => array(
  7726. '0' => 'biomaterial_treatment_id',
  7727. ),
  7728. 'unique keys' => array(
  7729. 'biomaterial_treatment_c1' => array(
  7730. '0' => 'biomaterial_id',
  7731. '1' => 'treatment_id',
  7732. ),
  7733. ),
  7734. 'indexes' => array(
  7735. 'biomaterial_treatment_idx1' => array(
  7736. '0' => 'biomaterial_id',
  7737. ),
  7738. 'biomaterial_treatment_idx2' => array(
  7739. '0' => 'treatment_id',
  7740. ),
  7741. 'biomaterial_treatment_idx3' => array(
  7742. '0' => 'unittype_id',
  7743. ),
  7744. ),
  7745. 'foreign keys' => array(
  7746. ),
  7747. );
  7748. return $description;
  7749. }
  7750. /**
  7751. * Implements hook_acquisition_relationship_schema()
  7752. * Purpose: To describe the structure of acquisition_relationship to tripal
  7753. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7754. * @see tripal_core.api.inc: tripal_core_chado_update()
  7755. * @see tripal_core.api.inc: tripal_core_chado_select()
  7756. *
  7757. * @return
  7758. * An array describing the current table
  7759. *
  7760. * @ingroup tripal_api
  7761. *
  7762. * @ingroup tripal_core
  7763. */
  7764. function tripal_core_chado_acquisition_relationship_schema () {
  7765. $description = array();
  7766. $description = array(
  7767. 'table' => 'acquisition_relationship',
  7768. // 'description' => 'TODO: please describe this table!',
  7769. 'fields' => array(
  7770. 'acquisition_relationship_id' => array(
  7771. // 'description' => 'TODO: please describe this field!',
  7772. 'type' => 'serial',
  7773. 'not null' => '1',
  7774. ),
  7775. 'subject_id' => array(
  7776. // 'description' => 'TODO: please describe this field!',
  7777. 'type' => 'int',
  7778. 'not null' => '1',
  7779. ),
  7780. 'type_id' => array(
  7781. // 'description' => 'TODO: please describe this field!',
  7782. 'type' => 'int',
  7783. 'not null' => '1',
  7784. ),
  7785. 'object_id' => array(
  7786. // 'description' => 'TODO: please describe this field!',
  7787. 'type' => 'int',
  7788. 'not null' => '1',
  7789. ),
  7790. 'value' => array(
  7791. // 'description' => 'TODO: please describe this field!',
  7792. 'type' => 'text',
  7793. 'not null' => '',
  7794. ),
  7795. 'rank' => array(
  7796. // 'description' => 'TODO: please describe this field!',
  7797. 'type' => 'int',
  7798. 'not null' => '1',
  7799. 'default' => '0',
  7800. ),
  7801. ),
  7802. 'primary key' => array(
  7803. '0' => 'acquisition_relationship_id',
  7804. ),
  7805. 'unique keys' => array(
  7806. 'acquisition_relationship_c1' => array(
  7807. '0' => 'subject_id',
  7808. '1' => 'object_id',
  7809. '2' => 'type_id',
  7810. '3' => 'rank',
  7811. ),
  7812. ),
  7813. 'indexes' => array(
  7814. 'acquisition_relationship_idx1' => array(
  7815. '0' => 'subject_id',
  7816. ),
  7817. 'acquisition_relationship_idx2' => array(
  7818. '0' => 'type_id',
  7819. ),
  7820. 'acquisition_relationship_idx3' => array(
  7821. '0' => 'object_id',
  7822. ),
  7823. ),
  7824. 'foreign keys' => array(
  7825. ),
  7826. );
  7827. return $description;
  7828. }
  7829. /**
  7830. * Implements hook_acquisition_schema()
  7831. * Purpose: To describe the structure of acquisition to tripal
  7832. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7833. * @see tripal_core.api.inc: tripal_core_chado_update()
  7834. * @see tripal_core.api.inc: tripal_core_chado_select()
  7835. *
  7836. * @return
  7837. * An array describing the current table
  7838. *
  7839. * @ingroup tripal_api
  7840. *
  7841. * @ingroup tripal_core
  7842. */
  7843. function tripal_core_chado_acquisition_schema () {
  7844. $description = array();
  7845. $description = array(
  7846. 'table' => 'acquisition',
  7847. // 'description' => 'TODO: please describe this table!',
  7848. 'fields' => array(
  7849. 'acquisition_id' => array(
  7850. // 'description' => 'TODO: please describe this field!',
  7851. 'type' => 'serial',
  7852. 'not null' => '1',
  7853. ),
  7854. 'assay_id' => array(
  7855. // 'description' => 'TODO: please describe this field!',
  7856. 'type' => 'int',
  7857. 'not null' => '1',
  7858. ),
  7859. 'protocol_id' => array(
  7860. // 'description' => 'TODO: please describe this field!',
  7861. 'type' => 'int',
  7862. 'not null' => '',
  7863. ),
  7864. 'channel_id' => array(
  7865. // 'description' => 'TODO: please describe this field!',
  7866. 'type' => 'int',
  7867. 'not null' => '',
  7868. ),
  7869. 'acquisitiondate' => array(
  7870. // 'description' => 'TODO: please describe this field!',
  7871. 'type' => 'datetime',
  7872. 'not null' => '',
  7873. 'default' => 'ow(',
  7874. ),
  7875. 'name' => array(
  7876. // 'description' => 'TODO: please describe this field!',
  7877. 'type' => 'text',
  7878. 'not null' => '',
  7879. ),
  7880. 'uri' => array(
  7881. // 'description' => 'TODO: please describe this field!',
  7882. 'type' => 'text',
  7883. 'not null' => '',
  7884. ),
  7885. ),
  7886. 'primary key' => array(
  7887. '0' => 'acquisition_id',
  7888. ),
  7889. 'unique keys' => array(
  7890. 'acquisition_c1' => array(
  7891. '0' => 'name',
  7892. ),
  7893. ),
  7894. 'indexes' => array(
  7895. 'acquisition_idx1' => array(
  7896. '0' => 'assay_id',
  7897. ),
  7898. 'acquisition_idx2' => array(
  7899. '0' => 'protocol_id',
  7900. ),
  7901. 'acquisition_idx3' => array(
  7902. '0' => 'channel_id',
  7903. ),
  7904. ),
  7905. 'foreign keys' => array(
  7906. ),
  7907. );
  7908. return $description;
  7909. }
  7910. /**
  7911. * Implements hook_acquisitionprop_schema()
  7912. * Purpose: To describe the structure of acquisitionprop to tripal
  7913. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7914. * @see tripal_core.api.inc: tripal_core_chado_update()
  7915. * @see tripal_core.api.inc: tripal_core_chado_select()
  7916. *
  7917. * @return
  7918. * An array describing the current table
  7919. *
  7920. * @ingroup tripal_api
  7921. *
  7922. * @ingroup tripal_core
  7923. */
  7924. function tripal_core_chado_acquisitionprop_schema () {
  7925. $description = array();
  7926. $description = array(
  7927. 'table' => 'acquisitionprop',
  7928. // 'description' => 'TODO: please describe this table!',
  7929. 'fields' => array(
  7930. 'acquisitionprop_id' => array(
  7931. // 'description' => 'TODO: please describe this field!',
  7932. 'type' => 'serial',
  7933. 'not null' => '1',
  7934. ),
  7935. 'acquisition_id' => array(
  7936. // 'description' => 'TODO: please describe this field!',
  7937. 'type' => 'int',
  7938. 'not null' => '1',
  7939. ),
  7940. 'type_id' => array(
  7941. // 'description' => 'TODO: please describe this field!',
  7942. 'type' => 'int',
  7943. 'not null' => '1',
  7944. ),
  7945. 'value' => array(
  7946. // 'description' => 'TODO: please describe this field!',
  7947. 'type' => 'text',
  7948. 'not null' => '',
  7949. ),
  7950. 'rank' => array(
  7951. // 'description' => 'TODO: please describe this field!',
  7952. 'type' => 'int',
  7953. 'not null' => '1',
  7954. 'default' => '0',
  7955. ),
  7956. ),
  7957. 'primary key' => array(
  7958. '0' => 'acquisitionprop_id',
  7959. ),
  7960. 'unique keys' => array(
  7961. 'acquisitionprop_c1' => array(
  7962. '0' => 'acquisition_id',
  7963. '1' => 'type_id',
  7964. '2' => 'rank',
  7965. ),
  7966. ),
  7967. 'indexes' => array(
  7968. 'acquisitionprop_idx1' => array(
  7969. '0' => 'acquisition_id',
  7970. ),
  7971. 'acquisitionprop_idx2' => array(
  7972. '0' => 'type_id',
  7973. ),
  7974. ),
  7975. 'foreign keys' => array(
  7976. ),
  7977. );
  7978. return $description;
  7979. }
  7980. /**
  7981. * Implements hook_all_feature_names_schema()
  7982. * Purpose: To describe the structure of all_feature_names to tripal
  7983. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7984. * @see tripal_core.api.inc: tripal_core_chado_update()
  7985. * @see tripal_core.api.inc: tripal_core_chado_select()
  7986. *
  7987. * @return
  7988. * An array describing the current table
  7989. *
  7990. * @ingroup tripal_api
  7991. *
  7992. * @ingroup tripal_core
  7993. */
  7994. function tripal_core_chado_all_feature_names_schema () {
  7995. $description = array();
  7996. $description = array(
  7997. 'table' => 'all_feature_names',
  7998. // 'description' => 'TODO: please describe this table!',
  7999. 'fields' => array(
  8000. 'feature_id' => array(
  8001. // 'description' => 'TODO: please describe this field!',
  8002. 'type' => 'int',
  8003. 'not null' => '',
  8004. ),
  8005. 'name' => array(
  8006. // 'description' => 'TODO: please describe this field!',
  8007. 'type' => 'varchar',
  8008. 'length' => '255',
  8009. 'not null' => '',
  8010. ),
  8011. 'organism_id' => array(
  8012. // 'description' => 'TODO: please describe this field!',
  8013. 'type' => 'int',
  8014. 'not null' => '',
  8015. ),
  8016. ),
  8017. 'primary key' => array(
  8018. ),
  8019. 'unique keys' => array(
  8020. ),
  8021. 'indexes' => array(
  8022. ),
  8023. 'foreign keys' => array(
  8024. ),
  8025. );
  8026. return $description;
  8027. }
  8028. /**
  8029. * Implements hook_analysis_schema()
  8030. * Purpose: To describe the structure of analysis to tripal
  8031. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8032. * @see tripal_core.api.inc: tripal_core_chado_update()
  8033. * @see tripal_core.api.inc: tripal_core_chado_select()
  8034. *
  8035. * @return
  8036. * An array describing the current table
  8037. *
  8038. * @ingroup tripal_api
  8039. *
  8040. * @ingroup tripal_core
  8041. */
  8042. function tripal_core_chado_analysis_schema () {
  8043. $description = array();
  8044. $description = array(
  8045. 'table' => 'analysis',
  8046. // 'description' => 'TODO: please describe this table!',
  8047. 'fields' => array(
  8048. 'analysis_id' => array(
  8049. // 'description' => 'TODO: please describe this field!',
  8050. 'type' => 'serial',
  8051. 'not null' => '1',
  8052. ),
  8053. 'name' => array(
  8054. // 'description' => 'TODO: please describe this field!',
  8055. 'type' => 'varchar',
  8056. 'length' => '255',
  8057. 'not null' => '',
  8058. ),
  8059. 'description' => array(
  8060. // 'description' => 'TODO: please describe this field!',
  8061. 'type' => 'text',
  8062. 'not null' => '',
  8063. ),
  8064. 'program' => array(
  8065. // 'description' => 'TODO: please describe this field!',
  8066. 'type' => 'varchar',
  8067. 'length' => '255',
  8068. 'not null' => '1',
  8069. ),
  8070. 'programversion' => array(
  8071. // 'description' => 'TODO: please describe this field!',
  8072. 'type' => 'varchar',
  8073. 'length' => '255',
  8074. 'not null' => '1',
  8075. ),
  8076. 'algorithm' => array(
  8077. // 'description' => 'TODO: please describe this field!',
  8078. 'type' => 'varchar',
  8079. 'length' => '255',
  8080. 'not null' => '',
  8081. ),
  8082. 'sourcename' => array(
  8083. // 'description' => 'TODO: please describe this field!',
  8084. 'type' => 'varchar',
  8085. 'length' => '255',
  8086. 'not null' => '',
  8087. ),
  8088. 'sourceversion' => array(
  8089. // 'description' => 'TODO: please describe this field!',
  8090. 'type' => 'varchar',
  8091. 'length' => '255',
  8092. 'not null' => '',
  8093. ),
  8094. 'sourceuri' => array(
  8095. // 'description' => 'TODO: please describe this field!',
  8096. 'type' => 'text',
  8097. 'not null' => '',
  8098. ),
  8099. 'timeexecuted' => array(
  8100. // 'description' => 'TODO: please describe this field!',
  8101. 'type' => 'datetime',
  8102. 'not null' => '1',
  8103. 'default' => 'ow(',
  8104. ),
  8105. ),
  8106. 'primary key' => array(
  8107. '0' => 'analysis_id',
  8108. ),
  8109. 'unique keys' => array(
  8110. 'analysis_c1' => array(
  8111. '0' => 'program',
  8112. '1' => 'programversion',
  8113. '2' => 'sourcename',
  8114. ),
  8115. ),
  8116. 'indexes' => array(
  8117. ),
  8118. 'foreign keys' => array(
  8119. ),
  8120. );
  8121. return $description;
  8122. }
  8123. /**
  8124. * Implements hook_analysisfeature_schema()
  8125. * Purpose: To describe the structure of analysisfeature to tripal
  8126. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8127. * @see tripal_core.api.inc: tripal_core_chado_update()
  8128. * @see tripal_core.api.inc: tripal_core_chado_select()
  8129. *
  8130. * @return
  8131. * An array describing the current table
  8132. *
  8133. * @ingroup tripal_api
  8134. *
  8135. * @ingroup tripal_core
  8136. */
  8137. function tripal_core_chado_analysisfeature_schema () {
  8138. $description = array();
  8139. $description = array(
  8140. 'table' => 'analysisfeature',
  8141. // 'description' => 'TODO: please describe this table!',
  8142. 'fields' => array(
  8143. 'analysisfeature_id' => array(
  8144. // 'description' => 'TODO: please describe this field!',
  8145. 'type' => 'serial',
  8146. 'not null' => '1',
  8147. ),
  8148. 'feature_id' => array(
  8149. // 'description' => 'TODO: please describe this field!',
  8150. 'type' => 'int',
  8151. 'not null' => '1',
  8152. ),
  8153. 'analysis_id' => array(
  8154. // 'description' => 'TODO: please describe this field!',
  8155. 'type' => 'int',
  8156. 'not null' => '1',
  8157. ),
  8158. 'rawscore' => array(
  8159. // 'description' => 'TODO: please describe this field!',
  8160. 'type' => 'float',
  8161. 'size' => 'big',
  8162. 'not null' => '',
  8163. ),
  8164. 'normscore' => array(
  8165. // 'description' => 'TODO: please describe this field!',
  8166. 'type' => 'float',
  8167. 'size' => 'big',
  8168. 'not null' => '',
  8169. ),
  8170. 'significance' => array(
  8171. // 'description' => 'TODO: please describe this field!',
  8172. 'type' => 'float',
  8173. 'size' => 'big',
  8174. 'not null' => '',
  8175. ),
  8176. 'identity' => array(
  8177. // 'description' => 'TODO: please describe this field!',
  8178. 'type' => 'float',
  8179. 'size' => 'big',
  8180. 'not null' => '',
  8181. ),
  8182. ),
  8183. 'primary key' => array(
  8184. '0' => 'analysisfeature_id',
  8185. ),
  8186. 'unique keys' => array(
  8187. 'analysisfeature_c1' => array(
  8188. '0' => 'feature_id',
  8189. '1' => 'analysis_id',
  8190. ),
  8191. ),
  8192. 'indexes' => array(
  8193. 'analysisfeature_idx1' => array(
  8194. '0' => 'feature_id',
  8195. ),
  8196. 'analysisfeature_idx2' => array(
  8197. '0' => 'analysis_id',
  8198. ),
  8199. ),
  8200. 'foreign keys' => array(
  8201. ),
  8202. );
  8203. return $description;
  8204. }
  8205. /**
  8206. * Implements hook_analysisfeatureprop_schema()
  8207. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8208. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8209. * @see tripal_core.api.inc: tripal_core_chado_update()
  8210. * @see tripal_core.api.inc: tripal_core_chado_select()
  8211. *
  8212. * @return
  8213. * An array describing the current table
  8214. *
  8215. * @ingroup tripal_api
  8216. *
  8217. * @ingroup tripal_core
  8218. */
  8219. function tripal_core_chado_analysisfeatureprop_schema () {
  8220. $description = array();
  8221. $description = array(
  8222. 'table' => 'analysisfeatureprop',
  8223. // 'description' => 'TODO: please describe this table!',
  8224. 'fields' => array(
  8225. 'analysisfeatureprop_id' => array(
  8226. // 'description' => 'TODO: please describe this field!',
  8227. 'type' => 'serial',
  8228. 'not null' => '1',
  8229. ),
  8230. 'analysisfeature_id' => array(
  8231. // 'description' => 'TODO: please describe this field!',
  8232. 'type' => 'int',
  8233. 'not null' => '1',
  8234. ),
  8235. 'type_id' => array(
  8236. // 'description' => 'TODO: please describe this field!',
  8237. 'type' => 'int',
  8238. 'not null' => '1',
  8239. ),
  8240. 'value' => array(
  8241. // 'description' => 'TODO: please describe this field!',
  8242. 'type' => 'text',
  8243. 'not null' => '',
  8244. ),
  8245. 'rank' => array(
  8246. // 'description' => 'TODO: please describe this field!',
  8247. 'type' => 'int',
  8248. 'not null' => '1',
  8249. ),
  8250. ),
  8251. 'primary key' => array(
  8252. '0' => 'analysisfeatureprop_id',
  8253. ),
  8254. 'unique keys' => array(
  8255. 'analysisfeature_id_type_id_rank' => array(
  8256. '0' => 'analysisfeature_id',
  8257. '1' => 'type_id',
  8258. '2' => 'rank',
  8259. ),
  8260. ),
  8261. 'indexes' => array(
  8262. ),
  8263. 'foreign keys' => array(
  8264. ),
  8265. );
  8266. return $description;
  8267. }
  8268. /**
  8269. * Implements hook_assayprop_schema()
  8270. * Purpose: To describe the structure of assayprop to tripal
  8271. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8272. * @see tripal_core.api.inc: tripal_core_chado_update()
  8273. * @see tripal_core.api.inc: tripal_core_chado_select()
  8274. *
  8275. * @return
  8276. * An array describing the current table
  8277. *
  8278. * @ingroup tripal_api
  8279. *
  8280. * @ingroup tripal_core
  8281. */
  8282. function tripal_core_chado_assayprop_schema () {
  8283. $description = array();
  8284. $description = array(
  8285. 'table' => 'assayprop',
  8286. // 'description' => 'TODO: please describe this table!',
  8287. 'fields' => array(
  8288. 'assayprop_id' => array(
  8289. // 'description' => 'TODO: please describe this field!',
  8290. 'type' => 'serial',
  8291. 'not null' => '1',
  8292. ),
  8293. 'assay_id' => array(
  8294. // 'description' => 'TODO: please describe this field!',
  8295. 'type' => 'int',
  8296. 'not null' => '1',
  8297. ),
  8298. 'type_id' => array(
  8299. // 'description' => 'TODO: please describe this field!',
  8300. 'type' => 'int',
  8301. 'not null' => '1',
  8302. ),
  8303. 'value' => array(
  8304. // 'description' => 'TODO: please describe this field!',
  8305. 'type' => 'text',
  8306. 'not null' => '',
  8307. ),
  8308. 'rank' => array(
  8309. // 'description' => 'TODO: please describe this field!',
  8310. 'type' => 'int',
  8311. 'not null' => '1',
  8312. 'default' => '0',
  8313. ),
  8314. ),
  8315. 'primary key' => array(
  8316. '0' => 'assayprop_id',
  8317. ),
  8318. 'unique keys' => array(
  8319. 'assayprop_c1' => array(
  8320. '0' => 'assay_id',
  8321. '1' => 'type_id',
  8322. '2' => 'rank',
  8323. ),
  8324. ),
  8325. 'indexes' => array(
  8326. 'assayprop_idx1' => array(
  8327. '0' => 'assay_id',
  8328. ),
  8329. 'assayprop_idx2' => array(
  8330. '0' => 'type_id',
  8331. ),
  8332. ),
  8333. 'foreign keys' => array(
  8334. ),
  8335. );
  8336. return $description;
  8337. }
  8338. /**
  8339. * Implements hook_biomaterial_schema()
  8340. * Purpose: To describe the structure of biomaterial to tripal
  8341. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8342. * @see tripal_core.api.inc: tripal_core_chado_update()
  8343. * @see tripal_core.api.inc: tripal_core_chado_select()
  8344. *
  8345. * @return
  8346. * An array describing the current table
  8347. *
  8348. * @ingroup tripal_api
  8349. *
  8350. * @ingroup tripal_core
  8351. */
  8352. function tripal_core_chado_biomaterial_schema () {
  8353. $description = array();
  8354. $description = array(
  8355. 'table' => 'biomaterial',
  8356. // 'description' => 'TODO: please describe this table!',
  8357. 'fields' => array(
  8358. 'biomaterial_id' => array(
  8359. // 'description' => 'TODO: please describe this field!',
  8360. 'type' => 'serial',
  8361. 'not null' => '1',
  8362. ),
  8363. 'taxon_id' => array(
  8364. // 'description' => 'TODO: please describe this field!',
  8365. 'type' => 'int',
  8366. 'not null' => '',
  8367. ),
  8368. 'biosourceprovider_id' => array(
  8369. // 'description' => 'TODO: please describe this field!',
  8370. 'type' => 'int',
  8371. 'not null' => '',
  8372. ),
  8373. 'dbxref_id' => array(
  8374. // 'description' => 'TODO: please describe this field!',
  8375. 'type' => 'int',
  8376. 'not null' => '',
  8377. ),
  8378. 'name' => array(
  8379. // 'description' => 'TODO: please describe this field!',
  8380. 'type' => 'text',
  8381. 'not null' => '',
  8382. ),
  8383. 'description' => array(
  8384. // 'description' => 'TODO: please describe this field!',
  8385. 'type' => 'text',
  8386. 'not null' => '',
  8387. ),
  8388. ),
  8389. 'primary key' => array(
  8390. '0' => 'biomaterial_id',
  8391. ),
  8392. 'unique keys' => array(
  8393. 'biomaterial_c1' => array(
  8394. '0' => 'name',
  8395. ),
  8396. ),
  8397. 'indexes' => array(
  8398. 'biomaterial_idx1' => array(
  8399. '0' => 'taxon_id',
  8400. ),
  8401. 'biomaterial_idx2' => array(
  8402. '0' => 'biosourceprovider_id',
  8403. ),
  8404. 'biomaterial_idx3' => array(
  8405. '0' => 'dbxref_id',
  8406. ),
  8407. ),
  8408. 'foreign keys' => array(
  8409. ),
  8410. );
  8411. return $description;
  8412. }
  8413. /**
  8414. * Implements hook_biomaterial_dbxref_schema()
  8415. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8416. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8417. * @see tripal_core.api.inc: tripal_core_chado_update()
  8418. * @see tripal_core.api.inc: tripal_core_chado_select()
  8419. *
  8420. * @return
  8421. * An array describing the current table
  8422. *
  8423. * @ingroup tripal_api
  8424. *
  8425. * @ingroup tripal_core
  8426. */
  8427. function tripal_core_chado_biomaterial_dbxref_schema () {
  8428. $description = array();
  8429. $description = array(
  8430. 'table' => 'biomaterial_dbxref',
  8431. // 'description' => 'TODO: please describe this table!',
  8432. 'fields' => array(
  8433. 'biomaterial_dbxref_id' => array(
  8434. // 'description' => 'TODO: please describe this field!',
  8435. 'type' => 'serial',
  8436. 'not null' => '1',
  8437. ),
  8438. 'biomaterial_id' => array(
  8439. // 'description' => 'TODO: please describe this field!',
  8440. 'type' => 'int',
  8441. 'not null' => '1',
  8442. ),
  8443. 'dbxref_id' => array(
  8444. // 'description' => 'TODO: please describe this field!',
  8445. 'type' => 'int',
  8446. 'not null' => '1',
  8447. ),
  8448. ),
  8449. 'primary key' => array(
  8450. '0' => 'biomaterial_dbxref_id',
  8451. ),
  8452. 'unique keys' => array(
  8453. 'biomaterial_dbxref_c1' => array(
  8454. '0' => 'biomaterial_id',
  8455. '1' => 'dbxref_id',
  8456. ),
  8457. ),
  8458. 'indexes' => array(
  8459. 'biomaterial_dbxref_idx1' => array(
  8460. '0' => 'biomaterial_id',
  8461. ),
  8462. 'biomaterial_dbxref_idx2' => array(
  8463. '0' => 'dbxref_id',
  8464. ),
  8465. ),
  8466. 'foreign keys' => array(
  8467. ),
  8468. );
  8469. return $description;
  8470. }
  8471. /**
  8472. * Implements hook_biomaterial_relationship_schema()
  8473. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8474. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8475. * @see tripal_core.api.inc: tripal_core_chado_update()
  8476. * @see tripal_core.api.inc: tripal_core_chado_select()
  8477. *
  8478. * @return
  8479. * An array describing the current table
  8480. *
  8481. * @ingroup tripal_api
  8482. *
  8483. * @ingroup tripal_core
  8484. */
  8485. function tripal_core_chado_biomaterial_relationship_schema () {
  8486. $description = array();
  8487. $description = array(
  8488. 'table' => 'biomaterial_relationship',
  8489. // 'description' => 'TODO: please describe this table!',
  8490. 'fields' => array(
  8491. 'biomaterial_relationship_id' => array(
  8492. // 'description' => 'TODO: please describe this field!',
  8493. 'type' => 'serial',
  8494. 'not null' => '1',
  8495. ),
  8496. 'subject_id' => array(
  8497. // 'description' => 'TODO: please describe this field!',
  8498. 'type' => 'int',
  8499. 'not null' => '1',
  8500. ),
  8501. 'type_id' => array(
  8502. // 'description' => 'TODO: please describe this field!',
  8503. 'type' => 'int',
  8504. 'not null' => '1',
  8505. ),
  8506. 'object_id' => array(
  8507. // 'description' => 'TODO: please describe this field!',
  8508. 'type' => 'int',
  8509. 'not null' => '1',
  8510. ),
  8511. ),
  8512. 'primary key' => array(
  8513. '0' => 'biomaterial_relationship_id',
  8514. ),
  8515. 'unique keys' => array(
  8516. 'biomaterial_relationship_c1' => array(
  8517. '0' => 'subject_id',
  8518. '1' => 'object_id',
  8519. '2' => 'type_id',
  8520. ),
  8521. ),
  8522. 'indexes' => array(
  8523. 'biomaterial_relationship_idx1' => array(
  8524. '0' => 'subject_id',
  8525. ),
  8526. 'biomaterial_relationship_idx2' => array(
  8527. '0' => 'object_id',
  8528. ),
  8529. 'biomaterial_relationship_idx3' => array(
  8530. '0' => 'type_id',
  8531. ),
  8532. ),
  8533. 'foreign keys' => array(
  8534. ),
  8535. );
  8536. return $description;
  8537. }
  8538. /**
  8539. * Implements hook_assay_project_schema()
  8540. * Purpose: To describe the structure of assay_project to tripal
  8541. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8542. * @see tripal_core.api.inc: tripal_core_chado_update()
  8543. * @see tripal_core.api.inc: tripal_core_chado_select()
  8544. *
  8545. * @return
  8546. * An array describing the current table
  8547. *
  8548. * @ingroup tripal_api
  8549. *
  8550. * @ingroup tripal_core
  8551. */
  8552. function tripal_core_chado_assay_project_schema () {
  8553. $description = array();
  8554. $description = array(
  8555. 'table' => 'assay_project',
  8556. // 'description' => 'TODO: please describe this table!',
  8557. 'fields' => array(
  8558. 'assay_project_id' => array(
  8559. // 'description' => 'TODO: please describe this field!',
  8560. 'type' => 'serial',
  8561. 'not null' => '1',
  8562. ),
  8563. 'assay_id' => array(
  8564. // 'description' => 'TODO: please describe this field!',
  8565. 'type' => 'int',
  8566. 'not null' => '1',
  8567. ),
  8568. 'project_id' => array(
  8569. // 'description' => 'TODO: please describe this field!',
  8570. 'type' => 'int',
  8571. 'not null' => '1',
  8572. ),
  8573. ),
  8574. 'primary key' => array(
  8575. '0' => 'assay_project_id',
  8576. ),
  8577. 'unique keys' => array(
  8578. 'assay_project_c1' => array(
  8579. '0' => 'assay_id',
  8580. '1' => 'project_id',
  8581. ),
  8582. ),
  8583. 'indexes' => array(
  8584. 'assay_project_idx1' => array(
  8585. '0' => 'assay_id',
  8586. ),
  8587. 'assay_project_idx2' => array(
  8588. '0' => 'project_id',
  8589. ),
  8590. ),
  8591. 'foreign keys' => array(
  8592. ),
  8593. );
  8594. return $description;
  8595. }
  8596. /**
  8597. * Implements hook_assay_biomaterial_schema()
  8598. * Purpose: To describe the structure of assay_biomaterial to tripal
  8599. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8600. * @see tripal_core.api.inc: tripal_core_chado_update()
  8601. * @see tripal_core.api.inc: tripal_core_chado_select()
  8602. *
  8603. * @return
  8604. * An array describing the current table
  8605. *
  8606. * @ingroup tripal_api
  8607. *
  8608. * @ingroup tripal_core
  8609. */
  8610. function tripal_core_chado_assay_biomaterial_schema () {
  8611. $description = array();
  8612. $description = array(
  8613. 'table' => 'assay_biomaterial',
  8614. // 'description' => 'TODO: please describe this table!',
  8615. 'fields' => array(
  8616. 'assay_biomaterial_id' => array(
  8617. // 'description' => 'TODO: please describe this field!',
  8618. 'type' => 'serial',
  8619. 'not null' => '1',
  8620. ),
  8621. 'assay_id' => array(
  8622. // 'description' => 'TODO: please describe this field!',
  8623. 'type' => 'int',
  8624. 'not null' => '1',
  8625. ),
  8626. 'biomaterial_id' => array(
  8627. // 'description' => 'TODO: please describe this field!',
  8628. 'type' => 'int',
  8629. 'not null' => '1',
  8630. ),
  8631. 'channel_id' => array(
  8632. // 'description' => 'TODO: please describe this field!',
  8633. 'type' => 'int',
  8634. 'not null' => '',
  8635. ),
  8636. 'rank' => array(
  8637. // 'description' => 'TODO: please describe this field!',
  8638. 'type' => 'int',
  8639. 'not null' => '1',
  8640. 'default' => '0',
  8641. ),
  8642. ),
  8643. 'primary key' => array(
  8644. '0' => 'assay_biomaterial_id',
  8645. ),
  8646. 'unique keys' => array(
  8647. 'assay_biomaterial_c1' => array(
  8648. '0' => 'assay_id',
  8649. '1' => 'biomaterial_id',
  8650. '2' => 'channel_id',
  8651. '3' => 'rank',
  8652. ),
  8653. ),
  8654. 'indexes' => array(
  8655. 'assay_biomaterial_idx1' => array(
  8656. '0' => 'assay_id',
  8657. ),
  8658. 'assay_biomaterial_idx2' => array(
  8659. '0' => 'biomaterial_id',
  8660. ),
  8661. 'assay_biomaterial_idx3' => array(
  8662. '0' => 'channel_id',
  8663. ),
  8664. ),
  8665. 'foreign keys' => array(
  8666. ),
  8667. );
  8668. return $description;
  8669. }
  8670. /**
  8671. * Implements hook_analysisprop_schema()
  8672. * Purpose: To describe the structure of analysisprop to tripal
  8673. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8674. * @see tripal_core.api.inc: tripal_core_chado_update()
  8675. * @see tripal_core.api.inc: tripal_core_chado_select()
  8676. *
  8677. * @return
  8678. * An array describing the current table
  8679. *
  8680. * @ingroup tripal_api
  8681. *
  8682. * @ingroup tripal_core
  8683. */
  8684. function tripal_core_chado_analysisprop_schema () {
  8685. $description = array();
  8686. $description = array(
  8687. 'table' => 'analysisprop',
  8688. // 'description' => 'TODO: please describe this table!',
  8689. 'fields' => array(
  8690. 'analysisprop_id' => array(
  8691. // 'description' => 'TODO: please describe this field!',
  8692. 'type' => 'serial',
  8693. 'not null' => '1',
  8694. ),
  8695. 'analysis_id' => array(
  8696. // 'description' => 'TODO: please describe this field!',
  8697. 'type' => 'int',
  8698. 'not null' => '1',
  8699. ),
  8700. 'type_id' => array(
  8701. // 'description' => 'TODO: please describe this field!',
  8702. 'type' => 'int',
  8703. 'not null' => '1',
  8704. ),
  8705. 'value' => array(
  8706. // 'description' => 'TODO: please describe this field!',
  8707. 'type' => 'text',
  8708. 'not null' => '',
  8709. ),
  8710. 'rank' => array(
  8711. // 'description' => 'TODO: please describe this field!',
  8712. 'type' => 'int',
  8713. 'not null' => '1',
  8714. 'default' => '0',
  8715. ),
  8716. ),
  8717. 'primary key' => array(
  8718. '0' => 'analysisprop_id',
  8719. ),
  8720. 'unique keys' => array(
  8721. 'analysisprop_c1' => array(
  8722. '0' => 'analysis_id',
  8723. '1' => 'type_id',
  8724. '2' => 'rank',
  8725. ),
  8726. ),
  8727. 'indexes' => array(
  8728. 'analysisprop_idx1' => array(
  8729. '0' => 'analysis_id',
  8730. ),
  8731. 'analysisprop_idx2' => array(
  8732. '0' => 'type_id',
  8733. ),
  8734. ),
  8735. 'foreign keys' => array(
  8736. ),
  8737. );
  8738. return $description;
  8739. }
  8740. /**
  8741. * Implements hook_arraydesign_schema()
  8742. * Purpose: To describe the structure of arraydesign to tripal
  8743. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8744. * @see tripal_core.api.inc: tripal_core_chado_update()
  8745. * @see tripal_core.api.inc: tripal_core_chado_select()
  8746. *
  8747. * @return
  8748. * An array describing the current table
  8749. *
  8750. * @ingroup tripal_api
  8751. *
  8752. * @ingroup tripal_core
  8753. */
  8754. function tripal_core_chado_arraydesign_schema () {
  8755. $description = array();
  8756. $description = array(
  8757. 'table' => 'arraydesign',
  8758. // 'description' => 'TODO: please describe this table!',
  8759. 'fields' => array(
  8760. 'arraydesign_id' => array(
  8761. // 'description' => 'TODO: please describe this field!',
  8762. 'type' => 'serial',
  8763. 'not null' => '1',
  8764. ),
  8765. 'manufacturer_id' => array(
  8766. // 'description' => 'TODO: please describe this field!',
  8767. 'type' => 'int',
  8768. 'not null' => '1',
  8769. ),
  8770. 'platformtype_id' => array(
  8771. // 'description' => 'TODO: please describe this field!',
  8772. 'type' => 'int',
  8773. 'not null' => '1',
  8774. ),
  8775. 'substratetype_id' => array(
  8776. // 'description' => 'TODO: please describe this field!',
  8777. 'type' => 'int',
  8778. 'not null' => '',
  8779. ),
  8780. 'protocol_id' => array(
  8781. // 'description' => 'TODO: please describe this field!',
  8782. 'type' => 'int',
  8783. 'not null' => '',
  8784. ),
  8785. 'dbxref_id' => array(
  8786. // 'description' => 'TODO: please describe this field!',
  8787. 'type' => 'int',
  8788. 'not null' => '',
  8789. ),
  8790. 'name' => array(
  8791. // 'description' => 'TODO: please describe this field!',
  8792. 'type' => 'text',
  8793. 'not null' => '1',
  8794. ),
  8795. 'version' => array(
  8796. // 'description' => 'TODO: please describe this field!',
  8797. 'type' => 'text',
  8798. 'not null' => '',
  8799. ),
  8800. 'description' => array(
  8801. // 'description' => 'TODO: please describe this field!',
  8802. 'type' => 'text',
  8803. 'not null' => '',
  8804. ),
  8805. 'array_dimensions' => array(
  8806. // 'description' => 'TODO: please describe this field!',
  8807. 'type' => 'text',
  8808. 'not null' => '',
  8809. ),
  8810. 'element_dimensions' => array(
  8811. // 'description' => 'TODO: please describe this field!',
  8812. 'type' => 'text',
  8813. 'not null' => '',
  8814. ),
  8815. 'num_of_elements' => array(
  8816. // 'description' => 'TODO: please describe this field!',
  8817. 'type' => 'int',
  8818. 'not null' => '',
  8819. ),
  8820. 'num_array_columns' => array(
  8821. // 'description' => 'TODO: please describe this field!',
  8822. 'type' => 'int',
  8823. 'not null' => '',
  8824. ),
  8825. 'num_array_rows' => array(
  8826. // 'description' => 'TODO: please describe this field!',
  8827. 'type' => 'int',
  8828. 'not null' => '',
  8829. ),
  8830. 'num_grid_columns' => array(
  8831. // 'description' => 'TODO: please describe this field!',
  8832. 'type' => 'int',
  8833. 'not null' => '',
  8834. ),
  8835. 'num_grid_rows' => array(
  8836. // 'description' => 'TODO: please describe this field!',
  8837. 'type' => 'int',
  8838. 'not null' => '',
  8839. ),
  8840. 'num_sub_columns' => array(
  8841. // 'description' => 'TODO: please describe this field!',
  8842. 'type' => 'int',
  8843. 'not null' => '',
  8844. ),
  8845. 'num_sub_rows' => array(
  8846. // 'description' => 'TODO: please describe this field!',
  8847. 'type' => 'int',
  8848. 'not null' => '',
  8849. ),
  8850. ),
  8851. 'primary key' => array(
  8852. '0' => 'arraydesign_id',
  8853. ),
  8854. 'unique keys' => array(
  8855. 'arraydesign_c1' => array(
  8856. '0' => 'name',
  8857. ),
  8858. ),
  8859. 'indexes' => array(
  8860. 'arraydesign_idx1' => array(
  8861. '0' => 'manufacturer_id',
  8862. ),
  8863. 'arraydesign_idx2' => array(
  8864. '0' => 'platformtype_id',
  8865. ),
  8866. 'arraydesign_idx3' => array(
  8867. '0' => 'substratetype_id',
  8868. ),
  8869. 'arraydesign_idx4' => array(
  8870. '0' => 'protocol_id',
  8871. ),
  8872. 'arraydesign_idx5' => array(
  8873. '0' => 'dbxref_id',
  8874. ),
  8875. ),
  8876. 'foreign keys' => array(
  8877. ),
  8878. );
  8879. return $description;
  8880. }
  8881. /**
  8882. * Implements hook_arraydesignprop_schema()
  8883. * Purpose: To describe the structure of arraydesignprop to tripal
  8884. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8885. * @see tripal_core.api.inc: tripal_core_chado_update()
  8886. * @see tripal_core.api.inc: tripal_core_chado_select()
  8887. *
  8888. * @return
  8889. * An array describing the current table
  8890. *
  8891. * @ingroup tripal_api
  8892. *
  8893. * @ingroup tripal_core
  8894. */
  8895. function tripal_core_chado_arraydesignprop_schema () {
  8896. $description = array();
  8897. $description = array(
  8898. 'table' => 'arraydesignprop',
  8899. // 'description' => 'TODO: please describe this table!',
  8900. 'fields' => array(
  8901. 'arraydesignprop_id' => array(
  8902. // 'description' => 'TODO: please describe this field!',
  8903. 'type' => 'serial',
  8904. 'not null' => '1',
  8905. ),
  8906. 'arraydesign_id' => array(
  8907. // 'description' => 'TODO: please describe this field!',
  8908. 'type' => 'int',
  8909. 'not null' => '1',
  8910. ),
  8911. 'type_id' => array(
  8912. // 'description' => 'TODO: please describe this field!',
  8913. 'type' => 'int',
  8914. 'not null' => '1',
  8915. ),
  8916. 'value' => array(
  8917. // 'description' => 'TODO: please describe this field!',
  8918. 'type' => 'text',
  8919. 'not null' => '',
  8920. ),
  8921. 'rank' => array(
  8922. // 'description' => 'TODO: please describe this field!',
  8923. 'type' => 'int',
  8924. 'not null' => '1',
  8925. 'default' => '0',
  8926. ),
  8927. ),
  8928. 'primary key' => array(
  8929. '0' => 'arraydesignprop_id',
  8930. ),
  8931. 'unique keys' => array(
  8932. 'arraydesignprop_c1' => array(
  8933. '0' => 'arraydesign_id',
  8934. '1' => 'type_id',
  8935. '2' => 'rank',
  8936. ),
  8937. ),
  8938. 'indexes' => array(
  8939. 'arraydesignprop_idx1' => array(
  8940. '0' => 'arraydesign_id',
  8941. ),
  8942. 'arraydesignprop_idx2' => array(
  8943. '0' => 'type_id',
  8944. ),
  8945. ),
  8946. 'foreign keys' => array(
  8947. ),
  8948. );
  8949. return $description;
  8950. }
  8951. /**
  8952. * Implements hook_assay_schema()
  8953. * Purpose: To describe the structure of assay to tripal
  8954. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8955. * @see tripal_core.api.inc: tripal_core_chado_update()
  8956. * @see tripal_core.api.inc: tripal_core_chado_select()
  8957. *
  8958. * @return
  8959. * An array describing the current table
  8960. *
  8961. * @ingroup tripal_api
  8962. *
  8963. * @ingroup tripal_core
  8964. */
  8965. function tripal_core_chado_assay_schema () {
  8966. $description = array();
  8967. $description = array(
  8968. 'table' => 'assay',
  8969. // 'description' => 'TODO: please describe this table!',
  8970. 'fields' => array(
  8971. 'assay_id' => array(
  8972. // 'description' => 'TODO: please describe this field!',
  8973. 'type' => 'serial',
  8974. 'not null' => '1',
  8975. ),
  8976. 'arraydesign_id' => array(
  8977. // 'description' => 'TODO: please describe this field!',
  8978. 'type' => 'int',
  8979. 'not null' => '1',
  8980. ),
  8981. 'protocol_id' => array(
  8982. // 'description' => 'TODO: please describe this field!',
  8983. 'type' => 'int',
  8984. 'not null' => '',
  8985. ),
  8986. 'assaydate' => array(
  8987. // 'description' => 'TODO: please describe this field!',
  8988. 'type' => 'datetime',
  8989. 'not null' => '',
  8990. 'default' => 'ow(',
  8991. ),
  8992. 'arrayidentifier' => array(
  8993. // 'description' => 'TODO: please describe this field!',
  8994. 'type' => 'text',
  8995. 'not null' => '',
  8996. ),
  8997. 'arraybatchidentifier' => array(
  8998. // 'description' => 'TODO: please describe this field!',
  8999. 'type' => 'text',
  9000. 'not null' => '',
  9001. ),
  9002. 'operator_id' => array(
  9003. // 'description' => 'TODO: please describe this field!',
  9004. 'type' => 'int',
  9005. 'not null' => '1',
  9006. ),
  9007. 'dbxref_id' => array(
  9008. // 'description' => 'TODO: please describe this field!',
  9009. 'type' => 'int',
  9010. 'not null' => '',
  9011. ),
  9012. 'name' => array(
  9013. // 'description' => 'TODO: please describe this field!',
  9014. 'type' => 'text',
  9015. 'not null' => '',
  9016. ),
  9017. 'description' => array(
  9018. // 'description' => 'TODO: please describe this field!',
  9019. 'type' => 'text',
  9020. 'not null' => '',
  9021. ),
  9022. ),
  9023. 'primary key' => array(
  9024. '0' => 'assay_id',
  9025. ),
  9026. 'unique keys' => array(
  9027. 'assay_c1' => array(
  9028. '0' => 'name',
  9029. ),
  9030. ),
  9031. 'indexes' => array(
  9032. 'assay_idx1' => array(
  9033. '0' => 'arraydesign_id',
  9034. ),
  9035. 'assay_idx2' => array(
  9036. '0' => 'protocol_id',
  9037. ),
  9038. 'assay_idx3' => array(
  9039. '0' => 'operator_id',
  9040. ),
  9041. 'assay_idx4' => array(
  9042. '0' => 'dbxref_id',
  9043. ),
  9044. ),
  9045. 'foreign keys' => array(
  9046. ),
  9047. );
  9048. return $description;
  9049. }
  9050. /**
  9051. * Implements hook_cv_root_schema()
  9052. * Purpose: To describe the structure of cv_root to tripal
  9053. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9054. * @see tripal_core.api.inc: tripal_core_chado_update()
  9055. * @see tripal_core.api.inc: tripal_core_chado_select()
  9056. *
  9057. * @return
  9058. * An array describing the current table
  9059. *
  9060. * @ingroup tripal_api
  9061. *
  9062. * @ingroup tripal_core
  9063. */
  9064. function tripal_core_chado_cv_root_schema () {
  9065. $description = array();
  9066. $description = array(
  9067. 'table' => 'cv_root',
  9068. // 'description' => 'TODO: please describe this table!',
  9069. 'fields' => array(
  9070. 'cv_id' => array(
  9071. // 'description' => 'TODO: please describe this field!',
  9072. 'type' => 'int',
  9073. 'not null' => '',
  9074. ),
  9075. 'root_cvterm_id' => array(
  9076. // 'description' => 'TODO: please describe this field!',
  9077. 'type' => 'int',
  9078. 'not null' => '',
  9079. ),
  9080. ),
  9081. 'primary key' => array(
  9082. ),
  9083. 'unique keys' => array(
  9084. ),
  9085. 'indexes' => array(
  9086. ),
  9087. 'foreign keys' => array(
  9088. ),
  9089. );
  9090. return $description;
  9091. }
  9092. /**
  9093. * Implements hook_cvterm_schema()
  9094. * Purpose: To describe the structure of cvterm to tripal
  9095. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9096. * @see tripal_core.api.inc: tripal_core_chado_update()
  9097. * @see tripal_core.api.inc: tripal_core_chado_select()
  9098. *
  9099. * @return
  9100. * An array describing the current table
  9101. *
  9102. * @ingroup tripal_api
  9103. *
  9104. * @ingroup tripal_core
  9105. */
  9106. function tripal_core_chado_cvterm_schema () {
  9107. $description = array();
  9108. $description = array(
  9109. 'table' => 'cvterm',
  9110. // 'description' => 'TODO: please describe this table!',
  9111. 'fields' => array(
  9112. 'cvterm_id' => array(
  9113. // 'description' => 'TODO: please describe this field!',
  9114. 'type' => 'serial',
  9115. 'not null' => '1',
  9116. ),
  9117. 'cv_id' => array(
  9118. // 'description' => 'TODO: please describe this field!',
  9119. 'type' => 'int',
  9120. 'not null' => '1',
  9121. ),
  9122. 'name' => array(
  9123. // 'description' => 'TODO: please describe this field!',
  9124. 'type' => 'varchar',
  9125. 'length' => '1024',
  9126. 'not null' => '1',
  9127. ),
  9128. 'definition' => array(
  9129. // 'description' => 'TODO: please describe this field!',
  9130. 'type' => 'text',
  9131. 'not null' => '',
  9132. ),
  9133. 'dbxref_id' => array(
  9134. // 'description' => 'TODO: please describe this field!',
  9135. 'type' => 'int',
  9136. 'not null' => '1',
  9137. ),
  9138. 'is_obsolete' => array(
  9139. // 'description' => 'TODO: please describe this field!',
  9140. 'type' => 'int',
  9141. 'not null' => '1',
  9142. 'default' => '0',
  9143. ),
  9144. 'is_relationshiptype' => array(
  9145. // 'description' => 'TODO: please describe this field!',
  9146. 'type' => 'int',
  9147. 'not null' => '1',
  9148. 'default' => '0',
  9149. ),
  9150. ),
  9151. 'primary key' => array(
  9152. '0' => 'cvterm_id',
  9153. ),
  9154. 'unique keys' => array(
  9155. 'cvterm_c1' => array(
  9156. '0' => 'name',
  9157. '1' => 'cv_id',
  9158. '2' => 'is_obsolete',
  9159. ),
  9160. 'cvterm_c2' => array(
  9161. '0' => 'dbxref_id',
  9162. ),
  9163. ),
  9164. 'indexes' => array(
  9165. 'cvterm_idx1' => array(
  9166. '0' => 'cv_id',
  9167. ),
  9168. 'cvterm_idx2' => array(
  9169. '0' => 'name',
  9170. ),
  9171. 'cvterm_idx3' => array(
  9172. '0' => 'dbxref_id',
  9173. ),
  9174. ),
  9175. 'foreign keys' => array(
  9176. ),
  9177. );
  9178. return $description;
  9179. }
  9180. /**
  9181. * Implements hook_feature_dbxref_schema()
  9182. * Purpose: To describe the structure of feature_dbxref to tripal
  9183. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9184. * @see tripal_core.api.inc: tripal_core_chado_update()
  9185. * @see tripal_core.api.inc: tripal_core_chado_select()
  9186. *
  9187. * @return
  9188. * An array describing the current table
  9189. *
  9190. * @ingroup tripal_api
  9191. *
  9192. * @ingroup tripal_core
  9193. */
  9194. function tripal_core_chado_feature_dbxref_schema () {
  9195. $description = array();
  9196. $description = array(
  9197. 'table' => 'feature_dbxref',
  9198. // 'description' => 'TODO: please describe this table!',
  9199. 'fields' => array(
  9200. 'feature_dbxref_id' => array(
  9201. // 'description' => 'TODO: please describe this field!',
  9202. 'type' => 'serial',
  9203. 'not null' => '1',
  9204. ),
  9205. 'feature_id' => array(
  9206. // 'description' => 'TODO: please describe this field!',
  9207. 'type' => 'int',
  9208. 'not null' => '1',
  9209. ),
  9210. 'dbxref_id' => array(
  9211. // 'description' => 'TODO: please describe this field!',
  9212. 'type' => 'int',
  9213. 'not null' => '1',
  9214. ),
  9215. 'is_current' => array(
  9216. // 'description' => 'TODO: please describe this field!',
  9217. 'type' => 'boolean',
  9218. 'not null' => '1',
  9219. 'default' => 'ru',
  9220. ),
  9221. ),
  9222. 'primary key' => array(
  9223. '0' => 'feature_dbxref_id',
  9224. ),
  9225. 'unique keys' => array(
  9226. 'feature_dbxref_c1' => array(
  9227. '0' => 'feature_id',
  9228. '1' => 'dbxref_id',
  9229. ),
  9230. ),
  9231. 'indexes' => array(
  9232. 'feature_dbxref_idx1' => array(
  9233. '0' => 'feature_id',
  9234. ),
  9235. 'feature_dbxref_idx2' => array(
  9236. '0' => 'dbxref_id',
  9237. ),
  9238. ),
  9239. 'foreign keys' => array(
  9240. ),
  9241. );
  9242. return $description;
  9243. }
  9244. /**
  9245. * Implements hook_feature_cvtermprop_schema()
  9246. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9247. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9248. * @see tripal_core.api.inc: tripal_core_chado_update()
  9249. * @see tripal_core.api.inc: tripal_core_chado_select()
  9250. *
  9251. * @return
  9252. * An array describing the current table
  9253. *
  9254. * @ingroup tripal_api
  9255. *
  9256. * @ingroup tripal_core
  9257. */
  9258. function tripal_core_chado_feature_cvtermprop_schema () {
  9259. $description = array();
  9260. $description = array(
  9261. 'table' => 'feature_cvtermprop',
  9262. // 'description' => 'TODO: please describe this table!',
  9263. 'fields' => array(
  9264. 'feature_cvtermprop_id' => array(
  9265. // 'description' => 'TODO: please describe this field!',
  9266. 'type' => 'serial',
  9267. 'not null' => '1',
  9268. ),
  9269. 'feature_cvterm_id' => array(
  9270. // 'description' => 'TODO: please describe this field!',
  9271. 'type' => 'int',
  9272. 'not null' => '1',
  9273. ),
  9274. 'type_id' => array(
  9275. // 'description' => 'TODO: please describe this field!',
  9276. 'type' => 'int',
  9277. 'not null' => '1',
  9278. ),
  9279. 'value' => array(
  9280. // 'description' => 'TODO: please describe this field!',
  9281. 'type' => 'text',
  9282. 'not null' => '',
  9283. ),
  9284. 'rank' => array(
  9285. // 'description' => 'TODO: please describe this field!',
  9286. 'type' => 'int',
  9287. 'not null' => '1',
  9288. 'default' => '0',
  9289. ),
  9290. ),
  9291. 'primary key' => array(
  9292. '0' => 'feature_cvtermprop_id',
  9293. ),
  9294. 'unique keys' => array(
  9295. 'feature_cvtermprop_c1' => array(
  9296. '0' => 'feature_cvterm_id',
  9297. '1' => 'type_id',
  9298. '2' => 'rank',
  9299. ),
  9300. ),
  9301. 'indexes' => array(
  9302. 'feature_cvtermprop_idx1' => array(
  9303. '0' => 'feature_cvterm_id',
  9304. ),
  9305. 'feature_cvtermprop_idx2' => array(
  9306. '0' => 'type_id',
  9307. ),
  9308. ),
  9309. 'foreign keys' => array(
  9310. ),
  9311. );
  9312. return $description;
  9313. }
  9314. /**
  9315. * Implements hook_feature_difference_schema()
  9316. * Purpose: To describe the structure of feature_difference to tripal
  9317. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9318. * @see tripal_core.api.inc: tripal_core_chado_update()
  9319. * @see tripal_core.api.inc: tripal_core_chado_select()
  9320. *
  9321. * @return
  9322. * An array describing the current table
  9323. *
  9324. * @ingroup tripal_api
  9325. *
  9326. * @ingroup tripal_core
  9327. */
  9328. function tripal_core_chado_feature_difference_schema () {
  9329. $description = array();
  9330. $description = array(
  9331. 'table' => 'feature_difference',
  9332. // 'description' => 'TODO: please describe this table!',
  9333. 'fields' => array(
  9334. 'subject_id' => array(
  9335. // 'description' => 'TODO: please describe this field!',
  9336. 'type' => 'int',
  9337. 'not null' => '',
  9338. ),
  9339. 'object_id' => array(
  9340. // 'description' => 'TODO: please describe this field!',
  9341. 'type' => 'int',
  9342. 'not null' => '',
  9343. ),
  9344. 'srcfeature_id' => array(
  9345. // 'description' => 'TODO: please describe this field!',
  9346. 'type' => 'int',
  9347. 'size' => 'small',
  9348. 'not null' => '',
  9349. ),
  9350. 'fmin' => array(
  9351. // 'description' => 'TODO: please describe this field!',
  9352. 'type' => 'int',
  9353. 'not null' => '',
  9354. ),
  9355. 'fmax' => array(
  9356. // 'description' => 'TODO: please describe this field!',
  9357. 'type' => 'int',
  9358. 'not null' => '',
  9359. ),
  9360. 'strand' => array(
  9361. // 'description' => 'TODO: please describe this field!',
  9362. 'type' => 'int',
  9363. 'not null' => '',
  9364. ),
  9365. ),
  9366. 'primary key' => array(
  9367. ),
  9368. 'unique keys' => array(
  9369. ),
  9370. 'indexes' => array(
  9371. ),
  9372. 'foreign keys' => array(
  9373. ),
  9374. );
  9375. return $description;
  9376. }
  9377. /**
  9378. * Implements hook_feature_disjoint_schema()
  9379. * Purpose: To describe the structure of feature_disjoint to tripal
  9380. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9381. * @see tripal_core.api.inc: tripal_core_chado_update()
  9382. * @see tripal_core.api.inc: tripal_core_chado_select()
  9383. *
  9384. * @return
  9385. * An array describing the current table
  9386. *
  9387. * @ingroup tripal_api
  9388. *
  9389. * @ingroup tripal_core
  9390. */
  9391. function tripal_core_chado_feature_disjoint_schema () {
  9392. $description = array();
  9393. $description = array(
  9394. 'table' => 'feature_disjoint',
  9395. // 'description' => 'TODO: please describe this table!',
  9396. 'fields' => array(
  9397. 'subject_id' => array(
  9398. // 'description' => 'TODO: please describe this field!',
  9399. 'type' => 'int',
  9400. 'not null' => '',
  9401. ),
  9402. 'object_id' => array(
  9403. // 'description' => 'TODO: please describe this field!',
  9404. 'type' => 'int',
  9405. 'not null' => '',
  9406. ),
  9407. ),
  9408. 'primary key' => array(
  9409. ),
  9410. 'unique keys' => array(
  9411. ),
  9412. 'indexes' => array(
  9413. ),
  9414. 'foreign keys' => array(
  9415. ),
  9416. );
  9417. return $description;
  9418. }
  9419. /**
  9420. * Implements hook_feature_distance_schema()
  9421. * Purpose: To describe the structure of feature_distance to tripal
  9422. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9423. * @see tripal_core.api.inc: tripal_core_chado_update()
  9424. * @see tripal_core.api.inc: tripal_core_chado_select()
  9425. *
  9426. * @return
  9427. * An array describing the current table
  9428. *
  9429. * @ingroup tripal_api
  9430. *
  9431. * @ingroup tripal_core
  9432. */
  9433. function tripal_core_chado_feature_distance_schema () {
  9434. $description = array();
  9435. $description = array(
  9436. 'table' => 'feature_distance',
  9437. // 'description' => 'TODO: please describe this table!',
  9438. 'fields' => array(
  9439. 'subject_id' => array(
  9440. // 'description' => 'TODO: please describe this field!',
  9441. 'type' => 'int',
  9442. 'not null' => '',
  9443. ),
  9444. 'object_id' => array(
  9445. // 'description' => 'TODO: please describe this field!',
  9446. 'type' => 'int',
  9447. 'not null' => '',
  9448. ),
  9449. 'srcfeature_id' => array(
  9450. // 'description' => 'TODO: please describe this field!',
  9451. 'type' => 'int',
  9452. 'not null' => '',
  9453. ),
  9454. 'subject_strand' => array(
  9455. // 'description' => 'TODO: please describe this field!',
  9456. 'type' => 'int',
  9457. 'size' => 'small',
  9458. 'not null' => '',
  9459. ),
  9460. 'object_strand' => array(
  9461. // 'description' => 'TODO: please describe this field!',
  9462. 'type' => 'int',
  9463. 'size' => 'small',
  9464. 'not null' => '',
  9465. ),
  9466. 'distance' => array(
  9467. // 'description' => 'TODO: please describe this field!',
  9468. 'type' => 'int',
  9469. 'not null' => '',
  9470. ),
  9471. ),
  9472. 'primary key' => array(
  9473. ),
  9474. 'unique keys' => array(
  9475. ),
  9476. 'indexes' => array(
  9477. ),
  9478. 'foreign keys' => array(
  9479. ),
  9480. );
  9481. return $description;
  9482. }
  9483. /**
  9484. * Implements hook_feature_cvterm_pub_schema()
  9485. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9486. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9487. * @see tripal_core.api.inc: tripal_core_chado_update()
  9488. * @see tripal_core.api.inc: tripal_core_chado_select()
  9489. *
  9490. * @return
  9491. * An array describing the current table
  9492. *
  9493. * @ingroup tripal_api
  9494. *
  9495. * @ingroup tripal_core
  9496. */
  9497. function tripal_core_chado_feature_cvterm_pub_schema () {
  9498. $description = array();
  9499. $description = array(
  9500. 'table' => 'feature_cvterm_pub',
  9501. // 'description' => 'TODO: please describe this table!',
  9502. 'fields' => array(
  9503. 'feature_cvterm_pub_id' => array(
  9504. // 'description' => 'TODO: please describe this field!',
  9505. 'type' => 'serial',
  9506. 'not null' => '1',
  9507. ),
  9508. 'feature_cvterm_id' => array(
  9509. // 'description' => 'TODO: please describe this field!',
  9510. 'type' => 'int',
  9511. 'not null' => '1',
  9512. ),
  9513. 'pub_id' => array(
  9514. // 'description' => 'TODO: please describe this field!',
  9515. 'type' => 'int',
  9516. 'not null' => '1',
  9517. ),
  9518. ),
  9519. 'primary key' => array(
  9520. '0' => 'feature_cvterm_pub_id',
  9521. ),
  9522. 'unique keys' => array(
  9523. 'feature_cvterm_pub_c1' => array(
  9524. '0' => 'feature_cvterm_id',
  9525. '1' => 'pub_id',
  9526. ),
  9527. ),
  9528. 'indexes' => array(
  9529. 'feature_cvterm_pub_idx1' => array(
  9530. '0' => 'feature_cvterm_id',
  9531. ),
  9532. 'feature_cvterm_pub_idx2' => array(
  9533. '0' => 'pub_id',
  9534. ),
  9535. ),
  9536. 'foreign keys' => array(
  9537. ),
  9538. );
  9539. return $description;
  9540. }
  9541. /**
  9542. * Implements hook_feature_cvterm_dbxref_schema()
  9543. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9544. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9545. * @see tripal_core.api.inc: tripal_core_chado_update()
  9546. * @see tripal_core.api.inc: tripal_core_chado_select()
  9547. *
  9548. * @return
  9549. * An array describing the current table
  9550. *
  9551. * @ingroup tripal_api
  9552. *
  9553. * @ingroup tripal_core
  9554. */
  9555. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9556. $description = array();
  9557. $description = array(
  9558. 'table' => 'feature_cvterm_dbxref',
  9559. // 'description' => 'TODO: please describe this table!',
  9560. 'fields' => array(
  9561. 'feature_cvterm_dbxref_id' => array(
  9562. // 'description' => 'TODO: please describe this field!',
  9563. 'type' => 'serial',
  9564. 'not null' => '1',
  9565. ),
  9566. 'feature_cvterm_id' => array(
  9567. // 'description' => 'TODO: please describe this field!',
  9568. 'type' => 'int',
  9569. 'not null' => '1',
  9570. ),
  9571. 'dbxref_id' => array(
  9572. // 'description' => 'TODO: please describe this field!',
  9573. 'type' => 'int',
  9574. 'not null' => '1',
  9575. ),
  9576. ),
  9577. 'primary key' => array(
  9578. '0' => 'feature_cvterm_dbxref_id',
  9579. ),
  9580. 'unique keys' => array(
  9581. 'feature_cvterm_dbxref_c1' => array(
  9582. '0' => 'feature_cvterm_id',
  9583. '1' => 'dbxref_id',
  9584. ),
  9585. ),
  9586. 'indexes' => array(
  9587. 'feature_cvterm_dbxref_idx1' => array(
  9588. '0' => 'feature_cvterm_id',
  9589. ),
  9590. 'feature_cvterm_dbxref_idx2' => array(
  9591. '0' => 'dbxref_id',
  9592. ),
  9593. ),
  9594. 'foreign keys' => array(
  9595. ),
  9596. );
  9597. return $description;
  9598. }
  9599. /**
  9600. * Implements hook_f_type_schema()
  9601. * Purpose: To describe the structure of f_type to tripal
  9602. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9603. * @see tripal_core.api.inc: tripal_core_chado_update()
  9604. * @see tripal_core.api.inc: tripal_core_chado_select()
  9605. *
  9606. * @return
  9607. * An array describing the current table
  9608. *
  9609. * @ingroup tripal_api
  9610. *
  9611. * @ingroup tripal_core
  9612. */
  9613. function tripal_core_chado_f_type_schema () {
  9614. $description = array();
  9615. $description = array(
  9616. 'table' => 'f_type',
  9617. // 'description' => 'TODO: please describe this table!',
  9618. 'fields' => array(
  9619. 'feature_id' => array(
  9620. // 'description' => 'TODO: please describe this field!',
  9621. 'type' => 'int',
  9622. 'not null' => '',
  9623. ),
  9624. 'name' => array(
  9625. // 'description' => 'TODO: please describe this field!',
  9626. 'type' => 'varchar',
  9627. 'length' => '255',
  9628. 'not null' => '',
  9629. ),
  9630. 'dbxref_id' => array(
  9631. // 'description' => 'TODO: please describe this field!',
  9632. 'type' => 'int',
  9633. 'not null' => '',
  9634. ),
  9635. 'type' => array(
  9636. // 'description' => 'TODO: please describe this field!',
  9637. 'type' => 'varchar',
  9638. 'length' => '1024',
  9639. 'not null' => '',
  9640. ),
  9641. 'residues' => array(
  9642. // 'description' => 'TODO: please describe this field!',
  9643. 'type' => 'text',
  9644. 'not null' => '',
  9645. ),
  9646. 'seqlen' => array(
  9647. // 'description' => 'TODO: please describe this field!',
  9648. 'type' => 'int',
  9649. 'not null' => '',
  9650. ),
  9651. 'md5checksum' => array(
  9652. // 'description' => 'TODO: please describe this field!',
  9653. 'type' => 'char',
  9654. 'length' => '32',
  9655. 'not null' => '',
  9656. ),
  9657. 'type_id' => array(
  9658. // 'description' => 'TODO: please describe this field!',
  9659. 'type' => 'int',
  9660. 'not null' => '',
  9661. ),
  9662. 'timeaccessioned' => array(
  9663. // 'description' => 'TODO: please describe this field!',
  9664. 'type' => 'datetime',
  9665. 'not null' => '',
  9666. ),
  9667. 'timelastmodified' => array(
  9668. // 'description' => 'TODO: please describe this field!',
  9669. 'type' => 'datetime',
  9670. 'not null' => '',
  9671. ),
  9672. ),
  9673. 'primary key' => array(
  9674. ),
  9675. 'unique keys' => array(
  9676. ),
  9677. 'indexes' => array(
  9678. ),
  9679. 'foreign keys' => array(
  9680. ),
  9681. );
  9682. return $description;
  9683. }
  9684. /**
  9685. * Implements hook_feature_schema()
  9686. * Purpose: To describe the structure of feature to tripal
  9687. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9688. * @see tripal_core.api.inc: tripal_core_chado_update()
  9689. * @see tripal_core.api.inc: tripal_core_chado_select()
  9690. *
  9691. * @return
  9692. * An array describing the current table
  9693. *
  9694. * @ingroup tripal_api
  9695. *
  9696. * @ingroup tripal_core
  9697. */
  9698. function tripal_core_chado_feature_schema () {
  9699. $description = array();
  9700. $description = array(
  9701. 'table' => 'feature',
  9702. // 'description' => 'TODO: please describe this table!',
  9703. 'fields' => array(
  9704. 'feature_id' => array(
  9705. // 'description' => 'TODO: please describe this field!',
  9706. 'type' => 'serial',
  9707. 'not null' => '1',
  9708. ),
  9709. 'dbxref_id' => array(
  9710. // 'description' => 'TODO: please describe this field!',
  9711. 'type' => 'int',
  9712. 'not null' => '',
  9713. ),
  9714. 'organism_id' => array(
  9715. // 'description' => 'TODO: please describe this field!',
  9716. 'type' => 'int',
  9717. 'not null' => '1',
  9718. ),
  9719. 'name' => array(
  9720. // 'description' => 'TODO: please describe this field!',
  9721. 'type' => 'varchar',
  9722. 'length' => '255',
  9723. 'not null' => '',
  9724. ),
  9725. 'uniquename' => array(
  9726. // 'description' => 'TODO: please describe this field!',
  9727. 'type' => 'text',
  9728. 'not null' => '1',
  9729. ),
  9730. 'residues' => array(
  9731. // 'description' => 'TODO: please describe this field!',
  9732. 'type' => 'text',
  9733. 'not null' => '',
  9734. ),
  9735. 'seqlen' => array(
  9736. // 'description' => 'TODO: please describe this field!',
  9737. 'type' => 'int',
  9738. 'not null' => '',
  9739. ),
  9740. 'md5checksum' => array(
  9741. // 'description' => 'TODO: please describe this field!',
  9742. 'type' => 'char',
  9743. 'length' => '32',
  9744. 'not null' => '',
  9745. ),
  9746. 'type_id' => array(
  9747. // 'description' => 'TODO: please describe this field!',
  9748. 'type' => 'int',
  9749. 'not null' => '1',
  9750. ),
  9751. 'is_analysis' => array(
  9752. // 'description' => 'TODO: please describe this field!',
  9753. 'type' => 'boolean',
  9754. 'not null' => '1',
  9755. 'default' => 'als',
  9756. ),
  9757. 'is_obsolete' => array(
  9758. // 'description' => 'TODO: please describe this field!',
  9759. 'type' => 'boolean',
  9760. 'not null' => '1',
  9761. 'default' => 'als',
  9762. ),
  9763. 'timeaccessioned' => array(
  9764. // 'description' => 'TODO: please describe this field!',
  9765. 'type' => 'datetime',
  9766. 'not null' => '1',
  9767. 'default' => 'ow(',
  9768. ),
  9769. 'timelastmodified' => array(
  9770. // 'description' => 'TODO: please describe this field!',
  9771. 'type' => 'datetime',
  9772. 'not null' => '1',
  9773. 'default' => 'ow(',
  9774. ),
  9775. ),
  9776. 'primary key' => array(
  9777. '0' => 'feature_id',
  9778. ),
  9779. 'unique keys' => array(
  9780. 'feature_c1' => array(
  9781. '0' => 'organism_id',
  9782. '1' => 'uniquename',
  9783. '2' => 'type_id',
  9784. ),
  9785. ),
  9786. 'indexes' => array(
  9787. 'feature_idx1' => array(
  9788. '0' => 'dbxref_id',
  9789. ),
  9790. 'feature_idx2' => array(
  9791. '0' => 'organism_id',
  9792. ),
  9793. 'feature_idx3' => array(
  9794. '0' => 'type_id',
  9795. ),
  9796. 'feature_idx4' => array(
  9797. '0' => 'uniquename',
  9798. ),
  9799. 'feature_name_ind1' => array(
  9800. '0' => 'name',
  9801. ),
  9802. ),
  9803. 'foreign keys' => array(
  9804. ),
  9805. );
  9806. return $description;
  9807. }
  9808. /**
  9809. * Implements hook_feature_contains_schema()
  9810. * Purpose: To describe the structure of feature_contains to tripal
  9811. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9812. * @see tripal_core.api.inc: tripal_core_chado_update()
  9813. * @see tripal_core.api.inc: tripal_core_chado_select()
  9814. *
  9815. * @return
  9816. * An array describing the current table
  9817. *
  9818. * @ingroup tripal_api
  9819. *
  9820. * @ingroup tripal_core
  9821. */
  9822. function tripal_core_chado_feature_contains_schema () {
  9823. $description = array();
  9824. $description = array(
  9825. 'table' => 'feature_contains',
  9826. // 'description' => 'TODO: please describe this table!',
  9827. 'fields' => array(
  9828. 'subject_id' => array(
  9829. // 'description' => 'TODO: please describe this field!',
  9830. 'type' => 'int',
  9831. 'not null' => '',
  9832. ),
  9833. 'object_id' => array(
  9834. // 'description' => 'TODO: please describe this field!',
  9835. 'type' => 'int',
  9836. 'not null' => '',
  9837. ),
  9838. ),
  9839. 'primary key' => array(
  9840. ),
  9841. 'unique keys' => array(
  9842. ),
  9843. 'indexes' => array(
  9844. ),
  9845. 'foreign keys' => array(
  9846. ),
  9847. );
  9848. return $description;
  9849. }
  9850. /**
  9851. * Implements hook_feature_cvterm_schema()
  9852. * Purpose: To describe the structure of feature_cvterm to tripal
  9853. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9854. * @see tripal_core.api.inc: tripal_core_chado_update()
  9855. * @see tripal_core.api.inc: tripal_core_chado_select()
  9856. *
  9857. * @return
  9858. * An array describing the current table
  9859. *
  9860. * @ingroup tripal_api
  9861. *
  9862. * @ingroup tripal_core
  9863. */
  9864. function tripal_core_chado_feature_cvterm_schema () {
  9865. $description = array();
  9866. $description = array(
  9867. 'table' => 'feature_cvterm',
  9868. // 'description' => 'TODO: please describe this table!',
  9869. 'fields' => array(
  9870. 'feature_cvterm_id' => array(
  9871. // 'description' => 'TODO: please describe this field!',
  9872. 'type' => 'serial',
  9873. 'not null' => '1',
  9874. ),
  9875. 'feature_id' => array(
  9876. // 'description' => 'TODO: please describe this field!',
  9877. 'type' => 'int',
  9878. 'not null' => '1',
  9879. ),
  9880. 'cvterm_id' => array(
  9881. // 'description' => 'TODO: please describe this field!',
  9882. 'type' => 'int',
  9883. 'not null' => '1',
  9884. ),
  9885. 'pub_id' => array(
  9886. // 'description' => 'TODO: please describe this field!',
  9887. 'type' => 'int',
  9888. 'not null' => '1',
  9889. ),
  9890. 'is_not' => array(
  9891. // 'description' => 'TODO: please describe this field!',
  9892. 'type' => 'boolean',
  9893. 'not null' => '1',
  9894. 'default' => 'als',
  9895. ),
  9896. 'rank' => array(
  9897. // 'description' => 'TODO: please describe this field!',
  9898. 'type' => 'int',
  9899. 'not null' => '1',
  9900. 'default' => '0',
  9901. ),
  9902. ),
  9903. 'primary key' => array(
  9904. '0' => 'feature_cvterm_id',
  9905. ),
  9906. 'unique keys' => array(
  9907. 'feature_cvterm_c1' => array(
  9908. '0' => 'feature_id',
  9909. '1' => 'cvterm_id',
  9910. '2' => 'pub_id',
  9911. '3' => 'rank',
  9912. ),
  9913. ),
  9914. 'indexes' => array(
  9915. 'feature_cvterm_idx1' => array(
  9916. '0' => 'feature_id',
  9917. ),
  9918. 'feature_cvterm_idx2' => array(
  9919. '0' => 'cvterm_id',
  9920. ),
  9921. 'feature_cvterm_idx3' => array(
  9922. '0' => 'pub_id',
  9923. ),
  9924. ),
  9925. 'foreign keys' => array(
  9926. ),
  9927. );
  9928. return $description;
  9929. }
  9930. /**
  9931. * Implements hook_feature_expression_schema()
  9932. * Purpose: To describe the structure of feature_expression to tripal
  9933. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9934. * @see tripal_core.api.inc: tripal_core_chado_update()
  9935. * @see tripal_core.api.inc: tripal_core_chado_select()
  9936. *
  9937. * @return
  9938. * An array describing the current table
  9939. *
  9940. * @ingroup tripal_api
  9941. *
  9942. * @ingroup tripal_core
  9943. */
  9944. function tripal_core_chado_feature_expression_schema () {
  9945. $description = array();
  9946. $description = array(
  9947. 'table' => 'feature_expression',
  9948. // 'description' => 'TODO: please describe this table!',
  9949. 'fields' => array(
  9950. 'feature_expression_id' => array(
  9951. // 'description' => 'TODO: please describe this field!',
  9952. 'type' => 'serial',
  9953. 'not null' => '1',
  9954. ),
  9955. 'expression_id' => array(
  9956. // 'description' => 'TODO: please describe this field!',
  9957. 'type' => 'int',
  9958. 'not null' => '1',
  9959. ),
  9960. 'feature_id' => array(
  9961. // 'description' => 'TODO: please describe this field!',
  9962. 'type' => 'int',
  9963. 'not null' => '1',
  9964. ),
  9965. 'pub_id' => array(
  9966. // 'description' => 'TODO: please describe this field!',
  9967. 'type' => 'int',
  9968. 'not null' => '1',
  9969. ),
  9970. ),
  9971. 'primary key' => array(
  9972. '0' => 'feature_expression_id',
  9973. ),
  9974. 'unique keys' => array(
  9975. 'feature_expression_c1' => array(
  9976. '0' => 'expression_id',
  9977. '1' => 'feature_id',
  9978. '2' => 'pub_id',
  9979. ),
  9980. ),
  9981. 'indexes' => array(
  9982. 'feature_expression_idx1' => array(
  9983. '0' => 'expression_id',
  9984. ),
  9985. 'feature_expression_idx2' => array(
  9986. '0' => 'feature_id',
  9987. ),
  9988. 'feature_expression_idx3' => array(
  9989. '0' => 'pub_id',
  9990. ),
  9991. ),
  9992. 'foreign keys' => array(
  9993. ),
  9994. );
  9995. return $description;
  9996. }
  9997. /**
  9998. * Implements hook_feature_expressionprop_schema()
  9999. * Purpose: To describe the structure of feature_expressionprop to tripal
  10000. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10001. * @see tripal_core.api.inc: tripal_core_chado_update()
  10002. * @see tripal_core.api.inc: tripal_core_chado_select()
  10003. *
  10004. * @return
  10005. * An array describing the current table
  10006. *
  10007. * @ingroup tripal_api
  10008. *
  10009. * @ingroup tripal_core
  10010. */
  10011. function tripal_core_chado_feature_expressionprop_schema () {
  10012. $description = array();
  10013. $description = array(
  10014. 'table' => 'feature_expressionprop',
  10015. // 'description' => 'TODO: please describe this table!',
  10016. 'fields' => array(
  10017. 'feature_expressionprop_id' => array(
  10018. // 'description' => 'TODO: please describe this field!',
  10019. 'type' => 'serial',
  10020. 'not null' => '1',
  10021. ),
  10022. 'feature_expression_id' => array(
  10023. // 'description' => 'TODO: please describe this field!',
  10024. 'type' => 'int',
  10025. 'not null' => '1',
  10026. ),
  10027. 'type_id' => array(
  10028. // 'description' => 'TODO: please describe this field!',
  10029. 'type' => 'int',
  10030. 'not null' => '1',
  10031. ),
  10032. 'value' => array(
  10033. // 'description' => 'TODO: please describe this field!',
  10034. 'type' => 'text',
  10035. 'not null' => '',
  10036. ),
  10037. 'rank' => array(
  10038. // 'description' => 'TODO: please describe this field!',
  10039. 'type' => 'int',
  10040. 'not null' => '1',
  10041. 'default' => '0',
  10042. ),
  10043. ),
  10044. 'primary key' => array(
  10045. '0' => 'feature_expressionprop_id',
  10046. ),
  10047. 'unique keys' => array(
  10048. 'feature_expressionprop_c1' => array(
  10049. '0' => 'feature_expression_id',
  10050. '1' => 'type_id',
  10051. '2' => 'rank',
  10052. ),
  10053. ),
  10054. 'indexes' => array(
  10055. 'feature_expressionprop_idx1' => array(
  10056. '0' => 'feature_expression_id',
  10057. ),
  10058. 'feature_expressionprop_idx2' => array(
  10059. '0' => 'type_id',
  10060. ),
  10061. ),
  10062. 'foreign keys' => array(
  10063. ),
  10064. );
  10065. return $description;
  10066. }
  10067. /**
  10068. * Implements hook_feature_pubprop_schema()
  10069. * Purpose: To describe the structure of feature_pubprop to tripal
  10070. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10071. * @see tripal_core.api.inc: tripal_core_chado_update()
  10072. * @see tripal_core.api.inc: tripal_core_chado_select()
  10073. *
  10074. * @return
  10075. * An array describing the current table
  10076. *
  10077. * @ingroup tripal_api
  10078. *
  10079. * @ingroup tripal_core
  10080. */
  10081. function tripal_core_chado_feature_pubprop_schema () {
  10082. $description = array();
  10083. $description = array(
  10084. 'table' => 'feature_pubprop',
  10085. // 'description' => 'TODO: please describe this table!',
  10086. 'fields' => array(
  10087. 'feature_pubprop_id' => array(
  10088. // 'description' => 'TODO: please describe this field!',
  10089. 'type' => 'serial',
  10090. 'not null' => '1',
  10091. ),
  10092. 'feature_pub_id' => array(
  10093. // 'description' => 'TODO: please describe this field!',
  10094. 'type' => 'int',
  10095. 'not null' => '1',
  10096. ),
  10097. 'type_id' => array(
  10098. // 'description' => 'TODO: please describe this field!',
  10099. 'type' => 'int',
  10100. 'not null' => '1',
  10101. ),
  10102. 'value' => array(
  10103. // 'description' => 'TODO: please describe this field!',
  10104. 'type' => 'text',
  10105. 'not null' => '',
  10106. ),
  10107. 'rank' => array(
  10108. // 'description' => 'TODO: please describe this field!',
  10109. 'type' => 'int',
  10110. 'not null' => '1',
  10111. 'default' => '0',
  10112. ),
  10113. ),
  10114. 'primary key' => array(
  10115. '0' => 'feature_pubprop_id',
  10116. ),
  10117. 'unique keys' => array(
  10118. 'feature_pubprop_c1' => array(
  10119. '0' => 'feature_pub_id',
  10120. '1' => 'type_id',
  10121. '2' => 'rank',
  10122. ),
  10123. ),
  10124. 'indexes' => array(
  10125. 'feature_pubprop_idx1' => array(
  10126. '0' => 'feature_pub_id',
  10127. ),
  10128. ),
  10129. 'foreign keys' => array(
  10130. ),
  10131. );
  10132. return $description;
  10133. }
  10134. /**
  10135. * Implements hook_feature_relationship_schema()
  10136. * Purpose: To describe the structure of feature_relationship to tripal
  10137. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10138. * @see tripal_core.api.inc: tripal_core_chado_update()
  10139. * @see tripal_core.api.inc: tripal_core_chado_select()
  10140. *
  10141. * @return
  10142. * An array describing the current table
  10143. *
  10144. * @ingroup tripal_api
  10145. *
  10146. * @ingroup tripal_core
  10147. */
  10148. function tripal_core_chado_feature_relationship_schema () {
  10149. $description = array();
  10150. $description = array(
  10151. 'table' => 'feature_relationship',
  10152. // 'description' => 'TODO: please describe this table!',
  10153. 'fields' => array(
  10154. 'feature_relationship_id' => array(
  10155. // 'description' => 'TODO: please describe this field!',
  10156. 'type' => 'serial',
  10157. 'not null' => '1',
  10158. ),
  10159. 'subject_id' => array(
  10160. // 'description' => 'TODO: please describe this field!',
  10161. 'type' => 'int',
  10162. 'not null' => '1',
  10163. ),
  10164. 'object_id' => array(
  10165. // 'description' => 'TODO: please describe this field!',
  10166. 'type' => 'int',
  10167. 'not null' => '1',
  10168. ),
  10169. 'type_id' => array(
  10170. // 'description' => 'TODO: please describe this field!',
  10171. 'type' => 'int',
  10172. 'not null' => '1',
  10173. ),
  10174. 'value' => array(
  10175. // 'description' => 'TODO: please describe this field!',
  10176. 'type' => 'text',
  10177. 'not null' => '',
  10178. ),
  10179. 'rank' => array(
  10180. // 'description' => 'TODO: please describe this field!',
  10181. 'type' => 'int',
  10182. 'not null' => '1',
  10183. 'default' => '0',
  10184. ),
  10185. ),
  10186. 'primary key' => array(
  10187. '0' => 'feature_relationship_id',
  10188. ),
  10189. 'unique keys' => array(
  10190. 'feature_relationship_c1' => array(
  10191. '0' => 'subject_id',
  10192. '1' => 'object_id',
  10193. '2' => 'type_id',
  10194. '3' => 'rank',
  10195. ),
  10196. ),
  10197. 'indexes' => array(
  10198. 'feature_relationship_idx1' => array(
  10199. '0' => 'subject_id',
  10200. ),
  10201. 'feature_relationship_idx2' => array(
  10202. '0' => 'object_id',
  10203. ),
  10204. 'feature_relationship_idx3' => array(
  10205. '0' => 'type_id',
  10206. ),
  10207. ),
  10208. 'foreign keys' => array(
  10209. ),
  10210. );
  10211. return $description;
  10212. }
  10213. /**
  10214. * Implements hook_feature_relationship_pub_schema()
  10215. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10216. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10217. * @see tripal_core.api.inc: tripal_core_chado_update()
  10218. * @see tripal_core.api.inc: tripal_core_chado_select()
  10219. *
  10220. * @return
  10221. * An array describing the current table
  10222. *
  10223. * @ingroup tripal_api
  10224. *
  10225. * @ingroup tripal_core
  10226. */
  10227. function tripal_core_chado_feature_relationship_pub_schema () {
  10228. $description = array();
  10229. $description = array(
  10230. 'table' => 'feature_relationship_pub',
  10231. // 'description' => 'TODO: please describe this table!',
  10232. 'fields' => array(
  10233. 'feature_relationship_pub_id' => array(
  10234. // 'description' => 'TODO: please describe this field!',
  10235. 'type' => 'serial',
  10236. 'not null' => '1',
  10237. ),
  10238. 'feature_relationship_id' => array(
  10239. // 'description' => 'TODO: please describe this field!',
  10240. 'type' => 'int',
  10241. 'not null' => '1',
  10242. ),
  10243. 'pub_id' => array(
  10244. // 'description' => 'TODO: please describe this field!',
  10245. 'type' => 'int',
  10246. 'not null' => '1',
  10247. ),
  10248. ),
  10249. 'primary key' => array(
  10250. '0' => 'feature_relationship_pub_id',
  10251. ),
  10252. 'unique keys' => array(
  10253. 'feature_relationship_pub_c1' => array(
  10254. '0' => 'feature_relationship_id',
  10255. '1' => 'pub_id',
  10256. ),
  10257. ),
  10258. 'indexes' => array(
  10259. 'feature_relationship_pub_idx1' => array(
  10260. '0' => 'feature_relationship_id',
  10261. ),
  10262. 'feature_relationship_pub_idx2' => array(
  10263. '0' => 'pub_id',
  10264. ),
  10265. ),
  10266. 'foreign keys' => array(
  10267. ),
  10268. );
  10269. return $description;
  10270. }
  10271. /**
  10272. * Implements hook_feature_relationshipprop_schema()
  10273. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10274. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10275. * @see tripal_core.api.inc: tripal_core_chado_update()
  10276. * @see tripal_core.api.inc: tripal_core_chado_select()
  10277. *
  10278. * @return
  10279. * An array describing the current table
  10280. *
  10281. * @ingroup tripal_api
  10282. *
  10283. * @ingroup tripal_core
  10284. */
  10285. function tripal_core_chado_feature_relationshipprop_schema () {
  10286. $description = array();
  10287. $description = array(
  10288. 'table' => 'feature_relationshipprop',
  10289. // 'description' => 'TODO: please describe this table!',
  10290. 'fields' => array(
  10291. 'feature_relationshipprop_id' => array(
  10292. // 'description' => 'TODO: please describe this field!',
  10293. 'type' => 'serial',
  10294. 'not null' => '1',
  10295. ),
  10296. 'feature_relationship_id' => array(
  10297. // 'description' => 'TODO: please describe this field!',
  10298. 'type' => 'int',
  10299. 'not null' => '1',
  10300. ),
  10301. 'type_id' => array(
  10302. // 'description' => 'TODO: please describe this field!',
  10303. 'type' => 'int',
  10304. 'not null' => '1',
  10305. ),
  10306. 'value' => array(
  10307. // 'description' => 'TODO: please describe this field!',
  10308. 'type' => 'text',
  10309. 'not null' => '',
  10310. ),
  10311. 'rank' => array(
  10312. // 'description' => 'TODO: please describe this field!',
  10313. 'type' => 'int',
  10314. 'not null' => '1',
  10315. 'default' => '0',
  10316. ),
  10317. ),
  10318. 'primary key' => array(
  10319. '0' => 'feature_relationshipprop_id',
  10320. ),
  10321. 'unique keys' => array(
  10322. 'feature_relationshipprop_c1' => array(
  10323. '0' => 'feature_relationship_id',
  10324. '1' => 'type_id',
  10325. '2' => 'rank',
  10326. ),
  10327. ),
  10328. 'indexes' => array(
  10329. 'feature_relationshipprop_idx1' => array(
  10330. '0' => 'feature_relationship_id',
  10331. ),
  10332. 'feature_relationshipprop_idx2' => array(
  10333. '0' => 'type_id',
  10334. ),
  10335. ),
  10336. 'foreign keys' => array(
  10337. ),
  10338. );
  10339. return $description;
  10340. }
  10341. /**
  10342. * Implements hook_feature_pub_schema()
  10343. * Purpose: To describe the structure of feature_pub to tripal
  10344. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10345. * @see tripal_core.api.inc: tripal_core_chado_update()
  10346. * @see tripal_core.api.inc: tripal_core_chado_select()
  10347. *
  10348. * @return
  10349. * An array describing the current table
  10350. *
  10351. * @ingroup tripal_api
  10352. *
  10353. * @ingroup tripal_core
  10354. */
  10355. function tripal_core_chado_feature_pub_schema () {
  10356. $description = array();
  10357. $description = array(
  10358. 'table' => 'feature_pub',
  10359. // 'description' => 'TODO: please describe this table!',
  10360. 'fields' => array(
  10361. 'feature_pub_id' => array(
  10362. // 'description' => 'TODO: please describe this field!',
  10363. 'type' => 'serial',
  10364. 'not null' => '1',
  10365. ),
  10366. 'feature_id' => array(
  10367. // 'description' => 'TODO: please describe this field!',
  10368. 'type' => 'int',
  10369. 'not null' => '1',
  10370. ),
  10371. 'pub_id' => array(
  10372. // 'description' => 'TODO: please describe this field!',
  10373. 'type' => 'int',
  10374. 'not null' => '1',
  10375. ),
  10376. ),
  10377. 'primary key' => array(
  10378. '0' => 'feature_pub_id',
  10379. ),
  10380. 'unique keys' => array(
  10381. 'feature_pub_c1' => array(
  10382. '0' => 'feature_id',
  10383. '1' => 'pub_id',
  10384. ),
  10385. ),
  10386. 'indexes' => array(
  10387. 'feature_pub_idx1' => array(
  10388. '0' => 'feature_id',
  10389. ),
  10390. 'feature_pub_idx2' => array(
  10391. '0' => 'pub_id',
  10392. ),
  10393. ),
  10394. 'foreign keys' => array(
  10395. ),
  10396. );
  10397. return $description;
  10398. }
  10399. /**
  10400. * Implements hook_feature_phenotype_schema()
  10401. * Purpose: To describe the structure of feature_phenotype to tripal
  10402. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10403. * @see tripal_core.api.inc: tripal_core_chado_update()
  10404. * @see tripal_core.api.inc: tripal_core_chado_select()
  10405. *
  10406. * @return
  10407. * An array describing the current table
  10408. *
  10409. * @ingroup tripal_api
  10410. *
  10411. * @ingroup tripal_core
  10412. */
  10413. function tripal_core_chado_feature_phenotype_schema () {
  10414. $description = array();
  10415. $description = array(
  10416. 'table' => 'feature_phenotype',
  10417. // 'description' => 'TODO: please describe this table!',
  10418. 'fields' => array(
  10419. 'feature_phenotype_id' => array(
  10420. // 'description' => 'TODO: please describe this field!',
  10421. 'type' => 'serial',
  10422. 'not null' => '1',
  10423. ),
  10424. 'feature_id' => array(
  10425. // 'description' => 'TODO: please describe this field!',
  10426. 'type' => 'int',
  10427. 'not null' => '1',
  10428. ),
  10429. 'phenotype_id' => array(
  10430. // 'description' => 'TODO: please describe this field!',
  10431. 'type' => 'int',
  10432. 'not null' => '1',
  10433. ),
  10434. ),
  10435. 'primary key' => array(
  10436. '0' => 'feature_phenotype_id',
  10437. ),
  10438. 'unique keys' => array(
  10439. 'feature_phenotype_c1' => array(
  10440. '0' => 'feature_id',
  10441. '1' => 'phenotype_id',
  10442. ),
  10443. ),
  10444. 'indexes' => array(
  10445. 'feature_phenotype_idx1' => array(
  10446. '0' => 'feature_id',
  10447. ),
  10448. 'feature_phenotype_idx2' => array(
  10449. '0' => 'phenotype_id',
  10450. ),
  10451. ),
  10452. 'foreign keys' => array(
  10453. ),
  10454. );
  10455. return $description;
  10456. }
  10457. /**
  10458. * Implements hook_feature_genotype_schema()
  10459. * Purpose: To describe the structure of feature_genotype to tripal
  10460. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10461. * @see tripal_core.api.inc: tripal_core_chado_update()
  10462. * @see tripal_core.api.inc: tripal_core_chado_select()
  10463. *
  10464. * @return
  10465. * An array describing the current table
  10466. *
  10467. * @ingroup tripal_api
  10468. *
  10469. * @ingroup tripal_core
  10470. */
  10471. function tripal_core_chado_feature_genotype_schema () {
  10472. $description = array();
  10473. $description = array(
  10474. 'table' => 'feature_genotype',
  10475. // 'description' => 'TODO: please describe this table!',
  10476. 'fields' => array(
  10477. 'feature_genotype_id' => array(
  10478. // 'description' => 'TODO: please describe this field!',
  10479. 'type' => 'serial',
  10480. 'not null' => '1',
  10481. ),
  10482. 'feature_id' => array(
  10483. // 'description' => 'TODO: please describe this field!',
  10484. 'type' => 'int',
  10485. 'not null' => '1',
  10486. ),
  10487. 'genotype_id' => array(
  10488. // 'description' => 'TODO: please describe this field!',
  10489. 'type' => 'int',
  10490. 'not null' => '1',
  10491. ),
  10492. 'chromosome_id' => array(
  10493. // 'description' => 'TODO: please describe this field!',
  10494. 'type' => 'int',
  10495. 'not null' => '',
  10496. ),
  10497. 'rank' => array(
  10498. // 'description' => 'TODO: please describe this field!',
  10499. 'type' => 'int',
  10500. 'not null' => '1',
  10501. ),
  10502. 'cgroup' => array(
  10503. // 'description' => 'TODO: please describe this field!',
  10504. 'type' => 'int',
  10505. 'not null' => '1',
  10506. ),
  10507. 'cvterm_id' => array(
  10508. // 'description' => 'TODO: please describe this field!',
  10509. 'type' => 'int',
  10510. 'not null' => '1',
  10511. ),
  10512. ),
  10513. 'primary key' => array(
  10514. '0' => 'feature_genotype_id',
  10515. ),
  10516. 'unique keys' => array(
  10517. 'feature_genotype_c1' => array(
  10518. '0' => 'feature_id',
  10519. '1' => 'genotype_id',
  10520. '2' => 'cvterm_id',
  10521. '3' => 'chromosome_id',
  10522. '4' => 'rank',
  10523. '5' => 'cgroup',
  10524. ),
  10525. ),
  10526. 'indexes' => array(
  10527. 'feature_genotype_idx1' => array(
  10528. '0' => 'feature_id',
  10529. ),
  10530. 'feature_genotype_idx2' => array(
  10531. '0' => 'genotype_id',
  10532. ),
  10533. ),
  10534. 'foreign keys' => array(
  10535. ),
  10536. );
  10537. return $description;
  10538. }
  10539. /**
  10540. * Implements hook_feature_intersection_schema()
  10541. * Purpose: To describe the structure of feature_intersection to tripal
  10542. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10543. * @see tripal_core.api.inc: tripal_core_chado_update()
  10544. * @see tripal_core.api.inc: tripal_core_chado_select()
  10545. *
  10546. * @return
  10547. * An array describing the current table
  10548. *
  10549. * @ingroup tripal_api
  10550. *
  10551. * @ingroup tripal_core
  10552. */
  10553. function tripal_core_chado_feature_intersection_schema () {
  10554. $description = array();
  10555. $description = array(
  10556. 'table' => 'feature_intersection',
  10557. // 'description' => 'TODO: please describe this table!',
  10558. 'fields' => array(
  10559. 'subject_id' => array(
  10560. // 'description' => 'TODO: please describe this field!',
  10561. 'type' => 'int',
  10562. 'not null' => '',
  10563. ),
  10564. 'object_id' => array(
  10565. // 'description' => 'TODO: please describe this field!',
  10566. 'type' => 'int',
  10567. 'not null' => '',
  10568. ),
  10569. 'srcfeature_id' => array(
  10570. // 'description' => 'TODO: please describe this field!',
  10571. 'type' => 'int',
  10572. 'not null' => '',
  10573. ),
  10574. 'subject_strand' => array(
  10575. // 'description' => 'TODO: please describe this field!',
  10576. 'type' => 'int',
  10577. 'size' => 'small',
  10578. 'not null' => '',
  10579. ),
  10580. 'object_strand' => array(
  10581. // 'description' => 'TODO: please describe this field!',
  10582. 'type' => 'int',
  10583. 'size' => 'small',
  10584. 'not null' => '',
  10585. ),
  10586. 'fmin' => array(
  10587. // 'description' => 'TODO: please describe this field!',
  10588. 'type' => 'int',
  10589. 'not null' => '',
  10590. ),
  10591. 'fmax' => array(
  10592. // 'description' => 'TODO: please describe this field!',
  10593. 'type' => 'int',
  10594. 'not null' => '',
  10595. ),
  10596. ),
  10597. 'primary key' => array(
  10598. ),
  10599. 'unique keys' => array(
  10600. ),
  10601. 'indexes' => array(
  10602. ),
  10603. 'foreign keys' => array(
  10604. ),
  10605. );
  10606. return $description;
  10607. }
  10608. /**
  10609. * Implements hook_feature_meets_schema()
  10610. * Purpose: To describe the structure of feature_meets to tripal
  10611. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10612. * @see tripal_core.api.inc: tripal_core_chado_update()
  10613. * @see tripal_core.api.inc: tripal_core_chado_select()
  10614. *
  10615. * @return
  10616. * An array describing the current table
  10617. *
  10618. * @ingroup tripal_api
  10619. *
  10620. * @ingroup tripal_core
  10621. */
  10622. function tripal_core_chado_feature_meets_schema () {
  10623. $description = array();
  10624. $description = array(
  10625. 'table' => 'feature_meets',
  10626. // 'description' => 'TODO: please describe this table!',
  10627. 'fields' => array(
  10628. 'subject_id' => array(
  10629. // 'description' => 'TODO: please describe this field!',
  10630. 'type' => 'int',
  10631. 'not null' => '',
  10632. ),
  10633. 'object_id' => array(
  10634. // 'description' => 'TODO: please describe this field!',
  10635. 'type' => 'int',
  10636. 'not null' => '',
  10637. ),
  10638. ),
  10639. 'primary key' => array(
  10640. ),
  10641. 'unique keys' => array(
  10642. ),
  10643. 'indexes' => array(
  10644. ),
  10645. 'foreign keys' => array(
  10646. ),
  10647. );
  10648. return $description;
  10649. }
  10650. /**
  10651. * Implements hook_feature_meets_on_same_strand_schema()
  10652. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10653. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10654. * @see tripal_core.api.inc: tripal_core_chado_update()
  10655. * @see tripal_core.api.inc: tripal_core_chado_select()
  10656. *
  10657. * @return
  10658. * An array describing the current table
  10659. *
  10660. * @ingroup tripal_api
  10661. *
  10662. * @ingroup tripal_core
  10663. */
  10664. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10665. $description = array();
  10666. $description = array(
  10667. 'table' => 'feature_meets_on_same_strand',
  10668. // 'description' => 'TODO: please describe this table!',
  10669. 'fields' => array(
  10670. 'subject_id' => array(
  10671. // 'description' => 'TODO: please describe this field!',
  10672. 'type' => 'int',
  10673. 'not null' => '',
  10674. ),
  10675. 'object_id' => array(
  10676. // 'description' => 'TODO: please describe this field!',
  10677. 'type' => 'int',
  10678. 'not null' => '',
  10679. ),
  10680. ),
  10681. 'primary key' => array(
  10682. ),
  10683. 'unique keys' => array(
  10684. ),
  10685. 'indexes' => array(
  10686. ),
  10687. 'foreign keys' => array(
  10688. ),
  10689. );
  10690. return $description;
  10691. }
  10692. /**
  10693. * Implements hook_f_loc_schema()
  10694. * Purpose: To describe the structure of f_loc to tripal
  10695. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10696. * @see tripal_core.api.inc: tripal_core_chado_update()
  10697. * @see tripal_core.api.inc: tripal_core_chado_select()
  10698. *
  10699. * @return
  10700. * An array describing the current table
  10701. *
  10702. * @ingroup tripal_api
  10703. *
  10704. * @ingroup tripal_core
  10705. */
  10706. function tripal_core_chado_f_loc_schema () {
  10707. $description = array();
  10708. $description = array(
  10709. 'table' => 'f_loc',
  10710. // 'description' => 'TODO: please describe this table!',
  10711. 'fields' => array(
  10712. 'feature_id' => array(
  10713. // 'description' => 'TODO: please describe this field!',
  10714. 'type' => 'int',
  10715. 'not null' => '',
  10716. ),
  10717. 'name' => array(
  10718. // 'description' => 'TODO: please describe this field!',
  10719. 'type' => 'varchar',
  10720. 'length' => '255',
  10721. 'not null' => '',
  10722. ),
  10723. 'dbxref_id' => array(
  10724. // 'description' => 'TODO: please describe this field!',
  10725. 'type' => 'int',
  10726. 'not null' => '',
  10727. ),
  10728. 'nbeg' => array(
  10729. // 'description' => 'TODO: please describe this field!',
  10730. 'type' => 'int',
  10731. 'not null' => '',
  10732. ),
  10733. 'nend' => array(
  10734. // 'description' => 'TODO: please describe this field!',
  10735. 'type' => 'int',
  10736. 'not null' => '',
  10737. ),
  10738. 'strand' => array(
  10739. // 'description' => 'TODO: please describe this field!',
  10740. 'type' => 'int',
  10741. 'size' => 'small',
  10742. 'not null' => '',
  10743. ),
  10744. ),
  10745. 'primary key' => array(
  10746. ),
  10747. 'unique keys' => array(
  10748. ),
  10749. 'indexes' => array(
  10750. ),
  10751. 'foreign keys' => array(
  10752. ),
  10753. );
  10754. return $description;
  10755. }
  10756. /**
  10757. * Implements hook_expressionprop_schema()
  10758. * Purpose: To describe the structure of expressionprop to tripal
  10759. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10760. * @see tripal_core.api.inc: tripal_core_chado_update()
  10761. * @see tripal_core.api.inc: tripal_core_chado_select()
  10762. *
  10763. * @return
  10764. * An array describing the current table
  10765. *
  10766. * @ingroup tripal_api
  10767. *
  10768. * @ingroup tripal_core
  10769. */
  10770. function tripal_core_chado_expressionprop_schema () {
  10771. $description = array();
  10772. $description = array(
  10773. 'table' => 'expressionprop',
  10774. // 'description' => 'TODO: please describe this table!',
  10775. 'fields' => array(
  10776. 'expressionprop_id' => array(
  10777. // 'description' => 'TODO: please describe this field!',
  10778. 'type' => 'serial',
  10779. 'not null' => '1',
  10780. ),
  10781. 'expression_id' => array(
  10782. // 'description' => 'TODO: please describe this field!',
  10783. 'type' => 'int',
  10784. 'not null' => '1',
  10785. ),
  10786. 'type_id' => array(
  10787. // 'description' => 'TODO: please describe this field!',
  10788. 'type' => 'int',
  10789. 'not null' => '1',
  10790. ),
  10791. 'value' => array(
  10792. // 'description' => 'TODO: please describe this field!',
  10793. 'type' => 'text',
  10794. 'not null' => '',
  10795. ),
  10796. 'rank' => array(
  10797. // 'description' => 'TODO: please describe this field!',
  10798. 'type' => 'int',
  10799. 'not null' => '1',
  10800. 'default' => '0',
  10801. ),
  10802. ),
  10803. 'primary key' => array(
  10804. '0' => 'expressionprop_id',
  10805. ),
  10806. 'unique keys' => array(
  10807. 'expressionprop_c1' => array(
  10808. '0' => 'expression_id',
  10809. '1' => 'type_id',
  10810. '2' => 'rank',
  10811. ),
  10812. ),
  10813. 'indexes' => array(
  10814. 'expressionprop_idx1' => array(
  10815. '0' => 'expression_id',
  10816. ),
  10817. 'expressionprop_idx2' => array(
  10818. '0' => 'type_id',
  10819. ),
  10820. ),
  10821. 'foreign keys' => array(
  10822. ),
  10823. );
  10824. return $description;
  10825. }
  10826. /**
  10827. * Implements hook_db_dbxref_count_schema()
  10828. * Purpose: To describe the structure of db_dbxref_count to tripal
  10829. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10830. * @see tripal_core.api.inc: tripal_core_chado_update()
  10831. * @see tripal_core.api.inc: tripal_core_chado_select()
  10832. *
  10833. * @return
  10834. * An array describing the current table
  10835. *
  10836. * @ingroup tripal_api
  10837. *
  10838. * @ingroup tripal_core
  10839. */
  10840. function tripal_core_chado_db_dbxref_count_schema () {
  10841. $description = array();
  10842. $description = array(
  10843. 'table' => 'db_dbxref_count',
  10844. // 'description' => 'TODO: please describe this table!',
  10845. 'fields' => array(
  10846. 'name' => array(
  10847. // 'description' => 'TODO: please describe this field!',
  10848. 'type' => 'varchar',
  10849. 'length' => '255',
  10850. 'not null' => '',
  10851. ),
  10852. 'num_dbxrefs' => array(
  10853. // 'description' => 'TODO: please describe this field!',
  10854. 'type' => 'int',
  10855. 'size' => 'big',
  10856. 'not null' => '',
  10857. ),
  10858. ),
  10859. 'primary key' => array(
  10860. ),
  10861. 'unique keys' => array(
  10862. ),
  10863. 'indexes' => array(
  10864. ),
  10865. 'foreign keys' => array(
  10866. ),
  10867. );
  10868. return $description;
  10869. }
  10870. /**
  10871. * Implements hook_dbxref_schema()
  10872. * Purpose: To describe the structure of dbxref to tripal
  10873. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10874. * @see tripal_core.api.inc: tripal_core_chado_update()
  10875. * @see tripal_core.api.inc: tripal_core_chado_select()
  10876. *
  10877. * @return
  10878. * An array describing the current table
  10879. *
  10880. * @ingroup tripal_api
  10881. *
  10882. * @ingroup tripal_core
  10883. */
  10884. function tripal_core_chado_dbxref_schema () {
  10885. $description = array();
  10886. $description = array(
  10887. 'table' => 'dbxref',
  10888. // 'description' => 'TODO: please describe this table!',
  10889. 'fields' => array(
  10890. 'dbxref_id' => array(
  10891. // 'description' => 'TODO: please describe this field!',
  10892. 'type' => 'serial',
  10893. 'not null' => '1',
  10894. ),
  10895. 'db_id' => array(
  10896. // 'description' => 'TODO: please describe this field!',
  10897. 'type' => 'int',
  10898. 'not null' => '1',
  10899. ),
  10900. 'accession' => array(
  10901. // 'description' => 'TODO: please describe this field!',
  10902. 'type' => 'varchar',
  10903. 'length' => '255',
  10904. 'not null' => '1',
  10905. ),
  10906. 'version' => array(
  10907. // 'description' => 'TODO: please describe this field!',
  10908. 'type' => 'varchar',
  10909. 'length' => '255',
  10910. 'not null' => '1',
  10911. 'default' => '',
  10912. ),
  10913. 'description' => array(
  10914. // 'description' => 'TODO: please describe this field!',
  10915. 'type' => 'text',
  10916. 'not null' => '',
  10917. ),
  10918. ),
  10919. 'primary key' => array(
  10920. '0' => 'dbxref_id',
  10921. ),
  10922. 'unique keys' => array(
  10923. 'dbxref_c1' => array(
  10924. '0' => 'db_id',
  10925. '1' => 'accession',
  10926. '2' => 'version',
  10927. ),
  10928. ),
  10929. 'indexes' => array(
  10930. 'dbxref_idx1' => array(
  10931. '0' => 'db_id',
  10932. ),
  10933. 'dbxref_idx2' => array(
  10934. '0' => 'accession',
  10935. ),
  10936. 'dbxref_idx3' => array(
  10937. '0' => 'version',
  10938. ),
  10939. ),
  10940. 'foreign keys' => array(
  10941. ),
  10942. );
  10943. return $description;
  10944. }
  10945. /**
  10946. * Implements hook_dbxrefprop_schema()
  10947. * Purpose: To describe the structure of dbxrefprop to tripal
  10948. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10949. * @see tripal_core.api.inc: tripal_core_chado_update()
  10950. * @see tripal_core.api.inc: tripal_core_chado_select()
  10951. *
  10952. * @return
  10953. * An array describing the current table
  10954. *
  10955. * @ingroup tripal_api
  10956. *
  10957. * @ingroup tripal_core
  10958. */
  10959. function tripal_core_chado_dbxrefprop_schema () {
  10960. $description = array();
  10961. $description = array(
  10962. 'table' => 'dbxrefprop',
  10963. // 'description' => 'TODO: please describe this table!',
  10964. 'fields' => array(
  10965. 'dbxrefprop_id' => array(
  10966. // 'description' => 'TODO: please describe this field!',
  10967. 'type' => 'serial',
  10968. 'not null' => '1',
  10969. ),
  10970. 'dbxref_id' => array(
  10971. // 'description' => 'TODO: please describe this field!',
  10972. 'type' => 'int',
  10973. 'not null' => '1',
  10974. ),
  10975. 'type_id' => array(
  10976. // 'description' => 'TODO: please describe this field!',
  10977. 'type' => 'int',
  10978. 'not null' => '1',
  10979. ),
  10980. 'value' => array(
  10981. // 'description' => 'TODO: please describe this field!',
  10982. 'type' => 'text',
  10983. 'not null' => '1',
  10984. 'default' => '',
  10985. ),
  10986. 'rank' => array(
  10987. // 'description' => 'TODO: please describe this field!',
  10988. 'type' => 'int',
  10989. 'not null' => '1',
  10990. 'default' => '0',
  10991. ),
  10992. ),
  10993. 'primary key' => array(
  10994. '0' => 'dbxrefprop_id',
  10995. ),
  10996. 'unique keys' => array(
  10997. 'dbxrefprop_c1' => array(
  10998. '0' => 'dbxref_id',
  10999. '1' => 'type_id',
  11000. '2' => 'rank',
  11001. ),
  11002. ),
  11003. 'indexes' => array(
  11004. 'dbxrefprop_idx1' => array(
  11005. '0' => 'dbxref_id',
  11006. ),
  11007. 'dbxrefprop_idx2' => array(
  11008. '0' => 'type_id',
  11009. ),
  11010. ),
  11011. 'foreign keys' => array(
  11012. ),
  11013. );
  11014. return $description;
  11015. }
  11016. /**
  11017. * Implements hook_dfeatureloc_schema()
  11018. * Purpose: To describe the structure of dfeatureloc to tripal
  11019. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11020. * @see tripal_core.api.inc: tripal_core_chado_update()
  11021. * @see tripal_core.api.inc: tripal_core_chado_select()
  11022. *
  11023. * @return
  11024. * An array describing the current table
  11025. *
  11026. * @ingroup tripal_api
  11027. *
  11028. * @ingroup tripal_core
  11029. */
  11030. function tripal_core_chado_dfeatureloc_schema () {
  11031. $description = array();
  11032. $description = array(
  11033. 'table' => 'dfeatureloc',
  11034. // 'description' => 'TODO: please describe this table!',
  11035. 'fields' => array(
  11036. 'featureloc_id' => array(
  11037. // 'description' => 'TODO: please describe this field!',
  11038. 'type' => 'int',
  11039. 'not null' => '',
  11040. ),
  11041. 'feature_id' => array(
  11042. // 'description' => 'TODO: please describe this field!',
  11043. 'type' => 'int',
  11044. 'not null' => '',
  11045. ),
  11046. 'srcfeature_id' => array(
  11047. // 'description' => 'TODO: please describe this field!',
  11048. 'type' => 'int',
  11049. 'not null' => '',
  11050. ),
  11051. 'nbeg' => array(
  11052. // 'description' => 'TODO: please describe this field!',
  11053. 'type' => 'int',
  11054. 'not null' => '',
  11055. ),
  11056. 'is_nbeg_partial' => array(
  11057. // 'description' => 'TODO: please describe this field!',
  11058. 'type' => 'boolean',
  11059. 'not null' => '',
  11060. ),
  11061. 'nend' => array(
  11062. // 'description' => 'TODO: please describe this field!',
  11063. 'type' => 'int',
  11064. 'not null' => '',
  11065. ),
  11066. 'is_nend_partial' => array(
  11067. // 'description' => 'TODO: please describe this field!',
  11068. 'type' => 'boolean',
  11069. 'not null' => '',
  11070. ),
  11071. 'strand' => array(
  11072. // 'description' => 'TODO: please describe this field!',
  11073. 'type' => 'int',
  11074. 'size' => 'small',
  11075. 'not null' => '',
  11076. ),
  11077. 'phase' => array(
  11078. // 'description' => 'TODO: please describe this field!',
  11079. 'type' => 'int',
  11080. 'not null' => '',
  11081. ),
  11082. 'residue_info' => array(
  11083. // 'description' => 'TODO: please describe this field!',
  11084. 'type' => 'text',
  11085. 'not null' => '',
  11086. ),
  11087. 'locgroup' => array(
  11088. // 'description' => 'TODO: please describe this field!',
  11089. 'type' => 'int',
  11090. 'not null' => '',
  11091. ),
  11092. 'rank' => array(
  11093. // 'description' => 'TODO: please describe this field!',
  11094. 'type' => 'int',
  11095. 'not null' => '',
  11096. ),
  11097. ),
  11098. 'primary key' => array(
  11099. ),
  11100. 'unique keys' => array(
  11101. ),
  11102. 'indexes' => array(
  11103. ),
  11104. 'foreign keys' => array(
  11105. ),
  11106. );
  11107. return $description;
  11108. }
  11109. /**
  11110. * Implements hook_db_schema()
  11111. * Purpose: To describe the structure of db to tripal
  11112. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11113. * @see tripal_core.api.inc: tripal_core_chado_update()
  11114. * @see tripal_core.api.inc: tripal_core_chado_select()
  11115. *
  11116. * @return
  11117. * An array describing the current table
  11118. *
  11119. * @ingroup tripal_api
  11120. *
  11121. * @ingroup tripal_core
  11122. */
  11123. function tripal_core_chado_db_schema () {
  11124. $description = array();
  11125. $description = array(
  11126. 'table' => 'db',
  11127. // 'description' => 'TODO: please describe this table!',
  11128. 'fields' => array(
  11129. 'db_id' => array(
  11130. // 'description' => 'TODO: please describe this field!',
  11131. 'type' => 'serial',
  11132. 'not null' => '1',
  11133. ),
  11134. 'name' => array(
  11135. // 'description' => 'TODO: please describe this field!',
  11136. 'type' => 'varchar',
  11137. 'length' => '255',
  11138. 'not null' => '1',
  11139. ),
  11140. 'description' => array(
  11141. // 'description' => 'TODO: please describe this field!',
  11142. 'type' => 'varchar',
  11143. 'length' => '255',
  11144. 'not null' => '',
  11145. ),
  11146. 'urlprefix' => array(
  11147. // 'description' => 'TODO: please describe this field!',
  11148. 'type' => 'varchar',
  11149. 'length' => '255',
  11150. 'not null' => '',
  11151. ),
  11152. 'url' => array(
  11153. // 'description' => 'TODO: please describe this field!',
  11154. 'type' => 'varchar',
  11155. 'length' => '255',
  11156. 'not null' => '',
  11157. ),
  11158. ),
  11159. 'primary key' => array(
  11160. '0' => 'db_id',
  11161. ),
  11162. 'unique keys' => array(
  11163. 'db_c1' => array(
  11164. '0' => 'name',
  11165. ),
  11166. ),
  11167. 'indexes' => array(
  11168. ),
  11169. 'foreign keys' => array(
  11170. ),
  11171. );
  11172. return $description;
  11173. }
  11174. /**
  11175. * Implements hook_cvtermsynonym_schema()
  11176. * Purpose: To describe the structure of cvtermsynonym to tripal
  11177. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11178. * @see tripal_core.api.inc: tripal_core_chado_update()
  11179. * @see tripal_core.api.inc: tripal_core_chado_select()
  11180. *
  11181. * @return
  11182. * An array describing the current table
  11183. *
  11184. * @ingroup tripal_api
  11185. *
  11186. * @ingroup tripal_core
  11187. */
  11188. function tripal_core_chado_cvtermsynonym_schema () {
  11189. $description = array();
  11190. $description = array(
  11191. 'table' => 'cvtermsynonym',
  11192. // 'description' => 'TODO: please describe this table!',
  11193. 'fields' => array(
  11194. 'cvtermsynonym_id' => array(
  11195. // 'description' => 'TODO: please describe this field!',
  11196. 'type' => 'serial',
  11197. 'not null' => '1',
  11198. ),
  11199. 'cvterm_id' => array(
  11200. // 'description' => 'TODO: please describe this field!',
  11201. 'type' => 'int',
  11202. 'not null' => '1',
  11203. ),
  11204. 'synonym' => array(
  11205. // 'description' => 'TODO: please describe this field!',
  11206. 'type' => 'varchar',
  11207. 'length' => '1024',
  11208. 'not null' => '1',
  11209. ),
  11210. 'type_id' => array(
  11211. // 'description' => 'TODO: please describe this field!',
  11212. 'type' => 'int',
  11213. 'not null' => '',
  11214. ),
  11215. ),
  11216. 'primary key' => array(
  11217. '0' => 'cvtermsynonym_id',
  11218. ),
  11219. 'unique keys' => array(
  11220. 'cvtermsynonym_c1' => array(
  11221. '0' => 'cvterm_id',
  11222. '1' => 'synonym',
  11223. ),
  11224. ),
  11225. 'indexes' => array(
  11226. 'cvtermsynonym_idx1' => array(
  11227. '0' => 'cvterm_id',
  11228. ),
  11229. ),
  11230. 'foreign keys' => array(
  11231. ),
  11232. );
  11233. return $description;
  11234. }
  11235. /**
  11236. * Implements hook_cvterm_dbxref_schema()
  11237. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11238. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11239. * @see tripal_core.api.inc: tripal_core_chado_update()
  11240. * @see tripal_core.api.inc: tripal_core_chado_select()
  11241. *
  11242. * @return
  11243. * An array describing the current table
  11244. *
  11245. * @ingroup tripal_api
  11246. *
  11247. * @ingroup tripal_core
  11248. */
  11249. function tripal_core_chado_cvterm_dbxref_schema () {
  11250. $description = array();
  11251. $description = array(
  11252. 'table' => 'cvterm_dbxref',
  11253. // 'description' => 'TODO: please describe this table!',
  11254. 'fields' => array(
  11255. 'cvterm_dbxref_id' => array(
  11256. // 'description' => 'TODO: please describe this field!',
  11257. 'type' => 'serial',
  11258. 'not null' => '1',
  11259. ),
  11260. 'cvterm_id' => array(
  11261. // 'description' => 'TODO: please describe this field!',
  11262. 'type' => 'int',
  11263. 'not null' => '1',
  11264. ),
  11265. 'dbxref_id' => array(
  11266. // 'description' => 'TODO: please describe this field!',
  11267. 'type' => 'int',
  11268. 'not null' => '1',
  11269. ),
  11270. 'is_for_definition' => array(
  11271. // 'description' => 'TODO: please describe this field!',
  11272. 'type' => 'int',
  11273. 'not null' => '1',
  11274. 'default' => '0',
  11275. ),
  11276. ),
  11277. 'primary key' => array(
  11278. '0' => 'cvterm_dbxref_id',
  11279. ),
  11280. 'unique keys' => array(
  11281. 'cvterm_dbxref_c1' => array(
  11282. '0' => 'cvterm_id',
  11283. '1' => 'dbxref_id',
  11284. ),
  11285. ),
  11286. 'indexes' => array(
  11287. 'cvterm_dbxref_idx1' => array(
  11288. '0' => 'cvterm_id',
  11289. ),
  11290. 'cvterm_dbxref_idx2' => array(
  11291. '0' => 'dbxref_id',
  11292. ),
  11293. ),
  11294. 'foreign keys' => array(
  11295. ),
  11296. );
  11297. return $description;
  11298. }
  11299. /**
  11300. * Implements hook_cvterm_relationship_schema()
  11301. * Purpose: To describe the structure of cvterm_relationship 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_api
  11310. *
  11311. * @ingroup tripal_core
  11312. */
  11313. function tripal_core_chado_cvterm_relationship_schema () {
  11314. $description = array();
  11315. $description = array(
  11316. 'table' => 'cvterm_relationship',
  11317. // 'description' => 'TODO: please describe this table!',
  11318. 'fields' => array(
  11319. 'cvterm_relationship_id' => array(
  11320. // 'description' => 'TODO: please describe this field!',
  11321. 'type' => 'serial',
  11322. 'not null' => '1',
  11323. ),
  11324. 'type_id' => array(
  11325. // 'description' => 'TODO: please describe this field!',
  11326. 'type' => 'int',
  11327. 'not null' => '1',
  11328. ),
  11329. 'subject_id' => array(
  11330. // 'description' => 'TODO: please describe this field!',
  11331. 'type' => 'int',
  11332. 'not null' => '1',
  11333. ),
  11334. 'object_id' => array(
  11335. // 'description' => 'TODO: please describe this field!',
  11336. 'type' => 'int',
  11337. 'not null' => '1',
  11338. ),
  11339. ),
  11340. 'primary key' => array(
  11341. '0' => 'cvterm_relationship_id',
  11342. ),
  11343. 'unique keys' => array(
  11344. 'cvterm_relationship_c1' => array(
  11345. '0' => 'subject_id',
  11346. '1' => 'object_id',
  11347. '2' => 'type_id',
  11348. ),
  11349. ),
  11350. 'indexes' => array(
  11351. 'cvterm_relationship_idx1' => array(
  11352. '0' => 'type_id',
  11353. ),
  11354. 'cvterm_relationship_idx2' => array(
  11355. '0' => 'subject_id',
  11356. ),
  11357. 'cvterm_relationship_idx3' => array(
  11358. '0' => 'object_id',
  11359. ),
  11360. ),
  11361. 'foreign keys' => array(
  11362. ),
  11363. );
  11364. return $description;
  11365. }
  11366. /**
  11367. * Implements hook_cvtermpath_schema()
  11368. * Purpose: To describe the structure of cvtermpath to tripal
  11369. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11370. * @see tripal_core.api.inc: tripal_core_chado_update()
  11371. * @see tripal_core.api.inc: tripal_core_chado_select()
  11372. *
  11373. * @return
  11374. * An array describing the current table
  11375. *
  11376. * @ingroup tripal_api
  11377. *
  11378. * @ingroup tripal_core
  11379. */
  11380. function tripal_core_chado_cvtermpath_schema () {
  11381. $description = array();
  11382. $description = array(
  11383. 'table' => 'cvtermpath',
  11384. // 'description' => 'TODO: please describe this table!',
  11385. 'fields' => array(
  11386. 'cvtermpath_id' => array(
  11387. // 'description' => 'TODO: please describe this field!',
  11388. 'type' => 'serial',
  11389. 'not null' => '1',
  11390. ),
  11391. 'type_id' => array(
  11392. // 'description' => 'TODO: please describe this field!',
  11393. 'type' => 'int',
  11394. 'not null' => '',
  11395. ),
  11396. 'subject_id' => array(
  11397. // 'description' => 'TODO: please describe this field!',
  11398. 'type' => 'int',
  11399. 'not null' => '1',
  11400. ),
  11401. 'object_id' => array(
  11402. // 'description' => 'TODO: please describe this field!',
  11403. 'type' => 'int',
  11404. 'not null' => '1',
  11405. ),
  11406. 'cv_id' => array(
  11407. // 'description' => 'TODO: please describe this field!',
  11408. 'type' => 'int',
  11409. 'not null' => '1',
  11410. ),
  11411. 'pathdistance' => array(
  11412. // 'description' => 'TODO: please describe this field!',
  11413. 'type' => 'int',
  11414. 'not null' => '',
  11415. ),
  11416. ),
  11417. 'primary key' => array(
  11418. '0' => 'cvtermpath_id',
  11419. ),
  11420. 'unique keys' => array(
  11421. 'cvtermpath_c1' => array(
  11422. '0' => 'subject_id',
  11423. '1' => 'object_id',
  11424. '2' => 'type_id',
  11425. '3' => 'pathdistance',
  11426. ),
  11427. ),
  11428. 'indexes' => array(
  11429. 'cvtermpath_idx1' => array(
  11430. '0' => 'type_id',
  11431. ),
  11432. 'cvtermpath_idx2' => array(
  11433. '0' => 'subject_id',
  11434. ),
  11435. 'cvtermpath_idx3' => array(
  11436. '0' => 'object_id',
  11437. ),
  11438. 'cvtermpath_idx4' => array(
  11439. '0' => 'cv_id',
  11440. ),
  11441. ),
  11442. 'foreign keys' => array(
  11443. ),
  11444. );
  11445. return $description;
  11446. }
  11447. /**
  11448. * Implements hook_cvtermprop_schema()
  11449. * Purpose: To describe the structure of cvtermprop to tripal
  11450. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11451. * @see tripal_core.api.inc: tripal_core_chado_update()
  11452. * @see tripal_core.api.inc: tripal_core_chado_select()
  11453. *
  11454. * @return
  11455. * An array describing the current table
  11456. *
  11457. * @ingroup tripal_api
  11458. *
  11459. * @ingroup tripal_core
  11460. */
  11461. function tripal_core_chado_cvtermprop_schema () {
  11462. $description = array();
  11463. $description = array(
  11464. 'table' => 'cvtermprop',
  11465. // 'description' => 'TODO: please describe this table!',
  11466. 'fields' => array(
  11467. 'cvtermprop_id' => array(
  11468. // 'description' => 'TODO: please describe this field!',
  11469. 'type' => 'serial',
  11470. 'not null' => '1',
  11471. ),
  11472. 'cvterm_id' => array(
  11473. // 'description' => 'TODO: please describe this field!',
  11474. 'type' => 'int',
  11475. 'not null' => '1',
  11476. ),
  11477. 'type_id' => array(
  11478. // 'description' => 'TODO: please describe this field!',
  11479. 'type' => 'int',
  11480. 'not null' => '1',
  11481. ),
  11482. 'value' => array(
  11483. // 'description' => 'TODO: please describe this field!',
  11484. 'type' => 'text',
  11485. 'not null' => '1',
  11486. 'default' => '',
  11487. ),
  11488. 'rank' => array(
  11489. // 'description' => 'TODO: please describe this field!',
  11490. 'type' => 'int',
  11491. 'not null' => '1',
  11492. 'default' => '0',
  11493. ),
  11494. ),
  11495. 'primary key' => array(
  11496. '0' => 'cvtermprop_id',
  11497. ),
  11498. 'unique keys' => array(
  11499. 'cvterm_id' => array(
  11500. '0' => 'cvterm_id',
  11501. '1' => 'type_id',
  11502. '2' => 'value',
  11503. '3' => 'rank',
  11504. ),
  11505. ),
  11506. 'indexes' => array(
  11507. 'cvtermprop_idx1' => array(
  11508. '0' => 'cvterm_id',
  11509. ),
  11510. 'cvtermprop_idx2' => array(
  11511. '0' => 'type_id',
  11512. ),
  11513. ),
  11514. 'foreign keys' => array(
  11515. ),
  11516. );
  11517. return $description;
  11518. }
  11519. /**
  11520. * Implements hook_eimage_schema()
  11521. * Purpose: To describe the structure of eimage to tripal
  11522. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11523. * @see tripal_core.api.inc: tripal_core_chado_update()
  11524. * @see tripal_core.api.inc: tripal_core_chado_select()
  11525. *
  11526. * @return
  11527. * An array describing the current table
  11528. *
  11529. * @ingroup tripal_api
  11530. *
  11531. * @ingroup tripal_core
  11532. */
  11533. function tripal_core_chado_eimage_schema () {
  11534. $description = array();
  11535. $description = array(
  11536. 'table' => 'eimage',
  11537. // 'description' => 'TODO: please describe this table!',
  11538. 'fields' => array(
  11539. 'eimage_id' => array(
  11540. // 'description' => 'TODO: please describe this field!',
  11541. 'type' => 'serial',
  11542. 'not null' => '1',
  11543. ),
  11544. 'eimage_data' => array(
  11545. // 'description' => 'TODO: please describe this field!',
  11546. 'type' => 'text',
  11547. 'not null' => '',
  11548. ),
  11549. 'eimage_type' => array(
  11550. // 'description' => 'TODO: please describe this field!',
  11551. 'type' => 'varchar',
  11552. 'length' => '255',
  11553. 'not null' => '1',
  11554. ),
  11555. 'image_uri' => array(
  11556. // 'description' => 'TODO: please describe this field!',
  11557. 'type' => 'varchar',
  11558. 'length' => '255',
  11559. 'not null' => '',
  11560. ),
  11561. ),
  11562. 'primary key' => array(
  11563. '0' => 'eimage_id',
  11564. ),
  11565. 'unique keys' => array(
  11566. ),
  11567. 'indexes' => array(
  11568. ),
  11569. 'foreign keys' => array(
  11570. ),
  11571. );
  11572. return $description;
  11573. }
  11574. /**
  11575. * Implements hook_element_schema()
  11576. * Purpose: To describe the structure of element to tripal
  11577. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11578. * @see tripal_core.api.inc: tripal_core_chado_update()
  11579. * @see tripal_core.api.inc: tripal_core_chado_select()
  11580. *
  11581. * @return
  11582. * An array describing the current table
  11583. *
  11584. * @ingroup tripal_api
  11585. *
  11586. * @ingroup tripal_core
  11587. */
  11588. function tripal_core_chado_element_schema () {
  11589. $description = array();
  11590. $description = array(
  11591. 'table' => 'element',
  11592. // 'description' => 'TODO: please describe this table!',
  11593. 'fields' => array(
  11594. 'element_id' => array(
  11595. // 'description' => 'TODO: please describe this field!',
  11596. 'type' => 'serial',
  11597. 'not null' => '1',
  11598. ),
  11599. 'feature_id' => array(
  11600. // 'description' => 'TODO: please describe this field!',
  11601. 'type' => 'int',
  11602. 'not null' => '',
  11603. ),
  11604. 'arraydesign_id' => array(
  11605. // 'description' => 'TODO: please describe this field!',
  11606. 'type' => 'int',
  11607. 'not null' => '1',
  11608. ),
  11609. 'type_id' => array(
  11610. // 'description' => 'TODO: please describe this field!',
  11611. 'type' => 'int',
  11612. 'not null' => '',
  11613. ),
  11614. 'dbxref_id' => array(
  11615. // 'description' => 'TODO: please describe this field!',
  11616. 'type' => 'int',
  11617. 'not null' => '',
  11618. ),
  11619. ),
  11620. 'primary key' => array(
  11621. '0' => 'element_id',
  11622. ),
  11623. 'unique keys' => array(
  11624. 'element_c1' => array(
  11625. '0' => 'feature_id',
  11626. '1' => 'arraydesign_id',
  11627. ),
  11628. ),
  11629. 'indexes' => array(
  11630. 'element_idx1' => array(
  11631. '0' => 'feature_id',
  11632. ),
  11633. 'element_idx2' => array(
  11634. '0' => 'arraydesign_id',
  11635. ),
  11636. 'element_idx3' => array(
  11637. '0' => 'type_id',
  11638. ),
  11639. 'element_idx4' => array(
  11640. '0' => 'dbxref_id',
  11641. ),
  11642. ),
  11643. 'foreign keys' => array(
  11644. ),
  11645. );
  11646. return $description;
  11647. }
  11648. /**
  11649. * Implements hook_expression_cvterm_schema()
  11650. * Purpose: To describe the structure of expression_cvterm to tripal
  11651. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11652. * @see tripal_core.api.inc: tripal_core_chado_update()
  11653. * @see tripal_core.api.inc: tripal_core_chado_select()
  11654. *
  11655. * @return
  11656. * An array describing the current table
  11657. *
  11658. * @ingroup tripal_api
  11659. *
  11660. * @ingroup tripal_core
  11661. */
  11662. function tripal_core_chado_expression_cvterm_schema () {
  11663. $description = array();
  11664. $description = array(
  11665. 'table' => 'expression_cvterm',
  11666. // 'description' => 'TODO: please describe this table!',
  11667. 'fields' => array(
  11668. 'expression_cvterm_id' => array(
  11669. // 'description' => 'TODO: please describe this field!',
  11670. 'type' => 'serial',
  11671. 'not null' => '1',
  11672. ),
  11673. 'expression_id' => array(
  11674. // 'description' => 'TODO: please describe this field!',
  11675. 'type' => 'int',
  11676. 'not null' => '1',
  11677. ),
  11678. 'cvterm_id' => array(
  11679. // 'description' => 'TODO: please describe this field!',
  11680. 'type' => 'int',
  11681. 'not null' => '1',
  11682. ),
  11683. 'rank' => array(
  11684. // 'description' => 'TODO: please describe this field!',
  11685. 'type' => 'int',
  11686. 'not null' => '1',
  11687. 'default' => '0',
  11688. ),
  11689. 'cvterm_type_id' => array(
  11690. // 'description' => 'TODO: please describe this field!',
  11691. 'type' => 'int',
  11692. 'not null' => '1',
  11693. ),
  11694. ),
  11695. 'primary key' => array(
  11696. '0' => 'expression_cvterm_id',
  11697. ),
  11698. 'unique keys' => array(
  11699. 'expression_cvterm_c1' => array(
  11700. '0' => 'expression_id',
  11701. '1' => 'cvterm_id',
  11702. '2' => 'cvterm_type_id',
  11703. ),
  11704. ),
  11705. 'indexes' => array(
  11706. 'expression_cvterm_idx1' => array(
  11707. '0' => 'expression_id',
  11708. ),
  11709. 'expression_cvterm_idx2' => array(
  11710. '0' => 'cvterm_id',
  11711. ),
  11712. 'expression_cvterm_idx3' => array(
  11713. '0' => 'cvterm_type_id',
  11714. ),
  11715. ),
  11716. 'foreign keys' => array(
  11717. ),
  11718. );
  11719. return $description;
  11720. }
  11721. /**
  11722. * Implements hook_expression_cvtermprop_schema()
  11723. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11724. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11725. * @see tripal_core.api.inc: tripal_core_chado_update()
  11726. * @see tripal_core.api.inc: tripal_core_chado_select()
  11727. *
  11728. * @return
  11729. * An array describing the current table
  11730. *
  11731. * @ingroup tripal_api
  11732. *
  11733. * @ingroup tripal_core
  11734. */
  11735. function tripal_core_chado_expression_cvtermprop_schema () {
  11736. $description = array();
  11737. $description = array(
  11738. 'table' => 'expression_cvtermprop',
  11739. // 'description' => 'TODO: please describe this table!',
  11740. 'fields' => array(
  11741. 'expression_cvtermprop_id' => array(
  11742. // 'description' => 'TODO: please describe this field!',
  11743. 'type' => 'serial',
  11744. 'not null' => '1',
  11745. ),
  11746. 'expression_cvterm_id' => array(
  11747. // 'description' => 'TODO: please describe this field!',
  11748. 'type' => 'int',
  11749. 'not null' => '1',
  11750. ),
  11751. 'type_id' => array(
  11752. // 'description' => 'TODO: please describe this field!',
  11753. 'type' => 'int',
  11754. 'not null' => '1',
  11755. ),
  11756. 'value' => array(
  11757. // 'description' => 'TODO: please describe this field!',
  11758. 'type' => 'text',
  11759. 'not null' => '',
  11760. ),
  11761. 'rank' => array(
  11762. // 'description' => 'TODO: please describe this field!',
  11763. 'type' => 'int',
  11764. 'not null' => '1',
  11765. 'default' => '0',
  11766. ),
  11767. ),
  11768. 'primary key' => array(
  11769. '0' => 'expression_cvtermprop_id',
  11770. ),
  11771. 'unique keys' => array(
  11772. 'expression_cvtermprop_c1' => array(
  11773. '0' => 'expression_cvterm_id',
  11774. '1' => 'type_id',
  11775. '2' => 'rank',
  11776. ),
  11777. ),
  11778. 'indexes' => array(
  11779. 'expression_cvtermprop_idx1' => array(
  11780. '0' => 'expression_cvterm_id',
  11781. ),
  11782. 'expression_cvtermprop_idx2' => array(
  11783. '0' => 'type_id',
  11784. ),
  11785. ),
  11786. 'foreign keys' => array(
  11787. ),
  11788. );
  11789. return $description;
  11790. }
  11791. /**
  11792. * Implements hook_expression_image_schema()
  11793. * Purpose: To describe the structure of expression_image to tripal
  11794. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11795. * @see tripal_core.api.inc: tripal_core_chado_update()
  11796. * @see tripal_core.api.inc: tripal_core_chado_select()
  11797. *
  11798. * @return
  11799. * An array describing the current table
  11800. *
  11801. * @ingroup tripal_api
  11802. *
  11803. * @ingroup tripal_core
  11804. */
  11805. function tripal_core_chado_expression_image_schema () {
  11806. $description = array();
  11807. $description = array(
  11808. 'table' => 'expression_image',
  11809. // 'description' => 'TODO: please describe this table!',
  11810. 'fields' => array(
  11811. 'expression_image_id' => array(
  11812. // 'description' => 'TODO: please describe this field!',
  11813. 'type' => 'serial',
  11814. 'not null' => '1',
  11815. ),
  11816. 'expression_id' => array(
  11817. // 'description' => 'TODO: please describe this field!',
  11818. 'type' => 'int',
  11819. 'not null' => '1',
  11820. ),
  11821. 'eimage_id' => array(
  11822. // 'description' => 'TODO: please describe this field!',
  11823. 'type' => 'int',
  11824. 'not null' => '1',
  11825. ),
  11826. ),
  11827. 'primary key' => array(
  11828. '0' => 'expression_image_id',
  11829. ),
  11830. 'unique keys' => array(
  11831. 'expression_image_c1' => array(
  11832. '0' => 'expression_id',
  11833. '1' => 'eimage_id',
  11834. ),
  11835. ),
  11836. 'indexes' => array(
  11837. 'expression_image_idx1' => array(
  11838. '0' => 'expression_id',
  11839. ),
  11840. 'expression_image_idx2' => array(
  11841. '0' => 'eimage_id',
  11842. ),
  11843. ),
  11844. 'foreign keys' => array(
  11845. ),
  11846. );
  11847. return $description;
  11848. }
  11849. /**
  11850. * Implements hook_expression_pub_schema()
  11851. * Purpose: To describe the structure of expression_pub to tripal
  11852. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11853. * @see tripal_core.api.inc: tripal_core_chado_update()
  11854. * @see tripal_core.api.inc: tripal_core_chado_select()
  11855. *
  11856. * @return
  11857. * An array describing the current table
  11858. *
  11859. * @ingroup tripal_api
  11860. *
  11861. * @ingroup tripal_core
  11862. */
  11863. function tripal_core_chado_expression_pub_schema () {
  11864. $description = array();
  11865. $description = array(
  11866. 'table' => 'expression_pub',
  11867. // 'description' => 'TODO: please describe this table!',
  11868. 'fields' => array(
  11869. 'expression_pub_id' => array(
  11870. // 'description' => 'TODO: please describe this field!',
  11871. 'type' => 'serial',
  11872. 'not null' => '1',
  11873. ),
  11874. 'expression_id' => array(
  11875. // 'description' => 'TODO: please describe this field!',
  11876. 'type' => 'int',
  11877. 'not null' => '1',
  11878. ),
  11879. 'pub_id' => array(
  11880. // 'description' => 'TODO: please describe this field!',
  11881. 'type' => 'int',
  11882. 'not null' => '1',
  11883. ),
  11884. ),
  11885. 'primary key' => array(
  11886. '0' => 'expression_pub_id',
  11887. ),
  11888. 'unique keys' => array(
  11889. 'expression_pub_c1' => array(
  11890. '0' => 'expression_id',
  11891. '1' => 'pub_id',
  11892. ),
  11893. ),
  11894. 'indexes' => array(
  11895. 'expression_pub_idx1' => array(
  11896. '0' => 'expression_id',
  11897. ),
  11898. 'expression_pub_idx2' => array(
  11899. '0' => 'pub_id',
  11900. ),
  11901. ),
  11902. 'foreign keys' => array(
  11903. ),
  11904. );
  11905. return $description;
  11906. }
  11907. /**
  11908. * Implements hook_expression_schema()
  11909. * Purpose: To describe the structure of expression to tripal
  11910. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11911. * @see tripal_core.api.inc: tripal_core_chado_update()
  11912. * @see tripal_core.api.inc: tripal_core_chado_select()
  11913. *
  11914. * @return
  11915. * An array describing the current table
  11916. *
  11917. * @ingroup tripal_api
  11918. *
  11919. * @ingroup tripal_core
  11920. */
  11921. function tripal_core_chado_expression_schema () {
  11922. $description = array();
  11923. $description = array(
  11924. 'table' => 'expression',
  11925. // 'description' => 'TODO: please describe this table!',
  11926. 'fields' => array(
  11927. 'expression_id' => array(
  11928. // 'description' => 'TODO: please describe this field!',
  11929. 'type' => 'serial',
  11930. 'not null' => '1',
  11931. ),
  11932. 'uniquename' => array(
  11933. // 'description' => 'TODO: please describe this field!',
  11934. 'type' => 'text',
  11935. 'not null' => '1',
  11936. ),
  11937. 'md5checksum' => array(
  11938. // 'description' => 'TODO: please describe this field!',
  11939. 'type' => 'char',
  11940. 'length' => '32',
  11941. 'not null' => '',
  11942. ),
  11943. 'description' => array(
  11944. // 'description' => 'TODO: please describe this field!',
  11945. 'type' => 'text',
  11946. 'not null' => '',
  11947. ),
  11948. ),
  11949. 'primary key' => array(
  11950. '0' => 'expression_id',
  11951. ),
  11952. 'unique keys' => array(
  11953. 'expression_c1' => array(
  11954. '0' => 'uniquename',
  11955. ),
  11956. ),
  11957. 'indexes' => array(
  11958. ),
  11959. 'foreign keys' => array(
  11960. ),
  11961. );
  11962. return $description;
  11963. }
  11964. /**
  11965. * Implements hook_environment_cvterm_schema()
  11966. * Purpose: To describe the structure of environment_cvterm to tripal
  11967. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11968. * @see tripal_core.api.inc: tripal_core_chado_update()
  11969. * @see tripal_core.api.inc: tripal_core_chado_select()
  11970. *
  11971. * @return
  11972. * An array describing the current table
  11973. *
  11974. * @ingroup tripal_api
  11975. *
  11976. * @ingroup tripal_core
  11977. */
  11978. function tripal_core_chado_environment_cvterm_schema () {
  11979. $description = array();
  11980. $description = array(
  11981. 'table' => 'environment_cvterm',
  11982. // 'description' => 'TODO: please describe this table!',
  11983. 'fields' => array(
  11984. 'environment_cvterm_id' => array(
  11985. // 'description' => 'TODO: please describe this field!',
  11986. 'type' => 'serial',
  11987. 'not null' => '1',
  11988. ),
  11989. 'environment_id' => array(
  11990. // 'description' => 'TODO: please describe this field!',
  11991. 'type' => 'int',
  11992. 'not null' => '1',
  11993. ),
  11994. 'cvterm_id' => array(
  11995. // 'description' => 'TODO: please describe this field!',
  11996. 'type' => 'int',
  11997. 'not null' => '1',
  11998. ),
  11999. ),
  12000. 'primary key' => array(
  12001. '0' => 'environment_cvterm_id',
  12002. ),
  12003. 'unique keys' => array(
  12004. 'environment_cvterm_c1' => array(
  12005. '0' => 'environment_id',
  12006. '1' => 'cvterm_id',
  12007. ),
  12008. ),
  12009. 'indexes' => array(
  12010. 'environment_cvterm_idx1' => array(
  12011. '0' => 'environment_id',
  12012. ),
  12013. 'environment_cvterm_idx2' => array(
  12014. '0' => 'cvterm_id',
  12015. ),
  12016. ),
  12017. 'foreign keys' => array(
  12018. ),
  12019. );
  12020. return $description;
  12021. }
  12022. /**
  12023. * Implements hook_element_relationship_schema()
  12024. * Purpose: To describe the structure of element_relationship to tripal
  12025. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12026. * @see tripal_core.api.inc: tripal_core_chado_update()
  12027. * @see tripal_core.api.inc: tripal_core_chado_select()
  12028. *
  12029. * @return
  12030. * An array describing the current table
  12031. *
  12032. * @ingroup tripal_api
  12033. *
  12034. * @ingroup tripal_core
  12035. */
  12036. function tripal_core_chado_element_relationship_schema () {
  12037. $description = array();
  12038. $description = array(
  12039. 'table' => 'element_relationship',
  12040. // 'description' => 'TODO: please describe this table!',
  12041. 'fields' => array(
  12042. 'element_relationship_id' => array(
  12043. // 'description' => 'TODO: please describe this field!',
  12044. 'type' => 'serial',
  12045. 'not null' => '1',
  12046. ),
  12047. 'subject_id' => array(
  12048. // 'description' => 'TODO: please describe this field!',
  12049. 'type' => 'int',
  12050. 'not null' => '1',
  12051. ),
  12052. 'type_id' => array(
  12053. // 'description' => 'TODO: please describe this field!',
  12054. 'type' => 'int',
  12055. 'not null' => '1',
  12056. ),
  12057. 'object_id' => array(
  12058. // 'description' => 'TODO: please describe this field!',
  12059. 'type' => 'int',
  12060. 'not null' => '1',
  12061. ),
  12062. 'value' => array(
  12063. // 'description' => 'TODO: please describe this field!',
  12064. 'type' => 'text',
  12065. 'not null' => '',
  12066. ),
  12067. 'rank' => array(
  12068. // 'description' => 'TODO: please describe this field!',
  12069. 'type' => 'int',
  12070. 'not null' => '1',
  12071. 'default' => '0',
  12072. ),
  12073. ),
  12074. 'primary key' => array(
  12075. '0' => 'element_relationship_id',
  12076. ),
  12077. 'unique keys' => array(
  12078. 'element_relationship_c1' => array(
  12079. '0' => 'subject_id',
  12080. '1' => 'object_id',
  12081. '2' => 'type_id',
  12082. '3' => 'rank',
  12083. ),
  12084. ),
  12085. 'indexes' => array(
  12086. 'element_relationship_idx1' => array(
  12087. '0' => 'subject_id',
  12088. ),
  12089. 'element_relationship_idx2' => array(
  12090. '0' => 'type_id',
  12091. ),
  12092. 'element_relationship_idx3' => array(
  12093. '0' => 'object_id',
  12094. ),
  12095. 'element_relationship_idx4' => array(
  12096. '0' => 'value',
  12097. ),
  12098. ),
  12099. 'foreign keys' => array(
  12100. ),
  12101. );
  12102. return $description;
  12103. }
  12104. /**
  12105. * Implements hook_elementresult_schema()
  12106. * Purpose: To describe the structure of elementresult to tripal
  12107. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12108. * @see tripal_core.api.inc: tripal_core_chado_update()
  12109. * @see tripal_core.api.inc: tripal_core_chado_select()
  12110. *
  12111. * @return
  12112. * An array describing the current table
  12113. *
  12114. * @ingroup tripal_api
  12115. *
  12116. * @ingroup tripal_core
  12117. */
  12118. function tripal_core_chado_elementresult_schema () {
  12119. $description = array();
  12120. $description = array(
  12121. 'table' => 'elementresult',
  12122. // 'description' => 'TODO: please describe this table!',
  12123. 'fields' => array(
  12124. 'elementresult_id' => array(
  12125. // 'description' => 'TODO: please describe this field!',
  12126. 'type' => 'serial',
  12127. 'not null' => '1',
  12128. ),
  12129. 'element_id' => array(
  12130. // 'description' => 'TODO: please describe this field!',
  12131. 'type' => 'int',
  12132. 'not null' => '1',
  12133. ),
  12134. 'quantification_id' => array(
  12135. // 'description' => 'TODO: please describe this field!',
  12136. 'type' => 'int',
  12137. 'not null' => '1',
  12138. ),
  12139. 'signal' => array(
  12140. // 'description' => 'TODO: please describe this field!',
  12141. 'type' => 'float',
  12142. 'size' => 'big',
  12143. 'not null' => '1',
  12144. ),
  12145. ),
  12146. 'primary key' => array(
  12147. '0' => 'elementresult_id',
  12148. ),
  12149. 'unique keys' => array(
  12150. 'elementresult_c1' => array(
  12151. '0' => 'element_id',
  12152. '1' => 'quantification_id',
  12153. ),
  12154. ),
  12155. 'indexes' => array(
  12156. 'elementresult_idx1' => array(
  12157. '0' => 'element_id',
  12158. ),
  12159. 'elementresult_idx2' => array(
  12160. '0' => 'quantification_id',
  12161. ),
  12162. 'elementresult_idx3' => array(
  12163. '0' => 'signal',
  12164. ),
  12165. ),
  12166. 'foreign keys' => array(
  12167. ),
  12168. );
  12169. return $description;
  12170. }
  12171. /**
  12172. * Implements hook_elementresult_relationship_schema()
  12173. * Purpose: To describe the structure of elementresult_relationship to tripal
  12174. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12175. * @see tripal_core.api.inc: tripal_core_chado_update()
  12176. * @see tripal_core.api.inc: tripal_core_chado_select()
  12177. *
  12178. * @return
  12179. * An array describing the current table
  12180. *
  12181. * @ingroup tripal_api
  12182. *
  12183. * @ingroup tripal_core
  12184. */
  12185. function tripal_core_chado_elementresult_relationship_schema () {
  12186. $description = array();
  12187. $description = array(
  12188. 'table' => 'elementresult_relationship',
  12189. // 'description' => 'TODO: please describe this table!',
  12190. 'fields' => array(
  12191. 'elementresult_relationship_id' => array(
  12192. // 'description' => 'TODO: please describe this field!',
  12193. 'type' => 'serial',
  12194. 'not null' => '1',
  12195. ),
  12196. 'subject_id' => array(
  12197. // 'description' => 'TODO: please describe this field!',
  12198. 'type' => 'int',
  12199. 'not null' => '1',
  12200. ),
  12201. 'type_id' => array(
  12202. // 'description' => 'TODO: please describe this field!',
  12203. 'type' => 'int',
  12204. 'not null' => '1',
  12205. ),
  12206. 'object_id' => array(
  12207. // 'description' => 'TODO: please describe this field!',
  12208. 'type' => 'int',
  12209. 'not null' => '1',
  12210. ),
  12211. 'value' => array(
  12212. // 'description' => 'TODO: please describe this field!',
  12213. 'type' => 'text',
  12214. 'not null' => '',
  12215. ),
  12216. 'rank' => array(
  12217. // 'description' => 'TODO: please describe this field!',
  12218. 'type' => 'int',
  12219. 'not null' => '1',
  12220. 'default' => '0',
  12221. ),
  12222. ),
  12223. 'primary key' => array(
  12224. '0' => 'elementresult_relationship_id',
  12225. ),
  12226. 'unique keys' => array(
  12227. 'elementresult_relationship_c1' => array(
  12228. '0' => 'subject_id',
  12229. '1' => 'object_id',
  12230. '2' => 'type_id',
  12231. '3' => 'rank',
  12232. ),
  12233. ),
  12234. 'indexes' => array(
  12235. 'elementresult_relationship_idx1' => array(
  12236. '0' => 'subject_id',
  12237. ),
  12238. 'elementresult_relationship_idx2' => array(
  12239. '0' => 'type_id',
  12240. ),
  12241. 'elementresult_relationship_idx3' => array(
  12242. '0' => 'object_id',
  12243. ),
  12244. 'elementresult_relationship_idx4' => array(
  12245. '0' => 'value',
  12246. ),
  12247. ),
  12248. 'foreign keys' => array(
  12249. ),
  12250. );
  12251. return $description;
  12252. }
  12253. /**
  12254. * Implements hook_environment_schema()
  12255. * Purpose: To describe the structure of environment to tripal
  12256. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12257. * @see tripal_core.api.inc: tripal_core_chado_update()
  12258. * @see tripal_core.api.inc: tripal_core_chado_select()
  12259. *
  12260. * @return
  12261. * An array describing the current table
  12262. *
  12263. * @ingroup tripal_api
  12264. *
  12265. * @ingroup tripal_core
  12266. */
  12267. function tripal_core_chado_environment_schema () {
  12268. $description = array();
  12269. $description = array(
  12270. 'table' => 'environment',
  12271. // 'description' => 'TODO: please describe this table!',
  12272. 'fields' => array(
  12273. 'environment_id' => array(
  12274. // 'description' => 'TODO: please describe this field!',
  12275. 'type' => 'serial',
  12276. 'not null' => '1',
  12277. ),
  12278. 'uniquename' => array(
  12279. // 'description' => 'TODO: please describe this field!',
  12280. 'type' => 'text',
  12281. 'not null' => '1',
  12282. ),
  12283. 'description' => array(
  12284. // 'description' => 'TODO: please describe this field!',
  12285. 'type' => 'text',
  12286. 'not null' => '',
  12287. ),
  12288. ),
  12289. 'primary key' => array(
  12290. '0' => 'environment_id',
  12291. ),
  12292. 'unique keys' => array(
  12293. 'environment_c1' => array(
  12294. '0' => 'uniquename',
  12295. ),
  12296. ),
  12297. 'indexes' => array(
  12298. 'environment_idx1' => array(
  12299. '0' => 'uniquename',
  12300. ),
  12301. ),
  12302. 'foreign keys' => array(
  12303. ),
  12304. );
  12305. return $description;
  12306. }