tripal_core.schema.api.inc 316 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735
  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. * @defgroup tripal_schema_api Core Module Schema API
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado tables.
  11. * This API consists of a set of functions, one for each table in Chado. Each
  12. * function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal 6 does not handle foreign key relationships, a separate
  15. * hook is used to define the foreign key relationships for each table. As
  16. * of version 0.3b of Tripal, not all foreign key relationships have been
  17. * defined. Therefore, if you need a foreign key you must create the appropriate
  18. * hook. Hooks are named hook_chado_table_schema() where 'hook' is replaced
  19. * with the module name, and 'table' is replaced by the Chado table name.
  20. *
  21. * The functions provided in this documentation should not be called as is, but if you need
  22. * the Drupal-style array definition for any table, use the following function
  23. * call:
  24. *
  25. * $table_desc = module_invoke_all('chado_'.$table.'_schema');
  26. *
  27. * where the variable $table contains the name of the table you want to
  28. * retireve. The function call above uses the Drupal hook infrastructure to
  29. * call the appropriate function in the Schema API as well as the appropriate
  30. * hook to add in any foreign key relationships.
  31. *
  32. * @}
  33. * @ingroup tripal_api
  34. */
  35. /**
  36. * Retrieves the list tables in the Chado schema. By default it only retursn
  37. * the default Chado tables, but may also return custom tables added to the
  38. * Chado schema as well.
  39. *
  40. * @param $include_custom
  41. * Optional. Set as TRUE to include any custom tables created in the
  42. * Chado schema. Custom tables are added to Chado using the
  43. * tripal_core_chado_create_table() function.
  44. *
  45. * @returns
  46. * An associative array where the key and value pairs are the Chado table names.
  47. * @ingroup tripal_schema_api
  48. */
  49. function tripal_core_get_chado_tables($include_custom = NULL) {
  50. if (is_array($db_url) AND array_key_exists('chado', $db_url)) {
  51. $previous_db = tripal_db_set_active('chado');
  52. $sql = 'SELECT tablename FROM pg_tables';
  53. $resource = db_query($sql);
  54. tripal_db_set_active($previous_db);
  55. }
  56. else {
  57. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  58. $resource = db_query($sql);
  59. }
  60. $tables = array();
  61. while ($r = db_fetch_object($resource)) {
  62. $tables[$r->tablename] = $r->tablename;
  63. }
  64. // now add in the custom tables too
  65. if ($include_custom) {
  66. $sql = "SELECT table_name FROM {tripal_custom_tables}";
  67. $resource = db_query($sql);
  68. }
  69. while ($r = db_fetch_object($resource)) {
  70. $tables[$r->table_name] = $r->table_name;
  71. }
  72. asort($tables);
  73. return $tables;
  74. }
  75. /**
  76. * Implements hook_organism_dbxref_schema()
  77. * Purpose: To describe the structure of organism_dbxref to tripal
  78. * @see tripal_core_chado_insert()
  79. * @see tripal_core_chado_update()
  80. * @see tripal_core_chado_select()
  81. *
  82. * @return
  83. * An array describing the current table
  84. *
  85. * @ingroup tripal_schema_api
  86. *
  87. */
  88. function tripal_core_chado_organism_dbxref_schema() {
  89. $description = array();
  90. $description = array(
  91. 'table' => 'organism_dbxref',
  92. // 'description' => 'TODO: please describe this table!',
  93. 'fields' => array(
  94. 'organism_dbxref_id' => array(
  95. // 'description' => 'TODO: please describe this field!',
  96. 'type' => 'serial',
  97. 'not NULL' => '1',
  98. ),
  99. 'organism_id' => array(
  100. // 'description' => 'TODO: please describe this field!',
  101. 'type' => 'int',
  102. 'not NULL' => '1',
  103. ),
  104. 'dbxref_id' => array(
  105. // 'description' => 'TODO: please describe this field!',
  106. 'type' => 'int',
  107. 'not NULL' => '1',
  108. ),
  109. ),
  110. 'primary key' => array(
  111. '0' => 'organism_dbxref_id',
  112. ),
  113. 'unique keys' => array(
  114. 'organism_dbxref_c1' => array(
  115. '0' => 'organism_id',
  116. '1' => 'dbxref_id',
  117. ),
  118. ),
  119. 'indexes' => array(
  120. 'organism_dbxref_idx1' => array(
  121. '0' => 'organism_id',
  122. ),
  123. 'organism_dbxref_idx2' => array(
  124. '0' => 'dbxref_id',
  125. ),
  126. ),
  127. 'foreign keys' => array(
  128. ),
  129. );
  130. return $description;
  131. }
  132. /**
  133. * Implements hook_organismprop_schema()
  134. * Purpose: To describe the structure of organismprop to tripal
  135. * @see tripal_core_chado_insert()
  136. * @see tripal_core_chado_update()
  137. * @see tripal_core_chado_select()
  138. *
  139. * @return
  140. * An array describing the current table
  141. *
  142. * @ingroup tripal_schema_api
  143. *
  144. */
  145. function tripal_core_chado_organismprop_schema() {
  146. $description = array();
  147. $description = array(
  148. 'table' => 'organismprop',
  149. // 'description' => 'TODO: please describe this table!',
  150. 'fields' => array(
  151. 'organismprop_id' => array(
  152. // 'description' => 'TODO: please describe this field!',
  153. 'type' => 'serial',
  154. 'not NULL' => '1',
  155. ),
  156. 'organism_id' => array(
  157. // 'description' => 'TODO: please describe this field!',
  158. 'type' => 'int',
  159. 'not NULL' => '1',
  160. ),
  161. 'type_id' => array(
  162. // 'description' => 'TODO: please describe this field!',
  163. 'type' => 'int',
  164. 'not NULL' => '1',
  165. ),
  166. 'value' => array(
  167. // 'description' => 'TODO: please describe this field!',
  168. 'type' => 'text',
  169. 'not NULL' => '',
  170. ),
  171. 'rank' => array(
  172. // 'description' => 'TODO: please describe this field!',
  173. 'type' => 'int',
  174. 'not NULL' => '1',
  175. 'default' => '0',
  176. ),
  177. ),
  178. 'primary key' => array(
  179. '0' => 'organismprop_id',
  180. ),
  181. 'unique keys' => array(
  182. 'organismprop_c1' => array(
  183. '0' => 'organism_id',
  184. '1' => 'type_id',
  185. '2' => 'rank',
  186. ),
  187. ),
  188. 'indexes' => array(
  189. 'organismprop_idx1' => array(
  190. '0' => 'organism_id',
  191. ),
  192. 'organismprop_idx2' => array(
  193. '0' => 'type_id',
  194. ),
  195. ),
  196. 'foreign keys' => array(
  197. ),
  198. );
  199. return $description;
  200. }
  201. /**
  202. * Implements hook_phendesc_schema()
  203. * Purpose: To describe the structure of phendesc to tripal
  204. * @see tripal_core_chado_insert()
  205. * @see tripal_core_chado_update()
  206. * @see tripal_core_chado_select()
  207. *
  208. * @return
  209. * An array describing the current table
  210. *
  211. * @ingroup tripal_schema_api
  212. *
  213. */
  214. function tripal_core_chado_phendesc_schema() {
  215. $description = array();
  216. $description = array(
  217. 'table' => 'phendesc',
  218. // 'description' => 'TODO: please describe this table!',
  219. 'fields' => array(
  220. 'phendesc_id' => array(
  221. // 'description' => 'TODO: please describe this field!',
  222. 'type' => 'serial',
  223. 'not NULL' => '1',
  224. ),
  225. 'genotype_id' => array(
  226. // 'description' => 'TODO: please describe this field!',
  227. 'type' => 'int',
  228. 'not NULL' => '1',
  229. ),
  230. 'environment_id' => array(
  231. // 'description' => 'TODO: please describe this field!',
  232. 'type' => 'int',
  233. 'not NULL' => '1',
  234. ),
  235. 'description' => array(
  236. // 'description' => 'TODO: please describe this field!',
  237. 'type' => 'text',
  238. 'not NULL' => '1',
  239. ),
  240. 'type_id' => array(
  241. // 'description' => 'TODO: please describe this field!',
  242. 'type' => 'int',
  243. 'not NULL' => '1',
  244. ),
  245. 'pub_id' => array(
  246. // 'description' => 'TODO: please describe this field!',
  247. 'type' => 'int',
  248. 'not NULL' => '1',
  249. ),
  250. ),
  251. 'primary key' => array(
  252. '0' => 'phendesc_id',
  253. ),
  254. 'unique keys' => array(
  255. 'phendesc_c1' => array(
  256. '0' => 'genotype_id',
  257. '1' => 'environment_id',
  258. '2' => 'type_id',
  259. '3' => 'pub_id',
  260. ),
  261. ),
  262. 'indexes' => array(
  263. 'phendesc_idx1' => array(
  264. '0' => 'genotype_id',
  265. ),
  266. 'phendesc_idx2' => array(
  267. '0' => 'environment_id',
  268. ),
  269. 'phendesc_idx3' => array(
  270. '0' => 'pub_id',
  271. ),
  272. ),
  273. 'foreign keys' => array(
  274. ),
  275. );
  276. return $description;
  277. }
  278. /**
  279. * Implements hook_phenotype_schema()
  280. * Purpose: To describe the structure of phenotype to tripal
  281. * @see tripal_core_chado_insert()
  282. * @see tripal_core_chado_update()
  283. * @see tripal_core_chado_select()
  284. *
  285. * @return
  286. * An array describing the current table
  287. *
  288. * @ingroup tripal_schema_api
  289. *
  290. */
  291. function tripal_core_chado_phenotype_schema() {
  292. $description = array();
  293. $description = array(
  294. 'table' => 'phenotype',
  295. // 'description' => 'TODO: please describe this table!',
  296. 'fields' => array(
  297. 'phenotype_id' => array(
  298. // 'description' => 'TODO: please describe this field!',
  299. 'type' => 'serial',
  300. 'not NULL' => '1',
  301. ),
  302. 'uniquename' => array(
  303. // 'description' => 'TODO: please describe this field!',
  304. 'type' => 'text',
  305. 'not NULL' => '1',
  306. ),
  307. 'observable_id' => array(
  308. // 'description' => 'TODO: please describe this field!',
  309. 'type' => 'int',
  310. 'not NULL' => '',
  311. ),
  312. 'attr_id' => array(
  313. // 'description' => 'TODO: please describe this field!',
  314. 'type' => 'int',
  315. 'not NULL' => '',
  316. ),
  317. 'value' => array(
  318. // 'description' => 'TODO: please describe this field!',
  319. 'type' => 'text',
  320. 'not NULL' => '',
  321. ),
  322. 'cvalue_id' => array(
  323. // 'description' => 'TODO: please describe this field!',
  324. 'type' => 'int',
  325. 'not NULL' => '',
  326. ),
  327. 'assay_id' => array(
  328. // 'description' => 'TODO: please describe this field!',
  329. 'type' => 'int',
  330. 'not NULL' => '',
  331. ),
  332. ),
  333. 'primary key' => array(
  334. '0' => 'phenotype_id',
  335. ),
  336. 'unique keys' => array(
  337. 'phenotype_c1' => array(
  338. '0' => 'uniquename',
  339. ),
  340. ),
  341. 'indexes' => array(
  342. 'phenotype_idx1' => array(
  343. '0' => 'cvalue_id',
  344. ),
  345. 'phenotype_idx2' => array(
  346. '0' => 'observable_id',
  347. ),
  348. 'phenotype_idx3' => array(
  349. '0' => 'attr_id',
  350. ),
  351. ),
  352. 'foreign keys' => array(
  353. ),
  354. );
  355. return $description;
  356. }
  357. /**
  358. * Implements hook_organism_schema()
  359. * Purpose: To describe the structure of organism to tripal
  360. * @see tripal_core_chado_insert()
  361. * @see tripal_core_chado_update()
  362. * @see tripal_core_chado_select()
  363. *
  364. * @return
  365. * An array describing the current table
  366. *
  367. * @ingroup tripal_schema_api
  368. *
  369. */
  370. function tripal_core_chado_organism_schema() {
  371. $description = array();
  372. $description = array(
  373. 'table' => 'organism',
  374. // 'description' => 'TODO: please describe this table!',
  375. 'fields' => array(
  376. 'organism_id' => array(
  377. // 'description' => 'TODO: please describe this field!',
  378. 'type' => 'serial',
  379. 'not NULL' => '1',
  380. ),
  381. 'abbreviation' => array(
  382. // 'description' => 'TODO: please describe this field!',
  383. 'type' => 'varchar',
  384. 'length' => '255',
  385. 'not NULL' => '',
  386. ),
  387. 'genus' => array(
  388. // 'description' => 'TODO: please describe this field!',
  389. 'type' => 'varchar',
  390. 'length' => '255',
  391. 'not NULL' => '1',
  392. ),
  393. 'species' => array(
  394. // 'description' => 'TODO: please describe this field!',
  395. 'type' => 'varchar',
  396. 'length' => '255',
  397. 'not NULL' => '1',
  398. ),
  399. 'common_name' => array(
  400. // 'description' => 'TODO: please describe this field!',
  401. 'type' => 'varchar',
  402. 'length' => '255',
  403. 'not NULL' => '',
  404. ),
  405. 'comment' => array(
  406. // 'description' => 'TODO: please describe this field!',
  407. 'type' => 'text',
  408. 'not NULL' => '',
  409. ),
  410. ),
  411. 'primary key' => array(
  412. '0' => 'organism_id',
  413. ),
  414. 'unique keys' => array(
  415. 'organism_c1' => array(
  416. '0' => 'genus',
  417. '1' => 'species',
  418. ),
  419. ),
  420. 'indexes' => array(
  421. ),
  422. 'foreign keys' => array(
  423. ),
  424. );
  425. return $description;
  426. }
  427. /**
  428. * Implements hook_materialized_view_schema()
  429. * Purpose: To describe the structure of materialized_view to tripal
  430. * @see tripal_core_chado_insert()
  431. * @see tripal_core_chado_update()
  432. * @see tripal_core_chado_select()
  433. *
  434. * @return
  435. * An array describing the current table
  436. *
  437. * @ingroup tripal_schema_api
  438. *
  439. */
  440. function tripal_core_chado_materialized_view_schema() {
  441. $description = array();
  442. $description = array(
  443. 'table' => 'materialized_view',
  444. // 'description' => 'TODO: please describe this table!',
  445. 'fields' => array(
  446. 'materialized_view_id' => array(
  447. // 'description' => 'TODO: please describe this field!',
  448. 'type' => 'serial',
  449. 'not NULL' => '1',
  450. ),
  451. 'last_update' => array(
  452. // 'description' => 'TODO: please describe this field!',
  453. 'type' => 'datetime',
  454. 'not NULL' => '',
  455. ),
  456. 'refresh_time' => array(
  457. // 'description' => 'TODO: please describe this field!',
  458. 'type' => 'int',
  459. 'not NULL' => '',
  460. ),
  461. 'name' => array(
  462. // 'description' => 'TODO: please describe this field!',
  463. 'type' => 'varchar',
  464. 'length' => '64',
  465. 'not NULL' => '',
  466. ),
  467. 'mv_schema' => array(
  468. // 'description' => 'TODO: please describe this field!',
  469. 'type' => 'varchar',
  470. 'length' => '64',
  471. 'not NULL' => '',
  472. ),
  473. 'mv_table' => array(
  474. // 'description' => 'TODO: please describe this field!',
  475. 'type' => 'varchar',
  476. 'length' => '128',
  477. 'not NULL' => '',
  478. ),
  479. 'mv_specs' => array(
  480. // 'description' => 'TODO: please describe this field!',
  481. 'type' => 'text',
  482. 'not NULL' => '',
  483. ),
  484. 'indexed' => array(
  485. // 'description' => 'TODO: please describe this field!',
  486. 'type' => 'text',
  487. 'not NULL' => '',
  488. ),
  489. 'query' => array(
  490. // 'description' => 'TODO: please describe this field!',
  491. 'type' => 'text',
  492. 'not NULL' => '',
  493. ),
  494. 'special_index' => array(
  495. // 'description' => 'TODO: please describe this field!',
  496. 'type' => 'text',
  497. 'not NULL' => '',
  498. ),
  499. ),
  500. 'primary key' => array(
  501. ),
  502. 'unique keys' => array(
  503. 'name' => array(
  504. '0' => 'name',
  505. ),
  506. ),
  507. 'indexes' => array(
  508. ),
  509. 'foreign keys' => array(
  510. ),
  511. );
  512. return $description;
  513. }
  514. /**
  515. * Implements hook_libraryprop_schema()
  516. * Purpose: To describe the structure of libraryprop to tripal
  517. * @see tripal_core_chado_insert()
  518. * @see tripal_core_chado_update()
  519. * @see tripal_core_chado_select()
  520. *
  521. * @return
  522. * An array describing the current table
  523. *
  524. * @ingroup tripal_schema_api
  525. *
  526. */
  527. function tripal_core_chado_libraryprop_schema() {
  528. $description = array();
  529. $description = array(
  530. 'table' => 'libraryprop',
  531. // 'description' => 'TODO: please describe this table!',
  532. 'fields' => array(
  533. 'libraryprop_id' => array(
  534. // 'description' => 'TODO: please describe this field!',
  535. 'type' => 'serial',
  536. 'not NULL' => '1',
  537. ),
  538. 'library_id' => array(
  539. // 'description' => 'TODO: please describe this field!',
  540. 'type' => 'int',
  541. 'not NULL' => '1',
  542. ),
  543. 'type_id' => array(
  544. // 'description' => 'TODO: please describe this field!',
  545. 'type' => 'int',
  546. 'not NULL' => '1',
  547. ),
  548. 'value' => array(
  549. // 'description' => 'TODO: please describe this field!',
  550. 'type' => 'text',
  551. 'not NULL' => '',
  552. ),
  553. 'rank' => array(
  554. // 'description' => 'TODO: please describe this field!',
  555. 'type' => 'int',
  556. 'not NULL' => '1',
  557. 'default' => '0',
  558. ),
  559. ),
  560. 'primary key' => array(
  561. '0' => 'libraryprop_id',
  562. ),
  563. 'unique keys' => array(
  564. 'libraryprop_c1' => array(
  565. '0' => 'library_id',
  566. '1' => 'type_id',
  567. '2' => 'rank',
  568. ),
  569. ),
  570. 'indexes' => array(
  571. 'libraryprop_idx1' => array(
  572. '0' => 'library_id',
  573. ),
  574. 'libraryprop_idx2' => array(
  575. '0' => 'type_id',
  576. ),
  577. ),
  578. 'foreign keys' => array(
  579. ),
  580. );
  581. return $description;
  582. }
  583. /**
  584. * Implements hook_libraryprop_pub_schema()
  585. * Purpose: To describe the structure of libraryprop_pub to tripal
  586. * @see tripal_core_chado_insert()
  587. * @see tripal_core_chado_update()
  588. * @see tripal_core_chado_select()
  589. *
  590. * @return
  591. * An array describing the current table
  592. *
  593. * @ingroup tripal_schema_api
  594. *
  595. */
  596. function tripal_core_chado_libraryprop_pub_schema() {
  597. $description = array();
  598. $description = array(
  599. 'table' => 'libraryprop_pub',
  600. // 'description' => 'TODO: please describe this table!',
  601. 'fields' => array(
  602. 'libraryprop_pub_id' => array(
  603. // 'description' => 'TODO: please describe this field!',
  604. 'type' => 'serial',
  605. 'not NULL' => '1',
  606. ),
  607. 'libraryprop_id' => array(
  608. // 'description' => 'TODO: please describe this field!',
  609. 'type' => 'int',
  610. 'not NULL' => '1',
  611. ),
  612. 'pub_id' => array(
  613. // 'description' => 'TODO: please describe this field!',
  614. 'type' => 'int',
  615. 'not NULL' => '1',
  616. ),
  617. ),
  618. 'primary key' => array(
  619. '0' => 'libraryprop_pub_id',
  620. ),
  621. 'unique keys' => array(
  622. 'libraryprop_pub_c1' => array(
  623. '0' => 'libraryprop_id',
  624. '1' => 'pub_id',
  625. ),
  626. ),
  627. 'indexes' => array(
  628. 'libraryprop_pub_idx1' => array(
  629. '0' => 'libraryprop_id',
  630. ),
  631. 'libraryprop_pub_idx2' => array(
  632. '0' => 'pub_id',
  633. ),
  634. ),
  635. 'foreign keys' => array(
  636. ),
  637. );
  638. return $description;
  639. }
  640. /**
  641. * Implements hook_magedocumentation_schema()
  642. * Purpose: To describe the structure of magedocumentation to tripal
  643. * @see tripal_core_chado_insert()
  644. * @see tripal_core_chado_update()
  645. * @see tripal_core_chado_select()
  646. *
  647. * @return
  648. * An array describing the current table
  649. *
  650. * @ingroup tripal_schema_api
  651. *
  652. */
  653. function tripal_core_chado_magedocumentation_schema() {
  654. $description = array();
  655. $description = array(
  656. 'table' => 'magedocumentation',
  657. // 'description' => 'TODO: please describe this table!',
  658. 'fields' => array(
  659. 'magedocumentation_id' => array(
  660. // 'description' => 'TODO: please describe this field!',
  661. 'type' => 'serial',
  662. 'not NULL' => '1',
  663. ),
  664. 'mageml_id' => array(
  665. // 'description' => 'TODO: please describe this field!',
  666. 'type' => 'int',
  667. 'not NULL' => '1',
  668. ),
  669. 'tableinfo_id' => array(
  670. // 'description' => 'TODO: please describe this field!',
  671. 'type' => 'int',
  672. 'not NULL' => '1',
  673. ),
  674. 'row_id' => array(
  675. // 'description' => 'TODO: please describe this field!',
  676. 'type' => 'int',
  677. 'not NULL' => '1',
  678. ),
  679. 'mageidentifier' => array(
  680. // 'description' => 'TODO: please describe this field!',
  681. 'type' => 'text',
  682. 'not NULL' => '1',
  683. ),
  684. ),
  685. 'primary key' => array(
  686. '0' => 'magedocumentation_id',
  687. ),
  688. 'unique keys' => array(
  689. ),
  690. 'indexes' => array(
  691. 'magedocumentation_idx1' => array(
  692. '0' => 'mageml_id',
  693. ),
  694. 'magedocumentation_idx2' => array(
  695. '0' => 'tableinfo_id',
  696. ),
  697. 'magedocumentation_idx3' => array(
  698. '0' => 'row_id',
  699. ),
  700. ),
  701. 'foreign keys' => array(
  702. ),
  703. );
  704. return $description;
  705. }
  706. /**
  707. * Implements hook_mageml_schema()
  708. * Purpose: To describe the structure of mageml to tripal
  709. * @see tripal_core_chado_insert()
  710. * @see tripal_core_chado_update()
  711. * @see tripal_core_chado_select()
  712. *
  713. * @return
  714. * An array describing the current table
  715. *
  716. * @ingroup tripal_schema_api
  717. *
  718. */
  719. function tripal_core_chado_mageml_schema() {
  720. $description = array();
  721. $description = array(
  722. 'table' => 'mageml',
  723. // 'description' => 'TODO: please describe this table!',
  724. 'fields' => array(
  725. 'mageml_id' => array(
  726. // 'description' => 'TODO: please describe this field!',
  727. 'type' => 'serial',
  728. 'not NULL' => '1',
  729. ),
  730. 'mage_package' => array(
  731. // 'description' => 'TODO: please describe this field!',
  732. 'type' => 'text',
  733. 'not NULL' => '1',
  734. ),
  735. 'mage_ml' => array(
  736. // 'description' => 'TODO: please describe this field!',
  737. 'type' => 'text',
  738. 'not NULL' => '1',
  739. ),
  740. ),
  741. 'primary key' => array(
  742. '0' => 'mageml_id',
  743. ),
  744. 'unique keys' => array(
  745. ),
  746. 'indexes' => array(
  747. ),
  748. 'foreign keys' => array(
  749. ),
  750. );
  751. return $description;
  752. }
  753. /**
  754. * Implements hook_phenotype_comparison_schema()
  755. * Purpose: To describe the structure of phenotype_comparison to tripal
  756. * @see tripal_core_chado_insert()
  757. * @see tripal_core_chado_update()
  758. * @see tripal_core_chado_select()
  759. *
  760. * @return
  761. * An array describing the current table
  762. *
  763. * @ingroup tripal_schema_api
  764. *
  765. */
  766. function tripal_core_chado_phenotype_comparison_schema() {
  767. $description = array();
  768. $description = array(
  769. 'table' => 'phenotype_comparison',
  770. // 'description' => 'TODO: please describe this table!',
  771. 'fields' => array(
  772. 'phenotype_comparison_id' => array(
  773. // 'description' => 'TODO: please describe this field!',
  774. 'type' => 'serial',
  775. 'not NULL' => '1',
  776. ),
  777. 'genotype1_id' => array(
  778. // 'description' => 'TODO: please describe this field!',
  779. 'type' => 'int',
  780. 'not NULL' => '1',
  781. ),
  782. 'environment1_id' => array(
  783. // 'description' => 'TODO: please describe this field!',
  784. 'type' => 'int',
  785. 'not NULL' => '1',
  786. ),
  787. 'genotype2_id' => array(
  788. // 'description' => 'TODO: please describe this field!',
  789. 'type' => 'int',
  790. 'not NULL' => '1',
  791. ),
  792. 'environment2_id' => array(
  793. // 'description' => 'TODO: please describe this field!',
  794. 'type' => 'int',
  795. 'not NULL' => '1',
  796. ),
  797. 'phenotype1_id' => array(
  798. // 'description' => 'TODO: please describe this field!',
  799. 'type' => 'int',
  800. 'not NULL' => '1',
  801. ),
  802. 'phenotype2_id' => array(
  803. // 'description' => 'TODO: please describe this field!',
  804. 'type' => 'int',
  805. 'not NULL' => '',
  806. ),
  807. 'pub_id' => array(
  808. // 'description' => 'TODO: please describe this field!',
  809. 'type' => 'int',
  810. 'not NULL' => '1',
  811. ),
  812. 'organism_id' => array(
  813. // 'description' => 'TODO: please describe this field!',
  814. 'type' => 'int',
  815. 'not NULL' => '1',
  816. ),
  817. ),
  818. 'primary key' => array(
  819. '0' => 'phenotype_comparison_id',
  820. ),
  821. 'unique keys' => array(
  822. 'phenotype_comparison_c1' => array(
  823. '0' => 'genotype1_id',
  824. '1' => 'environment1_id',
  825. '2' => 'genotype2_id',
  826. '3' => 'environment2_id',
  827. '4' => 'phenotype1_id',
  828. '5' => 'pub_id',
  829. ),
  830. ),
  831. 'indexes' => array(
  832. 'phenotype_comparison_idx1' => array(
  833. '0' => 'genotype1_id',
  834. ),
  835. 'phenotype_comparison_idx2' => array(
  836. '0' => 'genotype2_id',
  837. ),
  838. 'phenotype_comparison_idx4' => array(
  839. '0' => 'pub_id',
  840. ),
  841. ),
  842. 'foreign keys' => array(
  843. ),
  844. );
  845. return $description;
  846. }
  847. /**
  848. * Implements hook_phenotype_comparison_cvterm_schema()
  849. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  850. * @see tripal_core_chado_insert()
  851. * @see tripal_core_chado_update()
  852. * @see tripal_core_chado_select()
  853. *
  854. * @return
  855. * An array describing the current table
  856. *
  857. * @ingroup tripal_schema_api
  858. *
  859. */
  860. function tripal_core_chado_phenotype_comparison_cvterm_schema() {
  861. $description = array();
  862. $description = array(
  863. 'table' => 'phenotype_comparison_cvterm',
  864. // 'description' => 'TODO: please describe this table!',
  865. 'fields' => array(
  866. 'phenotype_comparison_cvterm_id' => array(
  867. // 'description' => 'TODO: please describe this field!',
  868. 'type' => 'serial',
  869. 'not NULL' => '1',
  870. ),
  871. 'phenotype_comparison_id' => array(
  872. // 'description' => 'TODO: please describe this field!',
  873. 'type' => 'int',
  874. 'not NULL' => '1',
  875. ),
  876. 'cvterm_id' => array(
  877. // 'description' => 'TODO: please describe this field!',
  878. 'type' => 'int',
  879. 'not NULL' => '1',
  880. ),
  881. 'pub_id' => array(
  882. // 'description' => 'TODO: please describe this field!',
  883. 'type' => 'int',
  884. 'not NULL' => '1',
  885. ),
  886. 'rank' => array(
  887. // 'description' => 'TODO: please describe this field!',
  888. 'type' => 'int',
  889. 'not NULL' => '1',
  890. 'default' => '0',
  891. ),
  892. ),
  893. 'primary key' => array(
  894. '0' => 'phenotype_comparison_cvterm_id',
  895. ),
  896. 'unique keys' => array(
  897. 'phenotype_comparison_cvterm_c1' => array(
  898. '0' => 'phenotype_comparison_id',
  899. '1' => 'cvterm_id',
  900. ),
  901. ),
  902. 'indexes' => array(
  903. 'phenotype_comparison_cvterm_idx1' => array(
  904. '0' => 'phenotype_comparison_id',
  905. ),
  906. 'phenotype_comparison_cvterm_idx2' => array(
  907. '0' => 'cvterm_id',
  908. ),
  909. ),
  910. 'foreign keys' => array(
  911. ),
  912. );
  913. return $description;
  914. }
  915. /**
  916. * Implements hook_phylonode_relationship_schema()
  917. * Purpose: To describe the structure of phylonode_relationship to tripal
  918. * @see tripal_core_chado_insert()
  919. * @see tripal_core_chado_update()
  920. * @see tripal_core_chado_select()
  921. *
  922. * @return
  923. * An array describing the current table
  924. *
  925. * @ingroup tripal_schema_api
  926. *
  927. */
  928. function tripal_core_chado_phylonode_relationship_schema() {
  929. $description = array();
  930. $description = array(
  931. 'table' => 'phylonode_relationship',
  932. // 'description' => 'TODO: please describe this table!',
  933. 'fields' => array(
  934. 'phylonode_relationship_id' => array(
  935. // 'description' => 'TODO: please describe this field!',
  936. 'type' => 'serial',
  937. 'not NULL' => '1',
  938. ),
  939. 'subject_id' => array(
  940. // 'description' => 'TODO: please describe this field!',
  941. 'type' => 'int',
  942. 'not NULL' => '1',
  943. ),
  944. 'object_id' => array(
  945. // 'description' => 'TODO: please describe this field!',
  946. 'type' => 'int',
  947. 'not NULL' => '1',
  948. ),
  949. 'type_id' => array(
  950. // 'description' => 'TODO: please describe this field!',
  951. 'type' => 'int',
  952. 'not NULL' => '1',
  953. ),
  954. 'rank' => array(
  955. // 'description' => 'TODO: please describe this field!',
  956. 'type' => 'int',
  957. 'not NULL' => '',
  958. ),
  959. 'phylotree_id' => array(
  960. // 'description' => 'TODO: please describe this field!',
  961. 'type' => 'int',
  962. 'not NULL' => '1',
  963. ),
  964. ),
  965. 'primary key' => array(
  966. '0' => 'phylonode_relationship_id',
  967. ),
  968. 'unique keys' => array(
  969. 'subject_id' => array(
  970. '0' => 'subject_id',
  971. '1' => 'object_id',
  972. '2' => 'type_id',
  973. ),
  974. ),
  975. 'indexes' => array(
  976. 'phylonode_relationship_idx1' => array(
  977. '0' => 'subject_id',
  978. ),
  979. 'phylonode_relationship_idx2' => array(
  980. '0' => 'object_id',
  981. ),
  982. 'phylonode_relationship_idx3' => array(
  983. '0' => 'type_id',
  984. ),
  985. ),
  986. 'foreign keys' => array(
  987. ),
  988. );
  989. return $description;
  990. }
  991. /**
  992. * Implements hook_phylonodeprop_schema()
  993. * Purpose: To describe the structure of phylonodeprop to tripal
  994. * @see tripal_core_chado_insert()
  995. * @see tripal_core_chado_update()
  996. * @see tripal_core_chado_select()
  997. *
  998. * @return
  999. * An array describing the current table
  1000. *
  1001. * @ingroup tripal_schema_api
  1002. *
  1003. */
  1004. function tripal_core_chado_phylonodeprop_schema() {
  1005. $description = array();
  1006. $description = array(
  1007. 'table' => 'phylonodeprop',
  1008. // 'description' => 'TODO: please describe this table!',
  1009. 'fields' => array(
  1010. 'phylonodeprop_id' => array(
  1011. // 'description' => 'TODO: please describe this field!',
  1012. 'type' => 'serial',
  1013. 'not NULL' => '1',
  1014. ),
  1015. 'phylonode_id' => array(
  1016. // 'description' => 'TODO: please describe this field!',
  1017. 'type' => 'int',
  1018. 'not NULL' => '1',
  1019. ),
  1020. 'type_id' => array(
  1021. // 'description' => 'TODO: please describe this field!',
  1022. 'type' => 'int',
  1023. 'not NULL' => '1',
  1024. ),
  1025. 'value' => array(
  1026. // 'description' => 'TODO: please describe this field!',
  1027. 'type' => 'text',
  1028. 'not NULL' => '1',
  1029. 'default' => '',
  1030. ),
  1031. 'rank' => array(
  1032. // 'description' => 'TODO: please describe this field!',
  1033. 'type' => 'int',
  1034. 'not NULL' => '1',
  1035. 'default' => '0',
  1036. ),
  1037. ),
  1038. 'primary key' => array(
  1039. '0' => 'phylonodeprop_id',
  1040. ),
  1041. 'unique keys' => array(
  1042. 'phylonode_id' => array(
  1043. '0' => 'phylonode_id',
  1044. '1' => 'type_id',
  1045. '2' => 'value',
  1046. '3' => 'rank',
  1047. ),
  1048. ),
  1049. 'indexes' => array(
  1050. 'phylonodeprop_idx1' => array(
  1051. '0' => 'phylonode_id',
  1052. ),
  1053. 'phylonodeprop_idx2' => array(
  1054. '0' => 'type_id',
  1055. ),
  1056. ),
  1057. 'foreign keys' => array(
  1058. ),
  1059. );
  1060. return $description;
  1061. }
  1062. /**
  1063. * Implements hook_phylotree_schema()
  1064. * Purpose: To describe the structure of phylotree to tripal
  1065. * @see tripal_core_chado_insert()
  1066. * @see tripal_core_chado_update()
  1067. * @see tripal_core_chado_select()
  1068. *
  1069. * @return
  1070. * An array describing the current table
  1071. *
  1072. * @ingroup tripal_schema_api
  1073. *
  1074. */
  1075. function tripal_core_chado_phylotree_schema() {
  1076. $description = array();
  1077. $description = array(
  1078. 'table' => 'phylotree',
  1079. // 'description' => 'TODO: please describe this table!',
  1080. 'fields' => array(
  1081. 'phylotree_id' => array(
  1082. // 'description' => 'TODO: please describe this field!',
  1083. 'type' => 'serial',
  1084. 'not NULL' => '1',
  1085. ),
  1086. 'dbxref_id' => array(
  1087. // 'description' => 'TODO: please describe this field!',
  1088. 'type' => 'int',
  1089. 'not NULL' => '1',
  1090. ),
  1091. 'name' => array(
  1092. // 'description' => 'TODO: please describe this field!',
  1093. 'type' => 'varchar',
  1094. 'length' => '255',
  1095. 'not NULL' => '',
  1096. ),
  1097. 'type_id' => array(
  1098. // 'description' => 'TODO: please describe this field!',
  1099. 'type' => 'int',
  1100. 'not NULL' => '',
  1101. ),
  1102. 'analysis_id' => array(
  1103. // 'description' => 'TODO: please describe this field!',
  1104. 'type' => 'int',
  1105. 'not NULL' => '',
  1106. ),
  1107. 'comment' => array(
  1108. // 'description' => 'TODO: please describe this field!',
  1109. 'type' => 'text',
  1110. 'not NULL' => '',
  1111. ),
  1112. ),
  1113. 'primary key' => array(
  1114. '0' => 'phylotree_id',
  1115. ),
  1116. 'unique keys' => array(
  1117. ),
  1118. 'indexes' => array(
  1119. 'phylotree_idx1' => array(
  1120. '0' => 'phylotree_id',
  1121. ),
  1122. ),
  1123. 'foreign keys' => array(
  1124. ),
  1125. );
  1126. return $description;
  1127. }
  1128. /**
  1129. * Implements hook_phylotree_pub_schema()
  1130. * Purpose: To describe the structure of phylotree_pub to tripal
  1131. * @see tripal_core_chado_insert()
  1132. * @see tripal_core_chado_update()
  1133. * @see tripal_core_chado_select()
  1134. *
  1135. * @return
  1136. * An array describing the current table
  1137. *
  1138. * @ingroup tripal_schema_api
  1139. *
  1140. */
  1141. function tripal_core_chado_phylotree_pub_schema() {
  1142. $description = array();
  1143. $description = array(
  1144. 'table' => 'phylotree_pub',
  1145. // 'description' => 'TODO: please describe this table!',
  1146. 'fields' => array(
  1147. 'phylotree_pub_id' => array(
  1148. // 'description' => 'TODO: please describe this field!',
  1149. 'type' => 'serial',
  1150. 'not NULL' => '1',
  1151. ),
  1152. 'phylotree_id' => array(
  1153. // 'description' => 'TODO: please describe this field!',
  1154. 'type' => 'int',
  1155. 'not NULL' => '1',
  1156. ),
  1157. 'pub_id' => array(
  1158. // 'description' => 'TODO: please describe this field!',
  1159. 'type' => 'int',
  1160. 'not NULL' => '1',
  1161. ),
  1162. ),
  1163. 'primary key' => array(
  1164. '0' => 'phylotree_pub_id',
  1165. ),
  1166. 'unique keys' => array(
  1167. 'phylotree_id' => array(
  1168. '0' => 'phylotree_id',
  1169. '1' => 'pub_id',
  1170. ),
  1171. ),
  1172. 'indexes' => array(
  1173. 'phylotree_pub_idx1' => array(
  1174. '0' => 'phylotree_id',
  1175. ),
  1176. 'phylotree_pub_idx2' => array(
  1177. '0' => 'pub_id',
  1178. ),
  1179. ),
  1180. 'foreign keys' => array(
  1181. ),
  1182. );
  1183. return $description;
  1184. }
  1185. /**
  1186. * Implements hook_phylonode_pub_schema()
  1187. * Purpose: To describe the structure of phylonode_pub to tripal
  1188. * @see tripal_core_chado_insert()
  1189. * @see tripal_core_chado_update()
  1190. * @see tripal_core_chado_select()
  1191. *
  1192. * @return
  1193. * An array describing the current table
  1194. *
  1195. * @ingroup tripal_schema_api
  1196. *
  1197. */
  1198. function tripal_core_chado_phylonode_pub_schema() {
  1199. $description = array();
  1200. $description = array(
  1201. 'table' => 'phylonode_pub',
  1202. // 'description' => 'TODO: please describe this table!',
  1203. 'fields' => array(
  1204. 'phylonode_pub_id' => array(
  1205. // 'description' => 'TODO: please describe this field!',
  1206. 'type' => 'serial',
  1207. 'not NULL' => '1',
  1208. ),
  1209. 'phylonode_id' => array(
  1210. // 'description' => 'TODO: please describe this field!',
  1211. 'type' => 'int',
  1212. 'not NULL' => '1',
  1213. ),
  1214. 'pub_id' => array(
  1215. // 'description' => 'TODO: please describe this field!',
  1216. 'type' => 'int',
  1217. 'not NULL' => '1',
  1218. ),
  1219. ),
  1220. 'primary key' => array(
  1221. '0' => 'phylonode_pub_id',
  1222. ),
  1223. 'unique keys' => array(
  1224. 'phylonode_id' => array(
  1225. '0' => 'phylonode_id',
  1226. '1' => 'pub_id',
  1227. ),
  1228. ),
  1229. 'indexes' => array(
  1230. 'phylonode_pub_idx1' => array(
  1231. '0' => 'phylonode_id',
  1232. ),
  1233. 'phylonode_pub_idx2' => array(
  1234. '0' => 'pub_id',
  1235. ),
  1236. ),
  1237. 'foreign keys' => array(
  1238. ),
  1239. );
  1240. return $description;
  1241. }
  1242. /**
  1243. * Implements hook_phylonode_organism_schema()
  1244. * Purpose: To describe the structure of phylonode_organism to tripal
  1245. * @see tripal_core_chado_insert()
  1246. * @see tripal_core_chado_update()
  1247. * @see tripal_core_chado_select()
  1248. *
  1249. * @return
  1250. * An array describing the current table
  1251. *
  1252. * @ingroup tripal_schema_api
  1253. *
  1254. */
  1255. function tripal_core_chado_phylonode_organism_schema() {
  1256. $description = array();
  1257. $description = array(
  1258. 'table' => 'phylonode_organism',
  1259. // 'description' => 'TODO: please describe this table!',
  1260. 'fields' => array(
  1261. 'phylonode_organism_id' => array(
  1262. // 'description' => 'TODO: please describe this field!',
  1263. 'type' => 'serial',
  1264. 'not NULL' => '1',
  1265. ),
  1266. 'phylonode_id' => array(
  1267. // 'description' => 'TODO: please describe this field!',
  1268. 'type' => 'int',
  1269. 'not NULL' => '1',
  1270. ),
  1271. 'organism_id' => array(
  1272. // 'description' => 'TODO: please describe this field!',
  1273. 'type' => 'int',
  1274. 'not NULL' => '1',
  1275. ),
  1276. ),
  1277. 'primary key' => array(
  1278. '0' => 'phylonode_organism_id',
  1279. ),
  1280. 'unique keys' => array(
  1281. 'phylonode_id' => array(
  1282. '0' => 'phylonode_id',
  1283. ),
  1284. ),
  1285. 'indexes' => array(
  1286. 'phylonode_organism_idx1' => array(
  1287. '0' => 'phylonode_id',
  1288. ),
  1289. 'phylonode_organism_idx2' => array(
  1290. '0' => 'organism_id',
  1291. ),
  1292. ),
  1293. 'foreign keys' => array(
  1294. ),
  1295. );
  1296. return $description;
  1297. }
  1298. /**
  1299. * Implements hook_phenotype_cvterm_schema()
  1300. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1301. * @see tripal_core_chado_insert()
  1302. * @see tripal_core_chado_update()
  1303. * @see tripal_core_chado_select()
  1304. *
  1305. * @return
  1306. * An array describing the current table
  1307. *
  1308. * @ingroup tripal_schema_api
  1309. *
  1310. */
  1311. function tripal_core_chado_phenotype_cvterm_schema() {
  1312. $description = array();
  1313. $description = array(
  1314. 'table' => 'phenotype_cvterm',
  1315. // 'description' => 'TODO: please describe this table!',
  1316. 'fields' => array(
  1317. 'phenotype_cvterm_id' => array(
  1318. // 'description' => 'TODO: please describe this field!',
  1319. 'type' => 'serial',
  1320. 'not NULL' => '1',
  1321. ),
  1322. 'phenotype_id' => array(
  1323. // 'description' => 'TODO: please describe this field!',
  1324. 'type' => 'int',
  1325. 'not NULL' => '1',
  1326. ),
  1327. 'cvterm_id' => array(
  1328. // 'description' => 'TODO: please describe this field!',
  1329. 'type' => 'int',
  1330. 'not NULL' => '1',
  1331. ),
  1332. 'rank' => array(
  1333. // 'description' => 'TODO: please describe this field!',
  1334. 'type' => 'int',
  1335. 'not NULL' => '1',
  1336. 'default' => '0',
  1337. ),
  1338. ),
  1339. 'primary key' => array(
  1340. '0' => 'phenotype_cvterm_id',
  1341. ),
  1342. 'unique keys' => array(
  1343. 'phenotype_cvterm_c1' => array(
  1344. '0' => 'phenotype_id',
  1345. '1' => 'cvterm_id',
  1346. '2' => 'rank',
  1347. ),
  1348. ),
  1349. 'indexes' => array(
  1350. 'phenotype_cvterm_idx1' => array(
  1351. '0' => 'phenotype_id',
  1352. ),
  1353. 'phenotype_cvterm_idx2' => array(
  1354. '0' => 'cvterm_id',
  1355. ),
  1356. ),
  1357. 'foreign keys' => array(
  1358. ),
  1359. );
  1360. return $description;
  1361. }
  1362. /**
  1363. * Implements hook_phenstatement_schema()
  1364. * Purpose: To describe the structure of phenstatement to tripal
  1365. * @see tripal_core_chado_insert()
  1366. * @see tripal_core_chado_update()
  1367. * @see tripal_core_chado_select()
  1368. *
  1369. * @return
  1370. * An array describing the current table
  1371. *
  1372. * @ingroup tripal_schema_api
  1373. *
  1374. */
  1375. function tripal_core_chado_phenstatement_schema() {
  1376. $description = array();
  1377. $description = array(
  1378. 'table' => 'phenstatement',
  1379. // 'description' => 'TODO: please describe this table!',
  1380. 'fields' => array(
  1381. 'phenstatement_id' => array(
  1382. // 'description' => 'TODO: please describe this field!',
  1383. 'type' => 'serial',
  1384. 'not NULL' => '1',
  1385. ),
  1386. 'genotype_id' => array(
  1387. // 'description' => 'TODO: please describe this field!',
  1388. 'type' => 'int',
  1389. 'not NULL' => '1',
  1390. ),
  1391. 'environment_id' => array(
  1392. // 'description' => 'TODO: please describe this field!',
  1393. 'type' => 'int',
  1394. 'not NULL' => '1',
  1395. ),
  1396. 'phenotype_id' => array(
  1397. // 'description' => 'TODO: please describe this field!',
  1398. 'type' => 'int',
  1399. 'not NULL' => '1',
  1400. ),
  1401. 'type_id' => array(
  1402. // 'description' => 'TODO: please describe this field!',
  1403. 'type' => 'int',
  1404. 'not NULL' => '1',
  1405. ),
  1406. 'pub_id' => array(
  1407. // 'description' => 'TODO: please describe this field!',
  1408. 'type' => 'int',
  1409. 'not NULL' => '1',
  1410. ),
  1411. ),
  1412. 'primary key' => array(
  1413. '0' => 'phenstatement_id',
  1414. ),
  1415. 'unique keys' => array(
  1416. 'phenstatement_c1' => array(
  1417. '0' => 'genotype_id',
  1418. '1' => 'phenotype_id',
  1419. '2' => 'environment_id',
  1420. '3' => 'type_id',
  1421. '4' => 'pub_id',
  1422. ),
  1423. ),
  1424. 'indexes' => array(
  1425. 'phenstatement_idx1' => array(
  1426. '0' => 'genotype_id',
  1427. ),
  1428. 'phenstatement_idx2' => array(
  1429. '0' => 'phenotype_id',
  1430. ),
  1431. ),
  1432. 'foreign keys' => array(
  1433. ),
  1434. );
  1435. return $description;
  1436. }
  1437. /**
  1438. * Implements hook_phylonode_schema()
  1439. * Purpose: To describe the structure of phylonode to tripal
  1440. * @see tripal_core_chado_insert()
  1441. * @see tripal_core_chado_update()
  1442. * @see tripal_core_chado_select()
  1443. *
  1444. * @return
  1445. * An array describing the current table
  1446. *
  1447. * @ingroup tripal_schema_api
  1448. *
  1449. */
  1450. function tripal_core_chado_phylonode_schema() {
  1451. $description = array();
  1452. $description = array(
  1453. 'table' => 'phylonode',
  1454. // 'description' => 'TODO: please describe this table!',
  1455. 'fields' => array(
  1456. 'phylonode_id' => array(
  1457. // 'description' => 'TODO: please describe this field!',
  1458. 'type' => 'serial',
  1459. 'not NULL' => '1',
  1460. ),
  1461. 'phylotree_id' => array(
  1462. // 'description' => 'TODO: please describe this field!',
  1463. 'type' => 'int',
  1464. 'not NULL' => '1',
  1465. ),
  1466. 'parent_phylonode_id' => array(
  1467. // 'description' => 'TODO: please describe this field!',
  1468. 'type' => 'int',
  1469. 'not NULL' => '',
  1470. ),
  1471. 'left_idx' => array(
  1472. // 'description' => 'TODO: please describe this field!',
  1473. 'type' => 'int',
  1474. 'not NULL' => '1',
  1475. ),
  1476. 'right_idx' => array(
  1477. // 'description' => 'TODO: please describe this field!',
  1478. 'type' => 'int',
  1479. 'not NULL' => '1',
  1480. ),
  1481. 'type_id' => array(
  1482. // 'description' => 'TODO: please describe this field!',
  1483. 'type' => 'int',
  1484. 'not NULL' => '',
  1485. ),
  1486. 'feature_id' => array(
  1487. // 'description' => 'TODO: please describe this field!',
  1488. 'type' => 'int',
  1489. 'not NULL' => '',
  1490. ),
  1491. 'label' => array(
  1492. // 'description' => 'TODO: please describe this field!',
  1493. 'type' => 'varchar',
  1494. 'length' => '255',
  1495. 'not NULL' => '',
  1496. ),
  1497. 'distance' => array(
  1498. // 'description' => 'TODO: please describe this field!',
  1499. 'type' => 'float',
  1500. 'size' => 'big',
  1501. 'not NULL' => '',
  1502. ),
  1503. ),
  1504. 'primary key' => array(
  1505. '0' => 'phylonode_id',
  1506. ),
  1507. 'unique keys' => array(
  1508. 'phylotree_id' => array(
  1509. '0' => 'phylotree_id',
  1510. '1' => 'left_idx',
  1511. ),
  1512. 'phylonode_phylotree_id_key1' => array(
  1513. '0' => 'phylotree_id',
  1514. '1' => 'right_idx',
  1515. ),
  1516. ),
  1517. 'indexes' => array(
  1518. ),
  1519. 'foreign keys' => array(
  1520. ),
  1521. );
  1522. return $description;
  1523. }
  1524. /**
  1525. * Implements hook_phylonode_dbxref_schema()
  1526. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1527. * @see tripal_core_chado_insert()
  1528. * @see tripal_core_chado_update()
  1529. * @see tripal_core_chado_select()
  1530. *
  1531. * @return
  1532. * An array describing the current table
  1533. *
  1534. * @ingroup tripal_schema_api
  1535. *
  1536. */
  1537. function tripal_core_chado_phylonode_dbxref_schema() {
  1538. $description = array();
  1539. $description = array(
  1540. 'table' => 'phylonode_dbxref',
  1541. // 'description' => 'TODO: please describe this table!',
  1542. 'fields' => array(
  1543. 'phylonode_dbxref_id' => array(
  1544. // 'description' => 'TODO: please describe this field!',
  1545. 'type' => 'serial',
  1546. 'not NULL' => '1',
  1547. ),
  1548. 'phylonode_id' => array(
  1549. // 'description' => 'TODO: please describe this field!',
  1550. 'type' => 'int',
  1551. 'not NULL' => '1',
  1552. ),
  1553. 'dbxref_id' => array(
  1554. // 'description' => 'TODO: please describe this field!',
  1555. 'type' => 'int',
  1556. 'not NULL' => '1',
  1557. ),
  1558. ),
  1559. 'primary key' => array(
  1560. '0' => 'phylonode_dbxref_id',
  1561. ),
  1562. 'unique keys' => array(
  1563. 'phylonode_id' => array(
  1564. '0' => 'phylonode_id',
  1565. '1' => 'dbxref_id',
  1566. ),
  1567. ),
  1568. 'indexes' => array(
  1569. 'phylonode_dbxref_idx1' => array(
  1570. '0' => 'phylonode_id',
  1571. ),
  1572. 'phylonode_dbxref_idx2' => array(
  1573. '0' => 'dbxref_id',
  1574. ),
  1575. ),
  1576. 'foreign keys' => array(
  1577. ),
  1578. );
  1579. return $description;
  1580. }
  1581. /**
  1582. * Implements hook_library_synonym_schema()
  1583. * Purpose: To describe the structure of library_synonym to tripal
  1584. * @see tripal_core_chado_insert()
  1585. * @see tripal_core_chado_update()
  1586. * @see tripal_core_chado_select()
  1587. *
  1588. * @return
  1589. * An array describing the current table
  1590. *
  1591. * @ingroup tripal_schema_api
  1592. *
  1593. */
  1594. function tripal_core_chado_library_synonym_schema() {
  1595. $description = array();
  1596. $description = array(
  1597. 'table' => 'library_synonym',
  1598. // 'description' => 'TODO: please describe this table!',
  1599. 'fields' => array(
  1600. 'library_synonym_id' => array(
  1601. // 'description' => 'TODO: please describe this field!',
  1602. 'type' => 'serial',
  1603. 'not NULL' => '1',
  1604. ),
  1605. 'synonym_id' => array(
  1606. // 'description' => 'TODO: please describe this field!',
  1607. 'type' => 'int',
  1608. 'not NULL' => '1',
  1609. ),
  1610. 'library_id' => array(
  1611. // 'description' => 'TODO: please describe this field!',
  1612. 'type' => 'int',
  1613. 'not NULL' => '1',
  1614. ),
  1615. 'pub_id' => array(
  1616. // 'description' => 'TODO: please describe this field!',
  1617. 'type' => 'int',
  1618. 'not NULL' => '1',
  1619. ),
  1620. 'is_current' => array(
  1621. // 'description' => 'TODO: please describe this field!',
  1622. 'type' => 'boolean',
  1623. 'not NULL' => '1',
  1624. 'default' => 'ru',
  1625. ),
  1626. 'is_internal' => array(
  1627. // 'description' => 'TODO: please describe this field!',
  1628. 'type' => 'boolean',
  1629. 'not NULL' => '1',
  1630. 'default' => 'als',
  1631. ),
  1632. ),
  1633. 'primary key' => array(
  1634. '0' => 'library_synonym_id',
  1635. ),
  1636. 'unique keys' => array(
  1637. 'library_synonym_c1' => array(
  1638. '0' => 'synonym_id',
  1639. '1' => 'library_id',
  1640. '2' => 'pub_id',
  1641. ),
  1642. ),
  1643. 'indexes' => array(
  1644. 'library_synonym_idx1' => array(
  1645. '0' => 'synonym_id',
  1646. ),
  1647. 'library_synonym_idx2' => array(
  1648. '0' => 'library_id',
  1649. ),
  1650. 'library_synonym_idx3' => array(
  1651. '0' => 'pub_id',
  1652. ),
  1653. ),
  1654. 'foreign keys' => array(
  1655. ),
  1656. );
  1657. return $description;
  1658. }
  1659. /**
  1660. * Implements hook_library_pub_schema()
  1661. * Purpose: To describe the structure of library_pub to tripal
  1662. * @see tripal_core_chado_insert()
  1663. * @see tripal_core_chado_update()
  1664. * @see tripal_core_chado_select()
  1665. *
  1666. * @return
  1667. * An array describing the current table
  1668. *
  1669. * @ingroup tripal_schema_api
  1670. *
  1671. */
  1672. function tripal_core_chado_library_pub_schema() {
  1673. $description = array();
  1674. $description = array(
  1675. 'table' => 'library_pub',
  1676. // 'description' => 'TODO: please describe this table!',
  1677. 'fields' => array(
  1678. 'library_pub_id' => array(
  1679. // 'description' => 'TODO: please describe this field!',
  1680. 'type' => 'serial',
  1681. 'not NULL' => '1',
  1682. ),
  1683. 'library_id' => array(
  1684. // 'description' => 'TODO: please describe this field!',
  1685. 'type' => 'int',
  1686. 'not NULL' => '1',
  1687. ),
  1688. 'pub_id' => array(
  1689. // 'description' => 'TODO: please describe this field!',
  1690. 'type' => 'int',
  1691. 'not NULL' => '1',
  1692. ),
  1693. ),
  1694. 'primary key' => array(
  1695. '0' => 'library_pub_id',
  1696. ),
  1697. 'unique keys' => array(
  1698. 'library_pub_c1' => array(
  1699. '0' => 'library_id',
  1700. '1' => 'pub_id',
  1701. ),
  1702. ),
  1703. 'indexes' => array(
  1704. 'library_pub_idx1' => array(
  1705. '0' => 'library_id',
  1706. ),
  1707. 'library_pub_idx2' => array(
  1708. '0' => 'pub_id',
  1709. ),
  1710. ),
  1711. 'foreign keys' => array(
  1712. ),
  1713. );
  1714. return $description;
  1715. }
  1716. /**
  1717. * Implements hook_featureprop_pub_schema()
  1718. * Purpose: To describe the structure of featureprop_pub to tripal
  1719. * @see tripal_core_chado_insert()
  1720. * @see tripal_core_chado_update()
  1721. * @see tripal_core_chado_select()
  1722. *
  1723. * @return
  1724. * An array describing the current table
  1725. *
  1726. * @ingroup tripal_schema_api
  1727. *
  1728. */
  1729. function tripal_core_chado_featureprop_pub_schema() {
  1730. $description = array();
  1731. $description = array(
  1732. 'table' => 'featureprop_pub',
  1733. // 'description' => 'TODO: please describe this table!',
  1734. 'fields' => array(
  1735. 'featureprop_pub_id' => array(
  1736. // 'description' => 'TODO: please describe this field!',
  1737. 'type' => 'serial',
  1738. 'not NULL' => '1',
  1739. ),
  1740. 'featureprop_id' => array(
  1741. // 'description' => 'TODO: please describe this field!',
  1742. 'type' => 'int',
  1743. 'not NULL' => '1',
  1744. ),
  1745. 'pub_id' => array(
  1746. // 'description' => 'TODO: please describe this field!',
  1747. 'type' => 'int',
  1748. 'not NULL' => '1',
  1749. ),
  1750. ),
  1751. 'primary key' => array(
  1752. '0' => 'featureprop_pub_id',
  1753. ),
  1754. 'unique keys' => array(
  1755. 'featureprop_pub_c1' => array(
  1756. '0' => 'featureprop_id',
  1757. '1' => 'pub_id',
  1758. ),
  1759. ),
  1760. 'indexes' => array(
  1761. 'featureprop_pub_idx1' => array(
  1762. '0' => 'featureprop_id',
  1763. ),
  1764. 'featureprop_pub_idx2' => array(
  1765. '0' => 'pub_id',
  1766. ),
  1767. ),
  1768. 'foreign keys' => array(
  1769. ),
  1770. );
  1771. return $description;
  1772. }
  1773. /**
  1774. * Implements hook_featureprop_schema()
  1775. * Purpose: To describe the structure of featureprop to tripal
  1776. * @see tripal_core_chado_insert()
  1777. * @see tripal_core_chado_update()
  1778. * @see tripal_core_chado_select()
  1779. *
  1780. * @return
  1781. * An array describing the current table
  1782. *
  1783. * @ingroup tripal_schema_api
  1784. *
  1785. */
  1786. function tripal_core_chado_featureprop_schema() {
  1787. $description = array();
  1788. $description = array(
  1789. 'table' => 'featureprop',
  1790. // 'description' => 'TODO: please describe this table!',
  1791. 'fields' => array(
  1792. 'featureprop_id' => array(
  1793. // 'description' => 'TODO: please describe this field!',
  1794. 'type' => 'serial',
  1795. 'not NULL' => '1',
  1796. ),
  1797. 'feature_id' => array(
  1798. // 'description' => 'TODO: please describe this field!',
  1799. 'type' => 'int',
  1800. 'not NULL' => '1',
  1801. ),
  1802. 'type_id' => array(
  1803. // 'description' => 'TODO: please describe this field!',
  1804. 'type' => 'int',
  1805. 'not NULL' => '1',
  1806. ),
  1807. 'value' => array(
  1808. // 'description' => 'TODO: please describe this field!',
  1809. 'type' => 'text',
  1810. 'not NULL' => '',
  1811. ),
  1812. 'rank' => array(
  1813. // 'description' => 'TODO: please describe this field!',
  1814. 'type' => 'int',
  1815. 'not NULL' => '1',
  1816. 'default' => '0',
  1817. ),
  1818. ),
  1819. 'primary key' => array(
  1820. '0' => 'featureprop_id',
  1821. ),
  1822. 'unique keys' => array(
  1823. 'featureprop_c1' => array(
  1824. '0' => 'feature_id',
  1825. '1' => 'type_id',
  1826. '2' => 'rank',
  1827. ),
  1828. ),
  1829. 'indexes' => array(
  1830. 'featureprop_idx1' => array(
  1831. '0' => 'feature_id',
  1832. ),
  1833. 'featureprop_idx2' => array(
  1834. '0' => 'type_id',
  1835. ),
  1836. ),
  1837. 'foreign keys' => array(
  1838. ),
  1839. );
  1840. return $description;
  1841. }
  1842. /**
  1843. * Implements hook_featurerange_schema()
  1844. * Purpose: To describe the structure of featurerange to tripal
  1845. * @see tripal_core_chado_insert()
  1846. * @see tripal_core_chado_update()
  1847. * @see tripal_core_chado_select()
  1848. *
  1849. * @return
  1850. * An array describing the current table
  1851. *
  1852. * @ingroup tripal_schema_api
  1853. *
  1854. */
  1855. function tripal_core_chado_featurerange_schema() {
  1856. $description = array();
  1857. $description = array(
  1858. 'table' => 'featurerange',
  1859. // 'description' => 'TODO: please describe this table!',
  1860. 'fields' => array(
  1861. 'featurerange_id' => array(
  1862. // 'description' => 'TODO: please describe this field!',
  1863. 'type' => 'serial',
  1864. 'not NULL' => '1',
  1865. ),
  1866. 'featuremap_id' => array(
  1867. // 'description' => 'TODO: please describe this field!',
  1868. 'type' => 'int',
  1869. 'not NULL' => '1',
  1870. ),
  1871. 'feature_id' => array(
  1872. // 'description' => 'TODO: please describe this field!',
  1873. 'type' => 'int',
  1874. 'not NULL' => '1',
  1875. ),
  1876. 'leftstartf_id' => array(
  1877. // 'description' => 'TODO: please describe this field!',
  1878. 'type' => 'int',
  1879. 'not NULL' => '1',
  1880. ),
  1881. 'leftendf_id' => array(
  1882. // 'description' => 'TODO: please describe this field!',
  1883. 'type' => 'int',
  1884. 'not NULL' => '',
  1885. ),
  1886. 'rightstartf_id' => array(
  1887. // 'description' => 'TODO: please describe this field!',
  1888. 'type' => 'int',
  1889. 'not NULL' => '',
  1890. ),
  1891. 'rightendf_id' => array(
  1892. // 'description' => 'TODO: please describe this field!',
  1893. 'type' => 'int',
  1894. 'not NULL' => '1',
  1895. ),
  1896. 'rangestr' => array(
  1897. // 'description' => 'TODO: please describe this field!',
  1898. 'type' => 'varchar',
  1899. 'length' => '255',
  1900. 'not NULL' => '',
  1901. ),
  1902. ),
  1903. 'primary key' => array(
  1904. '0' => 'featurerange_id',
  1905. ),
  1906. 'unique keys' => array(
  1907. ),
  1908. 'indexes' => array(
  1909. 'featurerange_idx1' => array(
  1910. '0' => 'featuremap_id',
  1911. ),
  1912. 'featurerange_idx2' => array(
  1913. '0' => 'feature_id',
  1914. ),
  1915. 'featurerange_idx3' => array(
  1916. '0' => 'leftstartf_id',
  1917. ),
  1918. 'featurerange_idx4' => array(
  1919. '0' => 'leftendf_id',
  1920. ),
  1921. 'featurerange_idx5' => array(
  1922. '0' => 'rightstartf_id',
  1923. ),
  1924. 'featurerange_idx6' => array(
  1925. '0' => 'rightendf_id',
  1926. ),
  1927. ),
  1928. 'foreign keys' => array(
  1929. ),
  1930. );
  1931. return $description;
  1932. }
  1933. /**
  1934. * Implements hook_featureset_meets_schema()
  1935. * Purpose: To describe the structure of featureset_meets to tripal
  1936. * @see tripal_core_chado_insert()
  1937. * @see tripal_core_chado_update()
  1938. * @see tripal_core_chado_select()
  1939. *
  1940. * @return
  1941. * An array describing the current table
  1942. *
  1943. * @ingroup tripal_schema_api
  1944. *
  1945. */
  1946. function tripal_core_chado_featureset_meets_schema() {
  1947. $description = array();
  1948. $description = array(
  1949. 'table' => 'featureset_meets',
  1950. // 'description' => 'TODO: please describe this table!',
  1951. 'fields' => array(
  1952. 'subject_id' => array(
  1953. // 'description' => 'TODO: please describe this field!',
  1954. 'type' => 'int',
  1955. 'not NULL' => '',
  1956. ),
  1957. 'object_id' => array(
  1958. // 'description' => 'TODO: please describe this field!',
  1959. 'type' => 'int',
  1960. 'not NULL' => '',
  1961. ),
  1962. ),
  1963. 'primary key' => array(
  1964. ),
  1965. 'unique keys' => array(
  1966. ),
  1967. 'indexes' => array(
  1968. ),
  1969. 'foreign keys' => array(
  1970. ),
  1971. );
  1972. return $description;
  1973. }
  1974. /**
  1975. * Implements hook_fnr_type_schema()
  1976. * Purpose: To describe the structure of fnr_type to tripal
  1977. * @see tripal_core_chado_insert()
  1978. * @see tripal_core_chado_update()
  1979. * @see tripal_core_chado_select()
  1980. *
  1981. * @return
  1982. * An array describing the current table
  1983. *
  1984. * @ingroup tripal_schema_api
  1985. *
  1986. */
  1987. function tripal_core_chado_fnr_type_schema() {
  1988. $description = array();
  1989. $description = array(
  1990. 'table' => 'fnr_type',
  1991. // 'description' => 'TODO: please describe this table!',
  1992. 'fields' => array(
  1993. 'feature_id' => array(
  1994. // 'description' => 'TODO: please describe this field!',
  1995. 'type' => 'int',
  1996. 'not NULL' => '',
  1997. ),
  1998. 'name' => array(
  1999. // 'description' => 'TODO: please describe this field!',
  2000. 'type' => 'varchar',
  2001. 'length' => '255',
  2002. 'not NULL' => '',
  2003. ),
  2004. 'dbxref_id' => array(
  2005. // 'description' => 'TODO: please describe this field!',
  2006. 'type' => 'int',
  2007. 'not NULL' => '',
  2008. ),
  2009. 'type' => array(
  2010. // 'description' => 'TODO: please describe this field!',
  2011. 'type' => 'varchar',
  2012. 'length' => '1024',
  2013. 'not NULL' => '',
  2014. ),
  2015. 'residues' => array(
  2016. // 'description' => 'TODO: please describe this field!',
  2017. 'type' => 'text',
  2018. 'not NULL' => '',
  2019. ),
  2020. 'seqlen' => array(
  2021. // 'description' => 'TODO: please describe this field!',
  2022. 'type' => 'int',
  2023. 'not NULL' => '',
  2024. ),
  2025. 'md5checksum' => array(
  2026. // 'description' => 'TODO: please describe this field!',
  2027. 'type' => 'char',
  2028. 'length' => '32',
  2029. 'not NULL' => '',
  2030. ),
  2031. 'type_id' => array(
  2032. // 'description' => 'TODO: please describe this field!',
  2033. 'type' => 'int',
  2034. 'not NULL' => '',
  2035. ),
  2036. 'timeaccessioned' => array(
  2037. // 'description' => 'TODO: please describe this field!',
  2038. 'type' => 'datetime',
  2039. 'not NULL' => '',
  2040. ),
  2041. 'timelastmodified' => array(
  2042. // 'description' => 'TODO: please describe this field!',
  2043. 'type' => 'datetime',
  2044. 'not NULL' => '',
  2045. ),
  2046. ),
  2047. 'primary key' => array(
  2048. ),
  2049. 'unique keys' => array(
  2050. ),
  2051. 'indexes' => array(
  2052. ),
  2053. 'foreign keys' => array(
  2054. ),
  2055. );
  2056. return $description;
  2057. }
  2058. /**
  2059. * Implements hook_featurepos_schema()
  2060. * Purpose: To describe the structure of featurepos to tripal
  2061. * @see tripal_core_chado_insert()
  2062. * @see tripal_core_chado_update()
  2063. * @see tripal_core_chado_select()
  2064. *
  2065. * @return
  2066. * An array describing the current table
  2067. *
  2068. * @ingroup tripal_schema_api
  2069. *
  2070. */
  2071. function tripal_core_chado_featurepos_schema() {
  2072. $description = array();
  2073. $description = array(
  2074. 'table' => 'featurepos',
  2075. // 'description' => 'TODO: please describe this table!',
  2076. 'fields' => array(
  2077. 'featurepos_id' => array(
  2078. // 'description' => 'TODO: please describe this field!',
  2079. 'type' => 'serial',
  2080. 'not NULL' => '1',
  2081. ),
  2082. 'featuremap_id' => array(
  2083. // 'description' => 'TODO: please describe this field!',
  2084. 'type' => 'serial',
  2085. 'not NULL' => '1',
  2086. ),
  2087. 'feature_id' => array(
  2088. // 'description' => 'TODO: please describe this field!',
  2089. 'type' => 'int',
  2090. 'not NULL' => '1',
  2091. ),
  2092. 'map_feature_id' => array(
  2093. // 'description' => 'TODO: please describe this field!',
  2094. 'type' => 'int',
  2095. 'not NULL' => '1',
  2096. ),
  2097. 'mappos' => array(
  2098. // 'description' => 'TODO: please describe this field!',
  2099. 'type' => 'float',
  2100. 'size' => 'big',
  2101. 'not NULL' => '1',
  2102. ),
  2103. ),
  2104. 'primary key' => array(
  2105. '0' => 'featurepos_id',
  2106. ),
  2107. 'unique keys' => array(
  2108. ),
  2109. 'indexes' => array(
  2110. 'featurepos_idx1' => array(
  2111. '0' => 'featuremap_id',
  2112. ),
  2113. 'featurepos_idx2' => array(
  2114. '0' => 'feature_id',
  2115. ),
  2116. 'featurepos_idx3' => array(
  2117. '0' => 'map_feature_id',
  2118. ),
  2119. ),
  2120. 'foreign keys' => array(
  2121. ),
  2122. );
  2123. return $description;
  2124. }
  2125. /**
  2126. * Implements hook_featuremap_pub_schema()
  2127. * Purpose: To describe the structure of featuremap_pub to tripal
  2128. * @see tripal_core_chado_insert()
  2129. * @see tripal_core_chado_update()
  2130. * @see tripal_core_chado_select()
  2131. *
  2132. * @return
  2133. * An array describing the current table
  2134. *
  2135. * @ingroup tripal_schema_api
  2136. *
  2137. */
  2138. function tripal_core_chado_featuremap_pub_schema() {
  2139. $description = array();
  2140. $description = array(
  2141. 'table' => 'featuremap_pub',
  2142. // 'description' => 'TODO: please describe this table!',
  2143. 'fields' => array(
  2144. 'featuremap_pub_id' => array(
  2145. // 'description' => 'TODO: please describe this field!',
  2146. 'type' => 'serial',
  2147. 'not NULL' => '1',
  2148. ),
  2149. 'featuremap_id' => array(
  2150. // 'description' => 'TODO: please describe this field!',
  2151. 'type' => 'int',
  2152. 'not NULL' => '1',
  2153. ),
  2154. 'pub_id' => array(
  2155. // 'description' => 'TODO: please describe this field!',
  2156. 'type' => 'int',
  2157. 'not NULL' => '1',
  2158. ),
  2159. ),
  2160. 'primary key' => array(
  2161. '0' => 'featuremap_pub_id',
  2162. ),
  2163. 'unique keys' => array(
  2164. ),
  2165. 'indexes' => array(
  2166. 'featuremap_pub_idx1' => array(
  2167. '0' => 'featuremap_id',
  2168. ),
  2169. 'featuremap_pub_idx2' => array(
  2170. '0' => 'pub_id',
  2171. ),
  2172. ),
  2173. 'foreign keys' => array(
  2174. ),
  2175. );
  2176. return $description;
  2177. }
  2178. /**
  2179. * Implements hook_feature_union_schema()
  2180. * Purpose: To describe the structure of feature_union to tripal
  2181. * @see tripal_core_chado_insert()
  2182. * @see tripal_core_chado_update()
  2183. * @see tripal_core_chado_select()
  2184. *
  2185. * @return
  2186. * An array describing the current table
  2187. *
  2188. * @ingroup tripal_schema_api
  2189. *
  2190. */
  2191. function tripal_core_chado_feature_union_schema() {
  2192. $description = array();
  2193. $description = array(
  2194. 'table' => 'feature_union',
  2195. // 'description' => 'TODO: please describe this table!',
  2196. 'fields' => array(
  2197. 'subject_id' => array(
  2198. // 'description' => 'TODO: please describe this field!',
  2199. 'type' => 'int',
  2200. 'not NULL' => '',
  2201. ),
  2202. 'object_id' => array(
  2203. // 'description' => 'TODO: please describe this field!',
  2204. 'type' => 'int',
  2205. 'not NULL' => '',
  2206. ),
  2207. 'srcfeature_id' => array(
  2208. // 'description' => 'TODO: please describe this field!',
  2209. 'type' => 'int',
  2210. 'not NULL' => '',
  2211. ),
  2212. 'subject_strand' => array(
  2213. // 'description' => 'TODO: please describe this field!',
  2214. 'type' => 'int',
  2215. 'size' => 'small',
  2216. 'not NULL' => '',
  2217. ),
  2218. 'object_strand' => array(
  2219. // 'description' => 'TODO: please describe this field!',
  2220. 'type' => 'int',
  2221. 'size' => 'small',
  2222. 'not NULL' => '',
  2223. ),
  2224. 'fmin' => array(
  2225. // 'description' => 'TODO: please describe this field!',
  2226. 'type' => 'int',
  2227. 'not NULL' => '',
  2228. ),
  2229. 'fmax' => array(
  2230. // 'description' => 'TODO: please describe this field!',
  2231. 'type' => 'int',
  2232. 'not NULL' => '',
  2233. ),
  2234. ),
  2235. 'primary key' => array(
  2236. ),
  2237. 'unique keys' => array(
  2238. ),
  2239. 'indexes' => array(
  2240. ),
  2241. 'foreign keys' => array(
  2242. ),
  2243. );
  2244. return $description;
  2245. }
  2246. /**
  2247. * Implements hook_featureloc_schema()
  2248. * Purpose: To describe the structure of featureloc to tripal
  2249. * @see tripal_core_chado_insert()
  2250. * @see tripal_core_chado_update()
  2251. * @see tripal_core_chado_select()
  2252. *
  2253. * @return
  2254. * An array describing the current table
  2255. *
  2256. * @ingroup tripal_schema_api
  2257. *
  2258. */
  2259. function tripal_core_chado_featureloc_schema() {
  2260. $description = array();
  2261. $description = array(
  2262. 'table' => 'featureloc',
  2263. // 'description' => 'TODO: please describe this table!',
  2264. 'fields' => array(
  2265. 'featureloc_id' => array(
  2266. // 'description' => 'TODO: please describe this field!',
  2267. 'type' => 'serial',
  2268. 'not NULL' => '1',
  2269. ),
  2270. 'feature_id' => array(
  2271. // 'description' => 'TODO: please describe this field!',
  2272. 'type' => 'int',
  2273. 'not NULL' => '1',
  2274. ),
  2275. 'srcfeature_id' => array(
  2276. // 'description' => 'TODO: please describe this field!',
  2277. 'type' => 'int',
  2278. 'not NULL' => '',
  2279. ),
  2280. 'fmin' => array(
  2281. // 'description' => 'TODO: please describe this field!',
  2282. 'type' => 'int',
  2283. 'not NULL' => '',
  2284. ),
  2285. 'is_fmin_partial' => array(
  2286. // 'description' => 'TODO: please describe this field!',
  2287. 'type' => 'boolean',
  2288. 'not NULL' => '1',
  2289. 'default' => 'als',
  2290. ),
  2291. 'fmax' => array(
  2292. // 'description' => 'TODO: please describe this field!',
  2293. 'type' => 'int',
  2294. 'not NULL' => '',
  2295. ),
  2296. 'is_fmax_partial' => array(
  2297. // 'description' => 'TODO: please describe this field!',
  2298. 'type' => 'boolean',
  2299. 'not NULL' => '1',
  2300. 'default' => 'als',
  2301. ),
  2302. 'strand' => array(
  2303. // 'description' => 'TODO: please describe this field!',
  2304. 'type' => 'int',
  2305. 'size' => 'small',
  2306. 'not NULL' => '',
  2307. ),
  2308. 'phase' => array(
  2309. // 'description' => 'TODO: please describe this field!',
  2310. 'type' => 'int',
  2311. 'not NULL' => '',
  2312. ),
  2313. 'residue_info' => array(
  2314. // 'description' => 'TODO: please describe this field!',
  2315. 'type' => 'text',
  2316. 'not NULL' => '',
  2317. ),
  2318. 'locgroup' => array(
  2319. // 'description' => 'TODO: please describe this field!',
  2320. 'type' => 'int',
  2321. 'not NULL' => '1',
  2322. 'default' => '0',
  2323. ),
  2324. 'rank' => array(
  2325. // 'description' => 'TODO: please describe this field!',
  2326. 'type' => 'int',
  2327. 'not NULL' => '1',
  2328. 'default' => '0',
  2329. ),
  2330. ),
  2331. 'primary key' => array(
  2332. '0' => 'featureloc_id',
  2333. ),
  2334. 'unique keys' => array(
  2335. 'featureloc_c1' => array(
  2336. '0' => 'feature_id',
  2337. '1' => 'locgroup',
  2338. '2' => 'rank',
  2339. ),
  2340. ),
  2341. 'indexes' => array(
  2342. 'binloc_boxrange' => array(
  2343. '0' => 'fmin',
  2344. ),
  2345. 'binloc_boxrange_src' => array(
  2346. '0' => 'srcfeature_id',
  2347. '1' => 'fmin',
  2348. ),
  2349. 'featureloc_idx1' => array(
  2350. '0' => 'feature_id',
  2351. ),
  2352. 'featureloc_idx2' => array(
  2353. '0' => 'srcfeature_id',
  2354. ),
  2355. 'featureloc_idx3' => array(
  2356. '0' => 'srcfeature_id',
  2357. '1' => 'fmin',
  2358. '2' => 'fmax',
  2359. ),
  2360. ),
  2361. 'foreign keys' => array(
  2362. ),
  2363. );
  2364. return $description;
  2365. }
  2366. /**
  2367. * Implements hook_featureloc_pub_schema()
  2368. * Purpose: To describe the structure of featureloc_pub to tripal
  2369. * @see tripal_core_chado_insert()
  2370. * @see tripal_core_chado_update()
  2371. * @see tripal_core_chado_select()
  2372. *
  2373. * @return
  2374. * An array describing the current table
  2375. *
  2376. * @ingroup tripal_schema_api
  2377. *
  2378. */
  2379. function tripal_core_chado_featureloc_pub_schema() {
  2380. $description = array();
  2381. $description = array(
  2382. 'table' => 'featureloc_pub',
  2383. // 'description' => 'TODO: please describe this table!',
  2384. 'fields' => array(
  2385. 'featureloc_pub_id' => array(
  2386. // 'description' => 'TODO: please describe this field!',
  2387. 'type' => 'serial',
  2388. 'not NULL' => '1',
  2389. ),
  2390. 'featureloc_id' => array(
  2391. // 'description' => 'TODO: please describe this field!',
  2392. 'type' => 'int',
  2393. 'not NULL' => '1',
  2394. ),
  2395. 'pub_id' => array(
  2396. // 'description' => 'TODO: please describe this field!',
  2397. 'type' => 'int',
  2398. 'not NULL' => '1',
  2399. ),
  2400. ),
  2401. 'primary key' => array(
  2402. '0' => 'featureloc_pub_id',
  2403. ),
  2404. 'unique keys' => array(
  2405. 'featureloc_pub_c1' => array(
  2406. '0' => 'featureloc_id',
  2407. '1' => 'pub_id',
  2408. ),
  2409. ),
  2410. 'indexes' => array(
  2411. 'featureloc_pub_idx1' => array(
  2412. '0' => 'featureloc_id',
  2413. ),
  2414. 'featureloc_pub_idx2' => array(
  2415. '0' => 'pub_id',
  2416. ),
  2417. ),
  2418. 'foreign keys' => array(
  2419. ),
  2420. );
  2421. return $description;
  2422. }
  2423. /**
  2424. * Implements hook_featuremap_schema()
  2425. * Purpose: To describe the structure of featuremap to tripal
  2426. * @see tripal_core_chado_insert()
  2427. * @see tripal_core_chado_update()
  2428. * @see tripal_core_chado_select()
  2429. *
  2430. * @return
  2431. * An array describing the current table
  2432. *
  2433. * @ingroup tripal_schema_api
  2434. *
  2435. */
  2436. function tripal_core_chado_featuremap_schema() {
  2437. $description = array();
  2438. $description = array(
  2439. 'table' => 'featuremap',
  2440. // 'description' => 'TODO: please describe this table!',
  2441. 'fields' => array(
  2442. 'featuremap_id' => array(
  2443. // 'description' => 'TODO: please describe this field!',
  2444. 'type' => 'serial',
  2445. 'not NULL' => '1',
  2446. ),
  2447. 'name' => array(
  2448. // 'description' => 'TODO: please describe this field!',
  2449. 'type' => 'varchar',
  2450. 'length' => '255',
  2451. 'not NULL' => '',
  2452. ),
  2453. 'description' => array(
  2454. // 'description' => 'TODO: please describe this field!',
  2455. 'type' => 'text',
  2456. 'not NULL' => '',
  2457. ),
  2458. 'unittype_id' => array(
  2459. // 'description' => 'TODO: please describe this field!',
  2460. 'type' => 'int',
  2461. 'not NULL' => '',
  2462. ),
  2463. ),
  2464. 'primary key' => array(
  2465. '0' => 'featuremap_id',
  2466. ),
  2467. 'unique keys' => array(
  2468. 'featuremap_c1' => array(
  2469. '0' => 'name',
  2470. ),
  2471. ),
  2472. 'indexes' => array(
  2473. ),
  2474. 'foreign keys' => array(
  2475. ),
  2476. );
  2477. return $description;
  2478. }
  2479. /**
  2480. * Implements hook_fp_key_schema()
  2481. * Purpose: To describe the structure of fp_key to tripal
  2482. * @see tripal_core_chado_insert()
  2483. * @see tripal_core_chado_update()
  2484. * @see tripal_core_chado_select()
  2485. *
  2486. * @return
  2487. * An array describing the current table
  2488. *
  2489. * @ingroup tripal_schema_api
  2490. *
  2491. */
  2492. function tripal_core_chado_fp_key_schema() {
  2493. $description = array();
  2494. $description = array(
  2495. 'table' => 'fp_key',
  2496. // 'description' => 'TODO: please describe this table!',
  2497. 'fields' => array(
  2498. 'feature_id' => array(
  2499. // 'description' => 'TODO: please describe this field!',
  2500. 'type' => 'int',
  2501. 'not NULL' => '',
  2502. ),
  2503. 'pkey' => array(
  2504. // 'description' => 'TODO: please describe this field!',
  2505. 'type' => 'varchar',
  2506. 'length' => '1024',
  2507. 'not NULL' => '',
  2508. ),
  2509. 'value' => array(
  2510. // 'description' => 'TODO: please describe this field!',
  2511. 'type' => 'text',
  2512. 'not NULL' => '',
  2513. ),
  2514. ),
  2515. 'primary key' => array(
  2516. ),
  2517. 'unique keys' => array(
  2518. ),
  2519. 'indexes' => array(
  2520. ),
  2521. 'foreign keys' => array(
  2522. ),
  2523. );
  2524. return $description;
  2525. }
  2526. /**
  2527. * Implements hook_genotype_schema()
  2528. * Purpose: To describe the structure of genotype to tripal
  2529. * @see tripal_core_chado_insert()
  2530. * @see tripal_core_chado_update()
  2531. * @see tripal_core_chado_select()
  2532. *
  2533. * @return
  2534. * An array describing the current table
  2535. *
  2536. * @ingroup tripal_schema_api
  2537. *
  2538. */
  2539. function tripal_core_chado_genotype_schema() {
  2540. $description = array();
  2541. $description = array(
  2542. 'table' => 'genotype',
  2543. // 'description' => 'TODO: please describe this table!',
  2544. 'fields' => array(
  2545. 'genotype_id' => array(
  2546. // 'description' => 'TODO: please describe this field!',
  2547. 'type' => 'serial',
  2548. 'not NULL' => '1',
  2549. ),
  2550. 'name' => array(
  2551. // 'description' => 'TODO: please describe this field!',
  2552. 'type' => 'text',
  2553. 'not NULL' => '',
  2554. ),
  2555. 'uniquename' => array(
  2556. // 'description' => 'TODO: please describe this field!',
  2557. 'type' => 'text',
  2558. 'not NULL' => '1',
  2559. ),
  2560. 'description' => array(
  2561. // 'description' => 'TODO: please describe this field!',
  2562. 'type' => 'varchar',
  2563. 'length' => '255',
  2564. 'not NULL' => '',
  2565. ),
  2566. ),
  2567. 'primary key' => array(
  2568. '0' => 'genotype_id',
  2569. ),
  2570. 'unique keys' => array(
  2571. 'genotype_c1' => array(
  2572. '0' => 'uniquename',
  2573. ),
  2574. ),
  2575. 'indexes' => array(
  2576. 'genotype_idx1' => array(
  2577. '0' => 'uniquename',
  2578. ),
  2579. 'genotype_idx2' => array(
  2580. '0' => 'name',
  2581. ),
  2582. ),
  2583. 'foreign keys' => array(
  2584. ),
  2585. );
  2586. return $description;
  2587. }
  2588. /**
  2589. * Implements hook_library_cvterm_schema()
  2590. * Purpose: To describe the structure of library_cvterm to tripal
  2591. * @see tripal_core_chado_insert()
  2592. * @see tripal_core_chado_update()
  2593. * @see tripal_core_chado_select()
  2594. *
  2595. * @return
  2596. * An array describing the current table
  2597. *
  2598. * @ingroup tripal_schema_api
  2599. *
  2600. */
  2601. function tripal_core_chado_library_cvterm_schema() {
  2602. $description = array();
  2603. $description = array(
  2604. 'table' => 'library_cvterm',
  2605. // 'description' => 'TODO: please describe this table!',
  2606. 'fields' => array(
  2607. 'library_cvterm_id' => array(
  2608. // 'description' => 'TODO: please describe this field!',
  2609. 'type' => 'serial',
  2610. 'not NULL' => '1',
  2611. ),
  2612. 'library_id' => array(
  2613. // 'description' => 'TODO: please describe this field!',
  2614. 'type' => 'int',
  2615. 'not NULL' => '1',
  2616. ),
  2617. 'cvterm_id' => array(
  2618. // 'description' => 'TODO: please describe this field!',
  2619. 'type' => 'int',
  2620. 'not NULL' => '1',
  2621. ),
  2622. 'pub_id' => array(
  2623. // 'description' => 'TODO: please describe this field!',
  2624. 'type' => 'int',
  2625. 'not NULL' => '1',
  2626. ),
  2627. ),
  2628. 'primary key' => array(
  2629. '0' => 'library_cvterm_id',
  2630. ),
  2631. 'unique keys' => array(
  2632. 'library_cvterm_c1' => array(
  2633. '0' => 'library_id',
  2634. '1' => 'cvterm_id',
  2635. '2' => 'pub_id',
  2636. ),
  2637. ),
  2638. 'indexes' => array(
  2639. 'library_cvterm_idx1' => array(
  2640. '0' => 'library_id',
  2641. ),
  2642. 'library_cvterm_idx2' => array(
  2643. '0' => 'cvterm_id',
  2644. ),
  2645. 'library_cvterm_idx3' => array(
  2646. '0' => 'pub_id',
  2647. ),
  2648. ),
  2649. 'foreign keys' => array(
  2650. ),
  2651. );
  2652. return $description;
  2653. }
  2654. /**
  2655. * Implements hook_library_dbxref_schema()
  2656. * Purpose: To describe the structure of library_dbxref to tripal
  2657. * @see tripal_core_chado_insert()
  2658. * @see tripal_core_chado_update()
  2659. * @see tripal_core_chado_select()
  2660. *
  2661. * @return
  2662. * An array describing the current table
  2663. *
  2664. * @ingroup tripal_schema_api
  2665. *
  2666. */
  2667. function tripal_core_chado_library_dbxref_schema() {
  2668. $description = array();
  2669. $description = array(
  2670. 'table' => 'library_dbxref',
  2671. // 'description' => 'TODO: please describe this table!',
  2672. 'fields' => array(
  2673. 'library_dbxref_id' => array(
  2674. // 'description' => 'TODO: please describe this field!',
  2675. 'type' => 'serial',
  2676. 'not NULL' => '1',
  2677. ),
  2678. 'library_id' => array(
  2679. // 'description' => 'TODO: please describe this field!',
  2680. 'type' => 'int',
  2681. 'not NULL' => '1',
  2682. ),
  2683. 'dbxref_id' => array(
  2684. // 'description' => 'TODO: please describe this field!',
  2685. 'type' => 'int',
  2686. 'not NULL' => '1',
  2687. ),
  2688. 'is_current' => array(
  2689. // 'description' => 'TODO: please describe this field!',
  2690. 'type' => 'boolean',
  2691. 'not NULL' => '1',
  2692. 'default' => 'ru',
  2693. ),
  2694. ),
  2695. 'primary key' => array(
  2696. '0' => 'library_dbxref_id',
  2697. ),
  2698. 'unique keys' => array(
  2699. 'library_dbxref_c1' => array(
  2700. '0' => 'library_id',
  2701. '1' => 'dbxref_id',
  2702. ),
  2703. ),
  2704. 'indexes' => array(
  2705. 'library_dbxref_idx1' => array(
  2706. '0' => 'library_id',
  2707. ),
  2708. 'library_dbxref_idx2' => array(
  2709. '0' => 'dbxref_id',
  2710. ),
  2711. ),
  2712. 'foreign keys' => array(
  2713. ),
  2714. );
  2715. return $description;
  2716. }
  2717. /**
  2718. * Implements hook_library_feature_schema()
  2719. * Purpose: To describe the structure of library_feature to tripal
  2720. * @see tripal_core_chado_insert()
  2721. * @see tripal_core_chado_update()
  2722. * @see tripal_core_chado_select()
  2723. *
  2724. * @return
  2725. * An array describing the current table
  2726. *
  2727. * @ingroup tripal_schema_api
  2728. *
  2729. */
  2730. function tripal_core_chado_library_feature_schema() {
  2731. $description = array();
  2732. $description = array(
  2733. 'table' => 'library_feature',
  2734. // 'description' => 'TODO: please describe this table!',
  2735. 'fields' => array(
  2736. 'library_feature_id' => array(
  2737. // 'description' => 'TODO: please describe this field!',
  2738. 'type' => 'serial',
  2739. 'not NULL' => '1',
  2740. ),
  2741. 'library_id' => array(
  2742. // 'description' => 'TODO: please describe this field!',
  2743. 'type' => 'int',
  2744. 'not NULL' => '1',
  2745. ),
  2746. 'feature_id' => array(
  2747. // 'description' => 'TODO: please describe this field!',
  2748. 'type' => 'int',
  2749. 'not NULL' => '1',
  2750. ),
  2751. ),
  2752. 'primary key' => array(
  2753. '0' => 'library_feature_id',
  2754. ),
  2755. 'unique keys' => array(
  2756. 'library_feature_c1' => array(
  2757. '0' => 'library_id',
  2758. '1' => 'feature_id',
  2759. ),
  2760. ),
  2761. 'indexes' => array(
  2762. 'library_feature_idx1' => array(
  2763. '0' => 'library_id',
  2764. ),
  2765. 'library_feature_idx2' => array(
  2766. '0' => 'feature_id',
  2767. ),
  2768. ),
  2769. 'foreign keys' => array(
  2770. ),
  2771. );
  2772. return $description;
  2773. }
  2774. /**
  2775. * Implements hook_library_feature_count_schema()
  2776. * Purpose: To describe the structure of library_feature_count to tripal
  2777. * @see tripal_core_chado_insert()
  2778. * @see tripal_core_chado_update()
  2779. * @see tripal_core_chado_select()
  2780. *
  2781. * @return
  2782. * An array describing the current table
  2783. *
  2784. * @ingroup tripal_schema_api
  2785. *
  2786. */
  2787. function tripal_core_chado_library_feature_count_schema() {
  2788. $description = array();
  2789. $description = array(
  2790. 'table' => 'library_feature_count',
  2791. // 'description' => 'TODO: please describe this table!',
  2792. 'fields' => array(
  2793. 'library_id' => array(
  2794. // 'description' => 'TODO: please describe this field!',
  2795. 'type' => 'int',
  2796. 'not NULL' => '',
  2797. ),
  2798. 'name' => array(
  2799. // 'description' => 'TODO: please describe this field!',
  2800. 'type' => 'varchar',
  2801. 'length' => '255',
  2802. 'not NULL' => '',
  2803. ),
  2804. 'num_features' => array(
  2805. // 'description' => 'TODO: please describe this field!',
  2806. 'type' => 'int',
  2807. 'not NULL' => '',
  2808. ),
  2809. 'feature_type' => array(
  2810. // 'description' => 'TODO: please describe this field!',
  2811. 'type' => 'varchar',
  2812. 'length' => '255',
  2813. 'not NULL' => '',
  2814. ),
  2815. ),
  2816. 'primary key' => array(
  2817. ),
  2818. 'unique keys' => array(
  2819. 'library_feature_count_index' => array(
  2820. '0' => 'library_id',
  2821. ),
  2822. ),
  2823. 'indexes' => array(
  2824. ),
  2825. 'foreign keys' => array(
  2826. ),
  2827. );
  2828. return $description;
  2829. }
  2830. /**
  2831. * Implements hook_library_schema()
  2832. * Purpose: To describe the structure of library to tripal
  2833. * @see tripal_core_chado_insert()
  2834. * @see tripal_core_chado_update()
  2835. * @see tripal_core_chado_select()
  2836. *
  2837. * @return
  2838. * An array describing the current table
  2839. *
  2840. * @ingroup tripal_schema_api
  2841. *
  2842. */
  2843. function tripal_core_chado_library_schema() {
  2844. $description = array();
  2845. $description = array(
  2846. 'table' => 'library',
  2847. // 'description' => 'TODO: please describe this table!',
  2848. 'fields' => array(
  2849. 'library_id' => array(
  2850. // 'description' => 'TODO: please describe this field!',
  2851. 'type' => 'serial',
  2852. 'not NULL' => '1',
  2853. ),
  2854. 'organism_id' => array(
  2855. // 'description' => 'TODO: please describe this field!',
  2856. 'type' => 'int',
  2857. 'not NULL' => '1',
  2858. ),
  2859. 'name' => array(
  2860. // 'description' => 'TODO: please describe this field!',
  2861. 'type' => 'varchar',
  2862. 'length' => '255',
  2863. 'not NULL' => '',
  2864. ),
  2865. 'uniquename' => array(
  2866. // 'description' => 'TODO: please describe this field!',
  2867. 'type' => 'text',
  2868. 'not NULL' => '1',
  2869. ),
  2870. 'type_id' => array(
  2871. // 'description' => 'TODO: please describe this field!',
  2872. 'type' => 'int',
  2873. 'not NULL' => '1',
  2874. ),
  2875. 'is_obsolete' => array(
  2876. // 'description' => 'TODO: please describe this field!',
  2877. 'type' => 'int',
  2878. 'not NULL' => '1',
  2879. 'default' => '0',
  2880. ),
  2881. 'timeaccessioned' => array(
  2882. // 'description' => 'TODO: please describe this field!',
  2883. 'type' => 'datetime',
  2884. 'not NULL' => '1',
  2885. 'default' => 'ow(',
  2886. ),
  2887. 'timelastmodified' => array(
  2888. // 'description' => 'TODO: please describe this field!',
  2889. 'type' => 'datetime',
  2890. 'not NULL' => '1',
  2891. 'default' => 'ow(',
  2892. ),
  2893. ),
  2894. 'primary key' => array(
  2895. '0' => 'library_id',
  2896. ),
  2897. 'unique keys' => array(
  2898. 'library_c1' => array(
  2899. '0' => 'organism_id',
  2900. '1' => 'uniquename',
  2901. '2' => 'type_id',
  2902. ),
  2903. ),
  2904. 'indexes' => array(
  2905. 'library_idx1' => array(
  2906. '0' => 'organism_id',
  2907. ),
  2908. 'library_idx2' => array(
  2909. '0' => 'type_id',
  2910. ),
  2911. 'library_idx3' => array(
  2912. '0' => 'uniquename',
  2913. ),
  2914. 'library_name_ind1' => array(
  2915. '0' => 'name',
  2916. ),
  2917. ),
  2918. 'foreign keys' => array(
  2919. ),
  2920. );
  2921. return $description;
  2922. }
  2923. /**
  2924. * Implements hook_intronloc_view_schema()
  2925. * Purpose: To describe the structure of intronloc_view to tripal
  2926. * @see tripal_core_chado_insert()
  2927. * @see tripal_core_chado_update()
  2928. * @see tripal_core_chado_select()
  2929. *
  2930. * @return
  2931. * An array describing the current table
  2932. *
  2933. * @ingroup tripal_schema_api
  2934. *
  2935. */
  2936. function tripal_core_chado_intronloc_view_schema() {
  2937. $description = array();
  2938. $description = array(
  2939. 'table' => 'intronloc_view',
  2940. // 'description' => 'TODO: please describe this table!',
  2941. 'fields' => array(
  2942. 'exon1_id' => array(
  2943. // 'description' => 'TODO: please describe this field!',
  2944. 'type' => 'int',
  2945. 'not NULL' => '',
  2946. ),
  2947. 'exon2_id' => array(
  2948. // 'description' => 'TODO: please describe this field!',
  2949. 'type' => 'int',
  2950. 'not NULL' => '',
  2951. ),
  2952. 'fmin' => array(
  2953. // 'description' => 'TODO: please describe this field!',
  2954. 'type' => 'int',
  2955. 'not NULL' => '',
  2956. ),
  2957. 'fmax' => array(
  2958. // 'description' => 'TODO: please describe this field!',
  2959. 'type' => 'int',
  2960. 'not NULL' => '',
  2961. ),
  2962. 'strand' => array(
  2963. // 'description' => 'TODO: please describe this field!',
  2964. 'type' => 'int',
  2965. 'size' => 'small',
  2966. 'not NULL' => '',
  2967. ),
  2968. 'srcfeature_id' => array(
  2969. // 'description' => 'TODO: please describe this field!',
  2970. 'type' => 'int',
  2971. 'not NULL' => '',
  2972. ),
  2973. ),
  2974. 'primary key' => array(
  2975. ),
  2976. 'unique keys' => array(
  2977. ),
  2978. 'indexes' => array(
  2979. ),
  2980. 'foreign keys' => array(
  2981. ),
  2982. );
  2983. return $description;
  2984. }
  2985. /**
  2986. * Implements hook_gff3atts_schema()
  2987. * Purpose: To describe the structure of gff3atts to tripal
  2988. * @see tripal_core_chado_insert()
  2989. * @see tripal_core_chado_update()
  2990. * @see tripal_core_chado_select()
  2991. *
  2992. * @return
  2993. * An array describing the current table
  2994. *
  2995. * @ingroup tripal_schema_api
  2996. *
  2997. */
  2998. function tripal_core_chado_gff3atts_schema() {
  2999. $description = array();
  3000. $description = array(
  3001. 'table' => 'gff3atts',
  3002. // 'description' => 'TODO: please describe this table!',
  3003. 'fields' => array(
  3004. 'feature_id' => array(
  3005. // 'description' => 'TODO: please describe this field!',
  3006. 'type' => 'int',
  3007. 'not NULL' => '',
  3008. ),
  3009. 'type' => array(
  3010. // 'description' => 'TODO: please describe this field!',
  3011. 'type' => 'text',
  3012. 'not NULL' => '',
  3013. ),
  3014. 'attribute' => array(
  3015. // 'description' => 'TODO: please describe this field!',
  3016. 'type' => 'varchar',
  3017. 'not NULL' => '',
  3018. ),
  3019. ),
  3020. 'primary key' => array(
  3021. ),
  3022. 'unique keys' => array(
  3023. ),
  3024. 'indexes' => array(
  3025. ),
  3026. 'foreign keys' => array(
  3027. ),
  3028. );
  3029. return $description;
  3030. }
  3031. /**
  3032. * Implements hook_gff3view_schema()
  3033. * Purpose: To describe the structure of gff3view to tripal
  3034. * @see tripal_core_chado_insert()
  3035. * @see tripal_core_chado_update()
  3036. * @see tripal_core_chado_select()
  3037. *
  3038. * @return
  3039. * An array describing the current table
  3040. *
  3041. * @ingroup tripal_schema_api
  3042. *
  3043. */
  3044. function tripal_core_chado_gff3view_schema() {
  3045. $description = array();
  3046. $description = array(
  3047. 'table' => 'gff3view',
  3048. // 'description' => 'TODO: please describe this table!',
  3049. 'fields' => array(
  3050. 'feature_id' => array(
  3051. // 'description' => 'TODO: please describe this field!',
  3052. 'type' => 'int',
  3053. 'not NULL' => '',
  3054. ),
  3055. 'ref' => array(
  3056. // 'description' => 'TODO: please describe this field!',
  3057. 'type' => 'varchar',
  3058. 'length' => '255',
  3059. 'not NULL' => '',
  3060. ),
  3061. 'source' => array(
  3062. // 'description' => 'TODO: please describe this field!',
  3063. 'type' => 'varchar',
  3064. 'length' => '255',
  3065. 'not NULL' => '',
  3066. ),
  3067. 'type' => array(
  3068. // 'description' => 'TODO: please describe this field!',
  3069. 'type' => 'varchar',
  3070. 'length' => '1024',
  3071. 'not NULL' => '',
  3072. ),
  3073. 'fstart' => array(
  3074. // 'description' => 'TODO: please describe this field!',
  3075. 'type' => 'int',
  3076. 'not NULL' => '',
  3077. ),
  3078. 'fend' => array(
  3079. // 'description' => 'TODO: please describe this field!',
  3080. 'type' => 'int',
  3081. 'not NULL' => '',
  3082. ),
  3083. 'score' => array(
  3084. // 'description' => 'TODO: please describe this field!',
  3085. 'type' => 'float',
  3086. 'size' => 'big',
  3087. 'not NULL' => '',
  3088. ),
  3089. 'strand' => array(
  3090. // 'description' => 'TODO: please describe this field!',
  3091. 'type' => 'int',
  3092. 'size' => 'small',
  3093. 'not NULL' => '',
  3094. ),
  3095. 'phase' => array(
  3096. // 'description' => 'TODO: please describe this field!',
  3097. 'type' => 'int',
  3098. 'not NULL' => '',
  3099. ),
  3100. 'seqlen' => array(
  3101. // 'description' => 'TODO: please describe this field!',
  3102. 'type' => 'int',
  3103. 'not NULL' => '',
  3104. ),
  3105. 'name' => array(
  3106. // 'description' => 'TODO: please describe this field!',
  3107. 'type' => 'varchar',
  3108. 'length' => '255',
  3109. 'not NULL' => '',
  3110. ),
  3111. 'organism_id' => array(
  3112. // 'description' => 'TODO: please describe this field!',
  3113. 'type' => 'int',
  3114. 'not NULL' => '',
  3115. ),
  3116. ),
  3117. 'primary key' => array(
  3118. ),
  3119. 'unique keys' => array(
  3120. ),
  3121. 'indexes' => array(
  3122. ),
  3123. 'foreign keys' => array(
  3124. ),
  3125. );
  3126. return $description;
  3127. }
  3128. /**
  3129. * Implements hook_gffatts_schema()
  3130. * Purpose: To describe the structure of gffatts to tripal
  3131. * @see tripal_core_chado_insert()
  3132. * @see tripal_core_chado_update()
  3133. * @see tripal_core_chado_select()
  3134. *
  3135. * @return
  3136. * An array describing the current table
  3137. *
  3138. * @ingroup tripal_schema_api
  3139. *
  3140. */
  3141. function tripal_core_chado_gffatts_schema() {
  3142. $description = array();
  3143. $description = array(
  3144. 'table' => 'gffatts',
  3145. // 'description' => 'TODO: please describe this table!',
  3146. 'fields' => array(
  3147. 'feature_id' => array(
  3148. // 'description' => 'TODO: please describe this field!',
  3149. 'type' => 'int',
  3150. 'not NULL' => '',
  3151. ),
  3152. 'type' => array(
  3153. // 'description' => 'TODO: please describe this field!',
  3154. 'type' => 'text',
  3155. 'not NULL' => '',
  3156. ),
  3157. 'attribute' => array(
  3158. // 'description' => 'TODO: please describe this field!',
  3159. 'type' => 'varchar',
  3160. 'not NULL' => '',
  3161. ),
  3162. ),
  3163. 'primary key' => array(
  3164. ),
  3165. 'unique keys' => array(
  3166. ),
  3167. 'indexes' => array(
  3168. ),
  3169. 'foreign keys' => array(
  3170. ),
  3171. );
  3172. return $description;
  3173. }
  3174. /**
  3175. * Implements hook_intron_combined_view_schema()
  3176. * Purpose: To describe the structure of intron_combined_view to tripal
  3177. * @see tripal_core_chado_insert()
  3178. * @see tripal_core_chado_update()
  3179. * @see tripal_core_chado_select()
  3180. *
  3181. * @return
  3182. * An array describing the current table
  3183. *
  3184. * @ingroup tripal_schema_api
  3185. *
  3186. */
  3187. function tripal_core_chado_intron_combined_view_schema() {
  3188. $description = array();
  3189. $description = array(
  3190. 'table' => 'intron_combined_view',
  3191. // 'description' => 'TODO: please describe this table!',
  3192. 'fields' => array(
  3193. 'exon1_id' => array(
  3194. // 'description' => 'TODO: please describe this field!',
  3195. 'type' => 'int',
  3196. 'not NULL' => '',
  3197. ),
  3198. 'exon2_id' => array(
  3199. // 'description' => 'TODO: please describe this field!',
  3200. 'type' => 'int',
  3201. 'not NULL' => '',
  3202. ),
  3203. 'fmin' => array(
  3204. // 'description' => 'TODO: please describe this field!',
  3205. 'type' => 'int',
  3206. 'not NULL' => '',
  3207. ),
  3208. 'fmax' => array(
  3209. // 'description' => 'TODO: please describe this field!',
  3210. 'type' => 'int',
  3211. 'not NULL' => '',
  3212. ),
  3213. 'strand' => array(
  3214. // 'description' => 'TODO: please describe this field!',
  3215. 'type' => 'int',
  3216. 'size' => 'small',
  3217. 'not NULL' => '',
  3218. ),
  3219. 'srcfeature_id' => array(
  3220. // 'description' => 'TODO: please describe this field!',
  3221. 'type' => 'int',
  3222. 'not NULL' => '',
  3223. ),
  3224. 'intron_rank' => array(
  3225. // 'description' => 'TODO: please describe this field!',
  3226. 'type' => 'int',
  3227. 'not NULL' => '',
  3228. ),
  3229. 'transcript_id' => array(
  3230. // 'description' => 'TODO: please describe this field!',
  3231. 'type' => 'int',
  3232. 'not NULL' => '',
  3233. ),
  3234. ),
  3235. 'primary key' => array(
  3236. ),
  3237. 'unique keys' => array(
  3238. ),
  3239. 'indexes' => array(
  3240. ),
  3241. 'foreign keys' => array(
  3242. ),
  3243. );
  3244. return $description;
  3245. }
  3246. /**
  3247. * Implements hook_project_schema()
  3248. * Purpose: To describe the structure of project to tripal
  3249. * @see tripal_core_chado_insert()
  3250. * @see tripal_core_chado_update()
  3251. * @see tripal_core_chado_select()
  3252. *
  3253. * @return
  3254. * An array describing the current table
  3255. *
  3256. * @ingroup tripal_schema_api
  3257. *
  3258. */
  3259. function tripal_core_chado_project_schema() {
  3260. $description = array();
  3261. $description = array(
  3262. 'table' => 'project',
  3263. // 'description' => 'TODO: please describe this table!',
  3264. 'fields' => array(
  3265. 'project_id' => array(
  3266. // 'description' => 'TODO: please describe this field!',
  3267. 'type' => 'serial',
  3268. 'not NULL' => '1',
  3269. ),
  3270. 'name' => array(
  3271. // 'description' => 'TODO: please describe this field!',
  3272. 'type' => 'varchar',
  3273. 'length' => '255',
  3274. 'not NULL' => '1',
  3275. ),
  3276. 'description' => array(
  3277. // 'description' => 'TODO: please describe this field!',
  3278. 'type' => 'varchar',
  3279. 'length' => '255',
  3280. 'not NULL' => '1',
  3281. ),
  3282. ),
  3283. 'primary key' => array(
  3284. '0' => 'project_id',
  3285. ),
  3286. 'unique keys' => array(
  3287. 'project_c1' => array(
  3288. '0' => 'name',
  3289. ),
  3290. ),
  3291. 'indexes' => array(
  3292. ),
  3293. 'foreign keys' => array(
  3294. ),
  3295. );
  3296. return $description;
  3297. }
  3298. /**
  3299. * Implements hook_protein_coding_gene_schema()
  3300. * Purpose: To describe the structure of protein_coding_gene to tripal
  3301. * @see tripal_core_chado_insert()
  3302. * @see tripal_core_chado_update()
  3303. * @see tripal_core_chado_select()
  3304. *
  3305. * @return
  3306. * An array describing the current table
  3307. *
  3308. * @ingroup tripal_schema_api
  3309. *
  3310. */
  3311. function tripal_core_chado_protein_coding_gene_schema() {
  3312. $description = array();
  3313. $description = array(
  3314. 'table' => 'protein_coding_gene',
  3315. // 'description' => 'TODO: please describe this table!',
  3316. 'fields' => array(
  3317. 'feature_id' => array(
  3318. // 'description' => 'TODO: please describe this field!',
  3319. 'type' => 'int',
  3320. 'not NULL' => '',
  3321. ),
  3322. 'dbxref_id' => array(
  3323. // 'description' => 'TODO: please describe this field!',
  3324. 'type' => 'int',
  3325. 'not NULL' => '',
  3326. ),
  3327. 'organism_id' => array(
  3328. // 'description' => 'TODO: please describe this field!',
  3329. 'type' => 'int',
  3330. 'not NULL' => '',
  3331. ),
  3332. 'name' => array(
  3333. // 'description' => 'TODO: please describe this field!',
  3334. 'type' => 'varchar',
  3335. 'length' => '255',
  3336. 'not NULL' => '',
  3337. ),
  3338. 'uniquename' => array(
  3339. // 'description' => 'TODO: please describe this field!',
  3340. 'type' => 'text',
  3341. 'not NULL' => '',
  3342. ),
  3343. 'residues' => array(
  3344. // 'description' => 'TODO: please describe this field!',
  3345. 'type' => 'text',
  3346. 'not NULL' => '',
  3347. ),
  3348. 'seqlen' => array(
  3349. // 'description' => 'TODO: please describe this field!',
  3350. 'type' => 'int',
  3351. 'not NULL' => '',
  3352. ),
  3353. 'md5checksum' => array(
  3354. // 'description' => 'TODO: please describe this field!',
  3355. 'type' => 'char',
  3356. 'length' => '32',
  3357. 'not NULL' => '',
  3358. ),
  3359. 'type_id' => array(
  3360. // 'description' => 'TODO: please describe this field!',
  3361. 'type' => 'int',
  3362. 'not NULL' => '',
  3363. ),
  3364. 'is_analysis' => array(
  3365. // 'description' => 'TODO: please describe this field!',
  3366. 'type' => 'boolean',
  3367. 'not NULL' => '',
  3368. ),
  3369. 'is_obsolete' => array(
  3370. // 'description' => 'TODO: please describe this field!',
  3371. 'type' => 'boolean',
  3372. 'not NULL' => '',
  3373. ),
  3374. 'timeaccessioned' => array(
  3375. // 'description' => 'TODO: please describe this field!',
  3376. 'type' => 'datetime',
  3377. 'not NULL' => '',
  3378. ),
  3379. 'timelastmodified' => array(
  3380. // 'description' => 'TODO: please describe this field!',
  3381. 'type' => 'datetime',
  3382. 'not NULL' => '',
  3383. ),
  3384. ),
  3385. 'primary key' => array(
  3386. ),
  3387. 'unique keys' => array(
  3388. ),
  3389. 'indexes' => array(
  3390. ),
  3391. 'foreign keys' => array(
  3392. ),
  3393. );
  3394. return $description;
  3395. }
  3396. /**
  3397. * Implements hook_studyfactorvalue_schema()
  3398. * Purpose: To describe the structure of studyfactorvalue to tripal
  3399. * @see tripal_core_chado_insert()
  3400. * @see tripal_core_chado_update()
  3401. * @see tripal_core_chado_select()
  3402. *
  3403. * @return
  3404. * An array describing the current table
  3405. *
  3406. * @ingroup tripal_schema_api
  3407. *
  3408. */
  3409. function tripal_core_chado_studyfactorvalue_schema() {
  3410. $description = array();
  3411. $description = array(
  3412. 'table' => 'studyfactorvalue',
  3413. // 'description' => 'TODO: please describe this table!',
  3414. 'fields' => array(
  3415. 'studyfactorvalue_id' => array(
  3416. // 'description' => 'TODO: please describe this field!',
  3417. 'type' => 'serial',
  3418. 'not NULL' => '1',
  3419. ),
  3420. 'studyfactor_id' => array(
  3421. // 'description' => 'TODO: please describe this field!',
  3422. 'type' => 'int',
  3423. 'not NULL' => '1',
  3424. ),
  3425. 'assay_id' => array(
  3426. // 'description' => 'TODO: please describe this field!',
  3427. 'type' => 'int',
  3428. 'not NULL' => '1',
  3429. ),
  3430. 'factorvalue' => array(
  3431. // 'description' => 'TODO: please describe this field!',
  3432. 'type' => 'text',
  3433. 'not NULL' => '',
  3434. ),
  3435. 'name' => array(
  3436. // 'description' => 'TODO: please describe this field!',
  3437. 'type' => 'text',
  3438. 'not NULL' => '',
  3439. ),
  3440. 'rank' => array(
  3441. // 'description' => 'TODO: please describe this field!',
  3442. 'type' => 'int',
  3443. 'not NULL' => '1',
  3444. 'default' => '0',
  3445. ),
  3446. ),
  3447. 'primary key' => array(
  3448. '0' => 'studyfactorvalue_id',
  3449. ),
  3450. 'unique keys' => array(
  3451. ),
  3452. 'indexes' => array(
  3453. 'studyfactorvalue_idx1' => array(
  3454. '0' => 'studyfactor_id',
  3455. ),
  3456. 'studyfactorvalue_idx2' => array(
  3457. '0' => 'assay_id',
  3458. ),
  3459. ),
  3460. 'foreign keys' => array(
  3461. ),
  3462. );
  3463. return $description;
  3464. }
  3465. /**
  3466. * Implements hook_studyfactor_schema()
  3467. * Purpose: To describe the structure of studyfactor to tripal
  3468. * @see tripal_core_chado_insert()
  3469. * @see tripal_core_chado_update()
  3470. * @see tripal_core_chado_select()
  3471. *
  3472. * @return
  3473. * An array describing the current table
  3474. *
  3475. * @ingroup tripal_schema_api
  3476. *
  3477. */
  3478. function tripal_core_chado_studyfactor_schema() {
  3479. $description = array();
  3480. $description = array(
  3481. 'table' => 'studyfactor',
  3482. // 'description' => 'TODO: please describe this table!',
  3483. 'fields' => array(
  3484. 'studyfactor_id' => array(
  3485. // 'description' => 'TODO: please describe this field!',
  3486. 'type' => 'serial',
  3487. 'not NULL' => '1',
  3488. ),
  3489. 'studydesign_id' => array(
  3490. // 'description' => 'TODO: please describe this field!',
  3491. 'type' => 'int',
  3492. 'not NULL' => '1',
  3493. ),
  3494. 'type_id' => array(
  3495. // 'description' => 'TODO: please describe this field!',
  3496. 'type' => 'int',
  3497. 'not NULL' => '',
  3498. ),
  3499. 'name' => array(
  3500. // 'description' => 'TODO: please describe this field!',
  3501. 'type' => 'text',
  3502. 'not NULL' => '1',
  3503. ),
  3504. 'description' => array(
  3505. // 'description' => 'TODO: please describe this field!',
  3506. 'type' => 'text',
  3507. 'not NULL' => '',
  3508. ),
  3509. ),
  3510. 'primary key' => array(
  3511. '0' => 'studyfactor_id',
  3512. ),
  3513. 'unique keys' => array(
  3514. ),
  3515. 'indexes' => array(
  3516. 'studyfactor_idx1' => array(
  3517. '0' => 'studydesign_id',
  3518. ),
  3519. 'studyfactor_idx2' => array(
  3520. '0' => 'type_id',
  3521. ),
  3522. ),
  3523. 'foreign keys' => array(
  3524. ),
  3525. );
  3526. return $description;
  3527. }
  3528. /**
  3529. * Implements hook_studyprop_schema()
  3530. * Purpose: To describe the structure of studyprop to tripal
  3531. * @see tripal_core_chado_insert()
  3532. * @see tripal_core_chado_update()
  3533. * @see tripal_core_chado_select()
  3534. *
  3535. * @return
  3536. * An array describing the current table
  3537. *
  3538. * @ingroup tripal_schema_api
  3539. *
  3540. */
  3541. function tripal_core_chado_studyprop_schema() {
  3542. $description = array();
  3543. $description = array(
  3544. 'table' => 'studyprop',
  3545. // 'description' => 'TODO: please describe this table!',
  3546. 'fields' => array(
  3547. 'studyprop_id' => array(
  3548. // 'description' => 'TODO: please describe this field!',
  3549. 'type' => 'serial',
  3550. 'not NULL' => '1',
  3551. ),
  3552. 'study_id' => array(
  3553. // 'description' => 'TODO: please describe this field!',
  3554. 'type' => 'int',
  3555. 'not NULL' => '1',
  3556. ),
  3557. 'type_id' => array(
  3558. // 'description' => 'TODO: please describe this field!',
  3559. 'type' => 'int',
  3560. 'not NULL' => '1',
  3561. ),
  3562. 'value' => array(
  3563. // 'description' => 'TODO: please describe this field!',
  3564. 'type' => 'text',
  3565. 'not NULL' => '',
  3566. ),
  3567. 'rank' => array(
  3568. // 'description' => 'TODO: please describe this field!',
  3569. 'type' => 'int',
  3570. 'not NULL' => '1',
  3571. 'default' => '0',
  3572. ),
  3573. ),
  3574. 'primary key' => array(
  3575. '0' => 'studyprop_id',
  3576. ),
  3577. 'unique keys' => array(
  3578. 'study_id' => array(
  3579. '0' => 'study_id',
  3580. '1' => 'type_id',
  3581. '2' => 'rank',
  3582. ),
  3583. ),
  3584. 'indexes' => array(
  3585. 'studyprop_idx1' => array(
  3586. '0' => 'study_id',
  3587. ),
  3588. 'studyprop_idx2' => array(
  3589. '0' => 'type_id',
  3590. ),
  3591. ),
  3592. 'foreign keys' => array(
  3593. ),
  3594. );
  3595. return $description;
  3596. }
  3597. /**
  3598. * Implements hook_studyprop_feature_schema()
  3599. * Purpose: To describe the structure of studyprop_feature to tripal
  3600. * @see tripal_core_chado_insert()
  3601. * @see tripal_core_chado_update()
  3602. * @see tripal_core_chado_select()
  3603. *
  3604. * @return
  3605. * An array describing the current table
  3606. *
  3607. * @ingroup tripal_schema_api
  3608. *
  3609. */
  3610. function tripal_core_chado_studyprop_feature_schema() {
  3611. $description = array();
  3612. $description = array(
  3613. 'table' => 'studyprop_feature',
  3614. // 'description' => 'TODO: please describe this table!',
  3615. 'fields' => array(
  3616. 'studyprop_feature_id' => array(
  3617. // 'description' => 'TODO: please describe this field!',
  3618. 'type' => 'serial',
  3619. 'not NULL' => '1',
  3620. ),
  3621. 'studyprop_id' => array(
  3622. // 'description' => 'TODO: please describe this field!',
  3623. 'type' => 'int',
  3624. 'not NULL' => '1',
  3625. ),
  3626. 'feature_id' => array(
  3627. // 'description' => 'TODO: please describe this field!',
  3628. 'type' => 'int',
  3629. 'not NULL' => '1',
  3630. ),
  3631. 'type_id' => array(
  3632. // 'description' => 'TODO: please describe this field!',
  3633. 'type' => 'int',
  3634. 'not NULL' => '',
  3635. ),
  3636. ),
  3637. 'primary key' => array(
  3638. '0' => 'studyprop_feature_id',
  3639. ),
  3640. 'unique keys' => array(
  3641. 'studyprop_id' => array(
  3642. '0' => 'studyprop_id',
  3643. '1' => 'feature_id',
  3644. ),
  3645. ),
  3646. 'indexes' => array(
  3647. 'studyprop_feature_idx1' => array(
  3648. '0' => 'studyprop_id',
  3649. ),
  3650. 'studyprop_feature_idx2' => array(
  3651. '0' => 'feature_id',
  3652. ),
  3653. ),
  3654. 'foreign keys' => array(
  3655. ),
  3656. );
  3657. return $description;
  3658. }
  3659. /**
  3660. * Implements hook_synonym_schema()
  3661. * Purpose: To describe the structure of synonym to tripal
  3662. * @see tripal_core_chado_insert()
  3663. * @see tripal_core_chado_update()
  3664. * @see tripal_core_chado_select()
  3665. *
  3666. * @return
  3667. * An array describing the current table
  3668. *
  3669. * @ingroup tripal_schema_api
  3670. *
  3671. */
  3672. function tripal_core_chado_synonym_schema() {
  3673. $description = array();
  3674. $description = array(
  3675. 'table' => 'synonym',
  3676. // 'description' => 'TODO: please describe this table!',
  3677. 'fields' => array(
  3678. 'synonym_id' => array(
  3679. // 'description' => 'TODO: please describe this field!',
  3680. 'type' => 'serial',
  3681. 'not NULL' => '1',
  3682. ),
  3683. 'name' => array(
  3684. // 'description' => 'TODO: please describe this field!',
  3685. 'type' => 'varchar',
  3686. 'length' => '255',
  3687. 'not NULL' => '1',
  3688. ),
  3689. 'type_id' => array(
  3690. // 'description' => 'TODO: please describe this field!',
  3691. 'type' => 'int',
  3692. 'not NULL' => '1',
  3693. ),
  3694. 'synonym_sgml' => array(
  3695. // 'description' => 'TODO: please describe this field!',
  3696. 'type' => 'varchar',
  3697. 'length' => '255',
  3698. 'not NULL' => '1',
  3699. ),
  3700. ),
  3701. 'primary key' => array(
  3702. '0' => 'synonym_id',
  3703. ),
  3704. 'unique keys' => array(
  3705. 'synonym_c1' => array(
  3706. '0' => 'name',
  3707. '1' => 'type_id',
  3708. ),
  3709. ),
  3710. 'indexes' => array(
  3711. 'synonym_idx1' => array(
  3712. '0' => 'type_id',
  3713. ),
  3714. ),
  3715. 'foreign keys' => array(
  3716. ),
  3717. );
  3718. return $description;
  3719. }
  3720. /**
  3721. * Implements hook_studydesignprop_schema()
  3722. * Purpose: To describe the structure of studydesignprop to tripal
  3723. * @see tripal_core_chado_insert()
  3724. * @see tripal_core_chado_update()
  3725. * @see tripal_core_chado_select()
  3726. *
  3727. * @return
  3728. * An array describing the current table
  3729. *
  3730. * @ingroup tripal_schema_api
  3731. *
  3732. */
  3733. function tripal_core_chado_studydesignprop_schema() {
  3734. $description = array();
  3735. $description = array(
  3736. 'table' => 'studydesignprop',
  3737. // 'description' => 'TODO: please describe this table!',
  3738. 'fields' => array(
  3739. 'studydesignprop_id' => array(
  3740. // 'description' => 'TODO: please describe this field!',
  3741. 'type' => 'serial',
  3742. 'not NULL' => '1',
  3743. ),
  3744. 'studydesign_id' => array(
  3745. // 'description' => 'TODO: please describe this field!',
  3746. 'type' => 'int',
  3747. 'not NULL' => '1',
  3748. ),
  3749. 'type_id' => array(
  3750. // 'description' => 'TODO: please describe this field!',
  3751. 'type' => 'int',
  3752. 'not NULL' => '1',
  3753. ),
  3754. 'value' => array(
  3755. // 'description' => 'TODO: please describe this field!',
  3756. 'type' => 'text',
  3757. 'not NULL' => '',
  3758. ),
  3759. 'rank' => array(
  3760. // 'description' => 'TODO: please describe this field!',
  3761. 'type' => 'int',
  3762. 'not NULL' => '1',
  3763. 'default' => '0',
  3764. ),
  3765. ),
  3766. 'primary key' => array(
  3767. '0' => 'studydesignprop_id',
  3768. ),
  3769. 'unique keys' => array(
  3770. 'studydesignprop_c1' => array(
  3771. '0' => 'studydesign_id',
  3772. '1' => 'type_id',
  3773. '2' => 'rank',
  3774. ),
  3775. ),
  3776. 'indexes' => array(
  3777. 'studydesignprop_idx1' => array(
  3778. '0' => 'studydesign_id',
  3779. ),
  3780. 'studydesignprop_idx2' => array(
  3781. '0' => 'type_id',
  3782. ),
  3783. ),
  3784. 'foreign keys' => array(
  3785. ),
  3786. );
  3787. return $description;
  3788. }
  3789. /**
  3790. * Implements hook_studydesign_schema()
  3791. * Purpose: To describe the structure of studydesign to tripal
  3792. * @see tripal_core_chado_insert()
  3793. * @see tripal_core_chado_update()
  3794. * @see tripal_core_chado_select()
  3795. *
  3796. * @return
  3797. * An array describing the current table
  3798. *
  3799. * @ingroup tripal_schema_api
  3800. *
  3801. */
  3802. function tripal_core_chado_studydesign_schema() {
  3803. $description = array();
  3804. $description = array(
  3805. 'table' => 'studydesign',
  3806. // 'description' => 'TODO: please describe this table!',
  3807. 'fields' => array(
  3808. 'studydesign_id' => array(
  3809. // 'description' => 'TODO: please describe this field!',
  3810. 'type' => 'serial',
  3811. 'not NULL' => '1',
  3812. ),
  3813. 'study_id' => array(
  3814. // 'description' => 'TODO: please describe this field!',
  3815. 'type' => 'int',
  3816. 'not NULL' => '1',
  3817. ),
  3818. 'description' => array(
  3819. // 'description' => 'TODO: please describe this field!',
  3820. 'type' => 'text',
  3821. 'not NULL' => '',
  3822. ),
  3823. ),
  3824. 'primary key' => array(
  3825. '0' => 'studydesign_id',
  3826. ),
  3827. 'unique keys' => array(
  3828. ),
  3829. 'indexes' => array(
  3830. 'studydesign_idx1' => array(
  3831. '0' => 'study_id',
  3832. ),
  3833. ),
  3834. 'foreign keys' => array(
  3835. ),
  3836. );
  3837. return $description;
  3838. }
  3839. /**
  3840. * Implements hook_stockprop_schema()
  3841. * Purpose: To describe the structure of stockprop to tripal
  3842. * @see tripal_core_chado_insert()
  3843. * @see tripal_core_chado_update()
  3844. * @see tripal_core_chado_select()
  3845. *
  3846. * @return
  3847. * An array describing the current table
  3848. *
  3849. * @ingroup tripal_schema_api
  3850. *
  3851. */
  3852. function tripal_core_chado_stockprop_schema() {
  3853. $description = array();
  3854. $description = array(
  3855. 'table' => 'stockprop',
  3856. // 'description' => 'TODO: please describe this table!',
  3857. 'fields' => array(
  3858. 'stockprop_id' => array(
  3859. // 'description' => 'TODO: please describe this field!',
  3860. 'type' => 'serial',
  3861. 'not NULL' => '1',
  3862. ),
  3863. 'stock_id' => array(
  3864. // 'description' => 'TODO: please describe this field!',
  3865. 'type' => 'int',
  3866. 'not NULL' => '1',
  3867. ),
  3868. 'type_id' => array(
  3869. // 'description' => 'TODO: please describe this field!',
  3870. 'type' => 'int',
  3871. 'not NULL' => '1',
  3872. ),
  3873. 'value' => array(
  3874. // 'description' => 'TODO: please describe this field!',
  3875. 'type' => 'text',
  3876. 'not NULL' => '',
  3877. ),
  3878. 'rank' => array(
  3879. // 'description' => 'TODO: please describe this field!',
  3880. 'type' => 'int',
  3881. 'not NULL' => '1',
  3882. 'default' => '0',
  3883. ),
  3884. ),
  3885. 'primary key' => array(
  3886. '0' => 'stockprop_id',
  3887. ),
  3888. 'unique keys' => array(
  3889. 'stockprop_c1' => array(
  3890. '0' => 'stock_id',
  3891. '1' => 'type_id',
  3892. '2' => 'rank',
  3893. ),
  3894. ),
  3895. 'indexes' => array(
  3896. 'stockprop_idx1' => array(
  3897. '0' => 'stock_id',
  3898. ),
  3899. 'stockprop_idx2' => array(
  3900. '0' => 'type_id',
  3901. ),
  3902. ),
  3903. 'foreign keys' => array(
  3904. ),
  3905. );
  3906. return $description;
  3907. }
  3908. /**
  3909. * Implements hook_stockprop_pub_schema()
  3910. * Purpose: To describe the structure of stockprop_pub to tripal
  3911. * @see tripal_core_chado_insert()
  3912. * @see tripal_core_chado_update()
  3913. * @see tripal_core_chado_select()
  3914. *
  3915. * @return
  3916. * An array describing the current table
  3917. *
  3918. * @ingroup tripal_schema_api
  3919. *
  3920. */
  3921. function tripal_core_chado_stockprop_pub_schema() {
  3922. $description = array();
  3923. $description = array(
  3924. 'table' => 'stockprop_pub',
  3925. // 'description' => 'TODO: please describe this table!',
  3926. 'fields' => array(
  3927. 'stockprop_pub_id' => array(
  3928. // 'description' => 'TODO: please describe this field!',
  3929. 'type' => 'serial',
  3930. 'not NULL' => '1',
  3931. ),
  3932. 'stockprop_id' => array(
  3933. // 'description' => 'TODO: please describe this field!',
  3934. 'type' => 'int',
  3935. 'not NULL' => '1',
  3936. ),
  3937. 'pub_id' => array(
  3938. // 'description' => 'TODO: please describe this field!',
  3939. 'type' => 'int',
  3940. 'not NULL' => '1',
  3941. ),
  3942. ),
  3943. 'primary key' => array(
  3944. '0' => 'stockprop_pub_id',
  3945. ),
  3946. 'unique keys' => array(
  3947. 'stockprop_pub_c1' => array(
  3948. '0' => 'stockprop_id',
  3949. '1' => 'pub_id',
  3950. ),
  3951. ),
  3952. 'indexes' => array(
  3953. 'stockprop_pub_idx1' => array(
  3954. '0' => 'stockprop_id',
  3955. ),
  3956. 'stockprop_pub_idx2' => array(
  3957. '0' => 'pub_id',
  3958. ),
  3959. ),
  3960. 'foreign keys' => array(
  3961. ),
  3962. );
  3963. return $description;
  3964. }
  3965. /**
  3966. * Implements hook_study_schema()
  3967. * Purpose: To describe the structure of study to tripal
  3968. * @see tripal_core_chado_insert()
  3969. * @see tripal_core_chado_update()
  3970. * @see tripal_core_chado_select()
  3971. *
  3972. * @return
  3973. * An array describing the current table
  3974. *
  3975. * @ingroup tripal_schema_api
  3976. *
  3977. */
  3978. function tripal_core_chado_study_schema() {
  3979. $description = array();
  3980. $description = array(
  3981. 'table' => 'study',
  3982. // 'description' => 'TODO: please describe this table!',
  3983. 'fields' => array(
  3984. 'study_id' => array(
  3985. // 'description' => 'TODO: please describe this field!',
  3986. 'type' => 'serial',
  3987. 'not NULL' => '1',
  3988. ),
  3989. 'contact_id' => array(
  3990. // 'description' => 'TODO: please describe this field!',
  3991. 'type' => 'int',
  3992. 'not NULL' => '1',
  3993. ),
  3994. 'pub_id' => array(
  3995. // 'description' => 'TODO: please describe this field!',
  3996. 'type' => 'int',
  3997. 'not NULL' => '',
  3998. ),
  3999. 'dbxref_id' => array(
  4000. // 'description' => 'TODO: please describe this field!',
  4001. 'type' => 'int',
  4002. 'not NULL' => '',
  4003. ),
  4004. 'name' => array(
  4005. // 'description' => 'TODO: please describe this field!',
  4006. 'type' => 'text',
  4007. 'not NULL' => '1',
  4008. ),
  4009. 'description' => array(
  4010. // 'description' => 'TODO: please describe this field!',
  4011. 'type' => 'text',
  4012. 'not NULL' => '',
  4013. ),
  4014. ),
  4015. 'primary key' => array(
  4016. '0' => 'study_id',
  4017. ),
  4018. 'unique keys' => array(
  4019. 'study_c1' => array(
  4020. '0' => 'name',
  4021. ),
  4022. ),
  4023. 'indexes' => array(
  4024. 'study_idx1' => array(
  4025. '0' => 'contact_id',
  4026. ),
  4027. 'study_idx2' => array(
  4028. '0' => 'pub_id',
  4029. ),
  4030. 'study_idx3' => array(
  4031. '0' => 'dbxref_id',
  4032. ),
  4033. ),
  4034. 'foreign keys' => array(
  4035. ),
  4036. );
  4037. return $description;
  4038. }
  4039. /**
  4040. * Implements hook_study_assay_schema()
  4041. * Purpose: To describe the structure of study_assay to tripal
  4042. * @see tripal_core_chado_insert()
  4043. * @see tripal_core_chado_update()
  4044. * @see tripal_core_chado_select()
  4045. *
  4046. * @return
  4047. * An array describing the current table
  4048. *
  4049. * @ingroup tripal_schema_api
  4050. *
  4051. */
  4052. function tripal_core_chado_study_assay_schema() {
  4053. $description = array();
  4054. $description = array(
  4055. 'table' => 'study_assay',
  4056. // 'description' => 'TODO: please describe this table!',
  4057. 'fields' => array(
  4058. 'study_assay_id' => array(
  4059. // 'description' => 'TODO: please describe this field!',
  4060. 'type' => 'serial',
  4061. 'not NULL' => '1',
  4062. ),
  4063. 'study_id' => array(
  4064. // 'description' => 'TODO: please describe this field!',
  4065. 'type' => 'int',
  4066. 'not NULL' => '1',
  4067. ),
  4068. 'assay_id' => array(
  4069. // 'description' => 'TODO: please describe this field!',
  4070. 'type' => 'int',
  4071. 'not NULL' => '1',
  4072. ),
  4073. ),
  4074. 'primary key' => array(
  4075. '0' => 'study_assay_id',
  4076. ),
  4077. 'unique keys' => array(
  4078. 'study_assay_c1' => array(
  4079. '0' => 'study_id',
  4080. '1' => 'assay_id',
  4081. ),
  4082. ),
  4083. 'indexes' => array(
  4084. 'study_assay_idx1' => array(
  4085. '0' => 'study_id',
  4086. ),
  4087. 'study_assay_idx2' => array(
  4088. '0' => 'assay_id',
  4089. ),
  4090. ),
  4091. 'foreign keys' => array(
  4092. ),
  4093. );
  4094. return $description;
  4095. }
  4096. /**
  4097. * Implements hook_tableinfo_schema()
  4098. * Purpose: To describe the structure of tableinfo to tripal
  4099. * @see tripal_core_chado_insert()
  4100. * @see tripal_core_chado_update()
  4101. * @see tripal_core_chado_select()
  4102. *
  4103. * @return
  4104. * An array describing the current table
  4105. *
  4106. * @ingroup tripal_schema_api
  4107. *
  4108. */
  4109. function tripal_core_chado_tableinfo_schema() {
  4110. $description = array();
  4111. $description = array(
  4112. 'table' => 'tableinfo',
  4113. // 'description' => 'TODO: please describe this table!',
  4114. 'fields' => array(
  4115. 'tableinfo_id' => array(
  4116. // 'description' => 'TODO: please describe this field!',
  4117. 'type' => 'serial',
  4118. 'not NULL' => '1',
  4119. ),
  4120. 'name' => array(
  4121. // 'description' => 'TODO: please describe this field!',
  4122. 'type' => 'varchar',
  4123. 'length' => '30',
  4124. 'not NULL' => '1',
  4125. ),
  4126. 'primary_key_column' => array(
  4127. // 'description' => 'TODO: please describe this field!',
  4128. 'type' => 'varchar',
  4129. 'length' => '30',
  4130. 'not NULL' => '',
  4131. ),
  4132. 'is_view' => array(
  4133. // 'description' => 'TODO: please describe this field!',
  4134. 'type' => 'int',
  4135. 'not NULL' => '1',
  4136. 'default' => '0',
  4137. ),
  4138. 'view_on_table_id' => array(
  4139. // 'description' => 'TODO: please describe this field!',
  4140. 'type' => 'int',
  4141. 'not NULL' => '',
  4142. ),
  4143. 'superclass_table_id' => array(
  4144. // 'description' => 'TODO: please describe this field!',
  4145. 'type' => 'int',
  4146. 'not NULL' => '',
  4147. ),
  4148. 'is_updateable' => array(
  4149. // 'description' => 'TODO: please describe this field!',
  4150. 'type' => 'int',
  4151. 'not NULL' => '1',
  4152. 'default' => '1',
  4153. ),
  4154. 'modification_date' => array(
  4155. // 'description' => 'TODO: please describe this field!',
  4156. 'type' => 'date',
  4157. 'not NULL' => '1',
  4158. 'default' => 'ow(',
  4159. ),
  4160. ),
  4161. 'primary key' => array(
  4162. '0' => 'tableinfo_id',
  4163. ),
  4164. 'unique keys' => array(
  4165. 'tableinfo_c1' => array(
  4166. '0' => 'name',
  4167. ),
  4168. ),
  4169. 'indexes' => array(
  4170. ),
  4171. 'foreign keys' => array(
  4172. ),
  4173. );
  4174. return $description;
  4175. }
  4176. /**
  4177. * Implements hook_treatment_schema()
  4178. * Purpose: To describe the structure of treatment to tripal
  4179. * @see tripal_core_chado_insert()
  4180. * @see tripal_core_chado_update()
  4181. * @see tripal_core_chado_select()
  4182. *
  4183. * @return
  4184. * An array describing the current table
  4185. *
  4186. * @ingroup tripal_schema_api
  4187. *
  4188. */
  4189. function tripal_core_chado_treatment_schema() {
  4190. $description = array();
  4191. $description = array(
  4192. 'table' => 'treatment',
  4193. // 'description' => 'TODO: please describe this table!',
  4194. 'fields' => array(
  4195. 'treatment_id' => array(
  4196. // 'description' => 'TODO: please describe this field!',
  4197. 'type' => 'serial',
  4198. 'not NULL' => '1',
  4199. ),
  4200. 'rank' => array(
  4201. // 'description' => 'TODO: please describe this field!',
  4202. 'type' => 'int',
  4203. 'not NULL' => '1',
  4204. 'default' => '0',
  4205. ),
  4206. 'biomaterial_id' => array(
  4207. // 'description' => 'TODO: please describe this field!',
  4208. 'type' => 'int',
  4209. 'not NULL' => '1',
  4210. ),
  4211. 'type_id' => array(
  4212. // 'description' => 'TODO: please describe this field!',
  4213. 'type' => 'int',
  4214. 'not NULL' => '1',
  4215. ),
  4216. 'protocol_id' => array(
  4217. // 'description' => 'TODO: please describe this field!',
  4218. 'type' => 'int',
  4219. 'not NULL' => '',
  4220. ),
  4221. 'name' => array(
  4222. // 'description' => 'TODO: please describe this field!',
  4223. 'type' => 'text',
  4224. 'not NULL' => '',
  4225. ),
  4226. ),
  4227. 'primary key' => array(
  4228. '0' => 'treatment_id',
  4229. ),
  4230. 'unique keys' => array(
  4231. ),
  4232. 'indexes' => array(
  4233. 'treatment_idx1' => array(
  4234. '0' => 'biomaterial_id',
  4235. ),
  4236. 'treatment_idx2' => array(
  4237. '0' => 'type_id',
  4238. ),
  4239. 'treatment_idx3' => array(
  4240. '0' => 'protocol_id',
  4241. ),
  4242. ),
  4243. 'foreign keys' => array(
  4244. ),
  4245. );
  4246. return $description;
  4247. }
  4248. /**
  4249. * Implements hook_tripal_obo_schema()
  4250. * Purpose: To describe the structure of tripal_obo to tripal
  4251. * @see tripal_core_chado_insert()
  4252. * @see tripal_core_chado_update()
  4253. * @see tripal_core_chado_select()
  4254. *
  4255. * @return
  4256. * An array describing the current table
  4257. *
  4258. * @ingroup tripal_schema_api
  4259. *
  4260. */
  4261. function tripal_core_chado_tripal_obo_schema() {
  4262. $description = array();
  4263. $description = array(
  4264. 'table' => 'tripal_obo',
  4265. // 'description' => 'TODO: please describe this table!',
  4266. 'fields' => array(
  4267. 'cv_id' => array(
  4268. // 'description' => 'TODO: please describe this field!',
  4269. 'type' => 'int',
  4270. 'unsigned' => '1',
  4271. 'not NULL' => '1',
  4272. 'default' => '0',
  4273. ),
  4274. 'file' => array(
  4275. // 'description' => 'TODO: please describe this field!',
  4276. 'type' => 'varchar',
  4277. 'length' => '1024',
  4278. 'not NULL' => '',
  4279. ),
  4280. 'url' => array(
  4281. // 'description' => 'TODO: please describe this field!',
  4282. 'type' => 'varchar',
  4283. 'length' => '1024',
  4284. 'not NULL' => '',
  4285. ),
  4286. ),
  4287. 'primary key' => array(
  4288. '0' => 'cv_id',
  4289. ),
  4290. 'unique keys' => array(
  4291. ),
  4292. 'indexes' => array(
  4293. 'cv_id' => array(
  4294. '0' => 'cv_id',
  4295. ),
  4296. ),
  4297. 'foreign keys' => array(
  4298. ),
  4299. );
  4300. return $description;
  4301. }
  4302. /**
  4303. * Implements hook_tripal_organism_views_common_name_schema()
  4304. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4305. * @see tripal_core_chado_insert()
  4306. * @see tripal_core_chado_update()
  4307. * @see tripal_core_chado_select()
  4308. *
  4309. * @return
  4310. * An array describing the current table
  4311. *
  4312. * @ingroup tripal_schema_api
  4313. *
  4314. */
  4315. function tripal_core_chado_tripal_organism_views_common_name_schema() {
  4316. $description = array();
  4317. $description = array(
  4318. 'table' => 'tripal_organism_views_common_name',
  4319. // 'description' => 'TODO: please describe this table!',
  4320. 'fields' => array(
  4321. 'nid' => array(
  4322. // 'description' => 'TODO: please describe this field!',
  4323. 'type' => 'int',
  4324. 'unsigned' => '1',
  4325. 'not NULL' => '1',
  4326. 'default' => '0',
  4327. ),
  4328. 'common_name' => array(
  4329. // 'description' => 'TODO: please describe this field!',
  4330. 'type' => 'varchar',
  4331. 'length' => '255',
  4332. 'not NULL' => '1',
  4333. 'default' => 'NA',
  4334. ),
  4335. ),
  4336. 'primary key' => array(
  4337. ),
  4338. 'unique keys' => array(
  4339. ),
  4340. 'indexes' => array(
  4341. ),
  4342. 'foreign keys' => array(
  4343. ),
  4344. );
  4345. return $description;
  4346. }
  4347. /**
  4348. * Implements hook_type_feature_count_schema()
  4349. * Purpose: To describe the structure of type_feature_count to tripal
  4350. * @see tripal_core_chado_insert()
  4351. * @see tripal_core_chado_update()
  4352. * @see tripal_core_chado_select()
  4353. *
  4354. * @return
  4355. * An array describing the current table
  4356. *
  4357. * @ingroup tripal_schema_api
  4358. *
  4359. */
  4360. function tripal_core_chado_type_feature_count_schema() {
  4361. $description = array();
  4362. $description = array(
  4363. 'table' => 'type_feature_count',
  4364. // 'description' => 'TODO: please describe this table!',
  4365. 'fields' => array(
  4366. 'type' => array(
  4367. // 'description' => 'TODO: please describe this field!',
  4368. 'type' => 'varchar',
  4369. 'length' => '1024',
  4370. 'not NULL' => '',
  4371. ),
  4372. 'num_features' => array(
  4373. // 'description' => 'TODO: please describe this field!',
  4374. 'type' => 'int',
  4375. 'size' => 'big',
  4376. 'not NULL' => '',
  4377. ),
  4378. ),
  4379. 'primary key' => array(
  4380. ),
  4381. 'unique keys' => array(
  4382. ),
  4383. 'indexes' => array(
  4384. ),
  4385. 'foreign keys' => array(
  4386. ),
  4387. );
  4388. return $description;
  4389. }
  4390. /**
  4391. * Implements hook_stockcollectionprop_schema()
  4392. * Purpose: To describe the structure of stockcollectionprop to tripal
  4393. * @see tripal_core_chado_insert()
  4394. * @see tripal_core_chado_update()
  4395. * @see tripal_core_chado_select()
  4396. *
  4397. * @return
  4398. * An array describing the current table
  4399. *
  4400. * @ingroup tripal_schema_api
  4401. *
  4402. */
  4403. function tripal_core_chado_stockcollectionprop_schema() {
  4404. $description = array();
  4405. $description = array(
  4406. 'table' => 'stockcollectionprop',
  4407. // 'description' => 'TODO: please describe this table!',
  4408. 'fields' => array(
  4409. 'stockcollectionprop_id' => array(
  4410. // 'description' => 'TODO: please describe this field!',
  4411. 'type' => 'serial',
  4412. 'not NULL' => '1',
  4413. ),
  4414. 'stockcollection_id' => array(
  4415. // 'description' => 'TODO: please describe this field!',
  4416. 'type' => 'int',
  4417. 'not NULL' => '1',
  4418. ),
  4419. 'type_id' => array(
  4420. // 'description' => 'TODO: please describe this field!',
  4421. 'type' => 'int',
  4422. 'not NULL' => '1',
  4423. ),
  4424. 'value' => array(
  4425. // 'description' => 'TODO: please describe this field!',
  4426. 'type' => 'text',
  4427. 'not NULL' => '',
  4428. ),
  4429. 'rank' => array(
  4430. // 'description' => 'TODO: please describe this field!',
  4431. 'type' => 'int',
  4432. 'not NULL' => '1',
  4433. 'default' => '0',
  4434. ),
  4435. ),
  4436. 'primary key' => array(
  4437. '0' => 'stockcollectionprop_id',
  4438. ),
  4439. 'unique keys' => array(
  4440. 'stockcollectionprop_c1' => array(
  4441. '0' => 'stockcollection_id',
  4442. '1' => 'type_id',
  4443. '2' => 'rank',
  4444. ),
  4445. ),
  4446. 'indexes' => array(
  4447. 'stockcollectionprop_idx1' => array(
  4448. '0' => 'stockcollection_id',
  4449. ),
  4450. 'stockcollectionprop_idx2' => array(
  4451. '0' => 'type_id',
  4452. ),
  4453. ),
  4454. 'foreign keys' => array(
  4455. ),
  4456. );
  4457. return $description;
  4458. }
  4459. /**
  4460. * Implements hook_stockcollection_stock_schema()
  4461. * Purpose: To describe the structure of stockcollection_stock to tripal
  4462. * @see tripal_core_chado_insert()
  4463. * @see tripal_core_chado_update()
  4464. * @see tripal_core_chado_select()
  4465. *
  4466. * @return
  4467. * An array describing the current table
  4468. *
  4469. * @ingroup tripal_schema_api
  4470. *
  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_chado_insert()
  4520. * @see tripal_core_chado_update()
  4521. * @see tripal_core_chado_select()
  4522. *
  4523. * @return
  4524. * An array describing the current table
  4525. *
  4526. * @ingroup tripal_schema_api
  4527. *
  4528. */
  4529. function tripal_core_chado_public_feature_schema() {
  4530. $description = array();
  4531. $description = array(
  4532. 'table' => 'public_feature',
  4533. // 'description' => 'TODO: please describe this table!',
  4534. 'fields' => array(
  4535. 'vid' => array(
  4536. // 'description' => 'TODO: please describe this field!',
  4537. 'type' => 'int',
  4538. 'unsigned' => '1',
  4539. 'not NULL' => '1',
  4540. 'default' => '0',
  4541. ),
  4542. 'nid' => array(
  4543. // 'description' => 'TODO: please describe this field!',
  4544. 'type' => 'int',
  4545. 'unsigned' => '1',
  4546. 'not NULL' => '1',
  4547. 'default' => '0',
  4548. ),
  4549. 'feature_id' => array(
  4550. // 'description' => 'TODO: please describe this field!',
  4551. 'type' => 'int',
  4552. 'not NULL' => '1',
  4553. 'default' => '0',
  4554. ),
  4555. 'sync_date' => array(
  4556. // 'description' => 'TODO: please describe this field!',
  4557. 'type' => 'int',
  4558. 'not NULL' => '',
  4559. ),
  4560. ),
  4561. 'primary key' => array(
  4562. '0' => 'nid',
  4563. ),
  4564. 'unique keys' => array(
  4565. 'nid_vid' => array(
  4566. '0' => 'nid',
  4567. '1' => 'vid',
  4568. ),
  4569. 'vid' => array(
  4570. '0' => 'vid',
  4571. ),
  4572. ),
  4573. 'indexes' => array(
  4574. 'feature_id' => array(
  4575. '0' => 'feature_id',
  4576. ),
  4577. ),
  4578. 'foreign keys' => array(
  4579. ),
  4580. );
  4581. return $description;
  4582. }
  4583. /**
  4584. * Implements hook_public_library_schema()
  4585. * Purpose: To describe the structure of public_library to tripal
  4586. * @see tripal_core_chado_insert()
  4587. * @see tripal_core_chado_update()
  4588. * @see tripal_core_chado_select()
  4589. *
  4590. * @return
  4591. * An array describing the current table
  4592. *
  4593. * @ingroup tripal_schema_api
  4594. *
  4595. */
  4596. function tripal_core_chado_public_library_schema() {
  4597. $description = array();
  4598. $description = array(
  4599. 'table' => 'public_library',
  4600. // 'description' => 'TODO: please describe this table!',
  4601. 'fields' => array(
  4602. 'vid' => array(
  4603. // 'description' => 'TODO: please describe this field!',
  4604. 'type' => 'int',
  4605. 'unsigned' => '1',
  4606. 'not NULL' => '1',
  4607. 'default' => '0',
  4608. ),
  4609. 'nid' => array(
  4610. // 'description' => 'TODO: please describe this field!',
  4611. 'type' => 'int',
  4612. 'unsigned' => '1',
  4613. 'not NULL' => '1',
  4614. 'default' => '0',
  4615. ),
  4616. 'library_id' => array(
  4617. // 'description' => 'TODO: please describe this field!',
  4618. 'type' => 'int',
  4619. 'not NULL' => '1',
  4620. 'default' => '0',
  4621. ),
  4622. ),
  4623. 'primary key' => array(
  4624. '0' => 'nid',
  4625. ),
  4626. 'unique keys' => array(
  4627. 'nid_vid' => array(
  4628. '0' => 'nid',
  4629. '1' => 'vid',
  4630. ),
  4631. 'vid' => array(
  4632. '0' => 'vid',
  4633. ),
  4634. ),
  4635. 'indexes' => array(
  4636. 'library_id' => array(
  4637. '0' => 'library_id',
  4638. ),
  4639. ),
  4640. 'foreign keys' => array(
  4641. ),
  4642. );
  4643. return $description;
  4644. }
  4645. /**
  4646. * Implements hook_public_organism_schema()
  4647. * Purpose: To describe the structure of public_organism to tripal
  4648. * @see tripal_core_chado_insert()
  4649. * @see tripal_core_chado_update()
  4650. * @see tripal_core_chado_select()
  4651. *
  4652. * @return
  4653. * An array describing the current table
  4654. *
  4655. * @ingroup tripal_schema_api
  4656. *
  4657. */
  4658. function tripal_core_chado_public_organism_schema() {
  4659. $description = array();
  4660. $description = array(
  4661. 'table' => 'public_organism',
  4662. // 'description' => 'TODO: please describe this table!',
  4663. 'fields' => array(
  4664. 'vid' => array(
  4665. // 'description' => 'TODO: please describe this field!',
  4666. 'type' => 'int',
  4667. 'unsigned' => '1',
  4668. 'not NULL' => '1',
  4669. 'default' => '0',
  4670. ),
  4671. 'nid' => array(
  4672. // 'description' => 'TODO: please describe this field!',
  4673. 'type' => 'int',
  4674. 'unsigned' => '1',
  4675. 'not NULL' => '1',
  4676. 'default' => '0',
  4677. ),
  4678. 'organism_id' => array(
  4679. // 'description' => 'TODO: please describe this field!',
  4680. 'type' => 'int',
  4681. 'not NULL' => '1',
  4682. 'default' => '0',
  4683. ),
  4684. ),
  4685. 'primary key' => array(
  4686. '0' => 'nid',
  4687. ),
  4688. 'unique keys' => array(
  4689. 'nid_vid' => array(
  4690. '0' => 'nid',
  4691. '1' => 'vid',
  4692. ),
  4693. 'vid' => array(
  4694. '0' => 'vid',
  4695. ),
  4696. ),
  4697. 'indexes' => array(
  4698. 'organism_id' => array(
  4699. '0' => 'organism_id',
  4700. ),
  4701. ),
  4702. 'foreign keys' => array(
  4703. ),
  4704. );
  4705. return $description;
  4706. }
  4707. /**
  4708. * Implements hook_pubprop_schema()
  4709. * Purpose: To describe the structure of pubprop to tripal
  4710. * @see tripal_core_chado_insert()
  4711. * @see tripal_core_chado_update()
  4712. * @see tripal_core_chado_select()
  4713. *
  4714. * @return
  4715. * An array describing the current table
  4716. *
  4717. * @ingroup tripal_schema_api
  4718. *
  4719. */
  4720. function tripal_core_chado_pubprop_schema() {
  4721. $description = array();
  4722. $description = array(
  4723. 'table' => 'pubprop',
  4724. // 'description' => 'TODO: please describe this table!',
  4725. 'fields' => array(
  4726. 'pubprop_id' => array(
  4727. // 'description' => 'TODO: please describe this field!',
  4728. 'type' => 'serial',
  4729. 'not NULL' => '1',
  4730. ),
  4731. 'pub_id' => array(
  4732. // 'description' => 'TODO: please describe this field!',
  4733. 'type' => 'int',
  4734. 'not NULL' => '1',
  4735. ),
  4736. 'type_id' => array(
  4737. // 'description' => 'TODO: please describe this field!',
  4738. 'type' => 'int',
  4739. 'not NULL' => '1',
  4740. ),
  4741. 'value' => array(
  4742. // 'description' => 'TODO: please describe this field!',
  4743. 'type' => 'text',
  4744. 'not NULL' => '1',
  4745. ),
  4746. 'rank' => array(
  4747. // 'description' => 'TODO: please describe this field!',
  4748. 'type' => 'int',
  4749. 'not NULL' => '',
  4750. ),
  4751. ),
  4752. 'primary key' => array(
  4753. '0' => 'pubprop_id',
  4754. ),
  4755. 'unique keys' => array(
  4756. 'pubprop_c1' => array(
  4757. '0' => 'pub_id',
  4758. '1' => 'type_id',
  4759. '2' => 'rank',
  4760. ),
  4761. ),
  4762. 'indexes' => array(
  4763. 'pubprop_idx1' => array(
  4764. '0' => 'pub_id',
  4765. ),
  4766. 'pubprop_idx2' => array(
  4767. '0' => 'type_id',
  4768. ),
  4769. ),
  4770. 'foreign keys' => array(
  4771. ),
  4772. );
  4773. return $description;
  4774. }
  4775. /**
  4776. * Implements hook_pubauthor_schema()
  4777. * Purpose: To describe the structure of pubauthor to tripal
  4778. * @see tripal_core_chado_insert()
  4779. * @see tripal_core_chado_update()
  4780. * @see tripal_core_chado_select()
  4781. *
  4782. * @return
  4783. * An array describing the current table
  4784. *
  4785. * @ingroup tripal_schema_api
  4786. *
  4787. */
  4788. function tripal_core_chado_pubauthor_schema() {
  4789. $description = array();
  4790. $description = array(
  4791. 'table' => 'pubauthor',
  4792. // 'description' => 'TODO: please describe this table!',
  4793. 'fields' => array(
  4794. 'pubauthor_id' => array(
  4795. // 'description' => 'TODO: please describe this field!',
  4796. 'type' => 'serial',
  4797. 'not NULL' => '1',
  4798. ),
  4799. 'pub_id' => array(
  4800. // 'description' => 'TODO: please describe this field!',
  4801. 'type' => 'int',
  4802. 'not NULL' => '1',
  4803. ),
  4804. 'rank' => array(
  4805. // 'description' => 'TODO: please describe this field!',
  4806. 'type' => 'int',
  4807. 'not NULL' => '1',
  4808. ),
  4809. 'editor' => array(
  4810. // 'description' => 'TODO: please describe this field!',
  4811. 'type' => 'boolean',
  4812. 'not NULL' => '',
  4813. 'default' => 'als',
  4814. ),
  4815. 'surname' => array(
  4816. // 'description' => 'TODO: please describe this field!',
  4817. 'type' => 'varchar',
  4818. 'length' => '100',
  4819. 'not NULL' => '1',
  4820. ),
  4821. 'givennames' => array(
  4822. // 'description' => 'TODO: please describe this field!',
  4823. 'type' => 'varchar',
  4824. 'length' => '100',
  4825. 'not NULL' => '',
  4826. ),
  4827. 'suffix' => array(
  4828. // 'description' => 'TODO: please describe this field!',
  4829. 'type' => 'varchar',
  4830. 'length' => '100',
  4831. 'not NULL' => '',
  4832. ),
  4833. ),
  4834. 'primary key' => array(
  4835. '0' => 'pubauthor_id',
  4836. ),
  4837. 'unique keys' => array(
  4838. 'pubauthor_c1' => array(
  4839. '0' => 'pub_id',
  4840. '1' => 'rank',
  4841. ),
  4842. ),
  4843. 'indexes' => array(
  4844. 'pubauthor_idx2' => array(
  4845. '0' => 'pub_id',
  4846. ),
  4847. ),
  4848. 'foreign keys' => array(
  4849. ),
  4850. );
  4851. return $description;
  4852. }
  4853. /**
  4854. * Implements hook_pub_relationship_schema()
  4855. * Purpose: To describe the structure of pub_relationship to tripal
  4856. * @see tripal_core_chado_insert()
  4857. * @see tripal_core_chado_update()
  4858. * @see tripal_core_chado_select()
  4859. *
  4860. * @return
  4861. * An array describing the current table
  4862. *
  4863. * @ingroup tripal_schema_api
  4864. *
  4865. */
  4866. function tripal_core_chado_pub_relationship_schema() {
  4867. $description = array();
  4868. $description = array(
  4869. 'table' => 'pub_relationship',
  4870. // 'description' => 'TODO: please describe this table!',
  4871. 'fields' => array(
  4872. 'pub_relationship_id' => array(
  4873. // 'description' => 'TODO: please describe this field!',
  4874. 'type' => 'serial',
  4875. 'not NULL' => '1',
  4876. ),
  4877. 'subject_id' => array(
  4878. // 'description' => 'TODO: please describe this field!',
  4879. 'type' => 'int',
  4880. 'not NULL' => '1',
  4881. ),
  4882. 'object_id' => array(
  4883. // 'description' => 'TODO: please describe this field!',
  4884. 'type' => 'int',
  4885. 'not NULL' => '1',
  4886. ),
  4887. 'type_id' => array(
  4888. // 'description' => 'TODO: please describe this field!',
  4889. 'type' => 'int',
  4890. 'not NULL' => '1',
  4891. ),
  4892. ),
  4893. 'primary key' => array(
  4894. '0' => 'pub_relationship_id',
  4895. ),
  4896. 'unique keys' => array(
  4897. 'pub_relationship_c1' => array(
  4898. '0' => 'subject_id',
  4899. '1' => 'object_id',
  4900. '2' => 'type_id',
  4901. ),
  4902. ),
  4903. 'indexes' => array(
  4904. 'pub_relationship_idx1' => array(
  4905. '0' => 'subject_id',
  4906. ),
  4907. 'pub_relationship_idx2' => array(
  4908. '0' => 'object_id',
  4909. ),
  4910. 'pub_relationship_idx3' => array(
  4911. '0' => 'type_id',
  4912. ),
  4913. ),
  4914. 'foreign keys' => array(
  4915. ),
  4916. );
  4917. return $description;
  4918. }
  4919. /**
  4920. * Implements hook_protocol_schema()
  4921. * Purpose: To describe the structure of protocol to tripal
  4922. * @see tripal_core_chado_insert()
  4923. * @see tripal_core_chado_update()
  4924. * @see tripal_core_chado_select()
  4925. *
  4926. * @return
  4927. * An array describing the current table
  4928. *
  4929. * @ingroup tripal_schema_api
  4930. *
  4931. */
  4932. function tripal_core_chado_protocol_schema() {
  4933. $description = array();
  4934. $description = array(
  4935. 'table' => 'protocol',
  4936. // 'description' => 'TODO: please describe this table!',
  4937. 'fields' => array(
  4938. 'protocol_id' => array(
  4939. // 'description' => 'TODO: please describe this field!',
  4940. 'type' => 'serial',
  4941. 'not NULL' => '1',
  4942. ),
  4943. 'type_id' => array(
  4944. // 'description' => 'TODO: please describe this field!',
  4945. 'type' => 'int',
  4946. 'not NULL' => '1',
  4947. ),
  4948. 'pub_id' => array(
  4949. // 'description' => 'TODO: please describe this field!',
  4950. 'type' => 'int',
  4951. 'not NULL' => '',
  4952. ),
  4953. 'dbxref_id' => array(
  4954. // 'description' => 'TODO: please describe this field!',
  4955. 'type' => 'int',
  4956. 'not NULL' => '',
  4957. ),
  4958. 'name' => array(
  4959. // 'description' => 'TODO: please describe this field!',
  4960. 'type' => 'text',
  4961. 'not NULL' => '1',
  4962. ),
  4963. 'uri' => array(
  4964. // 'description' => 'TODO: please describe this field!',
  4965. 'type' => 'text',
  4966. 'not NULL' => '',
  4967. ),
  4968. 'protocoldescription' => array(
  4969. // 'description' => 'TODO: please describe this field!',
  4970. 'type' => 'text',
  4971. 'not NULL' => '',
  4972. ),
  4973. 'hardwaredescription' => array(
  4974. // 'description' => 'TODO: please describe this field!',
  4975. 'type' => 'text',
  4976. 'not NULL' => '',
  4977. ),
  4978. 'softwaredescription' => array(
  4979. // 'description' => 'TODO: please describe this field!',
  4980. 'type' => 'text',
  4981. 'not NULL' => '',
  4982. ),
  4983. ),
  4984. 'primary key' => array(
  4985. '0' => 'protocol_id',
  4986. ),
  4987. 'unique keys' => array(
  4988. 'protocol_c1' => array(
  4989. '0' => 'name',
  4990. ),
  4991. ),
  4992. 'indexes' => array(
  4993. 'protocol_idx1' => array(
  4994. '0' => 'type_id',
  4995. ),
  4996. 'protocol_idx2' => array(
  4997. '0' => 'pub_id',
  4998. ),
  4999. 'protocol_idx3' => array(
  5000. '0' => 'dbxref_id',
  5001. ),
  5002. ),
  5003. 'foreign keys' => array(
  5004. ),
  5005. );
  5006. return $description;
  5007. }
  5008. /**
  5009. * Implements hook_protocolparam_schema()
  5010. * Purpose: To describe the structure of protocolparam to tripal
  5011. * @see tripal_core_chado_insert()
  5012. * @see tripal_core_chado_update()
  5013. * @see tripal_core_chado_select()
  5014. *
  5015. * @return
  5016. * An array describing the current table
  5017. *
  5018. * @ingroup tripal_schema_api
  5019. *
  5020. */
  5021. function tripal_core_chado_protocolparam_schema() {
  5022. $description = array();
  5023. $description = array(
  5024. 'table' => 'protocolparam',
  5025. // 'description' => 'TODO: please describe this table!',
  5026. 'fields' => array(
  5027. 'protocolparam_id' => array(
  5028. // 'description' => 'TODO: please describe this field!',
  5029. 'type' => 'serial',
  5030. 'not NULL' => '1',
  5031. ),
  5032. 'protocol_id' => array(
  5033. // 'description' => 'TODO: please describe this field!',
  5034. 'type' => 'int',
  5035. 'not NULL' => '1',
  5036. ),
  5037. 'name' => array(
  5038. // 'description' => 'TODO: please describe this field!',
  5039. 'type' => 'text',
  5040. 'not NULL' => '1',
  5041. ),
  5042. 'datatype_id' => array(
  5043. // 'description' => 'TODO: please describe this field!',
  5044. 'type' => 'int',
  5045. 'not NULL' => '',
  5046. ),
  5047. 'unittype_id' => array(
  5048. // 'description' => 'TODO: please describe this field!',
  5049. 'type' => 'int',
  5050. 'not NULL' => '',
  5051. ),
  5052. 'value' => array(
  5053. // 'description' => 'TODO: please describe this field!',
  5054. 'type' => 'text',
  5055. 'not NULL' => '',
  5056. ),
  5057. 'rank' => array(
  5058. // 'description' => 'TODO: please describe this field!',
  5059. 'type' => 'int',
  5060. 'not NULL' => '1',
  5061. 'default' => '0',
  5062. ),
  5063. ),
  5064. 'primary key' => array(
  5065. '0' => 'protocolparam_id',
  5066. ),
  5067. 'unique keys' => array(
  5068. ),
  5069. 'indexes' => array(
  5070. 'protocolparam_idx1' => array(
  5071. '0' => 'protocol_id',
  5072. ),
  5073. 'protocolparam_idx2' => array(
  5074. '0' => 'datatype_id',
  5075. ),
  5076. 'protocolparam_idx3' => array(
  5077. '0' => 'unittype_id',
  5078. ),
  5079. ),
  5080. 'foreign keys' => array(
  5081. ),
  5082. );
  5083. return $description;
  5084. }
  5085. /**
  5086. * Implements hook_pub_schema()
  5087. * Purpose: To describe the structure of pub to tripal
  5088. * @see tripal_core_chado_insert()
  5089. * @see tripal_core_chado_update()
  5090. * @see tripal_core_chado_select()
  5091. *
  5092. * @return
  5093. * An array describing the current table
  5094. *
  5095. * @ingroup tripal_schema_api
  5096. *
  5097. */
  5098. function tripal_core_chado_pub_schema() {
  5099. $description = array();
  5100. $description = array(
  5101. 'table' => 'pub',
  5102. // 'description' => 'TODO: please describe this table!',
  5103. 'fields' => array(
  5104. 'pub_id' => array(
  5105. // 'description' => 'TODO: please describe this field!',
  5106. 'type' => 'serial',
  5107. 'not NULL' => '1',
  5108. ),
  5109. 'title' => array(
  5110. // 'description' => 'TODO: please describe this field!',
  5111. 'type' => 'text',
  5112. 'not NULL' => '',
  5113. ),
  5114. 'volumetitle' => array(
  5115. // 'description' => 'TODO: please describe this field!',
  5116. 'type' => 'text',
  5117. 'not NULL' => '',
  5118. ),
  5119. 'volume' => array(
  5120. // 'description' => 'TODO: please describe this field!',
  5121. 'type' => 'varchar',
  5122. 'length' => '255',
  5123. 'not NULL' => '',
  5124. ),
  5125. 'series_name' => array(
  5126. // 'description' => 'TODO: please describe this field!',
  5127. 'type' => 'varchar',
  5128. 'length' => '255',
  5129. 'not NULL' => '',
  5130. ),
  5131. 'issue' => array(
  5132. // 'description' => 'TODO: please describe this field!',
  5133. 'type' => 'varchar',
  5134. 'length' => '255',
  5135. 'not NULL' => '',
  5136. ),
  5137. 'pyear' => array(
  5138. // 'description' => 'TODO: please describe this field!',
  5139. 'type' => 'varchar',
  5140. 'length' => '255',
  5141. 'not NULL' => '',
  5142. ),
  5143. 'pages' => array(
  5144. // 'description' => 'TODO: please describe this field!',
  5145. 'type' => 'varchar',
  5146. 'length' => '255',
  5147. 'not NULL' => '',
  5148. ),
  5149. 'miniref' => array(
  5150. // 'description' => 'TODO: please describe this field!',
  5151. 'type' => 'varchar',
  5152. 'length' => '255',
  5153. 'not NULL' => '',
  5154. ),
  5155. 'uniquename' => array(
  5156. // 'description' => 'TODO: please describe this field!',
  5157. 'type' => 'text',
  5158. 'not NULL' => '1',
  5159. ),
  5160. 'type_id' => array(
  5161. // 'description' => 'TODO: please describe this field!',
  5162. 'type' => 'int',
  5163. 'not NULL' => '1',
  5164. ),
  5165. 'is_obsolete' => array(
  5166. // 'description' => 'TODO: please describe this field!',
  5167. 'type' => 'boolean',
  5168. 'not NULL' => '',
  5169. 'default' => 'als',
  5170. ),
  5171. 'publisher' => array(
  5172. // 'description' => 'TODO: please describe this field!',
  5173. 'type' => 'varchar',
  5174. 'length' => '255',
  5175. 'not NULL' => '',
  5176. ),
  5177. 'pubplace' => array(
  5178. // 'description' => 'TODO: please describe this field!',
  5179. 'type' => 'varchar',
  5180. 'length' => '255',
  5181. 'not NULL' => '',
  5182. ),
  5183. ),
  5184. 'primary key' => array(
  5185. '0' => 'pub_id',
  5186. ),
  5187. 'unique keys' => array(
  5188. 'pub_c1' => array(
  5189. '0' => 'uniquename',
  5190. ),
  5191. ),
  5192. 'indexes' => array(
  5193. 'pub_idx1' => array(
  5194. '0' => 'type_id',
  5195. ),
  5196. ),
  5197. 'foreign keys' => array(
  5198. ),
  5199. );
  5200. return $description;
  5201. }
  5202. /**
  5203. * Implements hook_pub_dbxref_schema()
  5204. * Purpose: To describe the structure of pub_dbxref to tripal
  5205. * @see tripal_core_chado_insert()
  5206. * @see tripal_core_chado_update()
  5207. * @see tripal_core_chado_select()
  5208. *
  5209. * @return
  5210. * An array describing the current table
  5211. *
  5212. * @ingroup tripal_schema_api
  5213. *
  5214. */
  5215. function tripal_core_chado_pub_dbxref_schema() {
  5216. $description = array();
  5217. $description = array(
  5218. 'table' => 'pub_dbxref',
  5219. // 'description' => 'TODO: please describe this table!',
  5220. 'fields' => array(
  5221. 'pub_dbxref_id' => array(
  5222. // 'description' => 'TODO: please describe this field!',
  5223. 'type' => 'serial',
  5224. 'not NULL' => '1',
  5225. ),
  5226. 'pub_id' => array(
  5227. // 'description' => 'TODO: please describe this field!',
  5228. 'type' => 'int',
  5229. 'not NULL' => '1',
  5230. ),
  5231. 'dbxref_id' => array(
  5232. // 'description' => 'TODO: please describe this field!',
  5233. 'type' => 'int',
  5234. 'not NULL' => '1',
  5235. ),
  5236. 'is_current' => array(
  5237. // 'description' => 'TODO: please describe this field!',
  5238. 'type' => 'boolean',
  5239. 'not NULL' => '1',
  5240. 'default' => 'ru',
  5241. ),
  5242. ),
  5243. 'primary key' => array(
  5244. '0' => 'pub_dbxref_id',
  5245. ),
  5246. 'unique keys' => array(
  5247. 'pub_dbxref_c1' => array(
  5248. '0' => 'pub_id',
  5249. '1' => 'dbxref_id',
  5250. ),
  5251. ),
  5252. 'indexes' => array(
  5253. 'pub_dbxref_idx1' => array(
  5254. '0' => 'pub_id',
  5255. ),
  5256. 'pub_dbxref_idx2' => array(
  5257. '0' => 'dbxref_id',
  5258. ),
  5259. ),
  5260. 'foreign keys' => array(
  5261. ),
  5262. );
  5263. return $description;
  5264. }
  5265. /**
  5266. * Implements hook_quantification_schema()
  5267. * Purpose: To describe the structure of quantification to tripal
  5268. * @see tripal_core_chado_insert()
  5269. * @see tripal_core_chado_update()
  5270. * @see tripal_core_chado_select()
  5271. *
  5272. * @return
  5273. * An array describing the current table
  5274. *
  5275. * @ingroup tripal_schema_api
  5276. *
  5277. */
  5278. function tripal_core_chado_quantification_schema() {
  5279. $description = array();
  5280. $description = array(
  5281. 'table' => 'quantification',
  5282. // 'description' => 'TODO: please describe this table!',
  5283. 'fields' => array(
  5284. 'quantification_id' => array(
  5285. // 'description' => 'TODO: please describe this field!',
  5286. 'type' => 'serial',
  5287. 'not NULL' => '1',
  5288. ),
  5289. 'acquisition_id' => array(
  5290. // 'description' => 'TODO: please describe this field!',
  5291. 'type' => 'int',
  5292. 'not NULL' => '1',
  5293. ),
  5294. 'operator_id' => array(
  5295. // 'description' => 'TODO: please describe this field!',
  5296. 'type' => 'int',
  5297. 'not NULL' => '',
  5298. ),
  5299. 'protocol_id' => array(
  5300. // 'description' => 'TODO: please describe this field!',
  5301. 'type' => 'int',
  5302. 'not NULL' => '',
  5303. ),
  5304. 'analysis_id' => array(
  5305. // 'description' => 'TODO: please describe this field!',
  5306. 'type' => 'int',
  5307. 'not NULL' => '1',
  5308. ),
  5309. 'quantificationdate' => array(
  5310. // 'description' => 'TODO: please describe this field!',
  5311. 'type' => 'datetime',
  5312. 'not NULL' => '',
  5313. 'default' => 'ow(',
  5314. ),
  5315. 'name' => array(
  5316. // 'description' => 'TODO: please describe this field!',
  5317. 'type' => 'text',
  5318. 'not NULL' => '',
  5319. ),
  5320. 'uri' => array(
  5321. // 'description' => 'TODO: please describe this field!',
  5322. 'type' => 'text',
  5323. 'not NULL' => '',
  5324. ),
  5325. ),
  5326. 'primary key' => array(
  5327. '0' => 'quantification_id',
  5328. ),
  5329. 'unique keys' => array(
  5330. 'quantification_c1' => array(
  5331. '0' => 'name',
  5332. '1' => 'analysis_id',
  5333. ),
  5334. ),
  5335. 'indexes' => array(
  5336. 'quantification_idx1' => array(
  5337. '0' => 'acquisition_id',
  5338. ),
  5339. 'quantification_idx2' => array(
  5340. '0' => 'operator_id',
  5341. ),
  5342. 'quantification_idx3' => array(
  5343. '0' => 'protocol_id',
  5344. ),
  5345. 'quantification_idx4' => array(
  5346. '0' => 'analysis_id',
  5347. ),
  5348. ),
  5349. 'foreign keys' => array(
  5350. ),
  5351. );
  5352. return $description;
  5353. }
  5354. /**
  5355. * Implements hook_quantification_relationship_schema()
  5356. * Purpose: To describe the structure of quantification_relationship to tripal
  5357. * @see tripal_core_chado_insert()
  5358. * @see tripal_core_chado_update()
  5359. * @see tripal_core_chado_select()
  5360. *
  5361. * @return
  5362. * An array describing the current table
  5363. *
  5364. * @ingroup tripal_schema_api
  5365. *
  5366. */
  5367. function tripal_core_chado_quantification_relationship_schema() {
  5368. $description = array();
  5369. $description = array(
  5370. 'table' => 'quantification_relationship',
  5371. // 'description' => 'TODO: please describe this table!',
  5372. 'fields' => array(
  5373. 'quantification_relationship_id' => array(
  5374. // 'description' => 'TODO: please describe this field!',
  5375. 'type' => 'serial',
  5376. 'not NULL' => '1',
  5377. ),
  5378. 'subject_id' => array(
  5379. // 'description' => 'TODO: please describe this field!',
  5380. 'type' => 'int',
  5381. 'not NULL' => '1',
  5382. ),
  5383. 'type_id' => array(
  5384. // 'description' => 'TODO: please describe this field!',
  5385. 'type' => 'int',
  5386. 'not NULL' => '1',
  5387. ),
  5388. 'object_id' => array(
  5389. // 'description' => 'TODO: please describe this field!',
  5390. 'type' => 'int',
  5391. 'not NULL' => '1',
  5392. ),
  5393. ),
  5394. 'primary key' => array(
  5395. '0' => 'quantification_relationship_id',
  5396. ),
  5397. 'unique keys' => array(
  5398. 'quantification_relationship_c1' => array(
  5399. '0' => 'subject_id',
  5400. '1' => 'object_id',
  5401. '2' => 'type_id',
  5402. ),
  5403. ),
  5404. 'indexes' => array(
  5405. 'quantification_relationship_idx1' => array(
  5406. '0' => 'subject_id',
  5407. ),
  5408. 'quantification_relationship_idx2' => array(
  5409. '0' => 'type_id',
  5410. ),
  5411. 'quantification_relationship_idx3' => array(
  5412. '0' => 'object_id',
  5413. ),
  5414. ),
  5415. 'foreign keys' => array(
  5416. ),
  5417. );
  5418. return $description;
  5419. }
  5420. /**
  5421. * Implements hook_stock_pub_schema()
  5422. * Purpose: To describe the structure of stock_pub to tripal
  5423. * @see tripal_core_chado_insert()
  5424. * @see tripal_core_chado_update()
  5425. * @see tripal_core_chado_select()
  5426. *
  5427. * @return
  5428. * An array describing the current table
  5429. *
  5430. * @ingroup tripal_schema_api
  5431. *
  5432. */
  5433. function tripal_core_chado_stock_pub_schema() {
  5434. $description = array();
  5435. $description = array(
  5436. 'table' => 'stock_pub',
  5437. // 'description' => 'TODO: please describe this table!',
  5438. 'fields' => array(
  5439. 'stock_pub_id' => array(
  5440. // 'description' => 'TODO: please describe this field!',
  5441. 'type' => 'serial',
  5442. 'not NULL' => '1',
  5443. ),
  5444. 'stock_id' => array(
  5445. // 'description' => 'TODO: please describe this field!',
  5446. 'type' => 'int',
  5447. 'not NULL' => '1',
  5448. ),
  5449. 'pub_id' => array(
  5450. // 'description' => 'TODO: please describe this field!',
  5451. 'type' => 'int',
  5452. 'not NULL' => '1',
  5453. ),
  5454. ),
  5455. 'primary key' => array(
  5456. '0' => 'stock_pub_id',
  5457. ),
  5458. 'unique keys' => array(
  5459. 'stock_pub_c1' => array(
  5460. '0' => 'stock_id',
  5461. '1' => 'pub_id',
  5462. ),
  5463. ),
  5464. 'indexes' => array(
  5465. 'stock_pub_idx1' => array(
  5466. '0' => 'stock_id',
  5467. ),
  5468. 'stock_pub_idx2' => array(
  5469. '0' => 'pub_id',
  5470. ),
  5471. ),
  5472. 'foreign keys' => array(
  5473. ),
  5474. );
  5475. return $description;
  5476. }
  5477. /**
  5478. * Implements hook_stock_relationship_schema()
  5479. * Purpose: To describe the structure of stock_relationship to tripal
  5480. * @see tripal_core_chado_insert()
  5481. * @see tripal_core_chado_update()
  5482. * @see tripal_core_chado_select()
  5483. *
  5484. * @return
  5485. * An array describing the current table
  5486. *
  5487. * @ingroup tripal_schema_api
  5488. *
  5489. */
  5490. function tripal_core_chado_stock_relationship_schema() {
  5491. $description = array();
  5492. $description = array(
  5493. 'table' => 'stock_relationship',
  5494. // 'description' => 'TODO: please describe this table!',
  5495. 'fields' => array(
  5496. 'stock_relationship_id' => array(
  5497. // 'description' => 'TODO: please describe this field!',
  5498. 'type' => 'serial',
  5499. 'not NULL' => '1',
  5500. ),
  5501. 'subject_id' => array(
  5502. // 'description' => 'TODO: please describe this field!',
  5503. 'type' => 'int',
  5504. 'not NULL' => '1',
  5505. ),
  5506. 'object_id' => array(
  5507. // 'description' => 'TODO: please describe this field!',
  5508. 'type' => 'int',
  5509. 'not NULL' => '1',
  5510. ),
  5511. 'type_id' => array(
  5512. // 'description' => 'TODO: please describe this field!',
  5513. 'type' => 'int',
  5514. 'not NULL' => '1',
  5515. ),
  5516. 'value' => array(
  5517. // 'description' => 'TODO: please describe this field!',
  5518. 'type' => 'text',
  5519. 'not NULL' => '',
  5520. ),
  5521. 'rank' => array(
  5522. // 'description' => 'TODO: please describe this field!',
  5523. 'type' => 'int',
  5524. 'not NULL' => '1',
  5525. 'default' => '0',
  5526. ),
  5527. ),
  5528. 'primary key' => array(
  5529. '0' => 'stock_relationship_id',
  5530. ),
  5531. 'unique keys' => array(
  5532. 'stock_relationship_c1' => array(
  5533. '0' => 'subject_id',
  5534. '1' => 'object_id',
  5535. '2' => 'type_id',
  5536. '3' => 'rank',
  5537. ),
  5538. ),
  5539. 'indexes' => array(
  5540. 'stock_relationship_idx1' => array(
  5541. '0' => 'subject_id',
  5542. ),
  5543. 'stock_relationship_idx2' => array(
  5544. '0' => 'object_id',
  5545. ),
  5546. 'stock_relationship_idx3' => array(
  5547. '0' => 'type_id',
  5548. ),
  5549. ),
  5550. 'foreign keys' => array(
  5551. ),
  5552. );
  5553. return $description;
  5554. }
  5555. /**
  5556. * Implements hook_stock_relationship_pub_schema()
  5557. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5558. * @see tripal_core_chado_insert()
  5559. * @see tripal_core_chado_update()
  5560. * @see tripal_core_chado_select()
  5561. *
  5562. * @return
  5563. * An array describing the current table
  5564. *
  5565. * @ingroup tripal_schema_api
  5566. *
  5567. */
  5568. function tripal_core_chado_stock_relationship_pub_schema() {
  5569. $description = array();
  5570. $description = array(
  5571. 'table' => 'stock_relationship_pub',
  5572. // 'description' => 'TODO: please describe this table!',
  5573. 'fields' => array(
  5574. 'stock_relationship_pub_id' => array(
  5575. // 'description' => 'TODO: please describe this field!',
  5576. 'type' => 'serial',
  5577. 'not NULL' => '1',
  5578. ),
  5579. 'stock_relationship_id' => array(
  5580. // 'description' => 'TODO: please describe this field!',
  5581. 'type' => 'int',
  5582. 'not NULL' => '1',
  5583. ),
  5584. 'pub_id' => array(
  5585. // 'description' => 'TODO: please describe this field!',
  5586. 'type' => 'int',
  5587. 'not NULL' => '1',
  5588. ),
  5589. ),
  5590. 'primary key' => array(
  5591. '0' => 'stock_relationship_pub_id',
  5592. ),
  5593. 'unique keys' => array(
  5594. 'stock_relationship_pub_c1' => array(
  5595. '0' => 'stock_relationship_id',
  5596. '1' => 'pub_id',
  5597. ),
  5598. ),
  5599. 'indexes' => array(
  5600. 'stock_relationship_pub_idx1' => array(
  5601. '0' => 'stock_relationship_id',
  5602. ),
  5603. 'stock_relationship_pub_idx2' => array(
  5604. '0' => 'pub_id',
  5605. ),
  5606. ),
  5607. 'foreign keys' => array(
  5608. ),
  5609. );
  5610. return $description;
  5611. }
  5612. /**
  5613. * Implements hook_stockcollection_schema()
  5614. * Purpose: To describe the structure of stockcollection to tripal
  5615. * @see tripal_core_chado_insert()
  5616. * @see tripal_core_chado_update()
  5617. * @see tripal_core_chado_select()
  5618. *
  5619. * @return
  5620. * An array describing the current table
  5621. *
  5622. * @ingroup tripal_schema_api
  5623. *
  5624. */
  5625. function tripal_core_chado_stockcollection_schema() {
  5626. $description = array();
  5627. $description = array(
  5628. 'table' => 'stockcollection',
  5629. // 'description' => 'TODO: please describe this table!',
  5630. 'fields' => array(
  5631. 'stockcollection_id' => array(
  5632. // 'description' => 'TODO: please describe this field!',
  5633. 'type' => 'serial',
  5634. 'not NULL' => '1',
  5635. ),
  5636. 'type_id' => array(
  5637. // 'description' => 'TODO: please describe this field!',
  5638. 'type' => 'int',
  5639. 'not NULL' => '1',
  5640. ),
  5641. 'contact_id' => array(
  5642. // 'description' => 'TODO: please describe this field!',
  5643. 'type' => 'int',
  5644. 'not NULL' => '',
  5645. ),
  5646. 'name' => array(
  5647. // 'description' => 'TODO: please describe this field!',
  5648. 'type' => 'varchar',
  5649. 'length' => '255',
  5650. 'not NULL' => '',
  5651. ),
  5652. 'uniquename' => array(
  5653. // 'description' => 'TODO: please describe this field!',
  5654. 'type' => 'text',
  5655. 'not NULL' => '1',
  5656. ),
  5657. ),
  5658. 'primary key' => array(
  5659. '0' => 'stockcollection_id',
  5660. ),
  5661. 'unique keys' => array(
  5662. 'stockcollection_c1' => array(
  5663. '0' => 'uniquename',
  5664. '1' => 'type_id',
  5665. ),
  5666. ),
  5667. 'indexes' => array(
  5668. 'stockcollection_idx1' => array(
  5669. '0' => 'contact_id',
  5670. ),
  5671. 'stockcollection_idx2' => array(
  5672. '0' => 'type_id',
  5673. ),
  5674. 'stockcollection_idx3' => array(
  5675. '0' => 'uniquename',
  5676. ),
  5677. 'stockcollection_name_ind1' => array(
  5678. '0' => 'name',
  5679. ),
  5680. ),
  5681. 'foreign keys' => array(
  5682. ),
  5683. );
  5684. return $description;
  5685. }
  5686. /**
  5687. * Implements hook_stock_genotype_schema()
  5688. * Purpose: To describe the structure of stock_genotype to tripal
  5689. * @see tripal_core_chado_insert()
  5690. * @see tripal_core_chado_update()
  5691. * @see tripal_core_chado_select()
  5692. *
  5693. * @return
  5694. * An array describing the current table
  5695. *
  5696. * @ingroup tripal_schema_api
  5697. *
  5698. */
  5699. function tripal_core_chado_stock_genotype_schema() {
  5700. $description = array();
  5701. $description = array(
  5702. 'table' => 'stock_genotype',
  5703. // 'description' => 'TODO: please describe this table!',
  5704. 'fields' => array(
  5705. 'stock_genotype_id' => array(
  5706. // 'description' => 'TODO: please describe this field!',
  5707. 'type' => 'serial',
  5708. 'not NULL' => '1',
  5709. ),
  5710. 'stock_id' => array(
  5711. // 'description' => 'TODO: please describe this field!',
  5712. 'type' => 'int',
  5713. 'not NULL' => '1',
  5714. ),
  5715. 'genotype_id' => array(
  5716. // 'description' => 'TODO: please describe this field!',
  5717. 'type' => 'int',
  5718. 'not NULL' => '1',
  5719. ),
  5720. ),
  5721. 'primary key' => array(
  5722. '0' => 'stock_genotype_id',
  5723. ),
  5724. 'unique keys' => array(
  5725. 'stock_genotype_c1' => array(
  5726. '0' => 'stock_id',
  5727. '1' => 'genotype_id',
  5728. ),
  5729. ),
  5730. 'indexes' => array(
  5731. 'stock_genotype_idx1' => array(
  5732. '0' => 'stock_id',
  5733. ),
  5734. 'stock_genotype_idx2' => array(
  5735. '0' => 'genotype_id',
  5736. ),
  5737. ),
  5738. 'foreign keys' => array(
  5739. ),
  5740. );
  5741. return $description;
  5742. }
  5743. /**
  5744. * Implements hook_stock_dbxref_schema()
  5745. * Purpose: To describe the structure of stock_dbxref to tripal
  5746. * @see tripal_core_chado_insert()
  5747. * @see tripal_core_chado_update()
  5748. * @see tripal_core_chado_select()
  5749. *
  5750. * @return
  5751. * An array describing the current table
  5752. *
  5753. * @ingroup tripal_schema_api
  5754. *
  5755. */
  5756. function tripal_core_chado_stock_dbxref_schema() {
  5757. $description = array();
  5758. $description = array(
  5759. 'table' => 'stock_dbxref',
  5760. // 'description' => 'TODO: please describe this table!',
  5761. 'fields' => array(
  5762. 'stock_dbxref_id' => array(
  5763. // 'description' => 'TODO: please describe this field!',
  5764. 'type' => 'serial',
  5765. 'not NULL' => '1',
  5766. ),
  5767. 'stock_id' => array(
  5768. // 'description' => 'TODO: please describe this field!',
  5769. 'type' => 'int',
  5770. 'not NULL' => '1',
  5771. ),
  5772. 'dbxref_id' => array(
  5773. // 'description' => 'TODO: please describe this field!',
  5774. 'type' => 'int',
  5775. 'not NULL' => '1',
  5776. ),
  5777. 'is_current' => array(
  5778. // 'description' => 'TODO: please describe this field!',
  5779. 'type' => 'boolean',
  5780. 'not NULL' => '1',
  5781. 'default' => 'ru',
  5782. ),
  5783. ),
  5784. 'primary key' => array(
  5785. '0' => 'stock_dbxref_id',
  5786. ),
  5787. 'unique keys' => array(
  5788. 'stock_dbxref_c1' => array(
  5789. '0' => 'stock_id',
  5790. '1' => 'dbxref_id',
  5791. ),
  5792. ),
  5793. 'indexes' => array(
  5794. 'stock_dbxref_idx1' => array(
  5795. '0' => 'stock_id',
  5796. ),
  5797. 'stock_dbxref_idx2' => array(
  5798. '0' => 'dbxref_id',
  5799. ),
  5800. ),
  5801. 'foreign keys' => array(
  5802. ),
  5803. );
  5804. return $description;
  5805. }
  5806. /**
  5807. * Implements hook_quantificationprop_schema()
  5808. * Purpose: To describe the structure of quantificationprop to tripal
  5809. * @see tripal_core_chado_insert()
  5810. * @see tripal_core_chado_update()
  5811. * @see tripal_core_chado_select()
  5812. *
  5813. * @return
  5814. * An array describing the current table
  5815. *
  5816. * @ingroup tripal_schema_api
  5817. *
  5818. */
  5819. function tripal_core_chado_quantificationprop_schema() {
  5820. $description = array();
  5821. $description = array(
  5822. 'table' => 'quantificationprop',
  5823. // 'description' => 'TODO: please describe this table!',
  5824. 'fields' => array(
  5825. 'quantificationprop_id' => array(
  5826. // 'description' => 'TODO: please describe this field!',
  5827. 'type' => 'serial',
  5828. 'not NULL' => '1',
  5829. ),
  5830. 'quantification_id' => array(
  5831. // 'description' => 'TODO: please describe this field!',
  5832. 'type' => 'int',
  5833. 'not NULL' => '1',
  5834. ),
  5835. 'type_id' => array(
  5836. // 'description' => 'TODO: please describe this field!',
  5837. 'type' => 'int',
  5838. 'not NULL' => '1',
  5839. ),
  5840. 'value' => array(
  5841. // 'description' => 'TODO: please describe this field!',
  5842. 'type' => 'text',
  5843. 'not NULL' => '',
  5844. ),
  5845. 'rank' => array(
  5846. // 'description' => 'TODO: please describe this field!',
  5847. 'type' => 'int',
  5848. 'not NULL' => '1',
  5849. 'default' => '0',
  5850. ),
  5851. ),
  5852. 'primary key' => array(
  5853. '0' => 'quantificationprop_id',
  5854. ),
  5855. 'unique keys' => array(
  5856. 'quantificationprop_c1' => array(
  5857. '0' => 'quantification_id',
  5858. '1' => 'type_id',
  5859. '2' => 'rank',
  5860. ),
  5861. ),
  5862. 'indexes' => array(
  5863. 'quantificationprop_idx1' => array(
  5864. '0' => 'quantification_id',
  5865. ),
  5866. 'quantificationprop_idx2' => array(
  5867. '0' => 'type_id',
  5868. ),
  5869. ),
  5870. 'foreign keys' => array(
  5871. ),
  5872. );
  5873. return $description;
  5874. }
  5875. /**
  5876. * Implements hook_stats_paths_to_root_schema()
  5877. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5878. * @see tripal_core_chado_insert()
  5879. * @see tripal_core_chado_update()
  5880. * @see tripal_core_chado_select()
  5881. *
  5882. * @return
  5883. * An array describing the current table
  5884. *
  5885. * @ingroup tripal_schema_api
  5886. *
  5887. */
  5888. function tripal_core_chado_stats_paths_to_root_schema() {
  5889. $description = array();
  5890. $description = array(
  5891. 'table' => 'stats_paths_to_root',
  5892. // 'description' => 'TODO: please describe this table!',
  5893. 'fields' => array(
  5894. 'cvterm_id' => array(
  5895. // 'description' => 'TODO: please describe this field!',
  5896. 'type' => 'int',
  5897. 'not NULL' => '',
  5898. ),
  5899. 'total_paths' => array(
  5900. // 'description' => 'TODO: please describe this field!',
  5901. 'type' => 'int',
  5902. 'size' => 'big',
  5903. 'not NULL' => '',
  5904. ),
  5905. 'avg_distance' => array(
  5906. // 'description' => 'TODO: please describe this field!',
  5907. 'type' => 'numeric',
  5908. 'not NULL' => '',
  5909. 'precision' => '0',
  5910. 'scale' => '0',
  5911. ),
  5912. 'min_distance' => array(
  5913. // 'description' => 'TODO: please describe this field!',
  5914. 'type' => 'int',
  5915. 'not NULL' => '',
  5916. ),
  5917. 'max_distance' => array(
  5918. // 'description' => 'TODO: please describe this field!',
  5919. 'type' => 'int',
  5920. 'not NULL' => '',
  5921. ),
  5922. ),
  5923. 'primary key' => array(
  5924. ),
  5925. 'unique keys' => array(
  5926. ),
  5927. 'indexes' => array(
  5928. ),
  5929. 'foreign keys' => array(
  5930. ),
  5931. );
  5932. return $description;
  5933. }
  5934. /**
  5935. * Implements hook_stock_schema()
  5936. * Purpose: To describe the structure of stock to tripal
  5937. * @see tripal_core_chado_insert()
  5938. * @see tripal_core_chado_update()
  5939. * @see tripal_core_chado_select()
  5940. *
  5941. * @return
  5942. * An array describing the current table
  5943. *
  5944. * @ingroup tripal_schema_api
  5945. *
  5946. */
  5947. function tripal_core_chado_stock_schema() {
  5948. $description = array();
  5949. $description = array(
  5950. 'table' => 'stock',
  5951. // 'description' => 'TODO: please describe this table!',
  5952. 'fields' => array(
  5953. 'stock_id' => array(
  5954. // 'description' => 'TODO: please describe this field!',
  5955. 'type' => 'serial',
  5956. 'not NULL' => '1',
  5957. ),
  5958. 'dbxref_id' => array(
  5959. // 'description' => 'TODO: please describe this field!',
  5960. 'type' => 'int',
  5961. 'not NULL' => '',
  5962. ),
  5963. 'organism_id' => array(
  5964. // 'description' => 'TODO: please describe this field!',
  5965. 'type' => 'int',
  5966. 'not NULL' => '1',
  5967. ),
  5968. 'name' => array(
  5969. // 'description' => 'TODO: please describe this field!',
  5970. 'type' => 'varchar',
  5971. 'length' => '255',
  5972. 'not NULL' => '',
  5973. ),
  5974. 'uniquename' => array(
  5975. // 'description' => 'TODO: please describe this field!',
  5976. 'type' => 'text',
  5977. 'not NULL' => '1',
  5978. ),
  5979. 'description' => array(
  5980. // 'description' => 'TODO: please describe this field!',
  5981. 'type' => 'text',
  5982. 'not NULL' => '',
  5983. ),
  5984. 'type_id' => array(
  5985. // 'description' => 'TODO: please describe this field!',
  5986. 'type' => 'int',
  5987. 'not NULL' => '1',
  5988. ),
  5989. 'is_obsolete' => array(
  5990. // 'description' => 'TODO: please describe this field!',
  5991. 'type' => 'boolean',
  5992. 'not NULL' => '1',
  5993. 'default' => 'als',
  5994. ),
  5995. ),
  5996. 'primary key' => array(
  5997. '0' => 'stock_id',
  5998. ),
  5999. 'unique keys' => array(
  6000. 'stock_c1' => array(
  6001. '0' => 'organism_id',
  6002. '1' => 'uniquename',
  6003. '2' => 'type_id',
  6004. ),
  6005. ),
  6006. 'indexes' => array(
  6007. 'stock_idx1' => array(
  6008. '0' => 'dbxref_id',
  6009. ),
  6010. 'stock_idx2' => array(
  6011. '0' => 'organism_id',
  6012. ),
  6013. 'stock_idx3' => array(
  6014. '0' => 'type_id',
  6015. ),
  6016. 'stock_idx4' => array(
  6017. '0' => 'uniquename',
  6018. ),
  6019. 'stock_name_ind1' => array(
  6020. '0' => 'name',
  6021. ),
  6022. ),
  6023. 'foreign keys' => array(
  6024. ),
  6025. );
  6026. return $description;
  6027. }
  6028. /**
  6029. * Implements hook_stock_cvterm_schema()
  6030. * Purpose: To describe the structure of stock_cvterm to tripal
  6031. * @see tripal_core_chado_insert()
  6032. * @see tripal_core_chado_update()
  6033. * @see tripal_core_chado_select()
  6034. *
  6035. * @return
  6036. * An array describing the current table
  6037. *
  6038. * @ingroup tripal_schema_api
  6039. *
  6040. */
  6041. function tripal_core_chado_stock_cvterm_schema() {
  6042. $description = array();
  6043. $description = array(
  6044. 'table' => 'stock_cvterm',
  6045. // 'description' => 'TODO: please describe this table!',
  6046. 'fields' => array(
  6047. 'stock_cvterm_id' => array(
  6048. // 'description' => 'TODO: please describe this field!',
  6049. 'type' => 'serial',
  6050. 'not NULL' => '1',
  6051. ),
  6052. 'stock_id' => array(
  6053. // 'description' => 'TODO: please describe this field!',
  6054. 'type' => 'int',
  6055. 'not NULL' => '1',
  6056. ),
  6057. 'cvterm_id' => array(
  6058. // 'description' => 'TODO: please describe this field!',
  6059. 'type' => 'int',
  6060. 'not NULL' => '1',
  6061. ),
  6062. 'pub_id' => array(
  6063. // 'description' => 'TODO: please describe this field!',
  6064. 'type' => 'int',
  6065. 'not NULL' => '1',
  6066. ),
  6067. ),
  6068. 'primary key' => array(
  6069. '0' => 'stock_cvterm_id',
  6070. ),
  6071. 'unique keys' => array(
  6072. 'stock_cvterm_c1' => array(
  6073. '0' => 'stock_id',
  6074. '1' => 'cvterm_id',
  6075. '2' => 'pub_id',
  6076. ),
  6077. ),
  6078. 'indexes' => array(
  6079. 'stock_cvterm_idx1' => array(
  6080. '0' => 'stock_id',
  6081. ),
  6082. 'stock_cvterm_idx2' => array(
  6083. '0' => 'cvterm_id',
  6084. ),
  6085. 'stock_cvterm_idx3' => array(
  6086. '0' => 'pub_id',
  6087. ),
  6088. ),
  6089. 'foreign keys' => array(
  6090. ),
  6091. );
  6092. return $description;
  6093. }
  6094. /**
  6095. * Implements hook_feature_synonym_schema()
  6096. * Purpose: To describe the structure of feature_synonym to tripal
  6097. * @see tripal_core_chado_insert()
  6098. * @see tripal_core_chado_update()
  6099. * @see tripal_core_chado_select()
  6100. *
  6101. * @return
  6102. * An array describing the current table
  6103. *
  6104. * @ingroup tripal_schema_api
  6105. *
  6106. */
  6107. function tripal_core_chado_feature_synonym_schema() {
  6108. $description = array();
  6109. $description = array(
  6110. 'table' => 'feature_synonym',
  6111. // 'description' => 'TODO: please describe this table!',
  6112. 'fields' => array(
  6113. 'feature_synonym_id' => array(
  6114. // 'description' => 'TODO: please describe this field!',
  6115. 'type' => 'serial',
  6116. 'not NULL' => '1',
  6117. ),
  6118. 'synonym_id' => array(
  6119. // 'description' => 'TODO: please describe this field!',
  6120. 'type' => 'int',
  6121. 'not NULL' => '1',
  6122. ),
  6123. 'feature_id' => array(
  6124. // 'description' => 'TODO: please describe this field!',
  6125. 'type' => 'int',
  6126. 'not NULL' => '1',
  6127. ),
  6128. 'pub_id' => array(
  6129. // 'description' => 'TODO: please describe this field!',
  6130. 'type' => 'int',
  6131. 'not NULL' => '1',
  6132. ),
  6133. 'is_current' => array(
  6134. // 'description' => 'TODO: please describe this field!',
  6135. 'type' => 'boolean',
  6136. 'not NULL' => '1',
  6137. 'default' => 'als',
  6138. ),
  6139. 'is_internal' => array(
  6140. // 'description' => 'TODO: please describe this field!',
  6141. 'type' => 'boolean',
  6142. 'not NULL' => '1',
  6143. 'default' => 'als',
  6144. ),
  6145. ),
  6146. 'primary key' => array(
  6147. '0' => 'feature_synonym_id',
  6148. ),
  6149. 'unique keys' => array(
  6150. 'feature_synonym_c1' => array(
  6151. '0' => 'synonym_id',
  6152. '1' => 'feature_id',
  6153. '2' => 'pub_id',
  6154. ),
  6155. ),
  6156. 'indexes' => array(
  6157. 'feature_synonym_idx1' => array(
  6158. '0' => 'synonym_id',
  6159. ),
  6160. 'feature_synonym_idx2' => array(
  6161. '0' => 'feature_id',
  6162. ),
  6163. 'feature_synonym_idx3' => array(
  6164. '0' => 'pub_id',
  6165. ),
  6166. ),
  6167. 'foreign keys' => array(
  6168. ),
  6169. );
  6170. return $description;
  6171. }
  6172. /**
  6173. * Implements hook_feature_relationshipprop_pub_schema()
  6174. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6175. * @see tripal_core_chado_insert()
  6176. * @see tripal_core_chado_update()
  6177. * @see tripal_core_chado_select()
  6178. *
  6179. * @return
  6180. * An array describing the current table
  6181. *
  6182. * @ingroup tripal_schema_api
  6183. *
  6184. */
  6185. function tripal_core_chado_feature_relationshipprop_pub_schema() {
  6186. $description = array();
  6187. $description = array(
  6188. 'table' => 'feature_relationshipprop_pub',
  6189. // 'description' => 'TODO: please describe this table!',
  6190. 'fields' => array(
  6191. 'feature_relationshipprop_pub_id' => array(
  6192. // 'description' => 'TODO: please describe this field!',
  6193. 'type' => 'serial',
  6194. 'not NULL' => '1',
  6195. ),
  6196. 'feature_relationshipprop_id' => array(
  6197. // 'description' => 'TODO: please describe this field!',
  6198. 'type' => 'int',
  6199. 'not NULL' => '1',
  6200. ),
  6201. 'pub_id' => array(
  6202. // 'description' => 'TODO: please describe this field!',
  6203. 'type' => 'int',
  6204. 'not NULL' => '1',
  6205. ),
  6206. ),
  6207. 'primary key' => array(
  6208. '0' => 'feature_relationshipprop_pub_id',
  6209. ),
  6210. 'unique keys' => array(
  6211. 'feature_relationshipprop_pub_c1' => array(
  6212. '0' => 'feature_relationshipprop_id',
  6213. '1' => 'pub_id',
  6214. ),
  6215. ),
  6216. 'indexes' => array(
  6217. 'feature_relationshipprop_pub_idx1' => array(
  6218. '0' => 'feature_relationshipprop_id',
  6219. ),
  6220. 'feature_relationshipprop_pub_idx2' => array(
  6221. '0' => 'pub_id',
  6222. ),
  6223. ),
  6224. 'foreign keys' => array(
  6225. ),
  6226. );
  6227. return $description;
  6228. }
  6229. /**
  6230. * Implements hook_cell_line_relationship_schema()
  6231. * Purpose: To describe the structure of cell_line_relationship to tripal
  6232. * @see tripal_core_chado_insert()
  6233. * @see tripal_core_chado_update()
  6234. * @see tripal_core_chado_select()
  6235. *
  6236. * @return
  6237. * An array describing the current table
  6238. *
  6239. * @ingroup tripal_schema_api
  6240. *
  6241. */
  6242. function tripal_core_chado_cell_line_relationship_schema() {
  6243. $description = array();
  6244. $description = array(
  6245. 'table' => 'cell_line_relationship',
  6246. // 'description' => 'TODO: please describe this table!',
  6247. 'fields' => array(
  6248. 'cell_line_relationship_id' => array(
  6249. // 'description' => 'TODO: please describe this field!',
  6250. 'type' => 'serial',
  6251. 'not NULL' => '1',
  6252. ),
  6253. 'subject_id' => array(
  6254. // 'description' => 'TODO: please describe this field!',
  6255. 'type' => 'int',
  6256. 'not NULL' => '1',
  6257. ),
  6258. 'object_id' => array(
  6259. // 'description' => 'TODO: please describe this field!',
  6260. 'type' => 'int',
  6261. 'not NULL' => '1',
  6262. ),
  6263. 'type_id' => array(
  6264. // 'description' => 'TODO: please describe this field!',
  6265. 'type' => 'int',
  6266. 'not NULL' => '1',
  6267. ),
  6268. ),
  6269. 'primary key' => array(
  6270. '0' => 'cell_line_relationship_id',
  6271. ),
  6272. 'unique keys' => array(
  6273. 'cell_line_relationship_c1' => array(
  6274. '0' => 'subject_id',
  6275. '1' => 'object_id',
  6276. '2' => 'type_id',
  6277. ),
  6278. ),
  6279. 'indexes' => array(
  6280. ),
  6281. 'foreign keys' => array(
  6282. ),
  6283. );
  6284. return $description;
  6285. }
  6286. /**
  6287. * Implements hook_cell_line_pub_schema()
  6288. * Purpose: To describe the structure of cell_line_pub to tripal
  6289. * @see tripal_core_chado_insert()
  6290. * @see tripal_core_chado_update()
  6291. * @see tripal_core_chado_select()
  6292. *
  6293. * @return
  6294. * An array describing the current table
  6295. *
  6296. * @ingroup tripal_schema_api
  6297. *
  6298. */
  6299. function tripal_core_chado_cell_line_pub_schema() {
  6300. $description = array();
  6301. $description = array(
  6302. 'table' => 'cell_line_pub',
  6303. // 'description' => 'TODO: please describe this table!',
  6304. 'fields' => array(
  6305. 'cell_line_pub_id' => array(
  6306. // 'description' => 'TODO: please describe this field!',
  6307. 'type' => 'serial',
  6308. 'not NULL' => '1',
  6309. ),
  6310. 'cell_line_id' => array(
  6311. // 'description' => 'TODO: please describe this field!',
  6312. 'type' => 'int',
  6313. 'not NULL' => '1',
  6314. ),
  6315. 'pub_id' => array(
  6316. // 'description' => 'TODO: please describe this field!',
  6317. 'type' => 'int',
  6318. 'not NULL' => '1',
  6319. ),
  6320. ),
  6321. 'primary key' => array(
  6322. '0' => 'cell_line_pub_id',
  6323. ),
  6324. 'unique keys' => array(
  6325. 'cell_line_pub_c1' => array(
  6326. '0' => 'cell_line_id',
  6327. '1' => 'pub_id',
  6328. ),
  6329. ),
  6330. 'indexes' => array(
  6331. ),
  6332. 'foreign keys' => array(
  6333. ),
  6334. );
  6335. return $description;
  6336. }
  6337. /**
  6338. * Implements hook_cell_line_synonym_schema()
  6339. * Purpose: To describe the structure of cell_line_synonym to tripal
  6340. * @see tripal_core_chado_insert()
  6341. * @see tripal_core_chado_update()
  6342. * @see tripal_core_chado_select()
  6343. *
  6344. * @return
  6345. * An array describing the current table
  6346. *
  6347. * @ingroup tripal_schema_api
  6348. *
  6349. */
  6350. function tripal_core_chado_cell_line_synonym_schema() {
  6351. $description = array();
  6352. $description = array(
  6353. 'table' => 'cell_line_synonym',
  6354. // 'description' => 'TODO: please describe this table!',
  6355. 'fields' => array(
  6356. 'cell_line_synonym_id' => array(
  6357. // 'description' => 'TODO: please describe this field!',
  6358. 'type' => 'serial',
  6359. 'not NULL' => '1',
  6360. ),
  6361. 'cell_line_id' => array(
  6362. // 'description' => 'TODO: please describe this field!',
  6363. 'type' => 'int',
  6364. 'not NULL' => '1',
  6365. ),
  6366. 'synonym_id' => array(
  6367. // 'description' => 'TODO: please describe this field!',
  6368. 'type' => 'int',
  6369. 'not NULL' => '1',
  6370. ),
  6371. 'pub_id' => array(
  6372. // 'description' => 'TODO: please describe this field!',
  6373. 'type' => 'int',
  6374. 'not NULL' => '1',
  6375. ),
  6376. 'is_current' => array(
  6377. // 'description' => 'TODO: please describe this field!',
  6378. 'type' => 'boolean',
  6379. 'not NULL' => '1',
  6380. 'default' => 'als',
  6381. ),
  6382. 'is_internal' => array(
  6383. // 'description' => 'TODO: please describe this field!',
  6384. 'type' => 'boolean',
  6385. 'not NULL' => '1',
  6386. 'default' => 'als',
  6387. ),
  6388. ),
  6389. 'primary key' => array(
  6390. '0' => 'cell_line_synonym_id',
  6391. ),
  6392. 'unique keys' => array(
  6393. 'cell_line_synonym_c1' => array(
  6394. '0' => 'synonym_id',
  6395. '1' => 'cell_line_id',
  6396. '2' => 'pub_id',
  6397. ),
  6398. ),
  6399. 'indexes' => array(
  6400. ),
  6401. 'foreign keys' => array(
  6402. ),
  6403. );
  6404. return $description;
  6405. }
  6406. /**
  6407. * Implements hook_cell_lineprop_schema()
  6408. * Purpose: To describe the structure of cell_lineprop to tripal
  6409. * @see tripal_core_chado_insert()
  6410. * @see tripal_core_chado_update()
  6411. * @see tripal_core_chado_select()
  6412. *
  6413. * @return
  6414. * An array describing the current table
  6415. *
  6416. * @ingroup tripal_schema_api
  6417. *
  6418. */
  6419. function tripal_core_chado_cell_lineprop_schema() {
  6420. $description = array();
  6421. $description = array(
  6422. 'table' => 'cell_lineprop',
  6423. // 'description' => 'TODO: please describe this table!',
  6424. 'fields' => array(
  6425. 'cell_lineprop_id' => array(
  6426. // 'description' => 'TODO: please describe this field!',
  6427. 'type' => 'serial',
  6428. 'not NULL' => '1',
  6429. ),
  6430. 'cell_line_id' => array(
  6431. // 'description' => 'TODO: please describe this field!',
  6432. 'type' => 'int',
  6433. 'not NULL' => '1',
  6434. ),
  6435. 'type_id' => array(
  6436. // 'description' => 'TODO: please describe this field!',
  6437. 'type' => 'int',
  6438. 'not NULL' => '1',
  6439. ),
  6440. 'value' => array(
  6441. // 'description' => 'TODO: please describe this field!',
  6442. 'type' => 'text',
  6443. 'not NULL' => '',
  6444. ),
  6445. 'rank' => array(
  6446. // 'description' => 'TODO: please describe this field!',
  6447. 'type' => 'int',
  6448. 'not NULL' => '1',
  6449. 'default' => '0',
  6450. ),
  6451. ),
  6452. 'primary key' => array(
  6453. '0' => 'cell_lineprop_id',
  6454. ),
  6455. 'unique keys' => array(
  6456. 'cell_lineprop_c1' => array(
  6457. '0' => 'cell_line_id',
  6458. '1' => 'type_id',
  6459. '2' => 'rank',
  6460. ),
  6461. ),
  6462. 'indexes' => array(
  6463. ),
  6464. 'foreign keys' => array(
  6465. ),
  6466. );
  6467. return $description;
  6468. }
  6469. /**
  6470. * Implements hook_cell_lineprop_pub_schema()
  6471. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6472. * @see tripal_core_chado_insert()
  6473. * @see tripal_core_chado_update()
  6474. * @see tripal_core_chado_select()
  6475. *
  6476. * @return
  6477. * An array describing the current table
  6478. *
  6479. * @ingroup tripal_schema_api
  6480. *
  6481. */
  6482. function tripal_core_chado_cell_lineprop_pub_schema() {
  6483. $description = array();
  6484. $description = array(
  6485. 'table' => 'cell_lineprop_pub',
  6486. // 'description' => 'TODO: please describe this table!',
  6487. 'fields' => array(
  6488. 'cell_lineprop_pub_id' => array(
  6489. // 'description' => 'TODO: please describe this field!',
  6490. 'type' => 'serial',
  6491. 'not NULL' => '1',
  6492. ),
  6493. 'cell_lineprop_id' => array(
  6494. // 'description' => 'TODO: please describe this field!',
  6495. 'type' => 'int',
  6496. 'not NULL' => '1',
  6497. ),
  6498. 'pub_id' => array(
  6499. // 'description' => 'TODO: please describe this field!',
  6500. 'type' => 'int',
  6501. 'not NULL' => '1',
  6502. ),
  6503. ),
  6504. 'primary key' => array(
  6505. '0' => 'cell_lineprop_pub_id',
  6506. ),
  6507. 'unique keys' => array(
  6508. 'cell_lineprop_pub_c1' => array(
  6509. '0' => 'cell_lineprop_id',
  6510. '1' => 'pub_id',
  6511. ),
  6512. ),
  6513. 'indexes' => array(
  6514. ),
  6515. 'foreign keys' => array(
  6516. ),
  6517. );
  6518. return $description;
  6519. }
  6520. /**
  6521. * Implements hook_cell_line_library_schema()
  6522. * Purpose: To describe the structure of cell_line_library to tripal
  6523. * @see tripal_core_chado_insert()
  6524. * @see tripal_core_chado_update()
  6525. * @see tripal_core_chado_select()
  6526. *
  6527. * @return
  6528. * An array describing the current table
  6529. *
  6530. * @ingroup tripal_schema_api
  6531. *
  6532. */
  6533. function tripal_core_chado_cell_line_library_schema() {
  6534. $description = array();
  6535. $description = array(
  6536. 'table' => 'cell_line_library',
  6537. // 'description' => 'TODO: please describe this table!',
  6538. 'fields' => array(
  6539. 'cell_line_library_id' => array(
  6540. // 'description' => 'TODO: please describe this field!',
  6541. 'type' => 'serial',
  6542. 'not NULL' => '1',
  6543. ),
  6544. 'cell_line_id' => array(
  6545. // 'description' => 'TODO: please describe this field!',
  6546. 'type' => 'int',
  6547. 'not NULL' => '1',
  6548. ),
  6549. 'library_id' => array(
  6550. // 'description' => 'TODO: please describe this field!',
  6551. 'type' => 'int',
  6552. 'not NULL' => '1',
  6553. ),
  6554. 'pub_id' => array(
  6555. // 'description' => 'TODO: please describe this field!',
  6556. 'type' => 'int',
  6557. 'not NULL' => '1',
  6558. ),
  6559. ),
  6560. 'primary key' => array(
  6561. '0' => 'cell_line_library_id',
  6562. ),
  6563. 'unique keys' => array(
  6564. 'cell_line_library_c1' => array(
  6565. '0' => 'cell_line_id',
  6566. '1' => 'library_id',
  6567. '2' => 'pub_id',
  6568. ),
  6569. ),
  6570. 'indexes' => array(
  6571. ),
  6572. 'foreign keys' => array(
  6573. ),
  6574. );
  6575. return $description;
  6576. }
  6577. /**
  6578. * Implements hook_cell_line_feature_schema()
  6579. * Purpose: To describe the structure of cell_line_feature to tripal
  6580. * @see tripal_core_chado_insert()
  6581. * @see tripal_core_chado_update()
  6582. * @see tripal_core_chado_select()
  6583. *
  6584. * @return
  6585. * An array describing the current table
  6586. *
  6587. * @ingroup tripal_schema_api
  6588. *
  6589. */
  6590. function tripal_core_chado_cell_line_feature_schema() {
  6591. $description = array();
  6592. $description = array(
  6593. 'table' => 'cell_line_feature',
  6594. // 'description' => 'TODO: please describe this table!',
  6595. 'fields' => array(
  6596. 'cell_line_feature_id' => array(
  6597. // 'description' => 'TODO: please describe this field!',
  6598. 'type' => 'serial',
  6599. 'not NULL' => '1',
  6600. ),
  6601. 'cell_line_id' => array(
  6602. // 'description' => 'TODO: please describe this field!',
  6603. 'type' => 'int',
  6604. 'not NULL' => '1',
  6605. ),
  6606. 'feature_id' => array(
  6607. // 'description' => 'TODO: please describe this field!',
  6608. 'type' => 'int',
  6609. 'not NULL' => '1',
  6610. ),
  6611. 'pub_id' => array(
  6612. // 'description' => 'TODO: please describe this field!',
  6613. 'type' => 'int',
  6614. 'not NULL' => '1',
  6615. ),
  6616. ),
  6617. 'primary key' => array(
  6618. '0' => 'cell_line_feature_id',
  6619. ),
  6620. 'unique keys' => array(
  6621. 'cell_line_feature_c1' => array(
  6622. '0' => 'cell_line_id',
  6623. '1' => 'feature_id',
  6624. '2' => 'pub_id',
  6625. ),
  6626. ),
  6627. 'indexes' => array(
  6628. ),
  6629. 'foreign keys' => array(
  6630. ),
  6631. );
  6632. return $description;
  6633. }
  6634. /**
  6635. * Implements hook_cell_line_schema()
  6636. * Purpose: To describe the structure of cell_line to tripal
  6637. * @see tripal_core_chado_insert()
  6638. * @see tripal_core_chado_update()
  6639. * @see tripal_core_chado_select()
  6640. *
  6641. * @return
  6642. * An array describing the current table
  6643. *
  6644. * @ingroup tripal_schema_api
  6645. *
  6646. */
  6647. function tripal_core_chado_cell_line_schema() {
  6648. $description = array();
  6649. $description = array(
  6650. 'table' => 'cell_line',
  6651. // 'description' => 'TODO: please describe this table!',
  6652. 'fields' => array(
  6653. 'cell_line_id' => array(
  6654. // 'description' => 'TODO: please describe this field!',
  6655. 'type' => 'serial',
  6656. 'not NULL' => '1',
  6657. ),
  6658. 'name' => array(
  6659. // 'description' => 'TODO: please describe this field!',
  6660. 'type' => 'varchar',
  6661. 'length' => '255',
  6662. 'not NULL' => '',
  6663. ),
  6664. 'uniquename' => array(
  6665. // 'description' => 'TODO: please describe this field!',
  6666. 'type' => 'varchar',
  6667. 'length' => '255',
  6668. 'not NULL' => '1',
  6669. ),
  6670. 'organism_id' => array(
  6671. // 'description' => 'TODO: please describe this field!',
  6672. 'type' => 'int',
  6673. 'not NULL' => '1',
  6674. ),
  6675. 'timeaccessioned' => array(
  6676. // 'description' => 'TODO: please describe this field!',
  6677. 'type' => 'datetime',
  6678. 'not NULL' => '1',
  6679. 'default' => 'ow(',
  6680. ),
  6681. 'timelastmodified' => array(
  6682. // 'description' => 'TODO: please describe this field!',
  6683. 'type' => 'datetime',
  6684. 'not NULL' => '1',
  6685. 'default' => 'ow(',
  6686. ),
  6687. ),
  6688. 'primary key' => array(
  6689. '0' => 'cell_line_id',
  6690. ),
  6691. 'unique keys' => array(
  6692. 'cell_line_c1' => array(
  6693. '0' => 'uniquename',
  6694. '1' => 'organism_id',
  6695. ),
  6696. ),
  6697. 'indexes' => array(
  6698. ),
  6699. 'foreign keys' => array(
  6700. ),
  6701. );
  6702. return $description;
  6703. }
  6704. /**
  6705. * Implements hook_cell_line_cvterm_schema()
  6706. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6707. * @see tripal_core_chado_insert()
  6708. * @see tripal_core_chado_update()
  6709. * @see tripal_core_chado_select()
  6710. *
  6711. * @return
  6712. * An array describing the current table
  6713. *
  6714. * @ingroup tripal_schema_api
  6715. *
  6716. */
  6717. function tripal_core_chado_cell_line_cvterm_schema() {
  6718. $description = array();
  6719. $description = array(
  6720. 'table' => 'cell_line_cvterm',
  6721. // 'description' => 'TODO: please describe this table!',
  6722. 'fields' => array(
  6723. 'cell_line_cvterm_id' => array(
  6724. // 'description' => 'TODO: please describe this field!',
  6725. 'type' => 'serial',
  6726. 'not NULL' => '1',
  6727. ),
  6728. 'cell_line_id' => array(
  6729. // 'description' => 'TODO: please describe this field!',
  6730. 'type' => 'int',
  6731. 'not NULL' => '1',
  6732. ),
  6733. 'cvterm_id' => array(
  6734. // 'description' => 'TODO: please describe this field!',
  6735. 'type' => 'int',
  6736. 'not NULL' => '1',
  6737. ),
  6738. 'pub_id' => array(
  6739. // 'description' => 'TODO: please describe this field!',
  6740. 'type' => 'int',
  6741. 'not NULL' => '1',
  6742. ),
  6743. 'rank' => array(
  6744. // 'description' => 'TODO: please describe this field!',
  6745. 'type' => 'int',
  6746. 'not NULL' => '1',
  6747. 'default' => '0',
  6748. ),
  6749. ),
  6750. 'primary key' => array(
  6751. '0' => 'cell_line_cvterm_id',
  6752. ),
  6753. 'unique keys' => array(
  6754. 'cell_line_cvterm_c1' => array(
  6755. '0' => 'cell_line_id',
  6756. '1' => 'cvterm_id',
  6757. '2' => 'pub_id',
  6758. '3' => 'rank',
  6759. ),
  6760. ),
  6761. 'indexes' => array(
  6762. ),
  6763. 'foreign keys' => array(
  6764. ),
  6765. );
  6766. return $description;
  6767. }
  6768. /**
  6769. * Implements hook_cell_line_cvtermprop_schema()
  6770. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6771. * @see tripal_core_chado_insert()
  6772. * @see tripal_core_chado_update()
  6773. * @see tripal_core_chado_select()
  6774. *
  6775. * @return
  6776. * An array describing the current table
  6777. *
  6778. * @ingroup tripal_schema_api
  6779. *
  6780. */
  6781. function tripal_core_chado_cell_line_cvtermprop_schema() {
  6782. $description = array();
  6783. $description = array(
  6784. 'table' => 'cell_line_cvtermprop',
  6785. // 'description' => 'TODO: please describe this table!',
  6786. 'fields' => array(
  6787. 'cell_line_cvtermprop_id' => array(
  6788. // 'description' => 'TODO: please describe this field!',
  6789. 'type' => 'serial',
  6790. 'not NULL' => '1',
  6791. ),
  6792. 'cell_line_cvterm_id' => array(
  6793. // 'description' => 'TODO: please describe this field!',
  6794. 'type' => 'int',
  6795. 'not NULL' => '1',
  6796. ),
  6797. 'type_id' => array(
  6798. // 'description' => 'TODO: please describe this field!',
  6799. 'type' => 'int',
  6800. 'not NULL' => '1',
  6801. ),
  6802. 'value' => array(
  6803. // 'description' => 'TODO: please describe this field!',
  6804. 'type' => 'text',
  6805. 'not NULL' => '',
  6806. ),
  6807. 'rank' => array(
  6808. // 'description' => 'TODO: please describe this field!',
  6809. 'type' => 'int',
  6810. 'not NULL' => '1',
  6811. 'default' => '0',
  6812. ),
  6813. ),
  6814. 'primary key' => array(
  6815. '0' => 'cell_line_cvtermprop_id',
  6816. ),
  6817. 'unique keys' => array(
  6818. 'cell_line_cvtermprop_c1' => array(
  6819. '0' => 'cell_line_cvterm_id',
  6820. '1' => 'type_id',
  6821. '2' => 'rank',
  6822. ),
  6823. ),
  6824. 'indexes' => array(
  6825. ),
  6826. 'foreign keys' => array(
  6827. ),
  6828. );
  6829. return $description;
  6830. }
  6831. /**
  6832. * Implements hook_cell_line_dbxref_schema()
  6833. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6834. * @see tripal_core_chado_insert()
  6835. * @see tripal_core_chado_update()
  6836. * @see tripal_core_chado_select()
  6837. *
  6838. * @return
  6839. * An array describing the current table
  6840. *
  6841. * @ingroup tripal_schema_api
  6842. *
  6843. */
  6844. function tripal_core_chado_cell_line_dbxref_schema() {
  6845. $description = array();
  6846. $description = array(
  6847. 'table' => 'cell_line_dbxref',
  6848. // 'description' => 'TODO: please describe this table!',
  6849. 'fields' => array(
  6850. 'cell_line_dbxref_id' => array(
  6851. // 'description' => 'TODO: please describe this field!',
  6852. 'type' => 'serial',
  6853. 'not NULL' => '1',
  6854. ),
  6855. 'cell_line_id' => array(
  6856. // 'description' => 'TODO: please describe this field!',
  6857. 'type' => 'int',
  6858. 'not NULL' => '1',
  6859. ),
  6860. 'dbxref_id' => array(
  6861. // 'description' => 'TODO: please describe this field!',
  6862. 'type' => 'int',
  6863. 'not NULL' => '1',
  6864. ),
  6865. 'is_current' => array(
  6866. // 'description' => 'TODO: please describe this field!',
  6867. 'type' => 'boolean',
  6868. 'not NULL' => '1',
  6869. 'default' => 'ru',
  6870. ),
  6871. ),
  6872. 'primary key' => array(
  6873. '0' => 'cell_line_dbxref_id',
  6874. ),
  6875. 'unique keys' => array(
  6876. 'cell_line_dbxref_c1' => array(
  6877. '0' => 'cell_line_id',
  6878. '1' => 'dbxref_id',
  6879. ),
  6880. ),
  6881. 'indexes' => array(
  6882. ),
  6883. 'foreign keys' => array(
  6884. ),
  6885. );
  6886. return $description;
  6887. }
  6888. /**
  6889. * Implements hook_channel_schema()
  6890. * Purpose: To describe the structure of channel to tripal
  6891. * @see tripal_core_chado_insert()
  6892. * @see tripal_core_chado_update()
  6893. * @see tripal_core_chado_select()
  6894. *
  6895. * @return
  6896. * An array describing the current table
  6897. *
  6898. * @ingroup tripal_schema_api
  6899. *
  6900. */
  6901. function tripal_core_chado_channel_schema() {
  6902. $description = array();
  6903. $description = array(
  6904. 'table' => 'channel',
  6905. // 'description' => 'TODO: please describe this table!',
  6906. 'fields' => array(
  6907. 'channel_id' => array(
  6908. // 'description' => 'TODO: please describe this field!',
  6909. 'type' => 'serial',
  6910. 'not NULL' => '1',
  6911. ),
  6912. 'name' => array(
  6913. // 'description' => 'TODO: please describe this field!',
  6914. 'type' => 'text',
  6915. 'not NULL' => '1',
  6916. ),
  6917. 'definition' => array(
  6918. // 'description' => 'TODO: please describe this field!',
  6919. 'type' => 'text',
  6920. 'not NULL' => '1',
  6921. ),
  6922. ),
  6923. 'primary key' => array(
  6924. '0' => 'channel_id',
  6925. ),
  6926. 'unique keys' => array(
  6927. 'channel_c1' => array(
  6928. '0' => 'name',
  6929. ),
  6930. ),
  6931. 'indexes' => array(
  6932. ),
  6933. 'foreign keys' => array(
  6934. ),
  6935. );
  6936. return $description;
  6937. }
  6938. /**
  6939. * Implements hook_common_ancestor_cvterm_schema()
  6940. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6941. * @see tripal_core_chado_insert()
  6942. * @see tripal_core_chado_update()
  6943. * @see tripal_core_chado_select()
  6944. *
  6945. * @return
  6946. * An array describing the current table
  6947. *
  6948. * @ingroup tripal_schema_api
  6949. *
  6950. */
  6951. function tripal_core_chado_common_ancestor_cvterm_schema() {
  6952. $description = array();
  6953. $description = array(
  6954. 'table' => 'common_ancestor_cvterm',
  6955. // 'description' => 'TODO: please describe this table!',
  6956. 'fields' => array(
  6957. 'cvterm1_id' => array(
  6958. // 'description' => 'TODO: please describe this field!',
  6959. 'type' => 'int',
  6960. 'not NULL' => '',
  6961. ),
  6962. 'cvterm2_id' => array(
  6963. // 'description' => 'TODO: please describe this field!',
  6964. 'type' => 'int',
  6965. 'not NULL' => '',
  6966. ),
  6967. 'ancestor_cvterm_id' => array(
  6968. // 'description' => 'TODO: please describe this field!',
  6969. 'type' => 'int',
  6970. 'not NULL' => '',
  6971. ),
  6972. 'pathdistance1' => array(
  6973. // 'description' => 'TODO: please describe this field!',
  6974. 'type' => 'int',
  6975. 'not NULL' => '',
  6976. ),
  6977. 'pathdistance2' => array(
  6978. // 'description' => 'TODO: please describe this field!',
  6979. 'type' => 'int',
  6980. 'not NULL' => '',
  6981. ),
  6982. 'total_pathdistance' => array(
  6983. // 'description' => 'TODO: please describe this field!',
  6984. 'type' => 'int',
  6985. 'not NULL' => '',
  6986. ),
  6987. ),
  6988. 'primary key' => array(
  6989. ),
  6990. 'unique keys' => array(
  6991. ),
  6992. 'indexes' => array(
  6993. ),
  6994. 'foreign keys' => array(
  6995. ),
  6996. );
  6997. return $description;
  6998. }
  6999. /**
  7000. * Implements hook_cv_cvterm_count_with_obs_schema()
  7001. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  7002. * @see tripal_core_chado_insert()
  7003. * @see tripal_core_chado_update()
  7004. * @see tripal_core_chado_select()
  7005. *
  7006. * @return
  7007. * An array describing the current table
  7008. *
  7009. * @ingroup tripal_schema_api
  7010. *
  7011. */
  7012. function tripal_core_chado_cv_cvterm_count_with_obs_schema() {
  7013. $description = array();
  7014. $description = array(
  7015. 'table' => 'cv_cvterm_count_with_obs',
  7016. // 'description' => 'TODO: please describe this table!',
  7017. 'fields' => array(
  7018. 'name' => array(
  7019. // 'description' => 'TODO: please describe this field!',
  7020. 'type' => 'varchar',
  7021. 'length' => '255',
  7022. 'not NULL' => '',
  7023. ),
  7024. 'num_terms_incl_obs' => array(
  7025. // 'description' => 'TODO: please describe this field!',
  7026. 'type' => 'int',
  7027. 'size' => 'big',
  7028. 'not NULL' => '',
  7029. ),
  7030. ),
  7031. 'primary key' => array(
  7032. ),
  7033. 'unique keys' => array(
  7034. ),
  7035. 'indexes' => array(
  7036. ),
  7037. 'foreign keys' => array(
  7038. ),
  7039. );
  7040. return $description;
  7041. }
  7042. /**
  7043. * Implements hook_cv_leaf_schema()
  7044. * Purpose: To describe the structure of cv_leaf to tripal
  7045. * @see tripal_core_chado_insert()
  7046. * @see tripal_core_chado_update()
  7047. * @see tripal_core_chado_select()
  7048. *
  7049. * @return
  7050. * An array describing the current table
  7051. *
  7052. * @ingroup tripal_schema_api
  7053. *
  7054. */
  7055. function tripal_core_chado_cv_leaf_schema() {
  7056. $description = array();
  7057. $description = array(
  7058. 'table' => 'cv_leaf',
  7059. // 'description' => 'TODO: please describe this table!',
  7060. 'fields' => array(
  7061. 'cv_id' => array(
  7062. // 'description' => 'TODO: please describe this field!',
  7063. 'type' => 'int',
  7064. 'not NULL' => '',
  7065. ),
  7066. 'cvterm_id' => array(
  7067. // 'description' => 'TODO: please describe this field!',
  7068. 'type' => 'int',
  7069. 'not NULL' => '',
  7070. ),
  7071. ),
  7072. 'primary key' => array(
  7073. ),
  7074. 'unique keys' => array(
  7075. ),
  7076. 'indexes' => array(
  7077. ),
  7078. 'foreign keys' => array(
  7079. ),
  7080. );
  7081. return $description;
  7082. }
  7083. /**
  7084. * Implements hook_cv_link_count_schema()
  7085. * Purpose: To describe the structure of cv_link_count to tripal
  7086. * @see tripal_core_chado_insert()
  7087. * @see tripal_core_chado_update()
  7088. * @see tripal_core_chado_select()
  7089. *
  7090. * @return
  7091. * An array describing the current table
  7092. *
  7093. * @ingroup tripal_schema_api
  7094. *
  7095. */
  7096. function tripal_core_chado_cv_link_count_schema() {
  7097. $description = array();
  7098. $description = array(
  7099. 'table' => 'cv_link_count',
  7100. // 'description' => 'TODO: please describe this table!',
  7101. 'fields' => array(
  7102. 'cv_name' => array(
  7103. // 'description' => 'TODO: please describe this field!',
  7104. 'type' => 'varchar',
  7105. 'length' => '255',
  7106. 'not NULL' => '',
  7107. ),
  7108. 'relation_name' => array(
  7109. // 'description' => 'TODO: please describe this field!',
  7110. 'type' => 'varchar',
  7111. 'length' => '1024',
  7112. 'not NULL' => '',
  7113. ),
  7114. 'relation_cv_name' => array(
  7115. // 'description' => 'TODO: please describe this field!',
  7116. 'type' => 'varchar',
  7117. 'length' => '255',
  7118. 'not NULL' => '',
  7119. ),
  7120. 'num_links' => array(
  7121. // 'description' => 'TODO: please describe this field!',
  7122. 'type' => 'int',
  7123. 'size' => 'big',
  7124. 'not NULL' => '',
  7125. ),
  7126. ),
  7127. 'primary key' => array(
  7128. ),
  7129. 'unique keys' => array(
  7130. ),
  7131. 'indexes' => array(
  7132. ),
  7133. 'foreign keys' => array(
  7134. ),
  7135. );
  7136. return $description;
  7137. }
  7138. /**
  7139. * Implements hook_cv_path_count_schema()
  7140. * Purpose: To describe the structure of cv_path_count to tripal
  7141. * @see tripal_core_chado_insert()
  7142. * @see tripal_core_chado_update()
  7143. * @see tripal_core_chado_select()
  7144. *
  7145. * @return
  7146. * An array describing the current table
  7147. *
  7148. * @ingroup tripal_schema_api
  7149. *
  7150. */
  7151. function tripal_core_chado_cv_path_count_schema() {
  7152. $description = array();
  7153. $description = array(
  7154. 'table' => 'cv_path_count',
  7155. // 'description' => 'TODO: please describe this table!',
  7156. 'fields' => array(
  7157. 'cv_name' => array(
  7158. // 'description' => 'TODO: please describe this field!',
  7159. 'type' => 'varchar',
  7160. 'length' => '255',
  7161. 'not NULL' => '',
  7162. ),
  7163. 'relation_name' => array(
  7164. // 'description' => 'TODO: please describe this field!',
  7165. 'type' => 'varchar',
  7166. 'length' => '1024',
  7167. 'not NULL' => '',
  7168. ),
  7169. 'relation_cv_name' => array(
  7170. // 'description' => 'TODO: please describe this field!',
  7171. 'type' => 'varchar',
  7172. 'length' => '255',
  7173. 'not NULL' => '',
  7174. ),
  7175. 'num_paths' => array(
  7176. // 'description' => 'TODO: please describe this field!',
  7177. 'type' => 'int',
  7178. 'size' => 'big',
  7179. 'not NULL' => '',
  7180. ),
  7181. ),
  7182. 'primary key' => array(
  7183. ),
  7184. 'unique keys' => array(
  7185. ),
  7186. 'indexes' => array(
  7187. ),
  7188. 'foreign keys' => array(
  7189. ),
  7190. );
  7191. return $description;
  7192. }
  7193. /**
  7194. * Implements hook_cv_cvterm_count_schema()
  7195. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7196. * @see tripal_core_chado_insert()
  7197. * @see tripal_core_chado_update()
  7198. * @see tripal_core_chado_select()
  7199. *
  7200. * @return
  7201. * An array describing the current table
  7202. *
  7203. * @ingroup tripal_schema_api
  7204. *
  7205. */
  7206. function tripal_core_chado_cv_cvterm_count_schema() {
  7207. $description = array();
  7208. $description = array(
  7209. 'table' => 'cv_cvterm_count',
  7210. // 'description' => 'TODO: please describe this table!',
  7211. 'fields' => array(
  7212. 'name' => array(
  7213. // 'description' => 'TODO: please describe this field!',
  7214. 'type' => 'varchar',
  7215. 'length' => '255',
  7216. 'not NULL' => '',
  7217. ),
  7218. 'num_terms_excl_obs' => array(
  7219. // 'description' => 'TODO: please describe this field!',
  7220. 'type' => 'int',
  7221. 'size' => 'big',
  7222. 'not NULL' => '',
  7223. ),
  7224. ),
  7225. 'primary key' => array(
  7226. ),
  7227. 'unique keys' => array(
  7228. ),
  7229. 'indexes' => array(
  7230. ),
  7231. 'foreign keys' => array(
  7232. ),
  7233. );
  7234. return $description;
  7235. }
  7236. /**
  7237. * Implements hook_cv_schema()
  7238. * Purpose: To describe the structure of cv to tripal
  7239. * @see tripal_core_chado_insert()
  7240. * @see tripal_core_chado_update()
  7241. * @see tripal_core_chado_select()
  7242. *
  7243. * @return
  7244. * An array describing the current table
  7245. *
  7246. * @ingroup tripal_schema_api
  7247. *
  7248. */
  7249. function tripal_core_chado_cv_schema() {
  7250. $description = array();
  7251. $description = array(
  7252. 'table' => 'cv',
  7253. // 'description' => 'TODO: please describe this table!',
  7254. 'fields' => array(
  7255. 'cv_id' => array(
  7256. // 'description' => 'TODO: please describe this field!',
  7257. 'type' => 'serial',
  7258. 'not NULL' => '1',
  7259. ),
  7260. 'name' => array(
  7261. // 'description' => 'TODO: please describe this field!',
  7262. 'type' => 'varchar',
  7263. 'length' => '255',
  7264. 'not NULL' => '1',
  7265. ),
  7266. 'definition' => array(
  7267. // 'description' => 'TODO: please describe this field!',
  7268. 'type' => 'text',
  7269. 'not NULL' => '',
  7270. ),
  7271. ),
  7272. 'primary key' => array(
  7273. '0' => 'cv_id',
  7274. ),
  7275. 'unique keys' => array(
  7276. 'cv_c1' => array(
  7277. '0' => 'name',
  7278. ),
  7279. ),
  7280. 'indexes' => array(
  7281. ),
  7282. 'foreign keys' => array(
  7283. ),
  7284. );
  7285. return $description;
  7286. }
  7287. /**
  7288. * Implements hook_common_descendant_cvterm_schema()
  7289. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7290. * @see tripal_core_chado_insert()
  7291. * @see tripal_core_chado_update()
  7292. * @see tripal_core_chado_select()
  7293. *
  7294. * @return
  7295. * An array describing the current table
  7296. *
  7297. * @ingroup tripal_schema_api
  7298. *
  7299. */
  7300. function tripal_core_chado_common_descendant_cvterm_schema() {
  7301. $description = array();
  7302. $description = array(
  7303. 'table' => 'common_descendant_cvterm',
  7304. // 'description' => 'TODO: please describe this table!',
  7305. 'fields' => array(
  7306. 'cvterm1_id' => array(
  7307. // 'description' => 'TODO: please describe this field!',
  7308. 'type' => 'int',
  7309. 'not NULL' => '',
  7310. ),
  7311. 'cvterm2_id' => array(
  7312. // 'description' => 'TODO: please describe this field!',
  7313. 'type' => 'int',
  7314. 'not NULL' => '',
  7315. ),
  7316. 'ancestor_cvterm_id' => array(
  7317. // 'description' => 'TODO: please describe this field!',
  7318. 'type' => 'int',
  7319. 'not NULL' => '',
  7320. ),
  7321. 'pathdistance1' => array(
  7322. // 'description' => 'TODO: please describe this field!',
  7323. 'type' => 'int',
  7324. 'not NULL' => '',
  7325. ),
  7326. 'pathdistance2' => array(
  7327. // 'description' => 'TODO: please describe this field!',
  7328. 'type' => 'int',
  7329. 'not NULL' => '',
  7330. ),
  7331. 'total_pathdistance' => array(
  7332. // 'description' => 'TODO: please describe this field!',
  7333. 'type' => 'int',
  7334. 'not NULL' => '',
  7335. ),
  7336. ),
  7337. 'primary key' => array(
  7338. ),
  7339. 'unique keys' => array(
  7340. ),
  7341. 'indexes' => array(
  7342. ),
  7343. 'foreign keys' => array(
  7344. ),
  7345. );
  7346. return $description;
  7347. }
  7348. /**
  7349. * Implements hook_contact_schema()
  7350. * Purpose: To describe the structure of contact to tripal
  7351. * @see tripal_core_chado_insert()
  7352. * @see tripal_core_chado_update()
  7353. * @see tripal_core_chado_select()
  7354. *
  7355. * @return
  7356. * An array describing the current table
  7357. *
  7358. * @ingroup tripal_schema_api
  7359. *
  7360. */
  7361. function tripal_core_chado_contact_schema() {
  7362. $description = array();
  7363. $description = array(
  7364. 'table' => 'contact',
  7365. // 'description' => 'TODO: please describe this table!',
  7366. 'fields' => array(
  7367. 'contact_id' => array(
  7368. // 'description' => 'TODO: please describe this field!',
  7369. 'type' => 'serial',
  7370. 'not NULL' => '1',
  7371. ),
  7372. 'type_id' => array(
  7373. // 'description' => 'TODO: please describe this field!',
  7374. 'type' => 'int',
  7375. 'not NULL' => '',
  7376. ),
  7377. 'name' => array(
  7378. // 'description' => 'TODO: please describe this field!',
  7379. 'type' => 'varchar',
  7380. 'length' => '255',
  7381. 'not NULL' => '1',
  7382. ),
  7383. 'description' => array(
  7384. // 'description' => 'TODO: please describe this field!',
  7385. 'type' => 'varchar',
  7386. 'length' => '255',
  7387. 'not NULL' => '',
  7388. ),
  7389. ),
  7390. 'primary key' => array(
  7391. '0' => 'contact_id',
  7392. ),
  7393. 'unique keys' => array(
  7394. 'contact_c1' => array(
  7395. '0' => 'name',
  7396. ),
  7397. ),
  7398. 'indexes' => array(
  7399. ),
  7400. 'foreign keys' => array(
  7401. ),
  7402. );
  7403. return $description;
  7404. }
  7405. /**
  7406. * Implements hook_contact_relationship_schema()
  7407. * Purpose: To describe the structure of contact_relationship to tripal
  7408. * @see tripal_core_chado_insert()
  7409. * @see tripal_core_chado_update()
  7410. * @see tripal_core_chado_select()
  7411. *
  7412. * @return
  7413. * An array describing the current table
  7414. *
  7415. * @ingroup tripal_schema_api
  7416. *
  7417. */
  7418. function tripal_core_chado_contact_relationship_schema() {
  7419. $description = array();
  7420. $description = array(
  7421. 'table' => 'contact_relationship',
  7422. // 'description' => 'TODO: please describe this table!',
  7423. 'fields' => array(
  7424. 'contact_relationship_id' => array(
  7425. // 'description' => 'TODO: please describe this field!',
  7426. 'type' => 'serial',
  7427. 'not NULL' => '1',
  7428. ),
  7429. 'type_id' => array(
  7430. // 'description' => 'TODO: please describe this field!',
  7431. 'type' => 'int',
  7432. 'not NULL' => '1',
  7433. ),
  7434. 'subject_id' => array(
  7435. // 'description' => 'TODO: please describe this field!',
  7436. 'type' => 'int',
  7437. 'not NULL' => '1',
  7438. ),
  7439. 'object_id' => array(
  7440. // 'description' => 'TODO: please describe this field!',
  7441. 'type' => 'int',
  7442. 'not NULL' => '1',
  7443. ),
  7444. ),
  7445. 'primary key' => array(
  7446. '0' => 'contact_relationship_id',
  7447. ),
  7448. 'unique keys' => array(
  7449. 'contact_relationship_c1' => array(
  7450. '0' => 'subject_id',
  7451. '1' => 'object_id',
  7452. '2' => 'type_id',
  7453. ),
  7454. ),
  7455. 'indexes' => array(
  7456. 'contact_relationship_idx1' => array(
  7457. '0' => 'type_id',
  7458. ),
  7459. 'contact_relationship_idx2' => array(
  7460. '0' => 'subject_id',
  7461. ),
  7462. 'contact_relationship_idx3' => array(
  7463. '0' => 'object_id',
  7464. ),
  7465. ),
  7466. 'foreign keys' => array(
  7467. ),
  7468. );
  7469. return $description;
  7470. }
  7471. /**
  7472. * Implements hook_control_schema()
  7473. * Purpose: To describe the structure of control to tripal
  7474. * @see tripal_core_chado_insert()
  7475. * @see tripal_core_chado_update()
  7476. * @see tripal_core_chado_select()
  7477. *
  7478. * @return
  7479. * An array describing the current table
  7480. *
  7481. * @ingroup tripal_schema_api
  7482. *
  7483. */
  7484. function tripal_core_chado_control_schema() {
  7485. $description = array();
  7486. $description = array(
  7487. 'table' => 'control',
  7488. // 'description' => 'TODO: please describe this table!',
  7489. 'fields' => array(
  7490. 'control_id' => array(
  7491. // 'description' => 'TODO: please describe this field!',
  7492. 'type' => 'serial',
  7493. 'not NULL' => '1',
  7494. ),
  7495. 'type_id' => array(
  7496. // 'description' => 'TODO: please describe this field!',
  7497. 'type' => 'int',
  7498. 'not NULL' => '1',
  7499. ),
  7500. 'assay_id' => array(
  7501. // 'description' => 'TODO: please describe this field!',
  7502. 'type' => 'int',
  7503. 'not NULL' => '1',
  7504. ),
  7505. 'tableinfo_id' => array(
  7506. // 'description' => 'TODO: please describe this field!',
  7507. 'type' => 'int',
  7508. 'not NULL' => '1',
  7509. ),
  7510. 'row_id' => array(
  7511. // 'description' => 'TODO: please describe this field!',
  7512. 'type' => 'int',
  7513. 'not NULL' => '1',
  7514. ),
  7515. 'name' => array(
  7516. // 'description' => 'TODO: please describe this field!',
  7517. 'type' => 'text',
  7518. 'not NULL' => '',
  7519. ),
  7520. 'value' => array(
  7521. // 'description' => 'TODO: please describe this field!',
  7522. 'type' => 'text',
  7523. 'not NULL' => '',
  7524. ),
  7525. 'rank' => array(
  7526. // 'description' => 'TODO: please describe this field!',
  7527. 'type' => 'int',
  7528. 'not NULL' => '1',
  7529. 'default' => '0',
  7530. ),
  7531. ),
  7532. 'primary key' => array(
  7533. '0' => 'control_id',
  7534. ),
  7535. 'unique keys' => array(
  7536. ),
  7537. 'indexes' => array(
  7538. 'control_idx1' => array(
  7539. '0' => 'type_id',
  7540. ),
  7541. 'control_idx2' => array(
  7542. '0' => 'assay_id',
  7543. ),
  7544. 'control_idx3' => array(
  7545. '0' => 'tableinfo_id',
  7546. ),
  7547. 'control_idx4' => array(
  7548. '0' => 'row_id',
  7549. ),
  7550. ),
  7551. 'foreign keys' => array(
  7552. ),
  7553. );
  7554. return $description;
  7555. }
  7556. /**
  7557. * Implements hook_biomaterialprop_schema()
  7558. * Purpose: To describe the structure of biomaterialprop to tripal
  7559. * @see tripal_core_chado_insert()
  7560. * @see tripal_core_chado_update()
  7561. * @see tripal_core_chado_select()
  7562. *
  7563. * @return
  7564. * An array describing the current table
  7565. *
  7566. * @ingroup tripal_schema_api
  7567. *
  7568. */
  7569. function tripal_core_chado_biomaterialprop_schema() {
  7570. $description = array();
  7571. $description = array(
  7572. 'table' => 'biomaterialprop',
  7573. // 'description' => 'TODO: please describe this table!',
  7574. 'fields' => array(
  7575. 'biomaterialprop_id' => array(
  7576. // 'description' => 'TODO: please describe this field!',
  7577. 'type' => 'serial',
  7578. 'not NULL' => '1',
  7579. ),
  7580. 'biomaterial_id' => array(
  7581. // 'description' => 'TODO: please describe this field!',
  7582. 'type' => 'int',
  7583. 'not NULL' => '1',
  7584. ),
  7585. 'type_id' => array(
  7586. // 'description' => 'TODO: please describe this field!',
  7587. 'type' => 'int',
  7588. 'not NULL' => '1',
  7589. ),
  7590. 'value' => array(
  7591. // 'description' => 'TODO: please describe this field!',
  7592. 'type' => 'text',
  7593. 'not NULL' => '',
  7594. ),
  7595. 'rank' => array(
  7596. // 'description' => 'TODO: please describe this field!',
  7597. 'type' => 'int',
  7598. 'not NULL' => '1',
  7599. 'default' => '0',
  7600. ),
  7601. ),
  7602. 'primary key' => array(
  7603. '0' => 'biomaterialprop_id',
  7604. ),
  7605. 'unique keys' => array(
  7606. 'biomaterialprop_c1' => array(
  7607. '0' => 'biomaterial_id',
  7608. '1' => 'type_id',
  7609. '2' => 'rank',
  7610. ),
  7611. ),
  7612. 'indexes' => array(
  7613. 'biomaterialprop_idx1' => array(
  7614. '0' => 'biomaterial_id',
  7615. ),
  7616. 'biomaterialprop_idx2' => array(
  7617. '0' => 'type_id',
  7618. ),
  7619. ),
  7620. 'foreign keys' => array(
  7621. ),
  7622. );
  7623. return $description;
  7624. }
  7625. /**
  7626. * Implements hook_biomaterial_treatment_schema()
  7627. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7628. * @see tripal_core_chado_insert()
  7629. * @see tripal_core_chado_update()
  7630. * @see tripal_core_chado_select()
  7631. *
  7632. * @return
  7633. * An array describing the current table
  7634. *
  7635. * @ingroup tripal_schema_api
  7636. *
  7637. */
  7638. function tripal_core_chado_biomaterial_treatment_schema() {
  7639. $description = array();
  7640. $description = array(
  7641. 'table' => 'biomaterial_treatment',
  7642. // 'description' => 'TODO: please describe this table!',
  7643. 'fields' => array(
  7644. 'biomaterial_treatment_id' => array(
  7645. // 'description' => 'TODO: please describe this field!',
  7646. 'type' => 'serial',
  7647. 'not NULL' => '1',
  7648. ),
  7649. 'biomaterial_id' => array(
  7650. // 'description' => 'TODO: please describe this field!',
  7651. 'type' => 'int',
  7652. 'not NULL' => '1',
  7653. ),
  7654. 'treatment_id' => array(
  7655. // 'description' => 'TODO: please describe this field!',
  7656. 'type' => 'int',
  7657. 'not NULL' => '1',
  7658. ),
  7659. 'unittype_id' => array(
  7660. // 'description' => 'TODO: please describe this field!',
  7661. 'type' => 'int',
  7662. 'not NULL' => '',
  7663. ),
  7664. 'value' => array(
  7665. // 'description' => 'TODO: please describe this field!',
  7666. 'type' => 'float',
  7667. 'not NULL' => '',
  7668. ),
  7669. 'rank' => array(
  7670. // 'description' => 'TODO: please describe this field!',
  7671. 'type' => 'int',
  7672. 'not NULL' => '1',
  7673. 'default' => '0',
  7674. ),
  7675. ),
  7676. 'primary key' => array(
  7677. '0' => 'biomaterial_treatment_id',
  7678. ),
  7679. 'unique keys' => array(
  7680. 'biomaterial_treatment_c1' => array(
  7681. '0' => 'biomaterial_id',
  7682. '1' => 'treatment_id',
  7683. ),
  7684. ),
  7685. 'indexes' => array(
  7686. 'biomaterial_treatment_idx1' => array(
  7687. '0' => 'biomaterial_id',
  7688. ),
  7689. 'biomaterial_treatment_idx2' => array(
  7690. '0' => 'treatment_id',
  7691. ),
  7692. 'biomaterial_treatment_idx3' => array(
  7693. '0' => 'unittype_id',
  7694. ),
  7695. ),
  7696. 'foreign keys' => array(
  7697. ),
  7698. );
  7699. return $description;
  7700. }
  7701. /**
  7702. * Implements hook_acquisition_relationship_schema()
  7703. * Purpose: To describe the structure of acquisition_relationship to tripal
  7704. * @see tripal_core_chado_insert()
  7705. * @see tripal_core_chado_update()
  7706. * @see tripal_core_chado_select()
  7707. *
  7708. * @return
  7709. * An array describing the current table
  7710. *
  7711. * @ingroup tripal_schema_api
  7712. *
  7713. */
  7714. function tripal_core_chado_acquisition_relationship_schema() {
  7715. $description = array();
  7716. $description = array(
  7717. 'table' => 'acquisition_relationship',
  7718. // 'description' => 'TODO: please describe this table!',
  7719. 'fields' => array(
  7720. 'acquisition_relationship_id' => array(
  7721. // 'description' => 'TODO: please describe this field!',
  7722. 'type' => 'serial',
  7723. 'not NULL' => '1',
  7724. ),
  7725. 'subject_id' => array(
  7726. // 'description' => 'TODO: please describe this field!',
  7727. 'type' => 'int',
  7728. 'not NULL' => '1',
  7729. ),
  7730. 'type_id' => array(
  7731. // 'description' => 'TODO: please describe this field!',
  7732. 'type' => 'int',
  7733. 'not NULL' => '1',
  7734. ),
  7735. 'object_id' => array(
  7736. // 'description' => 'TODO: please describe this field!',
  7737. 'type' => 'int',
  7738. 'not NULL' => '1',
  7739. ),
  7740. 'value' => array(
  7741. // 'description' => 'TODO: please describe this field!',
  7742. 'type' => 'text',
  7743. 'not NULL' => '',
  7744. ),
  7745. 'rank' => array(
  7746. // 'description' => 'TODO: please describe this field!',
  7747. 'type' => 'int',
  7748. 'not NULL' => '1',
  7749. 'default' => '0',
  7750. ),
  7751. ),
  7752. 'primary key' => array(
  7753. '0' => 'acquisition_relationship_id',
  7754. ),
  7755. 'unique keys' => array(
  7756. 'acquisition_relationship_c1' => array(
  7757. '0' => 'subject_id',
  7758. '1' => 'object_id',
  7759. '2' => 'type_id',
  7760. '3' => 'rank',
  7761. ),
  7762. ),
  7763. 'indexes' => array(
  7764. 'acquisition_relationship_idx1' => array(
  7765. '0' => 'subject_id',
  7766. ),
  7767. 'acquisition_relationship_idx2' => array(
  7768. '0' => 'type_id',
  7769. ),
  7770. 'acquisition_relationship_idx3' => array(
  7771. '0' => 'object_id',
  7772. ),
  7773. ),
  7774. 'foreign keys' => array(
  7775. ),
  7776. );
  7777. return $description;
  7778. }
  7779. /**
  7780. * Implements hook_acquisition_schema()
  7781. * Purpose: To describe the structure of acquisition to tripal
  7782. * @see tripal_core_chado_insert()
  7783. * @see tripal_core_chado_update()
  7784. * @see tripal_core_chado_select()
  7785. *
  7786. * @return
  7787. * An array describing the current table
  7788. *
  7789. * @ingroup tripal_schema_api
  7790. *
  7791. */
  7792. function tripal_core_chado_acquisition_schema() {
  7793. $description = array();
  7794. $description = array(
  7795. 'table' => 'acquisition',
  7796. // 'description' => 'TODO: please describe this table!',
  7797. 'fields' => array(
  7798. 'acquisition_id' => array(
  7799. // 'description' => 'TODO: please describe this field!',
  7800. 'type' => 'serial',
  7801. 'not NULL' => '1',
  7802. ),
  7803. 'assay_id' => array(
  7804. // 'description' => 'TODO: please describe this field!',
  7805. 'type' => 'int',
  7806. 'not NULL' => '1',
  7807. ),
  7808. 'protocol_id' => array(
  7809. // 'description' => 'TODO: please describe this field!',
  7810. 'type' => 'int',
  7811. 'not NULL' => '',
  7812. ),
  7813. 'channel_id' => array(
  7814. // 'description' => 'TODO: please describe this field!',
  7815. 'type' => 'int',
  7816. 'not NULL' => '',
  7817. ),
  7818. 'acquisitiondate' => array(
  7819. // 'description' => 'TODO: please describe this field!',
  7820. 'type' => 'datetime',
  7821. 'not NULL' => '',
  7822. 'default' => 'ow(',
  7823. ),
  7824. 'name' => array(
  7825. // 'description' => 'TODO: please describe this field!',
  7826. 'type' => 'text',
  7827. 'not NULL' => '',
  7828. ),
  7829. 'uri' => array(
  7830. // 'description' => 'TODO: please describe this field!',
  7831. 'type' => 'text',
  7832. 'not NULL' => '',
  7833. ),
  7834. ),
  7835. 'primary key' => array(
  7836. '0' => 'acquisition_id',
  7837. ),
  7838. 'unique keys' => array(
  7839. 'acquisition_c1' => array(
  7840. '0' => 'name',
  7841. ),
  7842. ),
  7843. 'indexes' => array(
  7844. 'acquisition_idx1' => array(
  7845. '0' => 'assay_id',
  7846. ),
  7847. 'acquisition_idx2' => array(
  7848. '0' => 'protocol_id',
  7849. ),
  7850. 'acquisition_idx3' => array(
  7851. '0' => 'channel_id',
  7852. ),
  7853. ),
  7854. 'foreign keys' => array(
  7855. ),
  7856. );
  7857. return $description;
  7858. }
  7859. /**
  7860. * Implements hook_acquisitionprop_schema()
  7861. * Purpose: To describe the structure of acquisitionprop to tripal
  7862. * @see tripal_core_chado_insert()
  7863. * @see tripal_core_chado_update()
  7864. * @see tripal_core_chado_select()
  7865. *
  7866. * @return
  7867. * An array describing the current table
  7868. *
  7869. * @ingroup tripal_schema_api
  7870. *
  7871. */
  7872. function tripal_core_chado_acquisitionprop_schema() {
  7873. $description = array();
  7874. $description = array(
  7875. 'table' => 'acquisitionprop',
  7876. // 'description' => 'TODO: please describe this table!',
  7877. 'fields' => array(
  7878. 'acquisitionprop_id' => array(
  7879. // 'description' => 'TODO: please describe this field!',
  7880. 'type' => 'serial',
  7881. 'not NULL' => '1',
  7882. ),
  7883. 'acquisition_id' => array(
  7884. // 'description' => 'TODO: please describe this field!',
  7885. 'type' => 'int',
  7886. 'not NULL' => '1',
  7887. ),
  7888. 'type_id' => array(
  7889. // 'description' => 'TODO: please describe this field!',
  7890. 'type' => 'int',
  7891. 'not NULL' => '1',
  7892. ),
  7893. 'value' => array(
  7894. // 'description' => 'TODO: please describe this field!',
  7895. 'type' => 'text',
  7896. 'not NULL' => '',
  7897. ),
  7898. 'rank' => array(
  7899. // 'description' => 'TODO: please describe this field!',
  7900. 'type' => 'int',
  7901. 'not NULL' => '1',
  7902. 'default' => '0',
  7903. ),
  7904. ),
  7905. 'primary key' => array(
  7906. '0' => 'acquisitionprop_id',
  7907. ),
  7908. 'unique keys' => array(
  7909. 'acquisitionprop_c1' => array(
  7910. '0' => 'acquisition_id',
  7911. '1' => 'type_id',
  7912. '2' => 'rank',
  7913. ),
  7914. ),
  7915. 'indexes' => array(
  7916. 'acquisitionprop_idx1' => array(
  7917. '0' => 'acquisition_id',
  7918. ),
  7919. 'acquisitionprop_idx2' => array(
  7920. '0' => 'type_id',
  7921. ),
  7922. ),
  7923. 'foreign keys' => array(
  7924. ),
  7925. );
  7926. return $description;
  7927. }
  7928. /**
  7929. * Implements hook_all_feature_names_schema()
  7930. * Purpose: To describe the structure of all_feature_names to tripal
  7931. * @see tripal_core_chado_insert()
  7932. * @see tripal_core_chado_update()
  7933. * @see tripal_core_chado_select()
  7934. *
  7935. * @return
  7936. * An array describing the current table
  7937. *
  7938. * @ingroup tripal_schema_api
  7939. *
  7940. */
  7941. function tripal_core_chado_all_feature_names_schema() {
  7942. $description = array();
  7943. $description = array(
  7944. 'table' => 'all_feature_names',
  7945. // 'description' => 'TODO: please describe this table!',
  7946. 'fields' => array(
  7947. 'feature_id' => array(
  7948. // 'description' => 'TODO: please describe this field!',
  7949. 'type' => 'int',
  7950. 'not NULL' => '',
  7951. ),
  7952. 'name' => array(
  7953. // 'description' => 'TODO: please describe this field!',
  7954. 'type' => 'varchar',
  7955. 'length' => '255',
  7956. 'not NULL' => '',
  7957. ),
  7958. 'organism_id' => array(
  7959. // 'description' => 'TODO: please describe this field!',
  7960. 'type' => 'int',
  7961. 'not NULL' => '',
  7962. ),
  7963. ),
  7964. 'primary key' => array(
  7965. ),
  7966. 'unique keys' => array(
  7967. ),
  7968. 'indexes' => array(
  7969. ),
  7970. 'foreign keys' => array(
  7971. ),
  7972. );
  7973. return $description;
  7974. }
  7975. /**
  7976. * Implements hook_analysis_schema()
  7977. * Purpose: To describe the structure of analysis to tripal
  7978. * @see tripal_core_chado_insert()
  7979. * @see tripal_core_chado_update()
  7980. * @see tripal_core_chado_select()
  7981. *
  7982. * @return
  7983. * An array describing the current table
  7984. *
  7985. * @ingroup tripal_schema_api
  7986. *
  7987. */
  7988. function tripal_core_chado_analysis_schema() {
  7989. $description = array();
  7990. $description = array(
  7991. 'table' => 'analysis',
  7992. // 'description' => 'TODO: please describe this table!',
  7993. 'fields' => array(
  7994. 'analysis_id' => array(
  7995. // 'description' => 'TODO: please describe this field!',
  7996. 'type' => 'serial',
  7997. 'not NULL' => '1',
  7998. ),
  7999. 'name' => array(
  8000. // 'description' => 'TODO: please describe this field!',
  8001. 'type' => 'varchar',
  8002. 'length' => '255',
  8003. 'not NULL' => '',
  8004. ),
  8005. 'description' => array(
  8006. // 'description' => 'TODO: please describe this field!',
  8007. 'type' => 'text',
  8008. 'not NULL' => '',
  8009. ),
  8010. 'program' => array(
  8011. // 'description' => 'TODO: please describe this field!',
  8012. 'type' => 'varchar',
  8013. 'length' => '255',
  8014. 'not NULL' => '1',
  8015. ),
  8016. 'programversion' => array(
  8017. // 'description' => 'TODO: please describe this field!',
  8018. 'type' => 'varchar',
  8019. 'length' => '255',
  8020. 'not NULL' => '1',
  8021. ),
  8022. 'algorithm' => array(
  8023. // 'description' => 'TODO: please describe this field!',
  8024. 'type' => 'varchar',
  8025. 'length' => '255',
  8026. 'not NULL' => '',
  8027. ),
  8028. 'sourcename' => array(
  8029. // 'description' => 'TODO: please describe this field!',
  8030. 'type' => 'varchar',
  8031. 'length' => '255',
  8032. 'not NULL' => '',
  8033. ),
  8034. 'sourceversion' => array(
  8035. // 'description' => 'TODO: please describe this field!',
  8036. 'type' => 'varchar',
  8037. 'length' => '255',
  8038. 'not NULL' => '',
  8039. ),
  8040. 'sourceuri' => array(
  8041. // 'description' => 'TODO: please describe this field!',
  8042. 'type' => 'text',
  8043. 'not NULL' => '',
  8044. ),
  8045. 'timeexecuted' => array(
  8046. // 'description' => 'TODO: please describe this field!',
  8047. 'type' => 'datetime',
  8048. 'not NULL' => '1',
  8049. 'default' => 'ow(',
  8050. ),
  8051. ),
  8052. 'primary key' => array(
  8053. '0' => 'analysis_id',
  8054. ),
  8055. 'unique keys' => array(
  8056. 'analysis_c1' => array(
  8057. '0' => 'program',
  8058. '1' => 'programversion',
  8059. '2' => 'sourcename',
  8060. ),
  8061. ),
  8062. 'indexes' => array(
  8063. ),
  8064. 'foreign keys' => array(
  8065. ),
  8066. );
  8067. return $description;
  8068. }
  8069. /**
  8070. * Implements hook_analysisfeature_schema()
  8071. * Purpose: To describe the structure of analysisfeature to tripal
  8072. * @see tripal_core_chado_insert()
  8073. * @see tripal_core_chado_update()
  8074. * @see tripal_core_chado_select()
  8075. *
  8076. * @return
  8077. * An array describing the current table
  8078. *
  8079. * @ingroup tripal_schema_api
  8080. *
  8081. */
  8082. function tripal_core_chado_analysisfeature_schema() {
  8083. $description = array();
  8084. $description = array(
  8085. 'table' => 'analysisfeature',
  8086. // 'description' => 'TODO: please describe this table!',
  8087. 'fields' => array(
  8088. 'analysisfeature_id' => array(
  8089. // 'description' => 'TODO: please describe this field!',
  8090. 'type' => 'serial',
  8091. 'not NULL' => '1',
  8092. ),
  8093. 'feature_id' => array(
  8094. // 'description' => 'TODO: please describe this field!',
  8095. 'type' => 'int',
  8096. 'not NULL' => '1',
  8097. ),
  8098. 'analysis_id' => array(
  8099. // 'description' => 'TODO: please describe this field!',
  8100. 'type' => 'int',
  8101. 'not NULL' => '1',
  8102. ),
  8103. 'rawscore' => array(
  8104. // 'description' => 'TODO: please describe this field!',
  8105. 'type' => 'float',
  8106. 'size' => 'big',
  8107. 'not NULL' => '',
  8108. ),
  8109. 'normscore' => array(
  8110. // 'description' => 'TODO: please describe this field!',
  8111. 'type' => 'float',
  8112. 'size' => 'big',
  8113. 'not NULL' => '',
  8114. ),
  8115. 'significance' => array(
  8116. // 'description' => 'TODO: please describe this field!',
  8117. 'type' => 'float',
  8118. 'size' => 'big',
  8119. 'not NULL' => '',
  8120. ),
  8121. 'identity' => array(
  8122. // 'description' => 'TODO: please describe this field!',
  8123. 'type' => 'float',
  8124. 'size' => 'big',
  8125. 'not NULL' => '',
  8126. ),
  8127. ),
  8128. 'primary key' => array(
  8129. '0' => 'analysisfeature_id',
  8130. ),
  8131. 'unique keys' => array(
  8132. 'analysisfeature_c1' => array(
  8133. '0' => 'feature_id',
  8134. '1' => 'analysis_id',
  8135. ),
  8136. ),
  8137. 'indexes' => array(
  8138. 'analysisfeature_idx1' => array(
  8139. '0' => 'feature_id',
  8140. ),
  8141. 'analysisfeature_idx2' => array(
  8142. '0' => 'analysis_id',
  8143. ),
  8144. ),
  8145. 'foreign keys' => array(
  8146. ),
  8147. );
  8148. return $description;
  8149. }
  8150. /**
  8151. * Implements hook_analysisfeatureprop_schema()
  8152. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8153. * @see tripal_core_chado_insert()
  8154. * @see tripal_core_chado_update()
  8155. * @see tripal_core_chado_select()
  8156. *
  8157. * @return
  8158. * An array describing the current table
  8159. *
  8160. * @ingroup tripal_schema_api
  8161. *
  8162. */
  8163. function tripal_core_chado_analysisfeatureprop_schema() {
  8164. $description = array();
  8165. $description = array(
  8166. 'table' => 'analysisfeatureprop',
  8167. // 'description' => 'TODO: please describe this table!',
  8168. 'fields' => array(
  8169. 'analysisfeatureprop_id' => array(
  8170. // 'description' => 'TODO: please describe this field!',
  8171. 'type' => 'serial',
  8172. 'not NULL' => '1',
  8173. ),
  8174. 'analysisfeature_id' => array(
  8175. // 'description' => 'TODO: please describe this field!',
  8176. 'type' => 'int',
  8177. 'not NULL' => '1',
  8178. ),
  8179. 'type_id' => array(
  8180. // 'description' => 'TODO: please describe this field!',
  8181. 'type' => 'int',
  8182. 'not NULL' => '1',
  8183. ),
  8184. 'value' => array(
  8185. // 'description' => 'TODO: please describe this field!',
  8186. 'type' => 'text',
  8187. 'not NULL' => '',
  8188. ),
  8189. 'rank' => array(
  8190. // 'description' => 'TODO: please describe this field!',
  8191. 'type' => 'int',
  8192. 'not NULL' => '1',
  8193. ),
  8194. ),
  8195. 'primary key' => array(
  8196. '0' => 'analysisfeatureprop_id',
  8197. ),
  8198. 'unique keys' => array(
  8199. 'analysisfeature_id_type_id_rank' => array(
  8200. '0' => 'analysisfeature_id',
  8201. '1' => 'type_id',
  8202. '2' => 'rank',
  8203. ),
  8204. ),
  8205. 'indexes' => array(
  8206. ),
  8207. 'foreign keys' => array(
  8208. ),
  8209. );
  8210. return $description;
  8211. }
  8212. /**
  8213. * Implements hook_assayprop_schema()
  8214. * Purpose: To describe the structure of assayprop to tripal
  8215. * @see tripal_core_chado_insert()
  8216. * @see tripal_core_chado_update()
  8217. * @see tripal_core_chado_select()
  8218. *
  8219. * @return
  8220. * An array describing the current table
  8221. *
  8222. * @ingroup tripal_schema_api
  8223. *
  8224. */
  8225. function tripal_core_chado_assayprop_schema() {
  8226. $description = array();
  8227. $description = array(
  8228. 'table' => 'assayprop',
  8229. // 'description' => 'TODO: please describe this table!',
  8230. 'fields' => array(
  8231. 'assayprop_id' => array(
  8232. // 'description' => 'TODO: please describe this field!',
  8233. 'type' => 'serial',
  8234. 'not NULL' => '1',
  8235. ),
  8236. 'assay_id' => array(
  8237. // 'description' => 'TODO: please describe this field!',
  8238. 'type' => 'int',
  8239. 'not NULL' => '1',
  8240. ),
  8241. 'type_id' => array(
  8242. // 'description' => 'TODO: please describe this field!',
  8243. 'type' => 'int',
  8244. 'not NULL' => '1',
  8245. ),
  8246. 'value' => array(
  8247. // 'description' => 'TODO: please describe this field!',
  8248. 'type' => 'text',
  8249. 'not NULL' => '',
  8250. ),
  8251. 'rank' => array(
  8252. // 'description' => 'TODO: please describe this field!',
  8253. 'type' => 'int',
  8254. 'not NULL' => '1',
  8255. 'default' => '0',
  8256. ),
  8257. ),
  8258. 'primary key' => array(
  8259. '0' => 'assayprop_id',
  8260. ),
  8261. 'unique keys' => array(
  8262. 'assayprop_c1' => array(
  8263. '0' => 'assay_id',
  8264. '1' => 'type_id',
  8265. '2' => 'rank',
  8266. ),
  8267. ),
  8268. 'indexes' => array(
  8269. 'assayprop_idx1' => array(
  8270. '0' => 'assay_id',
  8271. ),
  8272. 'assayprop_idx2' => array(
  8273. '0' => 'type_id',
  8274. ),
  8275. ),
  8276. 'foreign keys' => array(
  8277. ),
  8278. );
  8279. return $description;
  8280. }
  8281. /**
  8282. * Implements hook_biomaterial_schema()
  8283. * Purpose: To describe the structure of biomaterial to tripal
  8284. * @see tripal_core_chado_insert()
  8285. * @see tripal_core_chado_update()
  8286. * @see tripal_core_chado_select()
  8287. *
  8288. * @return
  8289. * An array describing the current table
  8290. *
  8291. * @ingroup tripal_schema_api
  8292. *
  8293. */
  8294. function tripal_core_chado_biomaterial_schema() {
  8295. $description = array();
  8296. $description = array(
  8297. 'table' => 'biomaterial',
  8298. // 'description' => 'TODO: please describe this table!',
  8299. 'fields' => array(
  8300. 'biomaterial_id' => array(
  8301. // 'description' => 'TODO: please describe this field!',
  8302. 'type' => 'serial',
  8303. 'not NULL' => '1',
  8304. ),
  8305. 'taxon_id' => array(
  8306. // 'description' => 'TODO: please describe this field!',
  8307. 'type' => 'int',
  8308. 'not NULL' => '',
  8309. ),
  8310. 'biosourceprovider_id' => array(
  8311. // 'description' => 'TODO: please describe this field!',
  8312. 'type' => 'int',
  8313. 'not NULL' => '',
  8314. ),
  8315. 'dbxref_id' => array(
  8316. // 'description' => 'TODO: please describe this field!',
  8317. 'type' => 'int',
  8318. 'not NULL' => '',
  8319. ),
  8320. 'name' => array(
  8321. // 'description' => 'TODO: please describe this field!',
  8322. 'type' => 'text',
  8323. 'not NULL' => '',
  8324. ),
  8325. 'description' => array(
  8326. // 'description' => 'TODO: please describe this field!',
  8327. 'type' => 'text',
  8328. 'not NULL' => '',
  8329. ),
  8330. ),
  8331. 'primary key' => array(
  8332. '0' => 'biomaterial_id',
  8333. ),
  8334. 'unique keys' => array(
  8335. 'biomaterial_c1' => array(
  8336. '0' => 'name',
  8337. ),
  8338. ),
  8339. 'indexes' => array(
  8340. 'biomaterial_idx1' => array(
  8341. '0' => 'taxon_id',
  8342. ),
  8343. 'biomaterial_idx2' => array(
  8344. '0' => 'biosourceprovider_id',
  8345. ),
  8346. 'biomaterial_idx3' => array(
  8347. '0' => 'dbxref_id',
  8348. ),
  8349. ),
  8350. 'foreign keys' => array(
  8351. ),
  8352. );
  8353. return $description;
  8354. }
  8355. /**
  8356. * Implements hook_biomaterial_dbxref_schema()
  8357. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8358. * @see tripal_core_chado_insert()
  8359. * @see tripal_core_chado_update()
  8360. * @see tripal_core_chado_select()
  8361. *
  8362. * @return
  8363. * An array describing the current table
  8364. *
  8365. * @ingroup tripal_schema_api
  8366. *
  8367. */
  8368. function tripal_core_chado_biomaterial_dbxref_schema() {
  8369. $description = array();
  8370. $description = array(
  8371. 'table' => 'biomaterial_dbxref',
  8372. // 'description' => 'TODO: please describe this table!',
  8373. 'fields' => array(
  8374. 'biomaterial_dbxref_id' => array(
  8375. // 'description' => 'TODO: please describe this field!',
  8376. 'type' => 'serial',
  8377. 'not NULL' => '1',
  8378. ),
  8379. 'biomaterial_id' => array(
  8380. // 'description' => 'TODO: please describe this field!',
  8381. 'type' => 'int',
  8382. 'not NULL' => '1',
  8383. ),
  8384. 'dbxref_id' => array(
  8385. // 'description' => 'TODO: please describe this field!',
  8386. 'type' => 'int',
  8387. 'not NULL' => '1',
  8388. ),
  8389. ),
  8390. 'primary key' => array(
  8391. '0' => 'biomaterial_dbxref_id',
  8392. ),
  8393. 'unique keys' => array(
  8394. 'biomaterial_dbxref_c1' => array(
  8395. '0' => 'biomaterial_id',
  8396. '1' => 'dbxref_id',
  8397. ),
  8398. ),
  8399. 'indexes' => array(
  8400. 'biomaterial_dbxref_idx1' => array(
  8401. '0' => 'biomaterial_id',
  8402. ),
  8403. 'biomaterial_dbxref_idx2' => array(
  8404. '0' => 'dbxref_id',
  8405. ),
  8406. ),
  8407. 'foreign keys' => array(
  8408. ),
  8409. );
  8410. return $description;
  8411. }
  8412. /**
  8413. * Implements hook_biomaterial_relationship_schema()
  8414. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8415. * @see tripal_core_chado_insert()
  8416. * @see tripal_core_chado_update()
  8417. * @see tripal_core_chado_select()
  8418. *
  8419. * @return
  8420. * An array describing the current table
  8421. *
  8422. * @ingroup tripal_schema_api
  8423. *
  8424. */
  8425. function tripal_core_chado_biomaterial_relationship_schema() {
  8426. $description = array();
  8427. $description = array(
  8428. 'table' => 'biomaterial_relationship',
  8429. // 'description' => 'TODO: please describe this table!',
  8430. 'fields' => array(
  8431. 'biomaterial_relationship_id' => array(
  8432. // 'description' => 'TODO: please describe this field!',
  8433. 'type' => 'serial',
  8434. 'not NULL' => '1',
  8435. ),
  8436. 'subject_id' => array(
  8437. // 'description' => 'TODO: please describe this field!',
  8438. 'type' => 'int',
  8439. 'not NULL' => '1',
  8440. ),
  8441. 'type_id' => array(
  8442. // 'description' => 'TODO: please describe this field!',
  8443. 'type' => 'int',
  8444. 'not NULL' => '1',
  8445. ),
  8446. 'object_id' => array(
  8447. // 'description' => 'TODO: please describe this field!',
  8448. 'type' => 'int',
  8449. 'not NULL' => '1',
  8450. ),
  8451. ),
  8452. 'primary key' => array(
  8453. '0' => 'biomaterial_relationship_id',
  8454. ),
  8455. 'unique keys' => array(
  8456. 'biomaterial_relationship_c1' => array(
  8457. '0' => 'subject_id',
  8458. '1' => 'object_id',
  8459. '2' => 'type_id',
  8460. ),
  8461. ),
  8462. 'indexes' => array(
  8463. 'biomaterial_relationship_idx1' => array(
  8464. '0' => 'subject_id',
  8465. ),
  8466. 'biomaterial_relationship_idx2' => array(
  8467. '0' => 'object_id',
  8468. ),
  8469. 'biomaterial_relationship_idx3' => array(
  8470. '0' => 'type_id',
  8471. ),
  8472. ),
  8473. 'foreign keys' => array(
  8474. ),
  8475. );
  8476. return $description;
  8477. }
  8478. /**
  8479. * Implements hook_assay_project_schema()
  8480. * Purpose: To describe the structure of assay_project to tripal
  8481. * @see tripal_core_chado_insert()
  8482. * @see tripal_core_chado_update()
  8483. * @see tripal_core_chado_select()
  8484. *
  8485. * @return
  8486. * An array describing the current table
  8487. *
  8488. * @ingroup tripal_schema_api
  8489. *
  8490. */
  8491. function tripal_core_chado_assay_project_schema() {
  8492. $description = array();
  8493. $description = array(
  8494. 'table' => 'assay_project',
  8495. // 'description' => 'TODO: please describe this table!',
  8496. 'fields' => array(
  8497. 'assay_project_id' => array(
  8498. // 'description' => 'TODO: please describe this field!',
  8499. 'type' => 'serial',
  8500. 'not NULL' => '1',
  8501. ),
  8502. 'assay_id' => array(
  8503. // 'description' => 'TODO: please describe this field!',
  8504. 'type' => 'int',
  8505. 'not NULL' => '1',
  8506. ),
  8507. 'project_id' => array(
  8508. // 'description' => 'TODO: please describe this field!',
  8509. 'type' => 'int',
  8510. 'not NULL' => '1',
  8511. ),
  8512. ),
  8513. 'primary key' => array(
  8514. '0' => 'assay_project_id',
  8515. ),
  8516. 'unique keys' => array(
  8517. 'assay_project_c1' => array(
  8518. '0' => 'assay_id',
  8519. '1' => 'project_id',
  8520. ),
  8521. ),
  8522. 'indexes' => array(
  8523. 'assay_project_idx1' => array(
  8524. '0' => 'assay_id',
  8525. ),
  8526. 'assay_project_idx2' => array(
  8527. '0' => 'project_id',
  8528. ),
  8529. ),
  8530. 'foreign keys' => array(
  8531. ),
  8532. );
  8533. return $description;
  8534. }
  8535. /**
  8536. * Implements hook_assay_biomaterial_schema()
  8537. * Purpose: To describe the structure of assay_biomaterial to tripal
  8538. * @see tripal_core_chado_insert()
  8539. * @see tripal_core_chado_update()
  8540. * @see tripal_core_chado_select()
  8541. *
  8542. * @return
  8543. * An array describing the current table
  8544. *
  8545. * @ingroup tripal_schema_api
  8546. *
  8547. */
  8548. function tripal_core_chado_assay_biomaterial_schema() {
  8549. $description = array();
  8550. $description = array(
  8551. 'table' => 'assay_biomaterial',
  8552. // 'description' => 'TODO: please describe this table!',
  8553. 'fields' => array(
  8554. 'assay_biomaterial_id' => array(
  8555. // 'description' => 'TODO: please describe this field!',
  8556. 'type' => 'serial',
  8557. 'not NULL' => '1',
  8558. ),
  8559. 'assay_id' => array(
  8560. // 'description' => 'TODO: please describe this field!',
  8561. 'type' => 'int',
  8562. 'not NULL' => '1',
  8563. ),
  8564. 'biomaterial_id' => array(
  8565. // 'description' => 'TODO: please describe this field!',
  8566. 'type' => 'int',
  8567. 'not NULL' => '1',
  8568. ),
  8569. 'channel_id' => array(
  8570. // 'description' => 'TODO: please describe this field!',
  8571. 'type' => 'int',
  8572. 'not NULL' => '',
  8573. ),
  8574. 'rank' => array(
  8575. // 'description' => 'TODO: please describe this field!',
  8576. 'type' => 'int',
  8577. 'not NULL' => '1',
  8578. 'default' => '0',
  8579. ),
  8580. ),
  8581. 'primary key' => array(
  8582. '0' => 'assay_biomaterial_id',
  8583. ),
  8584. 'unique keys' => array(
  8585. 'assay_biomaterial_c1' => array(
  8586. '0' => 'assay_id',
  8587. '1' => 'biomaterial_id',
  8588. '2' => 'channel_id',
  8589. '3' => 'rank',
  8590. ),
  8591. ),
  8592. 'indexes' => array(
  8593. 'assay_biomaterial_idx1' => array(
  8594. '0' => 'assay_id',
  8595. ),
  8596. 'assay_biomaterial_idx2' => array(
  8597. '0' => 'biomaterial_id',
  8598. ),
  8599. 'assay_biomaterial_idx3' => array(
  8600. '0' => 'channel_id',
  8601. ),
  8602. ),
  8603. 'foreign keys' => array(
  8604. ),
  8605. );
  8606. return $description;
  8607. }
  8608. /**
  8609. * Implements hook_analysisprop_schema()
  8610. * Purpose: To describe the structure of analysisprop to tripal
  8611. * @see tripal_core_chado_insert()
  8612. * @see tripal_core_chado_update()
  8613. * @see tripal_core_chado_select()
  8614. *
  8615. * @return
  8616. * An array describing the current table
  8617. *
  8618. * @ingroup tripal_schema_api
  8619. *
  8620. */
  8621. function tripal_core_chado_analysisprop_schema() {
  8622. $description = array();
  8623. $description = array(
  8624. 'table' => 'analysisprop',
  8625. // 'description' => 'TODO: please describe this table!',
  8626. 'fields' => array(
  8627. 'analysisprop_id' => array(
  8628. // 'description' => 'TODO: please describe this field!',
  8629. 'type' => 'serial',
  8630. 'not NULL' => '1',
  8631. ),
  8632. 'analysis_id' => array(
  8633. // 'description' => 'TODO: please describe this field!',
  8634. 'type' => 'int',
  8635. 'not NULL' => '1',
  8636. ),
  8637. 'type_id' => array(
  8638. // 'description' => 'TODO: please describe this field!',
  8639. 'type' => 'int',
  8640. 'not NULL' => '1',
  8641. ),
  8642. 'value' => array(
  8643. // 'description' => 'TODO: please describe this field!',
  8644. 'type' => 'text',
  8645. 'not NULL' => '',
  8646. ),
  8647. ),
  8648. 'primary key' => array(
  8649. '0' => 'analysisprop_id',
  8650. ),
  8651. 'unique keys' => array(
  8652. 'analysisprop_c1' => array(
  8653. '0' => 'analysis_id',
  8654. '1' => 'type_id',
  8655. ),
  8656. ),
  8657. 'indexes' => array(
  8658. 'analysisprop_idx1' => array(
  8659. '0' => 'analysis_id',
  8660. ),
  8661. 'analysisprop_idx2' => array(
  8662. '0' => 'type_id',
  8663. ),
  8664. ),
  8665. 'foreign keys' => array(
  8666. ),
  8667. );
  8668. return $description;
  8669. }
  8670. /**
  8671. * Implements hook_arraydesign_schema()
  8672. * Purpose: To describe the structure of arraydesign to tripal
  8673. * @see tripal_core_chado_insert()
  8674. * @see tripal_core_chado_update()
  8675. * @see tripal_core_chado_select()
  8676. *
  8677. * @return
  8678. * An array describing the current table
  8679. *
  8680. * @ingroup tripal_schema_api
  8681. *
  8682. */
  8683. function tripal_core_chado_arraydesign_schema() {
  8684. $description = array();
  8685. $description = array(
  8686. 'table' => 'arraydesign',
  8687. // 'description' => 'TODO: please describe this table!',
  8688. 'fields' => array(
  8689. 'arraydesign_id' => array(
  8690. // 'description' => 'TODO: please describe this field!',
  8691. 'type' => 'serial',
  8692. 'not NULL' => '1',
  8693. ),
  8694. 'manufacturer_id' => array(
  8695. // 'description' => 'TODO: please describe this field!',
  8696. 'type' => 'int',
  8697. 'not NULL' => '1',
  8698. ),
  8699. 'platformtype_id' => array(
  8700. // 'description' => 'TODO: please describe this field!',
  8701. 'type' => 'int',
  8702. 'not NULL' => '1',
  8703. ),
  8704. 'substratetype_id' => array(
  8705. // 'description' => 'TODO: please describe this field!',
  8706. 'type' => 'int',
  8707. 'not NULL' => '',
  8708. ),
  8709. 'protocol_id' => array(
  8710. // 'description' => 'TODO: please describe this field!',
  8711. 'type' => 'int',
  8712. 'not NULL' => '',
  8713. ),
  8714. 'dbxref_id' => array(
  8715. // 'description' => 'TODO: please describe this field!',
  8716. 'type' => 'int',
  8717. 'not NULL' => '',
  8718. ),
  8719. 'name' => array(
  8720. // 'description' => 'TODO: please describe this field!',
  8721. 'type' => 'text',
  8722. 'not NULL' => '1',
  8723. ),
  8724. 'version' => array(
  8725. // 'description' => 'TODO: please describe this field!',
  8726. 'type' => 'text',
  8727. 'not NULL' => '',
  8728. ),
  8729. 'description' => array(
  8730. // 'description' => 'TODO: please describe this field!',
  8731. 'type' => 'text',
  8732. 'not NULL' => '',
  8733. ),
  8734. 'array_dimensions' => array(
  8735. // 'description' => 'TODO: please describe this field!',
  8736. 'type' => 'text',
  8737. 'not NULL' => '',
  8738. ),
  8739. 'element_dimensions' => array(
  8740. // 'description' => 'TODO: please describe this field!',
  8741. 'type' => 'text',
  8742. 'not NULL' => '',
  8743. ),
  8744. 'num_of_elements' => array(
  8745. // 'description' => 'TODO: please describe this field!',
  8746. 'type' => 'int',
  8747. 'not NULL' => '',
  8748. ),
  8749. 'num_array_columns' => array(
  8750. // 'description' => 'TODO: please describe this field!',
  8751. 'type' => 'int',
  8752. 'not NULL' => '',
  8753. ),
  8754. 'num_array_rows' => array(
  8755. // 'description' => 'TODO: please describe this field!',
  8756. 'type' => 'int',
  8757. 'not NULL' => '',
  8758. ),
  8759. 'num_grid_columns' => array(
  8760. // 'description' => 'TODO: please describe this field!',
  8761. 'type' => 'int',
  8762. 'not NULL' => '',
  8763. ),
  8764. 'num_grid_rows' => array(
  8765. // 'description' => 'TODO: please describe this field!',
  8766. 'type' => 'int',
  8767. 'not NULL' => '',
  8768. ),
  8769. 'num_sub_columns' => array(
  8770. // 'description' => 'TODO: please describe this field!',
  8771. 'type' => 'int',
  8772. 'not NULL' => '',
  8773. ),
  8774. 'num_sub_rows' => array(
  8775. // 'description' => 'TODO: please describe this field!',
  8776. 'type' => 'int',
  8777. 'not NULL' => '',
  8778. ),
  8779. ),
  8780. 'primary key' => array(
  8781. '0' => 'arraydesign_id',
  8782. ),
  8783. 'unique keys' => array(
  8784. 'arraydesign_c1' => array(
  8785. '0' => 'name',
  8786. ),
  8787. ),
  8788. 'indexes' => array(
  8789. 'arraydesign_idx1' => array(
  8790. '0' => 'manufacturer_id',
  8791. ),
  8792. 'arraydesign_idx2' => array(
  8793. '0' => 'platformtype_id',
  8794. ),
  8795. 'arraydesign_idx3' => array(
  8796. '0' => 'substratetype_id',
  8797. ),
  8798. 'arraydesign_idx4' => array(
  8799. '0' => 'protocol_id',
  8800. ),
  8801. 'arraydesign_idx5' => array(
  8802. '0' => 'dbxref_id',
  8803. ),
  8804. ),
  8805. 'foreign keys' => array(
  8806. ),
  8807. );
  8808. return $description;
  8809. }
  8810. /**
  8811. * Implements hook_arraydesignprop_schema()
  8812. * Purpose: To describe the structure of arraydesignprop to tripal
  8813. * @see tripal_core_chado_insert()
  8814. * @see tripal_core_chado_update()
  8815. * @see tripal_core_chado_select()
  8816. *
  8817. * @return
  8818. * An array describing the current table
  8819. *
  8820. * @ingroup tripal_schema_api
  8821. *
  8822. */
  8823. function tripal_core_chado_arraydesignprop_schema() {
  8824. $description = array();
  8825. $description = array(
  8826. 'table' => 'arraydesignprop',
  8827. // 'description' => 'TODO: please describe this table!',
  8828. 'fields' => array(
  8829. 'arraydesignprop_id' => array(
  8830. // 'description' => 'TODO: please describe this field!',
  8831. 'type' => 'serial',
  8832. 'not NULL' => '1',
  8833. ),
  8834. 'arraydesign_id' => array(
  8835. // 'description' => 'TODO: please describe this field!',
  8836. 'type' => 'int',
  8837. 'not NULL' => '1',
  8838. ),
  8839. 'type_id' => array(
  8840. // 'description' => 'TODO: please describe this field!',
  8841. 'type' => 'int',
  8842. 'not NULL' => '1',
  8843. ),
  8844. 'value' => array(
  8845. // 'description' => 'TODO: please describe this field!',
  8846. 'type' => 'text',
  8847. 'not NULL' => '',
  8848. ),
  8849. 'rank' => array(
  8850. // 'description' => 'TODO: please describe this field!',
  8851. 'type' => 'int',
  8852. 'not NULL' => '1',
  8853. 'default' => '0',
  8854. ),
  8855. ),
  8856. 'primary key' => array(
  8857. '0' => 'arraydesignprop_id',
  8858. ),
  8859. 'unique keys' => array(
  8860. 'arraydesignprop_c1' => array(
  8861. '0' => 'arraydesign_id',
  8862. '1' => 'type_id',
  8863. '2' => 'rank',
  8864. ),
  8865. ),
  8866. 'indexes' => array(
  8867. 'arraydesignprop_idx1' => array(
  8868. '0' => 'arraydesign_id',
  8869. ),
  8870. 'arraydesignprop_idx2' => array(
  8871. '0' => 'type_id',
  8872. ),
  8873. ),
  8874. 'foreign keys' => array(
  8875. ),
  8876. );
  8877. return $description;
  8878. }
  8879. /**
  8880. * Implements hook_assay_schema()
  8881. * Purpose: To describe the structure of assay to tripal
  8882. * @see tripal_core_chado_insert()
  8883. * @see tripal_core_chado_update()
  8884. * @see tripal_core_chado_select()
  8885. *
  8886. * @return
  8887. * An array describing the current table
  8888. *
  8889. * @ingroup tripal_schema_api
  8890. *
  8891. */
  8892. function tripal_core_chado_assay_schema() {
  8893. $description = array();
  8894. $description = array(
  8895. 'table' => 'assay',
  8896. // 'description' => 'TODO: please describe this table!',
  8897. 'fields' => array(
  8898. 'assay_id' => array(
  8899. // 'description' => 'TODO: please describe this field!',
  8900. 'type' => 'serial',
  8901. 'not NULL' => '1',
  8902. ),
  8903. 'arraydesign_id' => array(
  8904. // 'description' => 'TODO: please describe this field!',
  8905. 'type' => 'int',
  8906. 'not NULL' => '1',
  8907. ),
  8908. 'protocol_id' => array(
  8909. // 'description' => 'TODO: please describe this field!',
  8910. 'type' => 'int',
  8911. 'not NULL' => '',
  8912. ),
  8913. 'assaydate' => array(
  8914. // 'description' => 'TODO: please describe this field!',
  8915. 'type' => 'datetime',
  8916. 'not NULL' => '',
  8917. 'default' => 'ow(',
  8918. ),
  8919. 'arrayidentifier' => array(
  8920. // 'description' => 'TODO: please describe this field!',
  8921. 'type' => 'text',
  8922. 'not NULL' => '',
  8923. ),
  8924. 'arraybatchidentifier' => array(
  8925. // 'description' => 'TODO: please describe this field!',
  8926. 'type' => 'text',
  8927. 'not NULL' => '',
  8928. ),
  8929. 'operator_id' => array(
  8930. // 'description' => 'TODO: please describe this field!',
  8931. 'type' => 'int',
  8932. 'not NULL' => '1',
  8933. ),
  8934. 'dbxref_id' => array(
  8935. // 'description' => 'TODO: please describe this field!',
  8936. 'type' => 'int',
  8937. 'not NULL' => '',
  8938. ),
  8939. 'name' => array(
  8940. // 'description' => 'TODO: please describe this field!',
  8941. 'type' => 'text',
  8942. 'not NULL' => '',
  8943. ),
  8944. 'description' => array(
  8945. // 'description' => 'TODO: please describe this field!',
  8946. 'type' => 'text',
  8947. 'not NULL' => '',
  8948. ),
  8949. ),
  8950. 'primary key' => array(
  8951. '0' => 'assay_id',
  8952. ),
  8953. 'unique keys' => array(
  8954. 'assay_c1' => array(
  8955. '0' => 'name',
  8956. ),
  8957. ),
  8958. 'indexes' => array(
  8959. 'assay_idx1' => array(
  8960. '0' => 'arraydesign_id',
  8961. ),
  8962. 'assay_idx2' => array(
  8963. '0' => 'protocol_id',
  8964. ),
  8965. 'assay_idx3' => array(
  8966. '0' => 'operator_id',
  8967. ),
  8968. 'assay_idx4' => array(
  8969. '0' => 'dbxref_id',
  8970. ),
  8971. ),
  8972. 'foreign keys' => array(
  8973. ),
  8974. );
  8975. return $description;
  8976. }
  8977. /**
  8978. * Implements hook_cv_root_schema()
  8979. * Purpose: To describe the structure of cv_root to tripal
  8980. * @see tripal_core_chado_insert()
  8981. * @see tripal_core_chado_update()
  8982. * @see tripal_core_chado_select()
  8983. *
  8984. * @return
  8985. * An array describing the current table
  8986. *
  8987. * @ingroup tripal_schema_api
  8988. *
  8989. */
  8990. function tripal_core_chado_cv_root_schema() {
  8991. $description = array();
  8992. $description = array(
  8993. 'table' => 'cv_root',
  8994. // 'description' => 'TODO: please describe this table!',
  8995. 'fields' => array(
  8996. 'cv_id' => array(
  8997. // 'description' => 'TODO: please describe this field!',
  8998. 'type' => 'int',
  8999. 'not NULL' => '',
  9000. ),
  9001. 'root_cvterm_id' => array(
  9002. // 'description' => 'TODO: please describe this field!',
  9003. 'type' => 'int',
  9004. 'not NULL' => '',
  9005. ),
  9006. ),
  9007. 'primary key' => array(
  9008. ),
  9009. 'unique keys' => array(
  9010. ),
  9011. 'indexes' => array(
  9012. ),
  9013. 'foreign keys' => array(
  9014. ),
  9015. );
  9016. return $description;
  9017. }
  9018. /**
  9019. * Implements hook_cvterm_schema()
  9020. * Purpose: To describe the structure of cvterm to tripal
  9021. * @see tripal_core_chado_insert()
  9022. * @see tripal_core_chado_update()
  9023. * @see tripal_core_chado_select()
  9024. *
  9025. * @return
  9026. * An array describing the current table
  9027. *
  9028. * @ingroup tripal_schema_api
  9029. *
  9030. */
  9031. function tripal_core_chado_cvterm_schema() {
  9032. $description = array();
  9033. $description = array(
  9034. 'table' => 'cvterm',
  9035. // 'description' => 'TODO: please describe this table!',
  9036. 'fields' => array(
  9037. 'cvterm_id' => array(
  9038. // 'description' => 'TODO: please describe this field!',
  9039. 'type' => 'serial',
  9040. 'not NULL' => '1',
  9041. ),
  9042. 'cv_id' => array(
  9043. // 'description' => 'TODO: please describe this field!',
  9044. 'type' => 'int',
  9045. 'not NULL' => '1',
  9046. ),
  9047. 'name' => array(
  9048. // 'description' => 'TODO: please describe this field!',
  9049. 'type' => 'varchar',
  9050. 'length' => '1024',
  9051. 'not NULL' => '1',
  9052. ),
  9053. 'definition' => array(
  9054. // 'description' => 'TODO: please describe this field!',
  9055. 'type' => 'text',
  9056. 'not NULL' => '',
  9057. ),
  9058. 'dbxref_id' => array(
  9059. // 'description' => 'TODO: please describe this field!',
  9060. 'type' => 'int',
  9061. 'not NULL' => '1',
  9062. ),
  9063. 'is_obsolete' => array(
  9064. // 'description' => 'TODO: please describe this field!',
  9065. 'type' => 'int',
  9066. 'not NULL' => '1',
  9067. 'default' => '0',
  9068. ),
  9069. 'is_relationshiptype' => array(
  9070. // 'description' => 'TODO: please describe this field!',
  9071. 'type' => 'int',
  9072. 'not NULL' => '1',
  9073. 'default' => '0',
  9074. ),
  9075. ),
  9076. 'primary key' => array(
  9077. '0' => 'cvterm_id',
  9078. ),
  9079. 'unique keys' => array(
  9080. 'cvterm_c1' => array(
  9081. '0' => 'name',
  9082. '1' => 'cv_id',
  9083. '2' => 'is_obsolete',
  9084. ),
  9085. 'cvterm_c2' => array(
  9086. '0' => 'dbxref_id',
  9087. ),
  9088. ),
  9089. 'indexes' => array(
  9090. 'cvterm_idx1' => array(
  9091. '0' => 'cv_id',
  9092. ),
  9093. 'cvterm_idx2' => array(
  9094. '0' => 'name',
  9095. ),
  9096. 'cvterm_idx3' => array(
  9097. '0' => 'dbxref_id',
  9098. ),
  9099. ),
  9100. 'foreign keys' => array(
  9101. ),
  9102. );
  9103. return $description;
  9104. }
  9105. /**
  9106. * Implements hook_feature_dbxref_schema()
  9107. * Purpose: To describe the structure of feature_dbxref to tripal
  9108. * @see tripal_core_chado_insert()
  9109. * @see tripal_core_chado_update()
  9110. * @see tripal_core_chado_select()
  9111. *
  9112. * @return
  9113. * An array describing the current table
  9114. *
  9115. * @ingroup tripal_schema_api
  9116. *
  9117. */
  9118. function tripal_core_chado_feature_dbxref_schema() {
  9119. $description = array();
  9120. $description = array(
  9121. 'table' => 'feature_dbxref',
  9122. // 'description' => 'TODO: please describe this table!',
  9123. 'fields' => array(
  9124. 'feature_dbxref_id' => array(
  9125. // 'description' => 'TODO: please describe this field!',
  9126. 'type' => 'serial',
  9127. 'not NULL' => '1',
  9128. ),
  9129. 'feature_id' => array(
  9130. // 'description' => 'TODO: please describe this field!',
  9131. 'type' => 'int',
  9132. 'not NULL' => '1',
  9133. ),
  9134. 'dbxref_id' => array(
  9135. // 'description' => 'TODO: please describe this field!',
  9136. 'type' => 'int',
  9137. 'not NULL' => '1',
  9138. ),
  9139. 'is_current' => array(
  9140. // 'description' => 'TODO: please describe this field!',
  9141. 'type' => 'boolean',
  9142. 'not NULL' => '1',
  9143. 'default' => 'ru',
  9144. ),
  9145. ),
  9146. 'primary key' => array(
  9147. '0' => 'feature_dbxref_id',
  9148. ),
  9149. 'unique keys' => array(
  9150. 'feature_dbxref_c1' => array(
  9151. '0' => 'feature_id',
  9152. '1' => 'dbxref_id',
  9153. ),
  9154. ),
  9155. 'indexes' => array(
  9156. 'feature_dbxref_idx1' => array(
  9157. '0' => 'feature_id',
  9158. ),
  9159. 'feature_dbxref_idx2' => array(
  9160. '0' => 'dbxref_id',
  9161. ),
  9162. ),
  9163. 'foreign keys' => array(
  9164. ),
  9165. );
  9166. return $description;
  9167. }
  9168. /**
  9169. * Implements hook_feature_cvtermprop_schema()
  9170. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9171. * @see tripal_core_chado_insert()
  9172. * @see tripal_core_chado_update()
  9173. * @see tripal_core_chado_select()
  9174. *
  9175. * @return
  9176. * An array describing the current table
  9177. *
  9178. * @ingroup tripal_schema_api
  9179. *
  9180. */
  9181. function tripal_core_chado_feature_cvtermprop_schema() {
  9182. $description = array();
  9183. $description = array(
  9184. 'table' => 'feature_cvtermprop',
  9185. // 'description' => 'TODO: please describe this table!',
  9186. 'fields' => array(
  9187. 'feature_cvtermprop_id' => array(
  9188. // 'description' => 'TODO: please describe this field!',
  9189. 'type' => 'serial',
  9190. 'not NULL' => '1',
  9191. ),
  9192. 'feature_cvterm_id' => array(
  9193. // 'description' => 'TODO: please describe this field!',
  9194. 'type' => 'int',
  9195. 'not NULL' => '1',
  9196. ),
  9197. 'type_id' => array(
  9198. // 'description' => 'TODO: please describe this field!',
  9199. 'type' => 'int',
  9200. 'not NULL' => '1',
  9201. ),
  9202. 'value' => array(
  9203. // 'description' => 'TODO: please describe this field!',
  9204. 'type' => 'text',
  9205. 'not NULL' => '',
  9206. ),
  9207. 'rank' => array(
  9208. // 'description' => 'TODO: please describe this field!',
  9209. 'type' => 'int',
  9210. 'not NULL' => '1',
  9211. 'default' => '0',
  9212. ),
  9213. ),
  9214. 'primary key' => array(
  9215. '0' => 'feature_cvtermprop_id',
  9216. ),
  9217. 'unique keys' => array(
  9218. 'feature_cvtermprop_c1' => array(
  9219. '0' => 'feature_cvterm_id',
  9220. '1' => 'type_id',
  9221. '2' => 'rank',
  9222. ),
  9223. ),
  9224. 'indexes' => array(
  9225. 'feature_cvtermprop_idx1' => array(
  9226. '0' => 'feature_cvterm_id',
  9227. ),
  9228. 'feature_cvtermprop_idx2' => array(
  9229. '0' => 'type_id',
  9230. ),
  9231. ),
  9232. 'foreign keys' => array(
  9233. ),
  9234. );
  9235. return $description;
  9236. }
  9237. /**
  9238. * Implements hook_feature_difference_schema()
  9239. * Purpose: To describe the structure of feature_difference to tripal
  9240. * @see tripal_core_chado_insert()
  9241. * @see tripal_core_chado_update()
  9242. * @see tripal_core_chado_select()
  9243. *
  9244. * @return
  9245. * An array describing the current table
  9246. *
  9247. * @ingroup tripal_schema_api
  9248. *
  9249. */
  9250. function tripal_core_chado_feature_difference_schema() {
  9251. $description = array();
  9252. $description = array(
  9253. 'table' => 'feature_difference',
  9254. // 'description' => 'TODO: please describe this table!',
  9255. 'fields' => array(
  9256. 'subject_id' => array(
  9257. // 'description' => 'TODO: please describe this field!',
  9258. 'type' => 'int',
  9259. 'not NULL' => '',
  9260. ),
  9261. 'object_id' => array(
  9262. // 'description' => 'TODO: please describe this field!',
  9263. 'type' => 'int',
  9264. 'not NULL' => '',
  9265. ),
  9266. 'srcfeature_id' => array(
  9267. // 'description' => 'TODO: please describe this field!',
  9268. 'type' => 'int',
  9269. 'size' => 'small',
  9270. 'not NULL' => '',
  9271. ),
  9272. 'fmin' => array(
  9273. // 'description' => 'TODO: please describe this field!',
  9274. 'type' => 'int',
  9275. 'not NULL' => '',
  9276. ),
  9277. 'fmax' => array(
  9278. // 'description' => 'TODO: please describe this field!',
  9279. 'type' => 'int',
  9280. 'not NULL' => '',
  9281. ),
  9282. 'strand' => array(
  9283. // 'description' => 'TODO: please describe this field!',
  9284. 'type' => 'int',
  9285. 'not NULL' => '',
  9286. ),
  9287. ),
  9288. 'primary key' => array(
  9289. ),
  9290. 'unique keys' => array(
  9291. ),
  9292. 'indexes' => array(
  9293. ),
  9294. 'foreign keys' => array(
  9295. ),
  9296. );
  9297. return $description;
  9298. }
  9299. /**
  9300. * Implements hook_feature_disjoint_schema()
  9301. * Purpose: To describe the structure of feature_disjoint to tripal
  9302. * @see tripal_core_chado_insert()
  9303. * @see tripal_core_chado_update()
  9304. * @see tripal_core_chado_select()
  9305. *
  9306. * @return
  9307. * An array describing the current table
  9308. *
  9309. * @ingroup tripal_schema_api
  9310. *
  9311. */
  9312. function tripal_core_chado_feature_disjoint_schema() {
  9313. $description = array();
  9314. $description = array(
  9315. 'table' => 'feature_disjoint',
  9316. // 'description' => 'TODO: please describe this table!',
  9317. 'fields' => array(
  9318. 'subject_id' => array(
  9319. // 'description' => 'TODO: please describe this field!',
  9320. 'type' => 'int',
  9321. 'not NULL' => '',
  9322. ),
  9323. 'object_id' => array(
  9324. // 'description' => 'TODO: please describe this field!',
  9325. 'type' => 'int',
  9326. 'not NULL' => '',
  9327. ),
  9328. ),
  9329. 'primary key' => array(
  9330. ),
  9331. 'unique keys' => array(
  9332. ),
  9333. 'indexes' => array(
  9334. ),
  9335. 'foreign keys' => array(
  9336. ),
  9337. );
  9338. return $description;
  9339. }
  9340. /**
  9341. * Implements hook_feature_distance_schema()
  9342. * Purpose: To describe the structure of feature_distance to tripal
  9343. * @see tripal_core_chado_insert()
  9344. * @see tripal_core_chado_update()
  9345. * @see tripal_core_chado_select()
  9346. *
  9347. * @return
  9348. * An array describing the current table
  9349. *
  9350. * @ingroup tripal_schema_api
  9351. *
  9352. */
  9353. function tripal_core_chado_feature_distance_schema() {
  9354. $description = array();
  9355. $description = array(
  9356. 'table' => 'feature_distance',
  9357. // 'description' => 'TODO: please describe this table!',
  9358. 'fields' => array(
  9359. 'subject_id' => array(
  9360. // 'description' => 'TODO: please describe this field!',
  9361. 'type' => 'int',
  9362. 'not NULL' => '',
  9363. ),
  9364. 'object_id' => array(
  9365. // 'description' => 'TODO: please describe this field!',
  9366. 'type' => 'int',
  9367. 'not NULL' => '',
  9368. ),
  9369. 'srcfeature_id' => array(
  9370. // 'description' => 'TODO: please describe this field!',
  9371. 'type' => 'int',
  9372. 'not NULL' => '',
  9373. ),
  9374. 'subject_strand' => array(
  9375. // 'description' => 'TODO: please describe this field!',
  9376. 'type' => 'int',
  9377. 'size' => 'small',
  9378. 'not NULL' => '',
  9379. ),
  9380. 'object_strand' => array(
  9381. // 'description' => 'TODO: please describe this field!',
  9382. 'type' => 'int',
  9383. 'size' => 'small',
  9384. 'not NULL' => '',
  9385. ),
  9386. 'distance' => array(
  9387. // 'description' => 'TODO: please describe this field!',
  9388. 'type' => 'int',
  9389. 'not NULL' => '',
  9390. ),
  9391. ),
  9392. 'primary key' => array(
  9393. ),
  9394. 'unique keys' => array(
  9395. ),
  9396. 'indexes' => array(
  9397. ),
  9398. 'foreign keys' => array(
  9399. ),
  9400. );
  9401. return $description;
  9402. }
  9403. /**
  9404. * Implements hook_feature_cvterm_pub_schema()
  9405. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9406. * @see tripal_core_chado_insert()
  9407. * @see tripal_core_chado_update()
  9408. * @see tripal_core_chado_select()
  9409. *
  9410. * @return
  9411. * An array describing the current table
  9412. *
  9413. * @ingroup tripal_schema_api
  9414. *
  9415. */
  9416. function tripal_core_chado_feature_cvterm_pub_schema() {
  9417. $description = array();
  9418. $description = array(
  9419. 'table' => 'feature_cvterm_pub',
  9420. // 'description' => 'TODO: please describe this table!',
  9421. 'fields' => array(
  9422. 'feature_cvterm_pub_id' => array(
  9423. // 'description' => 'TODO: please describe this field!',
  9424. 'type' => 'serial',
  9425. 'not NULL' => '1',
  9426. ),
  9427. 'feature_cvterm_id' => array(
  9428. // 'description' => 'TODO: please describe this field!',
  9429. 'type' => 'int',
  9430. 'not NULL' => '1',
  9431. ),
  9432. 'pub_id' => array(
  9433. // 'description' => 'TODO: please describe this field!',
  9434. 'type' => 'int',
  9435. 'not NULL' => '1',
  9436. ),
  9437. ),
  9438. 'primary key' => array(
  9439. '0' => 'feature_cvterm_pub_id',
  9440. ),
  9441. 'unique keys' => array(
  9442. 'feature_cvterm_pub_c1' => array(
  9443. '0' => 'feature_cvterm_id',
  9444. '1' => 'pub_id',
  9445. ),
  9446. ),
  9447. 'indexes' => array(
  9448. 'feature_cvterm_pub_idx1' => array(
  9449. '0' => 'feature_cvterm_id',
  9450. ),
  9451. 'feature_cvterm_pub_idx2' => array(
  9452. '0' => 'pub_id',
  9453. ),
  9454. ),
  9455. 'foreign keys' => array(
  9456. ),
  9457. );
  9458. return $description;
  9459. }
  9460. /**
  9461. * Implements hook_feature_cvterm_dbxref_schema()
  9462. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9463. * @see tripal_core_chado_insert()
  9464. * @see tripal_core_chado_update()
  9465. * @see tripal_core_chado_select()
  9466. *
  9467. * @return
  9468. * An array describing the current table
  9469. *
  9470. * @ingroup tripal_schema_api
  9471. *
  9472. */
  9473. function tripal_core_chado_feature_cvterm_dbxref_schema() {
  9474. $description = array();
  9475. $description = array(
  9476. 'table' => 'feature_cvterm_dbxref',
  9477. // 'description' => 'TODO: please describe this table!',
  9478. 'fields' => array(
  9479. 'feature_cvterm_dbxref_id' => array(
  9480. // 'description' => 'TODO: please describe this field!',
  9481. 'type' => 'serial',
  9482. 'not NULL' => '1',
  9483. ),
  9484. 'feature_cvterm_id' => array(
  9485. // 'description' => 'TODO: please describe this field!',
  9486. 'type' => 'int',
  9487. 'not NULL' => '1',
  9488. ),
  9489. 'dbxref_id' => array(
  9490. // 'description' => 'TODO: please describe this field!',
  9491. 'type' => 'int',
  9492. 'not NULL' => '1',
  9493. ),
  9494. ),
  9495. 'primary key' => array(
  9496. '0' => 'feature_cvterm_dbxref_id',
  9497. ),
  9498. 'unique keys' => array(
  9499. 'feature_cvterm_dbxref_c1' => array(
  9500. '0' => 'feature_cvterm_id',
  9501. '1' => 'dbxref_id',
  9502. ),
  9503. ),
  9504. 'indexes' => array(
  9505. 'feature_cvterm_dbxref_idx1' => array(
  9506. '0' => 'feature_cvterm_id',
  9507. ),
  9508. 'feature_cvterm_dbxref_idx2' => array(
  9509. '0' => 'dbxref_id',
  9510. ),
  9511. ),
  9512. 'foreign keys' => array(
  9513. ),
  9514. );
  9515. return $description;
  9516. }
  9517. /**
  9518. * Implements hook_f_type_schema()
  9519. * Purpose: To describe the structure of f_type to tripal
  9520. * @see tripal_core_chado_insert()
  9521. * @see tripal_core_chado_update()
  9522. * @see tripal_core_chado_select()
  9523. *
  9524. * @return
  9525. * An array describing the current table
  9526. *
  9527. * @ingroup tripal_schema_api
  9528. *
  9529. */
  9530. function tripal_core_chado_f_type_schema() {
  9531. $description = array();
  9532. $description = array(
  9533. 'table' => 'f_type',
  9534. // 'description' => 'TODO: please describe this table!',
  9535. 'fields' => array(
  9536. 'feature_id' => array(
  9537. // 'description' => 'TODO: please describe this field!',
  9538. 'type' => 'int',
  9539. 'not NULL' => '',
  9540. ),
  9541. 'name' => array(
  9542. // 'description' => 'TODO: please describe this field!',
  9543. 'type' => 'varchar',
  9544. 'length' => '255',
  9545. 'not NULL' => '',
  9546. ),
  9547. 'dbxref_id' => array(
  9548. // 'description' => 'TODO: please describe this field!',
  9549. 'type' => 'int',
  9550. 'not NULL' => '',
  9551. ),
  9552. 'type' => array(
  9553. // 'description' => 'TODO: please describe this field!',
  9554. 'type' => 'varchar',
  9555. 'length' => '1024',
  9556. 'not NULL' => '',
  9557. ),
  9558. 'residues' => array(
  9559. // 'description' => 'TODO: please describe this field!',
  9560. 'type' => 'text',
  9561. 'not NULL' => '',
  9562. ),
  9563. 'seqlen' => array(
  9564. // 'description' => 'TODO: please describe this field!',
  9565. 'type' => 'int',
  9566. 'not NULL' => '',
  9567. ),
  9568. 'md5checksum' => array(
  9569. // 'description' => 'TODO: please describe this field!',
  9570. 'type' => 'char',
  9571. 'length' => '32',
  9572. 'not NULL' => '',
  9573. ),
  9574. 'type_id' => array(
  9575. // 'description' => 'TODO: please describe this field!',
  9576. 'type' => 'int',
  9577. 'not NULL' => '',
  9578. ),
  9579. 'timeaccessioned' => array(
  9580. // 'description' => 'TODO: please describe this field!',
  9581. 'type' => 'datetime',
  9582. 'not NULL' => '',
  9583. ),
  9584. 'timelastmodified' => array(
  9585. // 'description' => 'TODO: please describe this field!',
  9586. 'type' => 'datetime',
  9587. 'not NULL' => '',
  9588. ),
  9589. ),
  9590. 'primary key' => array(
  9591. ),
  9592. 'unique keys' => array(
  9593. ),
  9594. 'indexes' => array(
  9595. ),
  9596. 'foreign keys' => array(
  9597. ),
  9598. );
  9599. return $description;
  9600. }
  9601. /**
  9602. * Implements hook_feature_schema()
  9603. * Purpose: To describe the structure of feature to tripal
  9604. * @see tripal_core_chado_insert()
  9605. * @see tripal_core_chado_update()
  9606. * @see tripal_core_chado_select()
  9607. *
  9608. * @return
  9609. * An array describing the current table
  9610. *
  9611. * @ingroup tripal_schema_api
  9612. *
  9613. */
  9614. function tripal_core_chado_feature_schema() {
  9615. $description = array();
  9616. $description = array(
  9617. 'table' => 'feature',
  9618. // 'description' => 'TODO: please describe this table!',
  9619. 'fields' => array(
  9620. 'feature_id' => array(
  9621. // 'description' => 'TODO: please describe this field!',
  9622. 'type' => 'serial',
  9623. 'not NULL' => '1',
  9624. ),
  9625. 'dbxref_id' => array(
  9626. // 'description' => 'TODO: please describe this field!',
  9627. 'type' => 'int',
  9628. 'not NULL' => '',
  9629. ),
  9630. 'organism_id' => array(
  9631. // 'description' => 'TODO: please describe this field!',
  9632. 'type' => 'int',
  9633. 'not NULL' => '1',
  9634. ),
  9635. 'name' => array(
  9636. // 'description' => 'TODO: please describe this field!',
  9637. 'type' => 'varchar',
  9638. 'length' => '255',
  9639. 'not NULL' => '',
  9640. ),
  9641. 'uniquename' => array(
  9642. // 'description' => 'TODO: please describe this field!',
  9643. 'type' => 'text',
  9644. 'not NULL' => '1',
  9645. ),
  9646. 'residues' => array(
  9647. // 'description' => 'TODO: please describe this field!',
  9648. 'type' => 'text',
  9649. 'not NULL' => '',
  9650. ),
  9651. 'seqlen' => array(
  9652. // 'description' => 'TODO: please describe this field!',
  9653. 'type' => 'int',
  9654. 'not NULL' => '',
  9655. ),
  9656. 'md5checksum' => array(
  9657. // 'description' => 'TODO: please describe this field!',
  9658. 'type' => 'char',
  9659. 'length' => '32',
  9660. 'not NULL' => '',
  9661. ),
  9662. 'type_id' => array(
  9663. // 'description' => 'TODO: please describe this field!',
  9664. 'type' => 'int',
  9665. 'not NULL' => '1',
  9666. ),
  9667. 'is_analysis' => array(
  9668. // 'description' => 'TODO: please describe this field!',
  9669. 'type' => 'boolean',
  9670. 'not NULL' => '1',
  9671. 'default' => 'als',
  9672. ),
  9673. 'is_obsolete' => array(
  9674. // 'description' => 'TODO: please describe this field!',
  9675. 'type' => 'boolean',
  9676. 'not NULL' => '1',
  9677. 'default' => 'als',
  9678. ),
  9679. 'timeaccessioned' => array(
  9680. // 'description' => 'TODO: please describe this field!',
  9681. 'type' => 'datetime',
  9682. 'not NULL' => '1',
  9683. 'default' => 'ow(',
  9684. ),
  9685. 'timelastmodified' => array(
  9686. // 'description' => 'TODO: please describe this field!',
  9687. 'type' => 'datetime',
  9688. 'not NULL' => '1',
  9689. 'default' => 'ow(',
  9690. ),
  9691. ),
  9692. 'primary key' => array(
  9693. '0' => 'feature_id',
  9694. ),
  9695. 'unique keys' => array(
  9696. 'feature_c1' => array(
  9697. '0' => 'organism_id',
  9698. '1' => 'uniquename',
  9699. '2' => 'type_id',
  9700. ),
  9701. ),
  9702. 'indexes' => array(
  9703. 'feature_idx1' => array(
  9704. '0' => 'dbxref_id',
  9705. ),
  9706. 'feature_idx2' => array(
  9707. '0' => 'organism_id',
  9708. ),
  9709. 'feature_idx3' => array(
  9710. '0' => 'type_id',
  9711. ),
  9712. 'feature_idx4' => array(
  9713. '0' => 'uniquename',
  9714. ),
  9715. 'feature_name_ind1' => array(
  9716. '0' => 'name',
  9717. ),
  9718. ),
  9719. 'foreign keys' => array(
  9720. ),
  9721. );
  9722. return $description;
  9723. }
  9724. /**
  9725. * Implements hook_feature_contains_schema()
  9726. * Purpose: To describe the structure of feature_contains to tripal
  9727. * @see tripal_core_chado_insert()
  9728. * @see tripal_core_chado_update()
  9729. * @see tripal_core_chado_select()
  9730. *
  9731. * @return
  9732. * An array describing the current table
  9733. *
  9734. * @ingroup tripal_schema_api
  9735. *
  9736. */
  9737. function tripal_core_chado_feature_contains_schema() {
  9738. $description = array();
  9739. $description = array(
  9740. 'table' => 'feature_contains',
  9741. // 'description' => 'TODO: please describe this table!',
  9742. 'fields' => array(
  9743. 'subject_id' => array(
  9744. // 'description' => 'TODO: please describe this field!',
  9745. 'type' => 'int',
  9746. 'not NULL' => '',
  9747. ),
  9748. 'object_id' => array(
  9749. // 'description' => 'TODO: please describe this field!',
  9750. 'type' => 'int',
  9751. 'not NULL' => '',
  9752. ),
  9753. ),
  9754. 'primary key' => array(
  9755. ),
  9756. 'unique keys' => array(
  9757. ),
  9758. 'indexes' => array(
  9759. ),
  9760. 'foreign keys' => array(
  9761. ),
  9762. );
  9763. return $description;
  9764. }
  9765. /**
  9766. * Implements hook_feature_cvterm_schema()
  9767. * Purpose: To describe the structure of feature_cvterm to tripal
  9768. * @see tripal_core_chado_insert()
  9769. * @see tripal_core_chado_update()
  9770. * @see tripal_core_chado_select()
  9771. *
  9772. * @return
  9773. * An array describing the current table
  9774. *
  9775. * @ingroup tripal_schema_api
  9776. *
  9777. */
  9778. function tripal_core_chado_feature_cvterm_schema() {
  9779. $description = array();
  9780. $description = array(
  9781. 'table' => 'feature_cvterm',
  9782. // 'description' => 'TODO: please describe this table!',
  9783. 'fields' => array(
  9784. 'feature_cvterm_id' => array(
  9785. // 'description' => 'TODO: please describe this field!',
  9786. 'type' => 'serial',
  9787. 'not NULL' => '1',
  9788. ),
  9789. 'feature_id' => array(
  9790. // 'description' => 'TODO: please describe this field!',
  9791. 'type' => 'int',
  9792. 'not NULL' => '1',
  9793. ),
  9794. 'cvterm_id' => array(
  9795. // 'description' => 'TODO: please describe this field!',
  9796. 'type' => 'int',
  9797. 'not NULL' => '1',
  9798. ),
  9799. 'pub_id' => array(
  9800. // 'description' => 'TODO: please describe this field!',
  9801. 'type' => 'int',
  9802. 'not NULL' => '1',
  9803. ),
  9804. 'is_not' => array(
  9805. // 'description' => 'TODO: please describe this field!',
  9806. 'type' => 'boolean',
  9807. 'not NULL' => '1',
  9808. 'default' => 'als',
  9809. ),
  9810. 'rank' => array(
  9811. // 'description' => 'TODO: please describe this field!',
  9812. 'type' => 'int',
  9813. 'not NULL' => '1',
  9814. 'default' => '0',
  9815. ),
  9816. ),
  9817. 'primary key' => array(
  9818. '0' => 'feature_cvterm_id',
  9819. ),
  9820. 'unique keys' => array(
  9821. 'feature_cvterm_c1' => array(
  9822. '0' => 'feature_id',
  9823. '1' => 'cvterm_id',
  9824. '2' => 'pub_id',
  9825. '3' => 'rank',
  9826. ),
  9827. ),
  9828. 'indexes' => array(
  9829. 'feature_cvterm_idx1' => array(
  9830. '0' => 'feature_id',
  9831. ),
  9832. 'feature_cvterm_idx2' => array(
  9833. '0' => 'cvterm_id',
  9834. ),
  9835. 'feature_cvterm_idx3' => array(
  9836. '0' => 'pub_id',
  9837. ),
  9838. ),
  9839. 'foreign keys' => array(
  9840. ),
  9841. );
  9842. return $description;
  9843. }
  9844. /**
  9845. * Implements hook_feature_expression_schema()
  9846. * Purpose: To describe the structure of feature_expression to tripal
  9847. * @see tripal_core_chado_insert()
  9848. * @see tripal_core_chado_update()
  9849. * @see tripal_core_chado_select()
  9850. *
  9851. * @return
  9852. * An array describing the current table
  9853. *
  9854. * @ingroup tripal_schema_api
  9855. *
  9856. */
  9857. function tripal_core_chado_feature_expression_schema() {
  9858. $description = array();
  9859. $description = array(
  9860. 'table' => 'feature_expression',
  9861. // 'description' => 'TODO: please describe this table!',
  9862. 'fields' => array(
  9863. 'feature_expression_id' => array(
  9864. // 'description' => 'TODO: please describe this field!',
  9865. 'type' => 'serial',
  9866. 'not NULL' => '1',
  9867. ),
  9868. 'expression_id' => array(
  9869. // 'description' => 'TODO: please describe this field!',
  9870. 'type' => 'int',
  9871. 'not NULL' => '1',
  9872. ),
  9873. 'feature_id' => array(
  9874. // 'description' => 'TODO: please describe this field!',
  9875. 'type' => 'int',
  9876. 'not NULL' => '1',
  9877. ),
  9878. 'pub_id' => array(
  9879. // 'description' => 'TODO: please describe this field!',
  9880. 'type' => 'int',
  9881. 'not NULL' => '1',
  9882. ),
  9883. ),
  9884. 'primary key' => array(
  9885. '0' => 'feature_expression_id',
  9886. ),
  9887. 'unique keys' => array(
  9888. 'feature_expression_c1' => array(
  9889. '0' => 'expression_id',
  9890. '1' => 'feature_id',
  9891. '2' => 'pub_id',
  9892. ),
  9893. ),
  9894. 'indexes' => array(
  9895. 'feature_expression_idx1' => array(
  9896. '0' => 'expression_id',
  9897. ),
  9898. 'feature_expression_idx2' => array(
  9899. '0' => 'feature_id',
  9900. ),
  9901. 'feature_expression_idx3' => array(
  9902. '0' => 'pub_id',
  9903. ),
  9904. ),
  9905. 'foreign keys' => array(
  9906. ),
  9907. );
  9908. return $description;
  9909. }
  9910. /**
  9911. * Implements hook_feature_expressionprop_schema()
  9912. * Purpose: To describe the structure of feature_expressionprop to tripal
  9913. * @see tripal_core_chado_insert()
  9914. * @see tripal_core_chado_update()
  9915. * @see tripal_core_chado_select()
  9916. *
  9917. * @return
  9918. * An array describing the current table
  9919. *
  9920. * @ingroup tripal_schema_api
  9921. *
  9922. */
  9923. function tripal_core_chado_feature_expressionprop_schema() {
  9924. $description = array();
  9925. $description = array(
  9926. 'table' => 'feature_expressionprop',
  9927. // 'description' => 'TODO: please describe this table!',
  9928. 'fields' => array(
  9929. 'feature_expressionprop_id' => array(
  9930. // 'description' => 'TODO: please describe this field!',
  9931. 'type' => 'serial',
  9932. 'not NULL' => '1',
  9933. ),
  9934. 'feature_expression_id' => array(
  9935. // 'description' => 'TODO: please describe this field!',
  9936. 'type' => 'int',
  9937. 'not NULL' => '1',
  9938. ),
  9939. 'type_id' => array(
  9940. // 'description' => 'TODO: please describe this field!',
  9941. 'type' => 'int',
  9942. 'not NULL' => '1',
  9943. ),
  9944. 'value' => array(
  9945. // 'description' => 'TODO: please describe this field!',
  9946. 'type' => 'text',
  9947. 'not NULL' => '',
  9948. ),
  9949. 'rank' => array(
  9950. // 'description' => 'TODO: please describe this field!',
  9951. 'type' => 'int',
  9952. 'not NULL' => '1',
  9953. 'default' => '0',
  9954. ),
  9955. ),
  9956. 'primary key' => array(
  9957. '0' => 'feature_expressionprop_id',
  9958. ),
  9959. 'unique keys' => array(
  9960. 'feature_expressionprop_c1' => array(
  9961. '0' => 'feature_expression_id',
  9962. '1' => 'type_id',
  9963. '2' => 'rank',
  9964. ),
  9965. ),
  9966. 'indexes' => array(
  9967. 'feature_expressionprop_idx1' => array(
  9968. '0' => 'feature_expression_id',
  9969. ),
  9970. 'feature_expressionprop_idx2' => array(
  9971. '0' => 'type_id',
  9972. ),
  9973. ),
  9974. 'foreign keys' => array(
  9975. ),
  9976. );
  9977. return $description;
  9978. }
  9979. /**
  9980. * Implements hook_feature_pubprop_schema()
  9981. * Purpose: To describe the structure of feature_pubprop to tripal
  9982. * @see tripal_core_chado_insert()
  9983. * @see tripal_core_chado_update()
  9984. * @see tripal_core_chado_select()
  9985. *
  9986. * @return
  9987. * An array describing the current table
  9988. *
  9989. * @ingroup tripal_schema_api
  9990. *
  9991. */
  9992. function tripal_core_chado_feature_pubprop_schema() {
  9993. $description = array();
  9994. $description = array(
  9995. 'table' => 'feature_pubprop',
  9996. // 'description' => 'TODO: please describe this table!',
  9997. 'fields' => array(
  9998. 'feature_pubprop_id' => array(
  9999. // 'description' => 'TODO: please describe this field!',
  10000. 'type' => 'serial',
  10001. 'not NULL' => '1',
  10002. ),
  10003. 'feature_pub_id' => array(
  10004. // 'description' => 'TODO: please describe this field!',
  10005. 'type' => 'int',
  10006. 'not NULL' => '1',
  10007. ),
  10008. 'type_id' => array(
  10009. // 'description' => 'TODO: please describe this field!',
  10010. 'type' => 'int',
  10011. 'not NULL' => '1',
  10012. ),
  10013. 'value' => array(
  10014. // 'description' => 'TODO: please describe this field!',
  10015. 'type' => 'text',
  10016. 'not NULL' => '',
  10017. ),
  10018. 'rank' => array(
  10019. // 'description' => 'TODO: please describe this field!',
  10020. 'type' => 'int',
  10021. 'not NULL' => '1',
  10022. 'default' => '0',
  10023. ),
  10024. ),
  10025. 'primary key' => array(
  10026. '0' => 'feature_pubprop_id',
  10027. ),
  10028. 'unique keys' => array(
  10029. 'feature_pubprop_c1' => array(
  10030. '0' => 'feature_pub_id',
  10031. '1' => 'type_id',
  10032. '2' => 'rank',
  10033. ),
  10034. ),
  10035. 'indexes' => array(
  10036. 'feature_pubprop_idx1' => array(
  10037. '0' => 'feature_pub_id',
  10038. ),
  10039. ),
  10040. 'foreign keys' => array(
  10041. ),
  10042. );
  10043. return $description;
  10044. }
  10045. /**
  10046. * Implements hook_feature_relationship_schema()
  10047. * Purpose: To describe the structure of feature_relationship to tripal
  10048. * @see tripal_core_chado_insert()
  10049. * @see tripal_core_chado_update()
  10050. * @see tripal_core_chado_select()
  10051. *
  10052. * @return
  10053. * An array describing the current table
  10054. *
  10055. * @ingroup tripal_schema_api
  10056. *
  10057. */
  10058. function tripal_core_chado_feature_relationship_schema() {
  10059. $description = array();
  10060. $description = array(
  10061. 'table' => 'feature_relationship',
  10062. // 'description' => 'TODO: please describe this table!',
  10063. 'fields' => array(
  10064. 'feature_relationship_id' => array(
  10065. // 'description' => 'TODO: please describe this field!',
  10066. 'type' => 'serial',
  10067. 'not NULL' => '1',
  10068. ),
  10069. 'subject_id' => array(
  10070. // 'description' => 'TODO: please describe this field!',
  10071. 'type' => 'int',
  10072. 'not NULL' => '1',
  10073. ),
  10074. 'object_id' => array(
  10075. // 'description' => 'TODO: please describe this field!',
  10076. 'type' => 'int',
  10077. 'not NULL' => '1',
  10078. ),
  10079. 'type_id' => array(
  10080. // 'description' => 'TODO: please describe this field!',
  10081. 'type' => 'int',
  10082. 'not NULL' => '1',
  10083. ),
  10084. 'value' => array(
  10085. // 'description' => 'TODO: please describe this field!',
  10086. 'type' => 'text',
  10087. 'not NULL' => '',
  10088. ),
  10089. 'rank' => array(
  10090. // 'description' => 'TODO: please describe this field!',
  10091. 'type' => 'int',
  10092. 'not NULL' => '1',
  10093. 'default' => '0',
  10094. ),
  10095. ),
  10096. 'primary key' => array(
  10097. '0' => 'feature_relationship_id',
  10098. ),
  10099. 'unique keys' => array(
  10100. 'feature_relationship_c1' => array(
  10101. '0' => 'subject_id',
  10102. '1' => 'object_id',
  10103. '2' => 'type_id',
  10104. '3' => 'rank',
  10105. ),
  10106. ),
  10107. 'indexes' => array(
  10108. 'feature_relationship_idx1' => array(
  10109. '0' => 'subject_id',
  10110. ),
  10111. 'feature_relationship_idx2' => array(
  10112. '0' => 'object_id',
  10113. ),
  10114. 'feature_relationship_idx3' => array(
  10115. '0' => 'type_id',
  10116. ),
  10117. ),
  10118. 'foreign keys' => array(
  10119. ),
  10120. );
  10121. return $description;
  10122. }
  10123. /**
  10124. * Implements hook_feature_relationship_pub_schema()
  10125. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10126. * @see tripal_core_chado_insert()
  10127. * @see tripal_core_chado_update()
  10128. * @see tripal_core_chado_select()
  10129. *
  10130. * @return
  10131. * An array describing the current table
  10132. *
  10133. * @ingroup tripal_schema_api
  10134. *
  10135. */
  10136. function tripal_core_chado_feature_relationship_pub_schema() {
  10137. $description = array();
  10138. $description = array(
  10139. 'table' => 'feature_relationship_pub',
  10140. // 'description' => 'TODO: please describe this table!',
  10141. 'fields' => array(
  10142. 'feature_relationship_pub_id' => array(
  10143. // 'description' => 'TODO: please describe this field!',
  10144. 'type' => 'serial',
  10145. 'not NULL' => '1',
  10146. ),
  10147. 'feature_relationship_id' => array(
  10148. // 'description' => 'TODO: please describe this field!',
  10149. 'type' => 'int',
  10150. 'not NULL' => '1',
  10151. ),
  10152. 'pub_id' => array(
  10153. // 'description' => 'TODO: please describe this field!',
  10154. 'type' => 'int',
  10155. 'not NULL' => '1',
  10156. ),
  10157. ),
  10158. 'primary key' => array(
  10159. '0' => 'feature_relationship_pub_id',
  10160. ),
  10161. 'unique keys' => array(
  10162. 'feature_relationship_pub_c1' => array(
  10163. '0' => 'feature_relationship_id',
  10164. '1' => 'pub_id',
  10165. ),
  10166. ),
  10167. 'indexes' => array(
  10168. 'feature_relationship_pub_idx1' => array(
  10169. '0' => 'feature_relationship_id',
  10170. ),
  10171. 'feature_relationship_pub_idx2' => array(
  10172. '0' => 'pub_id',
  10173. ),
  10174. ),
  10175. 'foreign keys' => array(
  10176. ),
  10177. );
  10178. return $description;
  10179. }
  10180. /**
  10181. * Implements hook_feature_relationshipprop_schema()
  10182. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10183. * @see tripal_core_chado_insert()
  10184. * @see tripal_core_chado_update()
  10185. * @see tripal_core_chado_select()
  10186. *
  10187. * @return
  10188. * An array describing the current table
  10189. *
  10190. * @ingroup tripal_schema_api
  10191. *
  10192. */
  10193. function tripal_core_chado_feature_relationshipprop_schema() {
  10194. $description = array();
  10195. $description = array(
  10196. 'table' => 'feature_relationshipprop',
  10197. // 'description' => 'TODO: please describe this table!',
  10198. 'fields' => array(
  10199. 'feature_relationshipprop_id' => array(
  10200. // 'description' => 'TODO: please describe this field!',
  10201. 'type' => 'serial',
  10202. 'not NULL' => '1',
  10203. ),
  10204. 'feature_relationship_id' => array(
  10205. // 'description' => 'TODO: please describe this field!',
  10206. 'type' => 'int',
  10207. 'not NULL' => '1',
  10208. ),
  10209. 'type_id' => array(
  10210. // 'description' => 'TODO: please describe this field!',
  10211. 'type' => 'int',
  10212. 'not NULL' => '1',
  10213. ),
  10214. 'value' => array(
  10215. // 'description' => 'TODO: please describe this field!',
  10216. 'type' => 'text',
  10217. 'not NULL' => '',
  10218. ),
  10219. 'rank' => array(
  10220. // 'description' => 'TODO: please describe this field!',
  10221. 'type' => 'int',
  10222. 'not NULL' => '1',
  10223. 'default' => '0',
  10224. ),
  10225. ),
  10226. 'primary key' => array(
  10227. '0' => 'feature_relationshipprop_id',
  10228. ),
  10229. 'unique keys' => array(
  10230. 'feature_relationshipprop_c1' => array(
  10231. '0' => 'feature_relationship_id',
  10232. '1' => 'type_id',
  10233. '2' => 'rank',
  10234. ),
  10235. ),
  10236. 'indexes' => array(
  10237. 'feature_relationshipprop_idx1' => array(
  10238. '0' => 'feature_relationship_id',
  10239. ),
  10240. 'feature_relationshipprop_idx2' => array(
  10241. '0' => 'type_id',
  10242. ),
  10243. ),
  10244. 'foreign keys' => array(
  10245. ),
  10246. );
  10247. return $description;
  10248. }
  10249. /**
  10250. * Implements hook_feature_pub_schema()
  10251. * Purpose: To describe the structure of feature_pub to tripal
  10252. * @see tripal_core_chado_insert()
  10253. * @see tripal_core_chado_update()
  10254. * @see tripal_core_chado_select()
  10255. *
  10256. * @return
  10257. * An array describing the current table
  10258. *
  10259. * @ingroup tripal_schema_api
  10260. *
  10261. */
  10262. function tripal_core_chado_feature_pub_schema() {
  10263. $description = array();
  10264. $description = array(
  10265. 'table' => 'feature_pub',
  10266. // 'description' => 'TODO: please describe this table!',
  10267. 'fields' => array(
  10268. 'feature_pub_id' => array(
  10269. // 'description' => 'TODO: please describe this field!',
  10270. 'type' => 'serial',
  10271. 'not NULL' => '1',
  10272. ),
  10273. 'feature_id' => array(
  10274. // 'description' => 'TODO: please describe this field!',
  10275. 'type' => 'int',
  10276. 'not NULL' => '1',
  10277. ),
  10278. 'pub_id' => array(
  10279. // 'description' => 'TODO: please describe this field!',
  10280. 'type' => 'int',
  10281. 'not NULL' => '1',
  10282. ),
  10283. ),
  10284. 'primary key' => array(
  10285. '0' => 'feature_pub_id',
  10286. ),
  10287. 'unique keys' => array(
  10288. 'feature_pub_c1' => array(
  10289. '0' => 'feature_id',
  10290. '1' => 'pub_id',
  10291. ),
  10292. ),
  10293. 'indexes' => array(
  10294. 'feature_pub_idx1' => array(
  10295. '0' => 'feature_id',
  10296. ),
  10297. 'feature_pub_idx2' => array(
  10298. '0' => 'pub_id',
  10299. ),
  10300. ),
  10301. 'foreign keys' => array(
  10302. ),
  10303. );
  10304. return $description;
  10305. }
  10306. /**
  10307. * Implements hook_feature_phenotype_schema()
  10308. * Purpose: To describe the structure of feature_phenotype to tripal
  10309. * @see tripal_core_chado_insert()
  10310. * @see tripal_core_chado_update()
  10311. * @see tripal_core_chado_select()
  10312. *
  10313. * @return
  10314. * An array describing the current table
  10315. *
  10316. * @ingroup tripal_schema_api
  10317. *
  10318. */
  10319. function tripal_core_chado_feature_phenotype_schema() {
  10320. $description = array();
  10321. $description = array(
  10322. 'table' => 'feature_phenotype',
  10323. // 'description' => 'TODO: please describe this table!',
  10324. 'fields' => array(
  10325. 'feature_phenotype_id' => array(
  10326. // 'description' => 'TODO: please describe this field!',
  10327. 'type' => 'serial',
  10328. 'not NULL' => '1',
  10329. ),
  10330. 'feature_id' => array(
  10331. // 'description' => 'TODO: please describe this field!',
  10332. 'type' => 'int',
  10333. 'not NULL' => '1',
  10334. ),
  10335. 'phenotype_id' => array(
  10336. // 'description' => 'TODO: please describe this field!',
  10337. 'type' => 'int',
  10338. 'not NULL' => '1',
  10339. ),
  10340. ),
  10341. 'primary key' => array(
  10342. '0' => 'feature_phenotype_id',
  10343. ),
  10344. 'unique keys' => array(
  10345. 'feature_phenotype_c1' => array(
  10346. '0' => 'feature_id',
  10347. '1' => 'phenotype_id',
  10348. ),
  10349. ),
  10350. 'indexes' => array(
  10351. 'feature_phenotype_idx1' => array(
  10352. '0' => 'feature_id',
  10353. ),
  10354. 'feature_phenotype_idx2' => array(
  10355. '0' => 'phenotype_id',
  10356. ),
  10357. ),
  10358. 'foreign keys' => array(
  10359. ),
  10360. );
  10361. return $description;
  10362. }
  10363. /**
  10364. * Implements hook_feature_genotype_schema()
  10365. * Purpose: To describe the structure of feature_genotype to tripal
  10366. * @see tripal_core_chado_insert()
  10367. * @see tripal_core_chado_update()
  10368. * @see tripal_core_chado_select()
  10369. *
  10370. * @return
  10371. * An array describing the current table
  10372. *
  10373. * @ingroup tripal_schema_api
  10374. *
  10375. */
  10376. function tripal_core_chado_feature_genotype_schema() {
  10377. $description = array();
  10378. $description = array(
  10379. 'table' => 'feature_genotype',
  10380. // 'description' => 'TODO: please describe this table!',
  10381. 'fields' => array(
  10382. 'feature_genotype_id' => array(
  10383. // 'description' => 'TODO: please describe this field!',
  10384. 'type' => 'serial',
  10385. 'not NULL' => '1',
  10386. ),
  10387. 'feature_id' => array(
  10388. // 'description' => 'TODO: please describe this field!',
  10389. 'type' => 'int',
  10390. 'not NULL' => '1',
  10391. ),
  10392. 'genotype_id' => array(
  10393. // 'description' => 'TODO: please describe this field!',
  10394. 'type' => 'int',
  10395. 'not NULL' => '1',
  10396. ),
  10397. 'chromosome_id' => array(
  10398. // 'description' => 'TODO: please describe this field!',
  10399. 'type' => 'int',
  10400. 'not NULL' => '',
  10401. ),
  10402. 'rank' => array(
  10403. // 'description' => 'TODO: please describe this field!',
  10404. 'type' => 'int',
  10405. 'not NULL' => '1',
  10406. ),
  10407. 'cgroup' => array(
  10408. // 'description' => 'TODO: please describe this field!',
  10409. 'type' => 'int',
  10410. 'not NULL' => '1',
  10411. ),
  10412. 'cvterm_id' => array(
  10413. // 'description' => 'TODO: please describe this field!',
  10414. 'type' => 'int',
  10415. 'not NULL' => '1',
  10416. ),
  10417. ),
  10418. 'primary key' => array(
  10419. '0' => 'feature_genotype_id',
  10420. ),
  10421. 'unique keys' => array(
  10422. 'feature_genotype_c1' => array(
  10423. '0' => 'feature_id',
  10424. '1' => 'genotype_id',
  10425. '2' => 'cvterm_id',
  10426. '3' => 'chromosome_id',
  10427. '4' => 'rank',
  10428. '5' => 'cgroup',
  10429. ),
  10430. ),
  10431. 'indexes' => array(
  10432. 'feature_genotype_idx1' => array(
  10433. '0' => 'feature_id',
  10434. ),
  10435. 'feature_genotype_idx2' => array(
  10436. '0' => 'genotype_id',
  10437. ),
  10438. ),
  10439. 'foreign keys' => array(
  10440. ),
  10441. );
  10442. return $description;
  10443. }
  10444. /**
  10445. * Implements hook_feature_intersection_schema()
  10446. * Purpose: To describe the structure of feature_intersection to tripal
  10447. * @see tripal_core_chado_insert()
  10448. * @see tripal_core_chado_update()
  10449. * @see tripal_core_chado_select()
  10450. *
  10451. * @return
  10452. * An array describing the current table
  10453. *
  10454. * @ingroup tripal_schema_api
  10455. *
  10456. */
  10457. function tripal_core_chado_feature_intersection_schema() {
  10458. $description = array();
  10459. $description = array(
  10460. 'table' => 'feature_intersection',
  10461. // 'description' => 'TODO: please describe this table!',
  10462. 'fields' => array(
  10463. 'subject_id' => array(
  10464. // 'description' => 'TODO: please describe this field!',
  10465. 'type' => 'int',
  10466. 'not NULL' => '',
  10467. ),
  10468. 'object_id' => array(
  10469. // 'description' => 'TODO: please describe this field!',
  10470. 'type' => 'int',
  10471. 'not NULL' => '',
  10472. ),
  10473. 'srcfeature_id' => array(
  10474. // 'description' => 'TODO: please describe this field!',
  10475. 'type' => 'int',
  10476. 'not NULL' => '',
  10477. ),
  10478. 'subject_strand' => array(
  10479. // 'description' => 'TODO: please describe this field!',
  10480. 'type' => 'int',
  10481. 'size' => 'small',
  10482. 'not NULL' => '',
  10483. ),
  10484. 'object_strand' => array(
  10485. // 'description' => 'TODO: please describe this field!',
  10486. 'type' => 'int',
  10487. 'size' => 'small',
  10488. 'not NULL' => '',
  10489. ),
  10490. 'fmin' => array(
  10491. // 'description' => 'TODO: please describe this field!',
  10492. 'type' => 'int',
  10493. 'not NULL' => '',
  10494. ),
  10495. 'fmax' => array(
  10496. // 'description' => 'TODO: please describe this field!',
  10497. 'type' => 'int',
  10498. 'not NULL' => '',
  10499. ),
  10500. ),
  10501. 'primary key' => array(
  10502. ),
  10503. 'unique keys' => array(
  10504. ),
  10505. 'indexes' => array(
  10506. ),
  10507. 'foreign keys' => array(
  10508. ),
  10509. );
  10510. return $description;
  10511. }
  10512. /**
  10513. * Implements hook_feature_meets_schema()
  10514. * Purpose: To describe the structure of feature_meets to tripal
  10515. * @see tripal_core_chado_insert()
  10516. * @see tripal_core_chado_update()
  10517. * @see tripal_core_chado_select()
  10518. *
  10519. * @return
  10520. * An array describing the current table
  10521. *
  10522. * @ingroup tripal_schema_api
  10523. *
  10524. */
  10525. function tripal_core_chado_feature_meets_schema() {
  10526. $description = array();
  10527. $description = array(
  10528. 'table' => 'feature_meets',
  10529. // 'description' => 'TODO: please describe this table!',
  10530. 'fields' => array(
  10531. 'subject_id' => array(
  10532. // 'description' => 'TODO: please describe this field!',
  10533. 'type' => 'int',
  10534. 'not NULL' => '',
  10535. ),
  10536. 'object_id' => array(
  10537. // 'description' => 'TODO: please describe this field!',
  10538. 'type' => 'int',
  10539. 'not NULL' => '',
  10540. ),
  10541. ),
  10542. 'primary key' => array(
  10543. ),
  10544. 'unique keys' => array(
  10545. ),
  10546. 'indexes' => array(
  10547. ),
  10548. 'foreign keys' => array(
  10549. ),
  10550. );
  10551. return $description;
  10552. }
  10553. /**
  10554. * Implements hook_feature_meets_on_same_strand_schema()
  10555. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10556. * @see tripal_core_chado_insert()
  10557. * @see tripal_core_chado_update()
  10558. * @see tripal_core_chado_select()
  10559. *
  10560. * @return
  10561. * An array describing the current table
  10562. *
  10563. * @ingroup tripal_schema_api
  10564. *
  10565. */
  10566. function tripal_core_chado_feature_meets_on_same_strand_schema() {
  10567. $description = array();
  10568. $description = array(
  10569. 'table' => 'feature_meets_on_same_strand',
  10570. // 'description' => 'TODO: please describe this table!',
  10571. 'fields' => array(
  10572. 'subject_id' => array(
  10573. // 'description' => 'TODO: please describe this field!',
  10574. 'type' => 'int',
  10575. 'not NULL' => '',
  10576. ),
  10577. 'object_id' => array(
  10578. // 'description' => 'TODO: please describe this field!',
  10579. 'type' => 'int',
  10580. 'not NULL' => '',
  10581. ),
  10582. ),
  10583. 'primary key' => array(
  10584. ),
  10585. 'unique keys' => array(
  10586. ),
  10587. 'indexes' => array(
  10588. ),
  10589. 'foreign keys' => array(
  10590. ),
  10591. );
  10592. return $description;
  10593. }
  10594. /**
  10595. * Implements hook_f_loc_schema()
  10596. * Purpose: To describe the structure of f_loc to tripal
  10597. * @see tripal_core_chado_insert()
  10598. * @see tripal_core_chado_update()
  10599. * @see tripal_core_chado_select()
  10600. *
  10601. * @return
  10602. * An array describing the current table
  10603. *
  10604. * @ingroup tripal_schema_api
  10605. *
  10606. */
  10607. function tripal_core_chado_f_loc_schema() {
  10608. $description = array();
  10609. $description = array(
  10610. 'table' => 'f_loc',
  10611. // 'description' => 'TODO: please describe this table!',
  10612. 'fields' => array(
  10613. 'feature_id' => array(
  10614. // 'description' => 'TODO: please describe this field!',
  10615. 'type' => 'int',
  10616. 'not NULL' => '',
  10617. ),
  10618. 'name' => array(
  10619. // 'description' => 'TODO: please describe this field!',
  10620. 'type' => 'varchar',
  10621. 'length' => '255',
  10622. 'not NULL' => '',
  10623. ),
  10624. 'dbxref_id' => array(
  10625. // 'description' => 'TODO: please describe this field!',
  10626. 'type' => 'int',
  10627. 'not NULL' => '',
  10628. ),
  10629. 'nbeg' => array(
  10630. // 'description' => 'TODO: please describe this field!',
  10631. 'type' => 'int',
  10632. 'not NULL' => '',
  10633. ),
  10634. 'nend' => array(
  10635. // 'description' => 'TODO: please describe this field!',
  10636. 'type' => 'int',
  10637. 'not NULL' => '',
  10638. ),
  10639. 'strand' => array(
  10640. // 'description' => 'TODO: please describe this field!',
  10641. 'type' => 'int',
  10642. 'size' => 'small',
  10643. 'not NULL' => '',
  10644. ),
  10645. ),
  10646. 'primary key' => array(
  10647. ),
  10648. 'unique keys' => array(
  10649. ),
  10650. 'indexes' => array(
  10651. ),
  10652. 'foreign keys' => array(
  10653. ),
  10654. );
  10655. return $description;
  10656. }
  10657. /**
  10658. * Implements hook_expressionprop_schema()
  10659. * Purpose: To describe the structure of expressionprop to tripal
  10660. * @see tripal_core_chado_insert()
  10661. * @see tripal_core_chado_update()
  10662. * @see tripal_core_chado_select()
  10663. *
  10664. * @return
  10665. * An array describing the current table
  10666. *
  10667. * @ingroup tripal_schema_api
  10668. *
  10669. */
  10670. function tripal_core_chado_expressionprop_schema() {
  10671. $description = array();
  10672. $description = array(
  10673. 'table' => 'expressionprop',
  10674. // 'description' => 'TODO: please describe this table!',
  10675. 'fields' => array(
  10676. 'expressionprop_id' => array(
  10677. // 'description' => 'TODO: please describe this field!',
  10678. 'type' => 'serial',
  10679. 'not NULL' => '1',
  10680. ),
  10681. 'expression_id' => array(
  10682. // 'description' => 'TODO: please describe this field!',
  10683. 'type' => 'int',
  10684. 'not NULL' => '1',
  10685. ),
  10686. 'type_id' => array(
  10687. // 'description' => 'TODO: please describe this field!',
  10688. 'type' => 'int',
  10689. 'not NULL' => '1',
  10690. ),
  10691. 'value' => array(
  10692. // 'description' => 'TODO: please describe this field!',
  10693. 'type' => 'text',
  10694. 'not NULL' => '',
  10695. ),
  10696. 'rank' => array(
  10697. // 'description' => 'TODO: please describe this field!',
  10698. 'type' => 'int',
  10699. 'not NULL' => '1',
  10700. 'default' => '0',
  10701. ),
  10702. ),
  10703. 'primary key' => array(
  10704. '0' => 'expressionprop_id',
  10705. ),
  10706. 'unique keys' => array(
  10707. 'expressionprop_c1' => array(
  10708. '0' => 'expression_id',
  10709. '1' => 'type_id',
  10710. '2' => 'rank',
  10711. ),
  10712. ),
  10713. 'indexes' => array(
  10714. 'expressionprop_idx1' => array(
  10715. '0' => 'expression_id',
  10716. ),
  10717. 'expressionprop_idx2' => array(
  10718. '0' => 'type_id',
  10719. ),
  10720. ),
  10721. 'foreign keys' => array(
  10722. ),
  10723. );
  10724. return $description;
  10725. }
  10726. /**
  10727. * Implements hook_db_dbxref_count_schema()
  10728. * Purpose: To describe the structure of db_dbxref_count to tripal
  10729. * @see tripal_core_chado_insert()
  10730. * @see tripal_core_chado_update()
  10731. * @see tripal_core_chado_select()
  10732. *
  10733. * @return
  10734. * An array describing the current table
  10735. *
  10736. * @ingroup tripal_schema_api
  10737. *
  10738. */
  10739. function tripal_core_chado_db_dbxref_count_schema() {
  10740. $description = array();
  10741. $description = array(
  10742. 'table' => 'db_dbxref_count',
  10743. // 'description' => 'TODO: please describe this table!',
  10744. 'fields' => array(
  10745. 'name' => array(
  10746. // 'description' => 'TODO: please describe this field!',
  10747. 'type' => 'varchar',
  10748. 'length' => '255',
  10749. 'not NULL' => '',
  10750. ),
  10751. 'num_dbxrefs' => array(
  10752. // 'description' => 'TODO: please describe this field!',
  10753. 'type' => 'int',
  10754. 'size' => 'big',
  10755. 'not NULL' => '',
  10756. ),
  10757. ),
  10758. 'primary key' => array(
  10759. ),
  10760. 'unique keys' => array(
  10761. ),
  10762. 'indexes' => array(
  10763. ),
  10764. 'foreign keys' => array(
  10765. ),
  10766. );
  10767. return $description;
  10768. }
  10769. /**
  10770. * Implements hook_dbxref_schema()
  10771. * Purpose: To describe the structure of dbxref to tripal
  10772. * @see tripal_core_chado_insert()
  10773. * @see tripal_core_chado_update()
  10774. * @see tripal_core_chado_select()
  10775. *
  10776. * @return
  10777. * An array describing the current table
  10778. *
  10779. * @ingroup tripal_schema_api
  10780. *
  10781. */
  10782. function tripal_core_chado_dbxref_schema() {
  10783. $description = array();
  10784. $description = array(
  10785. 'table' => 'dbxref',
  10786. // 'description' => 'TODO: please describe this table!',
  10787. 'fields' => array(
  10788. 'dbxref_id' => array(
  10789. // 'description' => 'TODO: please describe this field!',
  10790. 'type' => 'serial',
  10791. 'not NULL' => '1',
  10792. ),
  10793. 'db_id' => array(
  10794. // 'description' => 'TODO: please describe this field!',
  10795. 'type' => 'int',
  10796. 'not NULL' => '1',
  10797. ),
  10798. 'accession' => array(
  10799. // 'description' => 'TODO: please describe this field!',
  10800. 'type' => 'varchar',
  10801. 'length' => '255',
  10802. 'not NULL' => '1',
  10803. ),
  10804. 'version' => array(
  10805. // 'description' => 'TODO: please describe this field!',
  10806. 'type' => 'varchar',
  10807. 'length' => '255',
  10808. 'not NULL' => '1',
  10809. 'default' => '',
  10810. ),
  10811. 'description' => array(
  10812. // 'description' => 'TODO: please describe this field!',
  10813. 'type' => 'text',
  10814. 'not NULL' => '',
  10815. ),
  10816. ),
  10817. 'primary key' => array(
  10818. '0' => 'dbxref_id',
  10819. ),
  10820. 'unique keys' => array(
  10821. 'dbxref_c1' => array(
  10822. '0' => 'db_id',
  10823. '1' => 'accession',
  10824. '2' => 'version',
  10825. ),
  10826. ),
  10827. 'indexes' => array(
  10828. 'dbxref_idx1' => array(
  10829. '0' => 'db_id',
  10830. ),
  10831. 'dbxref_idx2' => array(
  10832. '0' => 'accession',
  10833. ),
  10834. 'dbxref_idx3' => array(
  10835. '0' => 'version',
  10836. ),
  10837. ),
  10838. 'foreign keys' => array(
  10839. ),
  10840. );
  10841. return $description;
  10842. }
  10843. /**
  10844. * Implements hook_dbxrefprop_schema()
  10845. * Purpose: To describe the structure of dbxrefprop to tripal
  10846. * @see tripal_core_chado_insert()
  10847. * @see tripal_core_chado_update()
  10848. * @see tripal_core_chado_select()
  10849. *
  10850. * @return
  10851. * An array describing the current table
  10852. *
  10853. * @ingroup tripal_schema_api
  10854. *
  10855. */
  10856. function tripal_core_chado_dbxrefprop_schema() {
  10857. $description = array();
  10858. $description = array(
  10859. 'table' => 'dbxrefprop',
  10860. // 'description' => 'TODO: please describe this table!',
  10861. 'fields' => array(
  10862. 'dbxrefprop_id' => array(
  10863. // 'description' => 'TODO: please describe this field!',
  10864. 'type' => 'serial',
  10865. 'not NULL' => '1',
  10866. ),
  10867. 'dbxref_id' => array(
  10868. // 'description' => 'TODO: please describe this field!',
  10869. 'type' => 'int',
  10870. 'not NULL' => '1',
  10871. ),
  10872. 'type_id' => array(
  10873. // 'description' => 'TODO: please describe this field!',
  10874. 'type' => 'int',
  10875. 'not NULL' => '1',
  10876. ),
  10877. 'value' => array(
  10878. // 'description' => 'TODO: please describe this field!',
  10879. 'type' => 'text',
  10880. 'not NULL' => '1',
  10881. 'default' => '',
  10882. ),
  10883. 'rank' => array(
  10884. // 'description' => 'TODO: please describe this field!',
  10885. 'type' => 'int',
  10886. 'not NULL' => '1',
  10887. 'default' => '0',
  10888. ),
  10889. ),
  10890. 'primary key' => array(
  10891. '0' => 'dbxrefprop_id',
  10892. ),
  10893. 'unique keys' => array(
  10894. 'dbxrefprop_c1' => array(
  10895. '0' => 'dbxref_id',
  10896. '1' => 'type_id',
  10897. '2' => 'rank',
  10898. ),
  10899. ),
  10900. 'indexes' => array(
  10901. 'dbxrefprop_idx1' => array(
  10902. '0' => 'dbxref_id',
  10903. ),
  10904. 'dbxrefprop_idx2' => array(
  10905. '0' => 'type_id',
  10906. ),
  10907. ),
  10908. 'foreign keys' => array(
  10909. ),
  10910. );
  10911. return $description;
  10912. }
  10913. /**
  10914. * Implements hook_dfeatureloc_schema()
  10915. * Purpose: To describe the structure of dfeatureloc to tripal
  10916. * @see tripal_core_chado_insert()
  10917. * @see tripal_core_chado_update()
  10918. * @see tripal_core_chado_select()
  10919. *
  10920. * @return
  10921. * An array describing the current table
  10922. *
  10923. * @ingroup tripal_schema_api
  10924. *
  10925. */
  10926. function tripal_core_chado_dfeatureloc_schema() {
  10927. $description = array();
  10928. $description = array(
  10929. 'table' => 'dfeatureloc',
  10930. // 'description' => 'TODO: please describe this table!',
  10931. 'fields' => array(
  10932. 'featureloc_id' => array(
  10933. // 'description' => 'TODO: please describe this field!',
  10934. 'type' => 'int',
  10935. 'not NULL' => '',
  10936. ),
  10937. 'feature_id' => array(
  10938. // 'description' => 'TODO: please describe this field!',
  10939. 'type' => 'int',
  10940. 'not NULL' => '',
  10941. ),
  10942. 'srcfeature_id' => array(
  10943. // 'description' => 'TODO: please describe this field!',
  10944. 'type' => 'int',
  10945. 'not NULL' => '',
  10946. ),
  10947. 'nbeg' => array(
  10948. // 'description' => 'TODO: please describe this field!',
  10949. 'type' => 'int',
  10950. 'not NULL' => '',
  10951. ),
  10952. 'is_nbeg_partial' => array(
  10953. // 'description' => 'TODO: please describe this field!',
  10954. 'type' => 'boolean',
  10955. 'not NULL' => '',
  10956. ),
  10957. 'nend' => array(
  10958. // 'description' => 'TODO: please describe this field!',
  10959. 'type' => 'int',
  10960. 'not NULL' => '',
  10961. ),
  10962. 'is_nend_partial' => array(
  10963. // 'description' => 'TODO: please describe this field!',
  10964. 'type' => 'boolean',
  10965. 'not NULL' => '',
  10966. ),
  10967. 'strand' => array(
  10968. // 'description' => 'TODO: please describe this field!',
  10969. 'type' => 'int',
  10970. 'size' => 'small',
  10971. 'not NULL' => '',
  10972. ),
  10973. 'phase' => array(
  10974. // 'description' => 'TODO: please describe this field!',
  10975. 'type' => 'int',
  10976. 'not NULL' => '',
  10977. ),
  10978. 'residue_info' => array(
  10979. // 'description' => 'TODO: please describe this field!',
  10980. 'type' => 'text',
  10981. 'not NULL' => '',
  10982. ),
  10983. 'locgroup' => array(
  10984. // 'description' => 'TODO: please describe this field!',
  10985. 'type' => 'int',
  10986. 'not NULL' => '',
  10987. ),
  10988. 'rank' => array(
  10989. // 'description' => 'TODO: please describe this field!',
  10990. 'type' => 'int',
  10991. 'not NULL' => '',
  10992. ),
  10993. ),
  10994. 'primary key' => array(
  10995. ),
  10996. 'unique keys' => array(
  10997. ),
  10998. 'indexes' => array(
  10999. ),
  11000. 'foreign keys' => array(
  11001. ),
  11002. );
  11003. return $description;
  11004. }
  11005. /**
  11006. * Implements hook_db_schema()
  11007. * Purpose: To describe the structure of db to tripal
  11008. * @see tripal_core_chado_insert()
  11009. * @see tripal_core_chado_update()
  11010. * @see tripal_core_chado_select()
  11011. *
  11012. * @return
  11013. * An array describing the current table
  11014. *
  11015. * @ingroup tripal_schema_api
  11016. *
  11017. */
  11018. function tripal_core_chado_db_schema() {
  11019. $description = array();
  11020. $description = array(
  11021. 'table' => 'db',
  11022. // 'description' => 'TODO: please describe this table!',
  11023. 'fields' => array(
  11024. 'db_id' => array(
  11025. // 'description' => 'TODO: please describe this field!',
  11026. 'type' => 'serial',
  11027. 'not NULL' => '1',
  11028. ),
  11029. 'name' => array(
  11030. // 'description' => 'TODO: please describe this field!',
  11031. 'type' => 'varchar',
  11032. 'length' => '255',
  11033. 'not NULL' => '1',
  11034. ),
  11035. 'description' => array(
  11036. // 'description' => 'TODO: please describe this field!',
  11037. 'type' => 'varchar',
  11038. 'length' => '255',
  11039. 'not NULL' => '',
  11040. ),
  11041. 'urlprefix' => array(
  11042. // 'description' => 'TODO: please describe this field!',
  11043. 'type' => 'varchar',
  11044. 'length' => '255',
  11045. 'not NULL' => '',
  11046. ),
  11047. 'url' => array(
  11048. // 'description' => 'TODO: please describe this field!',
  11049. 'type' => 'varchar',
  11050. 'length' => '255',
  11051. 'not NULL' => '',
  11052. ),
  11053. ),
  11054. 'primary key' => array(
  11055. '0' => 'db_id',
  11056. ),
  11057. 'unique keys' => array(
  11058. 'db_c1' => array(
  11059. '0' => 'name',
  11060. ),
  11061. ),
  11062. 'indexes' => array(
  11063. ),
  11064. 'foreign keys' => array(
  11065. ),
  11066. );
  11067. return $description;
  11068. }
  11069. /**
  11070. * Implements hook_cvtermsynonym_schema()
  11071. * Purpose: To describe the structure of cvtermsynonym to tripal
  11072. * @see tripal_core_chado_insert()
  11073. * @see tripal_core_chado_update()
  11074. * @see tripal_core_chado_select()
  11075. *
  11076. * @return
  11077. * An array describing the current table
  11078. *
  11079. * @ingroup tripal_schema_api
  11080. *
  11081. */
  11082. function tripal_core_chado_cvtermsynonym_schema() {
  11083. $description = array();
  11084. $description = array(
  11085. 'table' => 'cvtermsynonym',
  11086. // 'description' => 'TODO: please describe this table!',
  11087. 'fields' => array(
  11088. 'cvtermsynonym_id' => array(
  11089. // 'description' => 'TODO: please describe this field!',
  11090. 'type' => 'serial',
  11091. 'not NULL' => '1',
  11092. ),
  11093. 'cvterm_id' => array(
  11094. // 'description' => 'TODO: please describe this field!',
  11095. 'type' => 'int',
  11096. 'not NULL' => '1',
  11097. ),
  11098. 'synonym' => array(
  11099. // 'description' => 'TODO: please describe this field!',
  11100. 'type' => 'varchar',
  11101. 'length' => '1024',
  11102. 'not NULL' => '1',
  11103. ),
  11104. 'type_id' => array(
  11105. // 'description' => 'TODO: please describe this field!',
  11106. 'type' => 'int',
  11107. 'not NULL' => '',
  11108. ),
  11109. ),
  11110. 'primary key' => array(
  11111. '0' => 'cvtermsynonym_id',
  11112. ),
  11113. 'unique keys' => array(
  11114. 'cvtermsynonym_c1' => array(
  11115. '0' => 'cvterm_id',
  11116. '1' => 'synonym',
  11117. ),
  11118. ),
  11119. 'indexes' => array(
  11120. 'cvtermsynonym_idx1' => array(
  11121. '0' => 'cvterm_id',
  11122. ),
  11123. ),
  11124. 'foreign keys' => array(
  11125. ),
  11126. );
  11127. return $description;
  11128. }
  11129. /**
  11130. * Implements hook_cvterm_dbxref_schema()
  11131. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11132. * @see tripal_core_chado_insert()
  11133. * @see tripal_core_chado_update()
  11134. * @see tripal_core_chado_select()
  11135. *
  11136. * @return
  11137. * An array describing the current table
  11138. *
  11139. * @ingroup tripal_schema_api
  11140. *
  11141. */
  11142. function tripal_core_chado_cvterm_dbxref_schema() {
  11143. $description = array();
  11144. $description = array(
  11145. 'table' => 'cvterm_dbxref',
  11146. // 'description' => 'TODO: please describe this table!',
  11147. 'fields' => array(
  11148. 'cvterm_dbxref_id' => array(
  11149. // 'description' => 'TODO: please describe this field!',
  11150. 'type' => 'serial',
  11151. 'not NULL' => '1',
  11152. ),
  11153. 'cvterm_id' => array(
  11154. // 'description' => 'TODO: please describe this field!',
  11155. 'type' => 'int',
  11156. 'not NULL' => '1',
  11157. ),
  11158. 'dbxref_id' => array(
  11159. // 'description' => 'TODO: please describe this field!',
  11160. 'type' => 'int',
  11161. 'not NULL' => '1',
  11162. ),
  11163. 'is_for_definition' => array(
  11164. // 'description' => 'TODO: please describe this field!',
  11165. 'type' => 'int',
  11166. 'not NULL' => '1',
  11167. 'default' => '0',
  11168. ),
  11169. ),
  11170. 'primary key' => array(
  11171. '0' => 'cvterm_dbxref_id',
  11172. ),
  11173. 'unique keys' => array(
  11174. 'cvterm_dbxref_c1' => array(
  11175. '0' => 'cvterm_id',
  11176. '1' => 'dbxref_id',
  11177. ),
  11178. ),
  11179. 'indexes' => array(
  11180. 'cvterm_dbxref_idx1' => array(
  11181. '0' => 'cvterm_id',
  11182. ),
  11183. 'cvterm_dbxref_idx2' => array(
  11184. '0' => 'dbxref_id',
  11185. ),
  11186. ),
  11187. 'foreign keys' => array(
  11188. ),
  11189. );
  11190. return $description;
  11191. }
  11192. /**
  11193. * Implements hook_cvterm_relationship_schema()
  11194. * Purpose: To describe the structure of cvterm_relationship to tripal
  11195. * @see tripal_core_chado_insert()
  11196. * @see tripal_core_chado_update()
  11197. * @see tripal_core_chado_select()
  11198. *
  11199. * @return
  11200. * An array describing the current table
  11201. *
  11202. * @ingroup tripal_schema_api
  11203. *
  11204. */
  11205. function tripal_core_chado_cvterm_relationship_schema() {
  11206. $description = array();
  11207. $description = array(
  11208. 'table' => 'cvterm_relationship',
  11209. // 'description' => 'TODO: please describe this table!',
  11210. 'fields' => array(
  11211. 'cvterm_relationship_id' => array(
  11212. // 'description' => 'TODO: please describe this field!',
  11213. 'type' => 'serial',
  11214. 'not NULL' => '1',
  11215. ),
  11216. 'type_id' => array(
  11217. // 'description' => 'TODO: please describe this field!',
  11218. 'type' => 'int',
  11219. 'not NULL' => '1',
  11220. ),
  11221. 'subject_id' => array(
  11222. // 'description' => 'TODO: please describe this field!',
  11223. 'type' => 'int',
  11224. 'not NULL' => '1',
  11225. ),
  11226. 'object_id' => array(
  11227. // 'description' => 'TODO: please describe this field!',
  11228. 'type' => 'int',
  11229. 'not NULL' => '1',
  11230. ),
  11231. ),
  11232. 'primary key' => array(
  11233. '0' => 'cvterm_relationship_id',
  11234. ),
  11235. 'unique keys' => array(
  11236. 'cvterm_relationship_c1' => array(
  11237. '0' => 'subject_id',
  11238. '1' => 'object_id',
  11239. '2' => 'type_id',
  11240. ),
  11241. ),
  11242. 'indexes' => array(
  11243. 'cvterm_relationship_idx1' => array(
  11244. '0' => 'type_id',
  11245. ),
  11246. 'cvterm_relationship_idx2' => array(
  11247. '0' => 'subject_id',
  11248. ),
  11249. 'cvterm_relationship_idx3' => array(
  11250. '0' => 'object_id',
  11251. ),
  11252. ),
  11253. 'foreign keys' => array(
  11254. ),
  11255. );
  11256. return $description;
  11257. }
  11258. /**
  11259. * Implements hook_cvtermpath_schema()
  11260. * Purpose: To describe the structure of cvtermpath to tripal
  11261. * @see tripal_core_chado_insert()
  11262. * @see tripal_core_chado_update()
  11263. * @see tripal_core_chado_select()
  11264. *
  11265. * @return
  11266. * An array describing the current table
  11267. *
  11268. * @ingroup tripal_schema_api
  11269. *
  11270. */
  11271. function tripal_core_chado_cvtermpath_schema() {
  11272. $description = array();
  11273. $description = array(
  11274. 'table' => 'cvtermpath',
  11275. // 'description' => 'TODO: please describe this table!',
  11276. 'fields' => array(
  11277. 'cvtermpath_id' => array(
  11278. // 'description' => 'TODO: please describe this field!',
  11279. 'type' => 'serial',
  11280. 'not NULL' => '1',
  11281. ),
  11282. 'type_id' => array(
  11283. // 'description' => 'TODO: please describe this field!',
  11284. 'type' => 'int',
  11285. 'not NULL' => '',
  11286. ),
  11287. 'subject_id' => array(
  11288. // 'description' => 'TODO: please describe this field!',
  11289. 'type' => 'int',
  11290. 'not NULL' => '1',
  11291. ),
  11292. 'object_id' => array(
  11293. // 'description' => 'TODO: please describe this field!',
  11294. 'type' => 'int',
  11295. 'not NULL' => '1',
  11296. ),
  11297. 'cv_id' => array(
  11298. // 'description' => 'TODO: please describe this field!',
  11299. 'type' => 'int',
  11300. 'not NULL' => '1',
  11301. ),
  11302. 'pathdistance' => array(
  11303. // 'description' => 'TODO: please describe this field!',
  11304. 'type' => 'int',
  11305. 'not NULL' => '',
  11306. ),
  11307. ),
  11308. 'primary key' => array(
  11309. '0' => 'cvtermpath_id',
  11310. ),
  11311. 'unique keys' => array(
  11312. 'cvtermpath_c1' => array(
  11313. '0' => 'subject_id',
  11314. '1' => 'object_id',
  11315. '2' => 'type_id',
  11316. '3' => 'pathdistance',
  11317. ),
  11318. ),
  11319. 'indexes' => array(
  11320. 'cvtermpath_idx1' => array(
  11321. '0' => 'type_id',
  11322. ),
  11323. 'cvtermpath_idx2' => array(
  11324. '0' => 'subject_id',
  11325. ),
  11326. 'cvtermpath_idx3' => array(
  11327. '0' => 'object_id',
  11328. ),
  11329. 'cvtermpath_idx4' => array(
  11330. '0' => 'cv_id',
  11331. ),
  11332. ),
  11333. 'foreign keys' => array(
  11334. ),
  11335. );
  11336. return $description;
  11337. }
  11338. /**
  11339. * Implements hook_cvtermprop_schema()
  11340. * Purpose: To describe the structure of cvtermprop to tripal
  11341. * @see tripal_core_chado_insert()
  11342. * @see tripal_core_chado_update()
  11343. * @see tripal_core_chado_select()
  11344. *
  11345. * @return
  11346. * An array describing the current table
  11347. *
  11348. * @ingroup tripal_schema_api
  11349. *
  11350. */
  11351. function tripal_core_chado_cvtermprop_schema() {
  11352. $description = array();
  11353. $description = array(
  11354. 'table' => 'cvtermprop',
  11355. // 'description' => 'TODO: please describe this table!',
  11356. 'fields' => array(
  11357. 'cvtermprop_id' => array(
  11358. // 'description' => 'TODO: please describe this field!',
  11359. 'type' => 'serial',
  11360. 'not NULL' => '1',
  11361. ),
  11362. 'cvterm_id' => array(
  11363. // 'description' => 'TODO: please describe this field!',
  11364. 'type' => 'int',
  11365. 'not NULL' => '1',
  11366. ),
  11367. 'type_id' => array(
  11368. // 'description' => 'TODO: please describe this field!',
  11369. 'type' => 'int',
  11370. 'not NULL' => '1',
  11371. ),
  11372. 'value' => array(
  11373. // 'description' => 'TODO: please describe this field!',
  11374. 'type' => 'text',
  11375. 'not NULL' => '1',
  11376. 'default' => '',
  11377. ),
  11378. 'rank' => array(
  11379. // 'description' => 'TODO: please describe this field!',
  11380. 'type' => 'int',
  11381. 'not NULL' => '1',
  11382. 'default' => '0',
  11383. ),
  11384. ),
  11385. 'primary key' => array(
  11386. '0' => 'cvtermprop_id',
  11387. ),
  11388. 'unique keys' => array(
  11389. 'cvterm_id' => array(
  11390. '0' => 'cvterm_id',
  11391. '1' => 'type_id',
  11392. '2' => 'value',
  11393. '3' => 'rank',
  11394. ),
  11395. ),
  11396. 'indexes' => array(
  11397. 'cvtermprop_idx1' => array(
  11398. '0' => 'cvterm_id',
  11399. ),
  11400. 'cvtermprop_idx2' => array(
  11401. '0' => 'type_id',
  11402. ),
  11403. ),
  11404. 'foreign keys' => array(
  11405. ),
  11406. );
  11407. return $description;
  11408. }
  11409. /**
  11410. * Implements hook_eimage_schema()
  11411. * Purpose: To describe the structure of eimage to tripal
  11412. * @see tripal_core_chado_insert()
  11413. * @see tripal_core_chado_update()
  11414. * @see tripal_core_chado_select()
  11415. *
  11416. * @return
  11417. * An array describing the current table
  11418. *
  11419. * @ingroup tripal_schema_api
  11420. *
  11421. */
  11422. function tripal_core_chado_eimage_schema() {
  11423. $description = array();
  11424. $description = array(
  11425. 'table' => 'eimage',
  11426. // 'description' => 'TODO: please describe this table!',
  11427. 'fields' => array(
  11428. 'eimage_id' => array(
  11429. // 'description' => 'TODO: please describe this field!',
  11430. 'type' => 'serial',
  11431. 'not NULL' => '1',
  11432. ),
  11433. 'eimage_data' => array(
  11434. // 'description' => 'TODO: please describe this field!',
  11435. 'type' => 'text',
  11436. 'not NULL' => '',
  11437. ),
  11438. 'eimage_type' => array(
  11439. // 'description' => 'TODO: please describe this field!',
  11440. 'type' => 'varchar',
  11441. 'length' => '255',
  11442. 'not NULL' => '1',
  11443. ),
  11444. 'image_uri' => array(
  11445. // 'description' => 'TODO: please describe this field!',
  11446. 'type' => 'varchar',
  11447. 'length' => '255',
  11448. 'not NULL' => '',
  11449. ),
  11450. ),
  11451. 'primary key' => array(
  11452. '0' => 'eimage_id',
  11453. ),
  11454. 'unique keys' => array(
  11455. ),
  11456. 'indexes' => array(
  11457. ),
  11458. 'foreign keys' => array(
  11459. ),
  11460. );
  11461. return $description;
  11462. }
  11463. /**
  11464. * Implements hook_element_schema()
  11465. * Purpose: To describe the structure of element to tripal
  11466. * @see tripal_core_chado_insert()
  11467. * @see tripal_core_chado_update()
  11468. * @see tripal_core_chado_select()
  11469. *
  11470. * @return
  11471. * An array describing the current table
  11472. *
  11473. * @ingroup tripal_schema_api
  11474. *
  11475. */
  11476. function tripal_core_chado_element_schema() {
  11477. $description = array();
  11478. $description = array(
  11479. 'table' => 'element',
  11480. // 'description' => 'TODO: please describe this table!',
  11481. 'fields' => array(
  11482. 'element_id' => array(
  11483. // 'description' => 'TODO: please describe this field!',
  11484. 'type' => 'serial',
  11485. 'not NULL' => '1',
  11486. ),
  11487. 'feature_id' => array(
  11488. // 'description' => 'TODO: please describe this field!',
  11489. 'type' => 'int',
  11490. 'not NULL' => '',
  11491. ),
  11492. 'arraydesign_id' => array(
  11493. // 'description' => 'TODO: please describe this field!',
  11494. 'type' => 'int',
  11495. 'not NULL' => '1',
  11496. ),
  11497. 'type_id' => array(
  11498. // 'description' => 'TODO: please describe this field!',
  11499. 'type' => 'int',
  11500. 'not NULL' => '',
  11501. ),
  11502. 'dbxref_id' => array(
  11503. // 'description' => 'TODO: please describe this field!',
  11504. 'type' => 'int',
  11505. 'not NULL' => '',
  11506. ),
  11507. ),
  11508. 'primary key' => array(
  11509. '0' => 'element_id',
  11510. ),
  11511. 'unique keys' => array(
  11512. 'element_c1' => array(
  11513. '0' => 'feature_id',
  11514. '1' => 'arraydesign_id',
  11515. ),
  11516. ),
  11517. 'indexes' => array(
  11518. 'element_idx1' => array(
  11519. '0' => 'feature_id',
  11520. ),
  11521. 'element_idx2' => array(
  11522. '0' => 'arraydesign_id',
  11523. ),
  11524. 'element_idx3' => array(
  11525. '0' => 'type_id',
  11526. ),
  11527. 'element_idx4' => array(
  11528. '0' => 'dbxref_id',
  11529. ),
  11530. ),
  11531. 'foreign keys' => array(
  11532. ),
  11533. );
  11534. return $description;
  11535. }
  11536. /**
  11537. * Implements hook_expression_cvterm_schema()
  11538. * Purpose: To describe the structure of expression_cvterm to tripal
  11539. * @see tripal_core_chado_insert()
  11540. * @see tripal_core_chado_update()
  11541. * @see tripal_core_chado_select()
  11542. *
  11543. * @return
  11544. * An array describing the current table
  11545. *
  11546. * @ingroup tripal_schema_api
  11547. *
  11548. */
  11549. function tripal_core_chado_expression_cvterm_schema() {
  11550. $description = array();
  11551. $description = array(
  11552. 'table' => 'expression_cvterm',
  11553. // 'description' => 'TODO: please describe this table!',
  11554. 'fields' => array(
  11555. 'expression_cvterm_id' => array(
  11556. // 'description' => 'TODO: please describe this field!',
  11557. 'type' => 'serial',
  11558. 'not NULL' => '1',
  11559. ),
  11560. 'expression_id' => array(
  11561. // 'description' => 'TODO: please describe this field!',
  11562. 'type' => 'int',
  11563. 'not NULL' => '1',
  11564. ),
  11565. 'cvterm_id' => array(
  11566. // 'description' => 'TODO: please describe this field!',
  11567. 'type' => 'int',
  11568. 'not NULL' => '1',
  11569. ),
  11570. 'rank' => array(
  11571. // 'description' => 'TODO: please describe this field!',
  11572. 'type' => 'int',
  11573. 'not NULL' => '1',
  11574. 'default' => '0',
  11575. ),
  11576. 'cvterm_type_id' => array(
  11577. // 'description' => 'TODO: please describe this field!',
  11578. 'type' => 'int',
  11579. 'not NULL' => '1',
  11580. ),
  11581. ),
  11582. 'primary key' => array(
  11583. '0' => 'expression_cvterm_id',
  11584. ),
  11585. 'unique keys' => array(
  11586. 'expression_cvterm_c1' => array(
  11587. '0' => 'expression_id',
  11588. '1' => 'cvterm_id',
  11589. '2' => 'cvterm_type_id',
  11590. ),
  11591. ),
  11592. 'indexes' => array(
  11593. 'expression_cvterm_idx1' => array(
  11594. '0' => 'expression_id',
  11595. ),
  11596. 'expression_cvterm_idx2' => array(
  11597. '0' => 'cvterm_id',
  11598. ),
  11599. 'expression_cvterm_idx3' => array(
  11600. '0' => 'cvterm_type_id',
  11601. ),
  11602. ),
  11603. 'foreign keys' => array(
  11604. ),
  11605. );
  11606. return $description;
  11607. }
  11608. /**
  11609. * Implements hook_expression_cvtermprop_schema()
  11610. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11611. * @see tripal_core_chado_insert()
  11612. * @see tripal_core_chado_update()
  11613. * @see tripal_core_chado_select()
  11614. *
  11615. * @return
  11616. * An array describing the current table
  11617. *
  11618. * @ingroup tripal_schema_api
  11619. *
  11620. */
  11621. function tripal_core_chado_expression_cvtermprop_schema() {
  11622. $description = array();
  11623. $description = array(
  11624. 'table' => 'expression_cvtermprop',
  11625. // 'description' => 'TODO: please describe this table!',
  11626. 'fields' => array(
  11627. 'expression_cvtermprop_id' => array(
  11628. // 'description' => 'TODO: please describe this field!',
  11629. 'type' => 'serial',
  11630. 'not NULL' => '1',
  11631. ),
  11632. 'expression_cvterm_id' => array(
  11633. // 'description' => 'TODO: please describe this field!',
  11634. 'type' => 'int',
  11635. 'not NULL' => '1',
  11636. ),
  11637. 'type_id' => array(
  11638. // 'description' => 'TODO: please describe this field!',
  11639. 'type' => 'int',
  11640. 'not NULL' => '1',
  11641. ),
  11642. 'value' => array(
  11643. // 'description' => 'TODO: please describe this field!',
  11644. 'type' => 'text',
  11645. 'not NULL' => '',
  11646. ),
  11647. 'rank' => array(
  11648. // 'description' => 'TODO: please describe this field!',
  11649. 'type' => 'int',
  11650. 'not NULL' => '1',
  11651. 'default' => '0',
  11652. ),
  11653. ),
  11654. 'primary key' => array(
  11655. '0' => 'expression_cvtermprop_id',
  11656. ),
  11657. 'unique keys' => array(
  11658. 'expression_cvtermprop_c1' => array(
  11659. '0' => 'expression_cvterm_id',
  11660. '1' => 'type_id',
  11661. '2' => 'rank',
  11662. ),
  11663. ),
  11664. 'indexes' => array(
  11665. 'expression_cvtermprop_idx1' => array(
  11666. '0' => 'expression_cvterm_id',
  11667. ),
  11668. 'expression_cvtermprop_idx2' => array(
  11669. '0' => 'type_id',
  11670. ),
  11671. ),
  11672. 'foreign keys' => array(
  11673. ),
  11674. );
  11675. return $description;
  11676. }
  11677. /**
  11678. * Implements hook_expression_image_schema()
  11679. * Purpose: To describe the structure of expression_image to tripal
  11680. * @see tripal_core_chado_insert()
  11681. * @see tripal_core_chado_update()
  11682. * @see tripal_core_chado_select()
  11683. *
  11684. * @return
  11685. * An array describing the current table
  11686. *
  11687. * @ingroup tripal_schema_api
  11688. *
  11689. */
  11690. function tripal_core_chado_expression_image_schema() {
  11691. $description = array();
  11692. $description = array(
  11693. 'table' => 'expression_image',
  11694. // 'description' => 'TODO: please describe this table!',
  11695. 'fields' => array(
  11696. 'expression_image_id' => array(
  11697. // 'description' => 'TODO: please describe this field!',
  11698. 'type' => 'serial',
  11699. 'not NULL' => '1',
  11700. ),
  11701. 'expression_id' => array(
  11702. // 'description' => 'TODO: please describe this field!',
  11703. 'type' => 'int',
  11704. 'not NULL' => '1',
  11705. ),
  11706. 'eimage_id' => array(
  11707. // 'description' => 'TODO: please describe this field!',
  11708. 'type' => 'int',
  11709. 'not NULL' => '1',
  11710. ),
  11711. ),
  11712. 'primary key' => array(
  11713. '0' => 'expression_image_id',
  11714. ),
  11715. 'unique keys' => array(
  11716. 'expression_image_c1' => array(
  11717. '0' => 'expression_id',
  11718. '1' => 'eimage_id',
  11719. ),
  11720. ),
  11721. 'indexes' => array(
  11722. 'expression_image_idx1' => array(
  11723. '0' => 'expression_id',
  11724. ),
  11725. 'expression_image_idx2' => array(
  11726. '0' => 'eimage_id',
  11727. ),
  11728. ),
  11729. 'foreign keys' => array(
  11730. ),
  11731. );
  11732. return $description;
  11733. }
  11734. /**
  11735. * Implements hook_expression_pub_schema()
  11736. * Purpose: To describe the structure of expression_pub to tripal
  11737. * @see tripal_core_chado_insert()
  11738. * @see tripal_core_chado_update()
  11739. * @see tripal_core_chado_select()
  11740. *
  11741. * @return
  11742. * An array describing the current table
  11743. *
  11744. * @ingroup tripal_schema_api
  11745. *
  11746. */
  11747. function tripal_core_chado_expression_pub_schema() {
  11748. $description = array();
  11749. $description = array(
  11750. 'table' => 'expression_pub',
  11751. // 'description' => 'TODO: please describe this table!',
  11752. 'fields' => array(
  11753. 'expression_pub_id' => array(
  11754. // 'description' => 'TODO: please describe this field!',
  11755. 'type' => 'serial',
  11756. 'not NULL' => '1',
  11757. ),
  11758. 'expression_id' => array(
  11759. // 'description' => 'TODO: please describe this field!',
  11760. 'type' => 'int',
  11761. 'not NULL' => '1',
  11762. ),
  11763. 'pub_id' => array(
  11764. // 'description' => 'TODO: please describe this field!',
  11765. 'type' => 'int',
  11766. 'not NULL' => '1',
  11767. ),
  11768. ),
  11769. 'primary key' => array(
  11770. '0' => 'expression_pub_id',
  11771. ),
  11772. 'unique keys' => array(
  11773. 'expression_pub_c1' => array(
  11774. '0' => 'expression_id',
  11775. '1' => 'pub_id',
  11776. ),
  11777. ),
  11778. 'indexes' => array(
  11779. 'expression_pub_idx1' => array(
  11780. '0' => 'expression_id',
  11781. ),
  11782. 'expression_pub_idx2' => array(
  11783. '0' => 'pub_id',
  11784. ),
  11785. ),
  11786. 'foreign keys' => array(
  11787. ),
  11788. );
  11789. return $description;
  11790. }
  11791. /**
  11792. * Implements hook_expression_schema()
  11793. * Purpose: To describe the structure of expression to tripal
  11794. * @see tripal_core_chado_insert()
  11795. * @see tripal_core_chado_update()
  11796. * @see tripal_core_chado_select()
  11797. *
  11798. * @return
  11799. * An array describing the current table
  11800. *
  11801. * @ingroup tripal_schema_api
  11802. *
  11803. */
  11804. function tripal_core_chado_expression_schema() {
  11805. $description = array();
  11806. $description = array(
  11807. 'table' => 'expression',
  11808. // 'description' => 'TODO: please describe this table!',
  11809. 'fields' => array(
  11810. 'expression_id' => array(
  11811. // 'description' => 'TODO: please describe this field!',
  11812. 'type' => 'serial',
  11813. 'not NULL' => '1',
  11814. ),
  11815. 'uniquename' => array(
  11816. // 'description' => 'TODO: please describe this field!',
  11817. 'type' => 'text',
  11818. 'not NULL' => '1',
  11819. ),
  11820. 'md5checksum' => array(
  11821. // 'description' => 'TODO: please describe this field!',
  11822. 'type' => 'char',
  11823. 'length' => '32',
  11824. 'not NULL' => '',
  11825. ),
  11826. 'description' => array(
  11827. // 'description' => 'TODO: please describe this field!',
  11828. 'type' => 'text',
  11829. 'not NULL' => '',
  11830. ),
  11831. ),
  11832. 'primary key' => array(
  11833. '0' => 'expression_id',
  11834. ),
  11835. 'unique keys' => array(
  11836. 'expression_c1' => array(
  11837. '0' => 'uniquename',
  11838. ),
  11839. ),
  11840. 'indexes' => array(
  11841. ),
  11842. 'foreign keys' => array(
  11843. ),
  11844. );
  11845. return $description;
  11846. }
  11847. /**
  11848. * Implements hook_environment_cvterm_schema()
  11849. * Purpose: To describe the structure of environment_cvterm to tripal
  11850. * @see tripal_core_chado_insert()
  11851. * @see tripal_core_chado_update()
  11852. * @see tripal_core_chado_select()
  11853. *
  11854. * @return
  11855. * An array describing the current table
  11856. *
  11857. * @ingroup tripal_schema_api
  11858. *
  11859. */
  11860. function tripal_core_chado_environment_cvterm_schema() {
  11861. $description = array();
  11862. $description = array(
  11863. 'table' => 'environment_cvterm',
  11864. // 'description' => 'TODO: please describe this table!',
  11865. 'fields' => array(
  11866. 'environment_cvterm_id' => array(
  11867. // 'description' => 'TODO: please describe this field!',
  11868. 'type' => 'serial',
  11869. 'not NULL' => '1',
  11870. ),
  11871. 'environment_id' => array(
  11872. // 'description' => 'TODO: please describe this field!',
  11873. 'type' => 'int',
  11874. 'not NULL' => '1',
  11875. ),
  11876. 'cvterm_id' => array(
  11877. // 'description' => 'TODO: please describe this field!',
  11878. 'type' => 'int',
  11879. 'not NULL' => '1',
  11880. ),
  11881. ),
  11882. 'primary key' => array(
  11883. '0' => 'environment_cvterm_id',
  11884. ),
  11885. 'unique keys' => array(
  11886. 'environment_cvterm_c1' => array(
  11887. '0' => 'environment_id',
  11888. '1' => 'cvterm_id',
  11889. ),
  11890. ),
  11891. 'indexes' => array(
  11892. 'environment_cvterm_idx1' => array(
  11893. '0' => 'environment_id',
  11894. ),
  11895. 'environment_cvterm_idx2' => array(
  11896. '0' => 'cvterm_id',
  11897. ),
  11898. ),
  11899. 'foreign keys' => array(
  11900. ),
  11901. );
  11902. return $description;
  11903. }
  11904. /**
  11905. * Implements hook_element_relationship_schema()
  11906. * Purpose: To describe the structure of element_relationship to tripal
  11907. * @see tripal_core_chado_insert()
  11908. * @see tripal_core_chado_update()
  11909. * @see tripal_core_chado_select()
  11910. *
  11911. * @return
  11912. * An array describing the current table
  11913. *
  11914. * @ingroup tripal_schema_api
  11915. *
  11916. */
  11917. function tripal_core_chado_element_relationship_schema() {
  11918. $description = array();
  11919. $description = array(
  11920. 'table' => 'element_relationship',
  11921. // 'description' => 'TODO: please describe this table!',
  11922. 'fields' => array(
  11923. 'element_relationship_id' => array(
  11924. // 'description' => 'TODO: please describe this field!',
  11925. 'type' => 'serial',
  11926. 'not NULL' => '1',
  11927. ),
  11928. 'subject_id' => array(
  11929. // 'description' => 'TODO: please describe this field!',
  11930. 'type' => 'int',
  11931. 'not NULL' => '1',
  11932. ),
  11933. 'type_id' => array(
  11934. // 'description' => 'TODO: please describe this field!',
  11935. 'type' => 'int',
  11936. 'not NULL' => '1',
  11937. ),
  11938. 'object_id' => array(
  11939. // 'description' => 'TODO: please describe this field!',
  11940. 'type' => 'int',
  11941. 'not NULL' => '1',
  11942. ),
  11943. 'value' => array(
  11944. // 'description' => 'TODO: please describe this field!',
  11945. 'type' => 'text',
  11946. 'not NULL' => '',
  11947. ),
  11948. 'rank' => array(
  11949. // 'description' => 'TODO: please describe this field!',
  11950. 'type' => 'int',
  11951. 'not NULL' => '1',
  11952. 'default' => '0',
  11953. ),
  11954. ),
  11955. 'primary key' => array(
  11956. '0' => 'element_relationship_id',
  11957. ),
  11958. 'unique keys' => array(
  11959. 'element_relationship_c1' => array(
  11960. '0' => 'subject_id',
  11961. '1' => 'object_id',
  11962. '2' => 'type_id',
  11963. '3' => 'rank',
  11964. ),
  11965. ),
  11966. 'indexes' => array(
  11967. 'element_relationship_idx1' => array(
  11968. '0' => 'subject_id',
  11969. ),
  11970. 'element_relationship_idx2' => array(
  11971. '0' => 'type_id',
  11972. ),
  11973. 'element_relationship_idx3' => array(
  11974. '0' => 'object_id',
  11975. ),
  11976. 'element_relationship_idx4' => array(
  11977. '0' => 'value',
  11978. ),
  11979. ),
  11980. 'foreign keys' => array(
  11981. ),
  11982. );
  11983. return $description;
  11984. }
  11985. /**
  11986. * Implements hook_elementresult_schema()
  11987. * Purpose: To describe the structure of elementresult to tripal
  11988. * @see tripal_core_chado_insert()
  11989. * @see tripal_core_chado_update()
  11990. * @see tripal_core_chado_select()
  11991. *
  11992. * @return
  11993. * An array describing the current table
  11994. *
  11995. * @ingroup tripal_schema_api
  11996. *
  11997. */
  11998. function tripal_core_chado_elementresult_schema() {
  11999. $description = array();
  12000. $description = array(
  12001. 'table' => 'elementresult',
  12002. // 'description' => 'TODO: please describe this table!',
  12003. 'fields' => array(
  12004. 'elementresult_id' => array(
  12005. // 'description' => 'TODO: please describe this field!',
  12006. 'type' => 'serial',
  12007. 'not NULL' => '1',
  12008. ),
  12009. 'element_id' => array(
  12010. // 'description' => 'TODO: please describe this field!',
  12011. 'type' => 'int',
  12012. 'not NULL' => '1',
  12013. ),
  12014. 'quantification_id' => array(
  12015. // 'description' => 'TODO: please describe this field!',
  12016. 'type' => 'int',
  12017. 'not NULL' => '1',
  12018. ),
  12019. 'signal' => array(
  12020. // 'description' => 'TODO: please describe this field!',
  12021. 'type' => 'float',
  12022. 'size' => 'big',
  12023. 'not NULL' => '1',
  12024. ),
  12025. ),
  12026. 'primary key' => array(
  12027. '0' => 'elementresult_id',
  12028. ),
  12029. 'unique keys' => array(
  12030. 'elementresult_c1' => array(
  12031. '0' => 'element_id',
  12032. '1' => 'quantification_id',
  12033. ),
  12034. ),
  12035. 'indexes' => array(
  12036. 'elementresult_idx1' => array(
  12037. '0' => 'element_id',
  12038. ),
  12039. 'elementresult_idx2' => array(
  12040. '0' => 'quantification_id',
  12041. ),
  12042. 'elementresult_idx3' => array(
  12043. '0' => 'signal',
  12044. ),
  12045. ),
  12046. 'foreign keys' => array(
  12047. ),
  12048. );
  12049. return $description;
  12050. }
  12051. /**
  12052. * Implements hook_elementresult_relationship_schema()
  12053. * Purpose: To describe the structure of elementresult_relationship to tripal
  12054. * @see tripal_core_chado_insert()
  12055. * @see tripal_core_chado_update()
  12056. * @see tripal_core_chado_select()
  12057. *
  12058. * @return
  12059. * An array describing the current table
  12060. *
  12061. * @ingroup tripal_schema_api
  12062. *
  12063. */
  12064. function tripal_core_chado_elementresult_relationship_schema() {
  12065. $description = array();
  12066. $description = array(
  12067. 'table' => 'elementresult_relationship',
  12068. // 'description' => 'TODO: please describe this table!',
  12069. 'fields' => array(
  12070. 'elementresult_relationship_id' => array(
  12071. // 'description' => 'TODO: please describe this field!',
  12072. 'type' => 'serial',
  12073. 'not NULL' => '1',
  12074. ),
  12075. 'subject_id' => array(
  12076. // 'description' => 'TODO: please describe this field!',
  12077. 'type' => 'int',
  12078. 'not NULL' => '1',
  12079. ),
  12080. 'type_id' => array(
  12081. // 'description' => 'TODO: please describe this field!',
  12082. 'type' => 'int',
  12083. 'not NULL' => '1',
  12084. ),
  12085. 'object_id' => array(
  12086. // 'description' => 'TODO: please describe this field!',
  12087. 'type' => 'int',
  12088. 'not NULL' => '1',
  12089. ),
  12090. 'value' => array(
  12091. // 'description' => 'TODO: please describe this field!',
  12092. 'type' => 'text',
  12093. 'not NULL' => '',
  12094. ),
  12095. 'rank' => array(
  12096. // 'description' => 'TODO: please describe this field!',
  12097. 'type' => 'int',
  12098. 'not NULL' => '1',
  12099. 'default' => '0',
  12100. ),
  12101. ),
  12102. 'primary key' => array(
  12103. '0' => 'elementresult_relationship_id',
  12104. ),
  12105. 'unique keys' => array(
  12106. 'elementresult_relationship_c1' => array(
  12107. '0' => 'subject_id',
  12108. '1' => 'object_id',
  12109. '2' => 'type_id',
  12110. '3' => 'rank',
  12111. ),
  12112. ),
  12113. 'indexes' => array(
  12114. 'elementresult_relationship_idx1' => array(
  12115. '0' => 'subject_id',
  12116. ),
  12117. 'elementresult_relationship_idx2' => array(
  12118. '0' => 'type_id',
  12119. ),
  12120. 'elementresult_relationship_idx3' => array(
  12121. '0' => 'object_id',
  12122. ),
  12123. 'elementresult_relationship_idx4' => array(
  12124. '0' => 'value',
  12125. ),
  12126. ),
  12127. 'foreign keys' => array(
  12128. ),
  12129. );
  12130. return $description;
  12131. }
  12132. /**
  12133. * Implements hook_environment_schema()
  12134. * Purpose: To describe the structure of environment to tripal
  12135. * @see tripal_core_chado_insert()
  12136. * @see tripal_core_chado_update()
  12137. * @see tripal_core_chado_select()
  12138. *
  12139. * @return
  12140. * An array describing the current table
  12141. *
  12142. * @ingroup tripal_schema_api
  12143. *
  12144. */
  12145. function tripal_core_chado_environment_schema() {
  12146. $description = array();
  12147. $description = array(
  12148. 'table' => 'environment',
  12149. // 'description' => 'TODO: please describe this table!',
  12150. 'fields' => array(
  12151. 'environment_id' => array(
  12152. // 'description' => 'TODO: please describe this field!',
  12153. 'type' => 'serial',
  12154. 'not NULL' => '1',
  12155. ),
  12156. 'uniquename' => array(
  12157. // 'description' => 'TODO: please describe this field!',
  12158. 'type' => 'text',
  12159. 'not NULL' => '1',
  12160. ),
  12161. 'description' => array(
  12162. // 'description' => 'TODO: please describe this field!',
  12163. 'type' => 'text',
  12164. 'not NULL' => '',
  12165. ),
  12166. ),
  12167. 'primary key' => array(
  12168. '0' => 'environment_id',
  12169. ),
  12170. 'unique keys' => array(
  12171. 'environment_c1' => array(
  12172. '0' => 'uniquename',
  12173. ),
  12174. ),
  12175. 'indexes' => array(
  12176. 'environment_idx1' => array(
  12177. '0' => 'uniquename',
  12178. ),
  12179. ),
  12180. 'foreign keys' => array(
  12181. ),
  12182. );
  12183. return $description;
  12184. }