tripal_core.schema.api.inc 326 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado tables
  3. * to be used with tripal_core chado insert/update/select functions.
  4. * These schema definitions can be augmented by the various modules
  5. * (specifically to add missing foreign key definitions) by implementing
  6. * hook_chado_<table name>_schema().
  7. */
  8. /**
  9. * Implements hook_organism_dbxref_schema()
  10. * Purpose: To describe the structure of organism_dbxref to tripal
  11. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12. * @see tripal_core.api.inc: tripal_core_chado_update()
  13. * @see tripal_core.api.inc: tripal_core_chado_select()
  14. *
  15. * @return
  16. * An array describing the current table
  17. *
  18. * @ingroup tripal_schema_api
  19. *
  20. */
  21. function tripal_core_chado_organism_dbxref_schema () {
  22. $description = array();
  23. $description = array(
  24. 'table' => 'organism_dbxref',
  25. // 'description' => 'TODO: please describe this table!',
  26. 'fields' => array(
  27. 'organism_dbxref_id' => array(
  28. // 'description' => 'TODO: please describe this field!',
  29. 'type' => 'serial',
  30. 'not null' => '1',
  31. ),
  32. 'organism_id' => array(
  33. // 'description' => 'TODO: please describe this field!',
  34. 'type' => 'int',
  35. 'not null' => '1',
  36. ),
  37. 'dbxref_id' => array(
  38. // 'description' => 'TODO: please describe this field!',
  39. 'type' => 'int',
  40. 'not null' => '1',
  41. ),
  42. ),
  43. 'primary key' => array(
  44. '0' => 'organism_dbxref_id',
  45. ),
  46. 'unique keys' => array(
  47. 'organism_dbxref_c1' => array(
  48. '0' => 'organism_id',
  49. '1' => 'dbxref_id',
  50. ),
  51. ),
  52. 'indexes' => array(
  53. 'organism_dbxref_idx1' => array(
  54. '0' => 'organism_id',
  55. ),
  56. 'organism_dbxref_idx2' => array(
  57. '0' => 'dbxref_id',
  58. ),
  59. ),
  60. 'foreign keys' => array(
  61. ),
  62. );
  63. return $description;
  64. }
  65. /**
  66. * Implements hook_organismprop_schema()
  67. * Purpose: To describe the structure of organismprop to tripal
  68. * @see tripal_core.api.inc: tripal_core_chado_insert()
  69. * @see tripal_core.api.inc: tripal_core_chado_update()
  70. * @see tripal_core.api.inc: tripal_core_chado_select()
  71. *
  72. * @return
  73. * An array describing the current table
  74. *
  75. * @ingroup tripal_schema_api
  76. *
  77. */
  78. function tripal_core_chado_organismprop_schema () {
  79. $description = array();
  80. $description = array(
  81. 'table' => 'organismprop',
  82. // 'description' => 'TODO: please describe this table!',
  83. 'fields' => array(
  84. 'organismprop_id' => array(
  85. // 'description' => 'TODO: please describe this field!',
  86. 'type' => 'serial',
  87. 'not null' => '1',
  88. ),
  89. 'organism_id' => array(
  90. // 'description' => 'TODO: please describe this field!',
  91. 'type' => 'int',
  92. 'not null' => '1',
  93. ),
  94. 'type_id' => array(
  95. // 'description' => 'TODO: please describe this field!',
  96. 'type' => 'int',
  97. 'not null' => '1',
  98. ),
  99. 'value' => array(
  100. // 'description' => 'TODO: please describe this field!',
  101. 'type' => 'text',
  102. 'not null' => '',
  103. ),
  104. 'rank' => array(
  105. // 'description' => 'TODO: please describe this field!',
  106. 'type' => 'int',
  107. 'not null' => '1',
  108. 'default' => '0',
  109. ),
  110. ),
  111. 'primary key' => array(
  112. '0' => 'organismprop_id',
  113. ),
  114. 'unique keys' => array(
  115. 'organismprop_c1' => array(
  116. '0' => 'organism_id',
  117. '1' => 'type_id',
  118. '2' => 'rank',
  119. ),
  120. ),
  121. 'indexes' => array(
  122. 'organismprop_idx1' => array(
  123. '0' => 'organism_id',
  124. ),
  125. 'organismprop_idx2' => array(
  126. '0' => 'type_id',
  127. ),
  128. ),
  129. 'foreign keys' => array(
  130. ),
  131. );
  132. return $description;
  133. }
  134. /**
  135. * Implements hook_phendesc_schema()
  136. * Purpose: To describe the structure of phendesc to tripal
  137. * @see tripal_core.api.inc: tripal_core_chado_insert()
  138. * @see tripal_core.api.inc: tripal_core_chado_update()
  139. * @see tripal_core.api.inc: tripal_core_chado_select()
  140. *
  141. * @return
  142. * An array describing the current table
  143. *
  144. * @ingroup tripal_schema_api
  145. *
  146. */
  147. function tripal_core_chado_phendesc_schema () {
  148. $description = array();
  149. $description = array(
  150. 'table' => 'phendesc',
  151. // 'description' => 'TODO: please describe this table!',
  152. 'fields' => array(
  153. 'phendesc_id' => array(
  154. // 'description' => 'TODO: please describe this field!',
  155. 'type' => 'serial',
  156. 'not null' => '1',
  157. ),
  158. 'genotype_id' => array(
  159. // 'description' => 'TODO: please describe this field!',
  160. 'type' => 'int',
  161. 'not null' => '1',
  162. ),
  163. 'environment_id' => array(
  164. // 'description' => 'TODO: please describe this field!',
  165. 'type' => 'int',
  166. 'not null' => '1',
  167. ),
  168. 'description' => array(
  169. // 'description' => 'TODO: please describe this field!',
  170. 'type' => 'text',
  171. 'not null' => '1',
  172. ),
  173. 'type_id' => array(
  174. // 'description' => 'TODO: please describe this field!',
  175. 'type' => 'int',
  176. 'not null' => '1',
  177. ),
  178. 'pub_id' => array(
  179. // 'description' => 'TODO: please describe this field!',
  180. 'type' => 'int',
  181. 'not null' => '1',
  182. ),
  183. ),
  184. 'primary key' => array(
  185. '0' => 'phendesc_id',
  186. ),
  187. 'unique keys' => array(
  188. 'phendesc_c1' => array(
  189. '0' => 'genotype_id',
  190. '1' => 'environment_id',
  191. '2' => 'type_id',
  192. '3' => 'pub_id',
  193. ),
  194. ),
  195. 'indexes' => array(
  196. 'phendesc_idx1' => array(
  197. '0' => 'genotype_id',
  198. ),
  199. 'phendesc_idx2' => array(
  200. '0' => 'environment_id',
  201. ),
  202. 'phendesc_idx3' => array(
  203. '0' => 'pub_id',
  204. ),
  205. ),
  206. 'foreign keys' => array(
  207. ),
  208. );
  209. return $description;
  210. }
  211. /**
  212. * Implements hook_phenotype_schema()
  213. * Purpose: To describe the structure of phenotype to tripal
  214. * @see tripal_core.api.inc: tripal_core_chado_insert()
  215. * @see tripal_core.api.inc: tripal_core_chado_update()
  216. * @see tripal_core.api.inc: tripal_core_chado_select()
  217. *
  218. * @return
  219. * An array describing the current table
  220. *
  221. * @ingroup tripal_schema_api
  222. *
  223. */
  224. function tripal_core_chado_phenotype_schema () {
  225. $description = array();
  226. $description = array(
  227. 'table' => 'phenotype',
  228. // 'description' => 'TODO: please describe this table!',
  229. 'fields' => array(
  230. 'phenotype_id' => array(
  231. // 'description' => 'TODO: please describe this field!',
  232. 'type' => 'serial',
  233. 'not null' => '1',
  234. ),
  235. 'uniquename' => array(
  236. // 'description' => 'TODO: please describe this field!',
  237. 'type' => 'text',
  238. 'not null' => '1',
  239. ),
  240. 'observable_id' => array(
  241. // 'description' => 'TODO: please describe this field!',
  242. 'type' => 'int',
  243. 'not null' => '',
  244. ),
  245. 'attr_id' => array(
  246. // 'description' => 'TODO: please describe this field!',
  247. 'type' => 'int',
  248. 'not null' => '',
  249. ),
  250. 'value' => array(
  251. // 'description' => 'TODO: please describe this field!',
  252. 'type' => 'text',
  253. 'not null' => '',
  254. ),
  255. 'cvalue_id' => array(
  256. // 'description' => 'TODO: please describe this field!',
  257. 'type' => 'int',
  258. 'not null' => '',
  259. ),
  260. 'assay_id' => array(
  261. // 'description' => 'TODO: please describe this field!',
  262. 'type' => 'int',
  263. 'not null' => '',
  264. ),
  265. ),
  266. 'primary key' => array(
  267. '0' => 'phenotype_id',
  268. ),
  269. 'unique keys' => array(
  270. 'phenotype_c1' => array(
  271. '0' => 'uniquename',
  272. ),
  273. ),
  274. 'indexes' => array(
  275. 'phenotype_idx1' => array(
  276. '0' => 'cvalue_id',
  277. ),
  278. 'phenotype_idx2' => array(
  279. '0' => 'observable_id',
  280. ),
  281. 'phenotype_idx3' => array(
  282. '0' => 'attr_id',
  283. ),
  284. ),
  285. 'foreign keys' => array(
  286. ),
  287. );
  288. return $description;
  289. }
  290. /**
  291. * Implements hook_organism_schema()
  292. * Purpose: To describe the structure of organism to tripal
  293. * @see tripal_core.api.inc: tripal_core_chado_insert()
  294. * @see tripal_core.api.inc: tripal_core_chado_update()
  295. * @see tripal_core.api.inc: tripal_core_chado_select()
  296. *
  297. * @return
  298. * An array describing the current table
  299. *
  300. * @ingroup tripal_schema_api
  301. *
  302. */
  303. function tripal_core_chado_organism_schema () {
  304. $description = array();
  305. $description = array(
  306. 'table' => 'organism',
  307. // 'description' => 'TODO: please describe this table!',
  308. 'fields' => array(
  309. 'organism_id' => array(
  310. // 'description' => 'TODO: please describe this field!',
  311. 'type' => 'serial',
  312. 'not null' => '1',
  313. ),
  314. 'abbreviation' => array(
  315. // 'description' => 'TODO: please describe this field!',
  316. 'type' => 'varchar',
  317. 'length' => '255',
  318. 'not null' => '',
  319. ),
  320. 'genus' => array(
  321. // 'description' => 'TODO: please describe this field!',
  322. 'type' => 'varchar',
  323. 'length' => '255',
  324. 'not null' => '1',
  325. ),
  326. 'species' => array(
  327. // 'description' => 'TODO: please describe this field!',
  328. 'type' => 'varchar',
  329. 'length' => '255',
  330. 'not null' => '1',
  331. ),
  332. 'common_name' => array(
  333. // 'description' => 'TODO: please describe this field!',
  334. 'type' => 'varchar',
  335. 'length' => '255',
  336. 'not null' => '',
  337. ),
  338. 'comment' => array(
  339. // 'description' => 'TODO: please describe this field!',
  340. 'type' => 'text',
  341. 'not null' => '',
  342. ),
  343. ),
  344. 'primary key' => array(
  345. '0' => 'organism_id',
  346. ),
  347. 'unique keys' => array(
  348. 'organism_c1' => array(
  349. '0' => 'genus',
  350. '1' => 'species',
  351. ),
  352. ),
  353. 'indexes' => array(
  354. ),
  355. 'foreign keys' => array(
  356. ),
  357. );
  358. return $description;
  359. }
  360. /**
  361. * Implements hook_materialized_view_schema()
  362. * Purpose: To describe the structure of materialized_view to tripal
  363. * @see tripal_core.api.inc: tripal_core_chado_insert()
  364. * @see tripal_core.api.inc: tripal_core_chado_update()
  365. * @see tripal_core.api.inc: tripal_core_chado_select()
  366. *
  367. * @return
  368. * An array describing the current table
  369. *
  370. * @ingroup tripal_schema_api
  371. *
  372. */
  373. function tripal_core_chado_materialized_view_schema () {
  374. $description = array();
  375. $description = array(
  376. 'table' => 'materialized_view',
  377. // 'description' => 'TODO: please describe this table!',
  378. 'fields' => array(
  379. 'materialized_view_id' => array(
  380. // 'description' => 'TODO: please describe this field!',
  381. 'type' => 'serial',
  382. 'not null' => '1',
  383. ),
  384. 'last_update' => array(
  385. // 'description' => 'TODO: please describe this field!',
  386. 'type' => 'datetime',
  387. 'not null' => '',
  388. ),
  389. 'refresh_time' => array(
  390. // 'description' => 'TODO: please describe this field!',
  391. 'type' => 'int',
  392. 'not null' => '',
  393. ),
  394. 'name' => array(
  395. // 'description' => 'TODO: please describe this field!',
  396. 'type' => 'varchar',
  397. 'length' => '64',
  398. 'not null' => '',
  399. ),
  400. 'mv_schema' => array(
  401. // 'description' => 'TODO: please describe this field!',
  402. 'type' => 'varchar',
  403. 'length' => '64',
  404. 'not null' => '',
  405. ),
  406. 'mv_table' => array(
  407. // 'description' => 'TODO: please describe this field!',
  408. 'type' => 'varchar',
  409. 'length' => '128',
  410. 'not null' => '',
  411. ),
  412. 'mv_specs' => array(
  413. // 'description' => 'TODO: please describe this field!',
  414. 'type' => 'text',
  415. 'not null' => '',
  416. ),
  417. 'indexed' => array(
  418. // 'description' => 'TODO: please describe this field!',
  419. 'type' => 'text',
  420. 'not null' => '',
  421. ),
  422. 'query' => array(
  423. // 'description' => 'TODO: please describe this field!',
  424. 'type' => 'text',
  425. 'not null' => '',
  426. ),
  427. 'special_index' => array(
  428. // 'description' => 'TODO: please describe this field!',
  429. 'type' => 'text',
  430. 'not null' => '',
  431. ),
  432. ),
  433. 'primary key' => array(
  434. ),
  435. 'unique keys' => array(
  436. 'name' => array(
  437. '0' => 'name',
  438. ),
  439. ),
  440. 'indexes' => array(
  441. ),
  442. 'foreign keys' => array(
  443. ),
  444. );
  445. return $description;
  446. }
  447. /**
  448. * Implements hook_libraryprop_schema()
  449. * Purpose: To describe the structure of libraryprop to tripal
  450. * @see tripal_core.api.inc: tripal_core_chado_insert()
  451. * @see tripal_core.api.inc: tripal_core_chado_update()
  452. * @see tripal_core.api.inc: tripal_core_chado_select()
  453. *
  454. * @return
  455. * An array describing the current table
  456. *
  457. * @ingroup tripal_schema_api
  458. *
  459. */
  460. function tripal_core_chado_libraryprop_schema () {
  461. $description = array();
  462. $description = array(
  463. 'table' => 'libraryprop',
  464. // 'description' => 'TODO: please describe this table!',
  465. 'fields' => array(
  466. 'libraryprop_id' => array(
  467. // 'description' => 'TODO: please describe this field!',
  468. 'type' => 'serial',
  469. 'not null' => '1',
  470. ),
  471. 'library_id' => array(
  472. // 'description' => 'TODO: please describe this field!',
  473. 'type' => 'int',
  474. 'not null' => '1',
  475. ),
  476. 'type_id' => array(
  477. // 'description' => 'TODO: please describe this field!',
  478. 'type' => 'int',
  479. 'not null' => '1',
  480. ),
  481. 'value' => array(
  482. // 'description' => 'TODO: please describe this field!',
  483. 'type' => 'text',
  484. 'not null' => '',
  485. ),
  486. 'rank' => array(
  487. // 'description' => 'TODO: please describe this field!',
  488. 'type' => 'int',
  489. 'not null' => '1',
  490. 'default' => '0',
  491. ),
  492. ),
  493. 'primary key' => array(
  494. '0' => 'libraryprop_id',
  495. ),
  496. 'unique keys' => array(
  497. 'libraryprop_c1' => array(
  498. '0' => 'library_id',
  499. '1' => 'type_id',
  500. '2' => 'rank',
  501. ),
  502. ),
  503. 'indexes' => array(
  504. 'libraryprop_idx1' => array(
  505. '0' => 'library_id',
  506. ),
  507. 'libraryprop_idx2' => array(
  508. '0' => 'type_id',
  509. ),
  510. ),
  511. 'foreign keys' => array(
  512. ),
  513. );
  514. return $description;
  515. }
  516. /**
  517. * Implements hook_libraryprop_pub_schema()
  518. * Purpose: To describe the structure of libraryprop_pub to tripal
  519. * @see tripal_core.api.inc: tripal_core_chado_insert()
  520. * @see tripal_core.api.inc: tripal_core_chado_update()
  521. * @see tripal_core.api.inc: tripal_core_chado_select()
  522. *
  523. * @return
  524. * An array describing the current table
  525. *
  526. * @ingroup tripal_schema_api
  527. *
  528. */
  529. function tripal_core_chado_libraryprop_pub_schema () {
  530. $description = array();
  531. $description = array(
  532. 'table' => 'libraryprop_pub',
  533. // 'description' => 'TODO: please describe this table!',
  534. 'fields' => array(
  535. 'libraryprop_pub_id' => array(
  536. // 'description' => 'TODO: please describe this field!',
  537. 'type' => 'serial',
  538. 'not null' => '1',
  539. ),
  540. 'libraryprop_id' => array(
  541. // 'description' => 'TODO: please describe this field!',
  542. 'type' => 'int',
  543. 'not null' => '1',
  544. ),
  545. 'pub_id' => array(
  546. // 'description' => 'TODO: please describe this field!',
  547. 'type' => 'int',
  548. 'not null' => '1',
  549. ),
  550. ),
  551. 'primary key' => array(
  552. '0' => 'libraryprop_pub_id',
  553. ),
  554. 'unique keys' => array(
  555. 'libraryprop_pub_c1' => array(
  556. '0' => 'libraryprop_id',
  557. '1' => 'pub_id',
  558. ),
  559. ),
  560. 'indexes' => array(
  561. 'libraryprop_pub_idx1' => array(
  562. '0' => 'libraryprop_id',
  563. ),
  564. 'libraryprop_pub_idx2' => array(
  565. '0' => 'pub_id',
  566. ),
  567. ),
  568. 'foreign keys' => array(
  569. ),
  570. );
  571. return $description;
  572. }
  573. /**
  574. * Implements hook_magedocumentation_schema()
  575. * Purpose: To describe the structure of magedocumentation to tripal
  576. * @see tripal_core.api.inc: tripal_core_chado_insert()
  577. * @see tripal_core.api.inc: tripal_core_chado_update()
  578. * @see tripal_core.api.inc: tripal_core_chado_select()
  579. *
  580. * @return
  581. * An array describing the current table
  582. *
  583. * @ingroup tripal_schema_api
  584. *
  585. */
  586. function tripal_core_chado_magedocumentation_schema () {
  587. $description = array();
  588. $description = array(
  589. 'table' => 'magedocumentation',
  590. // 'description' => 'TODO: please describe this table!',
  591. 'fields' => array(
  592. 'magedocumentation_id' => array(
  593. // 'description' => 'TODO: please describe this field!',
  594. 'type' => 'serial',
  595. 'not null' => '1',
  596. ),
  597. 'mageml_id' => array(
  598. // 'description' => 'TODO: please describe this field!',
  599. 'type' => 'int',
  600. 'not null' => '1',
  601. ),
  602. 'tableinfo_id' => array(
  603. // 'description' => 'TODO: please describe this field!',
  604. 'type' => 'int',
  605. 'not null' => '1',
  606. ),
  607. 'row_id' => array(
  608. // 'description' => 'TODO: please describe this field!',
  609. 'type' => 'int',
  610. 'not null' => '1',
  611. ),
  612. 'mageidentifier' => array(
  613. // 'description' => 'TODO: please describe this field!',
  614. 'type' => 'text',
  615. 'not null' => '1',
  616. ),
  617. ),
  618. 'primary key' => array(
  619. '0' => 'magedocumentation_id',
  620. ),
  621. 'unique keys' => array(
  622. ),
  623. 'indexes' => array(
  624. 'magedocumentation_idx1' => array(
  625. '0' => 'mageml_id',
  626. ),
  627. 'magedocumentation_idx2' => array(
  628. '0' => 'tableinfo_id',
  629. ),
  630. 'magedocumentation_idx3' => array(
  631. '0' => 'row_id',
  632. ),
  633. ),
  634. 'foreign keys' => array(
  635. ),
  636. );
  637. return $description;
  638. }
  639. /**
  640. * Implements hook_mageml_schema()
  641. * Purpose: To describe the structure of mageml to tripal
  642. * @see tripal_core.api.inc: tripal_core_chado_insert()
  643. * @see tripal_core.api.inc: tripal_core_chado_update()
  644. * @see tripal_core.api.inc: tripal_core_chado_select()
  645. *
  646. * @return
  647. * An array describing the current table
  648. *
  649. * @ingroup tripal_schema_api
  650. *
  651. */
  652. function tripal_core_chado_mageml_schema () {
  653. $description = array();
  654. $description = array(
  655. 'table' => 'mageml',
  656. // 'description' => 'TODO: please describe this table!',
  657. 'fields' => array(
  658. 'mageml_id' => array(
  659. // 'description' => 'TODO: please describe this field!',
  660. 'type' => 'serial',
  661. 'not null' => '1',
  662. ),
  663. 'mage_package' => array(
  664. // 'description' => 'TODO: please describe this field!',
  665. 'type' => 'text',
  666. 'not null' => '1',
  667. ),
  668. 'mage_ml' => array(
  669. // 'description' => 'TODO: please describe this field!',
  670. 'type' => 'text',
  671. 'not null' => '1',
  672. ),
  673. ),
  674. 'primary key' => array(
  675. '0' => 'mageml_id',
  676. ),
  677. 'unique keys' => array(
  678. ),
  679. 'indexes' => array(
  680. ),
  681. 'foreign keys' => array(
  682. ),
  683. );
  684. return $description;
  685. }
  686. /**
  687. * Implements hook_phenotype_comparison_schema()
  688. * Purpose: To describe the structure of phenotype_comparison to tripal
  689. * @see tripal_core.api.inc: tripal_core_chado_insert()
  690. * @see tripal_core.api.inc: tripal_core_chado_update()
  691. * @see tripal_core.api.inc: tripal_core_chado_select()
  692. *
  693. * @return
  694. * An array describing the current table
  695. *
  696. * @ingroup tripal_schema_api
  697. *
  698. */
  699. function tripal_core_chado_phenotype_comparison_schema () {
  700. $description = array();
  701. $description = array(
  702. 'table' => 'phenotype_comparison',
  703. // 'description' => 'TODO: please describe this table!',
  704. 'fields' => array(
  705. 'phenotype_comparison_id' => array(
  706. // 'description' => 'TODO: please describe this field!',
  707. 'type' => 'serial',
  708. 'not null' => '1',
  709. ),
  710. 'genotype1_id' => array(
  711. // 'description' => 'TODO: please describe this field!',
  712. 'type' => 'int',
  713. 'not null' => '1',
  714. ),
  715. 'environment1_id' => array(
  716. // 'description' => 'TODO: please describe this field!',
  717. 'type' => 'int',
  718. 'not null' => '1',
  719. ),
  720. 'genotype2_id' => array(
  721. // 'description' => 'TODO: please describe this field!',
  722. 'type' => 'int',
  723. 'not null' => '1',
  724. ),
  725. 'environment2_id' => array(
  726. // 'description' => 'TODO: please describe this field!',
  727. 'type' => 'int',
  728. 'not null' => '1',
  729. ),
  730. 'phenotype1_id' => array(
  731. // 'description' => 'TODO: please describe this field!',
  732. 'type' => 'int',
  733. 'not null' => '1',
  734. ),
  735. 'phenotype2_id' => array(
  736. // 'description' => 'TODO: please describe this field!',
  737. 'type' => 'int',
  738. 'not null' => '',
  739. ),
  740. 'pub_id' => array(
  741. // 'description' => 'TODO: please describe this field!',
  742. 'type' => 'int',
  743. 'not null' => '1',
  744. ),
  745. 'organism_id' => array(
  746. // 'description' => 'TODO: please describe this field!',
  747. 'type' => 'int',
  748. 'not null' => '1',
  749. ),
  750. ),
  751. 'primary key' => array(
  752. '0' => 'phenotype_comparison_id',
  753. ),
  754. 'unique keys' => array(
  755. 'phenotype_comparison_c1' => array(
  756. '0' => 'genotype1_id',
  757. '1' => 'environment1_id',
  758. '2' => 'genotype2_id',
  759. '3' => 'environment2_id',
  760. '4' => 'phenotype1_id',
  761. '5' => 'pub_id',
  762. ),
  763. ),
  764. 'indexes' => array(
  765. 'phenotype_comparison_idx1' => array(
  766. '0' => 'genotype1_id',
  767. ),
  768. 'phenotype_comparison_idx2' => array(
  769. '0' => 'genotype2_id',
  770. ),
  771. 'phenotype_comparison_idx4' => array(
  772. '0' => 'pub_id',
  773. ),
  774. ),
  775. 'foreign keys' => array(
  776. ),
  777. );
  778. return $description;
  779. }
  780. /**
  781. * Implements hook_phenotype_comparison_cvterm_schema()
  782. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  783. * @see tripal_core.api.inc: tripal_core_chado_insert()
  784. * @see tripal_core.api.inc: tripal_core_chado_update()
  785. * @see tripal_core.api.inc: tripal_core_chado_select()
  786. *
  787. * @return
  788. * An array describing the current table
  789. *
  790. * @ingroup tripal_schema_api
  791. *
  792. */
  793. function tripal_core_chado_phenotype_comparison_cvterm_schema () {
  794. $description = array();
  795. $description = array(
  796. 'table' => 'phenotype_comparison_cvterm',
  797. // 'description' => 'TODO: please describe this table!',
  798. 'fields' => array(
  799. 'phenotype_comparison_cvterm_id' => array(
  800. // 'description' => 'TODO: please describe this field!',
  801. 'type' => 'serial',
  802. 'not null' => '1',
  803. ),
  804. 'phenotype_comparison_id' => array(
  805. // 'description' => 'TODO: please describe this field!',
  806. 'type' => 'int',
  807. 'not null' => '1',
  808. ),
  809. 'cvterm_id' => array(
  810. // 'description' => 'TODO: please describe this field!',
  811. 'type' => 'int',
  812. 'not null' => '1',
  813. ),
  814. 'pub_id' => array(
  815. // 'description' => 'TODO: please describe this field!',
  816. 'type' => 'int',
  817. 'not null' => '1',
  818. ),
  819. 'rank' => array(
  820. // 'description' => 'TODO: please describe this field!',
  821. 'type' => 'int',
  822. 'not null' => '1',
  823. 'default' => '0',
  824. ),
  825. ),
  826. 'primary key' => array(
  827. '0' => 'phenotype_comparison_cvterm_id',
  828. ),
  829. 'unique keys' => array(
  830. 'phenotype_comparison_cvterm_c1' => array(
  831. '0' => 'phenotype_comparison_id',
  832. '1' => 'cvterm_id',
  833. ),
  834. ),
  835. 'indexes' => array(
  836. 'phenotype_comparison_cvterm_idx1' => array(
  837. '0' => 'phenotype_comparison_id',
  838. ),
  839. 'phenotype_comparison_cvterm_idx2' => array(
  840. '0' => 'cvterm_id',
  841. ),
  842. ),
  843. 'foreign keys' => array(
  844. ),
  845. );
  846. return $description;
  847. }
  848. /**
  849. * Implements hook_phylonode_relationship_schema()
  850. * Purpose: To describe the structure of phylonode_relationship to tripal
  851. * @see tripal_core.api.inc: tripal_core_chado_insert()
  852. * @see tripal_core.api.inc: tripal_core_chado_update()
  853. * @see tripal_core.api.inc: tripal_core_chado_select()
  854. *
  855. * @return
  856. * An array describing the current table
  857. *
  858. * @ingroup tripal_schema_api
  859. *
  860. */
  861. function tripal_core_chado_phylonode_relationship_schema () {
  862. $description = array();
  863. $description = array(
  864. 'table' => 'phylonode_relationship',
  865. // 'description' => 'TODO: please describe this table!',
  866. 'fields' => array(
  867. 'phylonode_relationship_id' => array(
  868. // 'description' => 'TODO: please describe this field!',
  869. 'type' => 'serial',
  870. 'not null' => '1',
  871. ),
  872. 'subject_id' => array(
  873. // 'description' => 'TODO: please describe this field!',
  874. 'type' => 'int',
  875. 'not null' => '1',
  876. ),
  877. 'object_id' => array(
  878. // 'description' => 'TODO: please describe this field!',
  879. 'type' => 'int',
  880. 'not null' => '1',
  881. ),
  882. 'type_id' => array(
  883. // 'description' => 'TODO: please describe this field!',
  884. 'type' => 'int',
  885. 'not null' => '1',
  886. ),
  887. 'rank' => array(
  888. // 'description' => 'TODO: please describe this field!',
  889. 'type' => 'int',
  890. 'not null' => '',
  891. ),
  892. 'phylotree_id' => array(
  893. // 'description' => 'TODO: please describe this field!',
  894. 'type' => 'int',
  895. 'not null' => '1',
  896. ),
  897. ),
  898. 'primary key' => array(
  899. '0' => 'phylonode_relationship_id',
  900. ),
  901. 'unique keys' => array(
  902. 'subject_id' => array(
  903. '0' => 'subject_id',
  904. '1' => 'object_id',
  905. '2' => 'type_id',
  906. ),
  907. ),
  908. 'indexes' => array(
  909. 'phylonode_relationship_idx1' => array(
  910. '0' => 'subject_id',
  911. ),
  912. 'phylonode_relationship_idx2' => array(
  913. '0' => 'object_id',
  914. ),
  915. 'phylonode_relationship_idx3' => array(
  916. '0' => 'type_id',
  917. ),
  918. ),
  919. 'foreign keys' => array(
  920. ),
  921. );
  922. return $description;
  923. }
  924. /**
  925. * Implements hook_phylonodeprop_schema()
  926. * Purpose: To describe the structure of phylonodeprop to tripal
  927. * @see tripal_core.api.inc: tripal_core_chado_insert()
  928. * @see tripal_core.api.inc: tripal_core_chado_update()
  929. * @see tripal_core.api.inc: tripal_core_chado_select()
  930. *
  931. * @return
  932. * An array describing the current table
  933. *
  934. * @ingroup tripal_schema_api
  935. *
  936. */
  937. function tripal_core_chado_phylonodeprop_schema () {
  938. $description = array();
  939. $description = array(
  940. 'table' => 'phylonodeprop',
  941. // 'description' => 'TODO: please describe this table!',
  942. 'fields' => array(
  943. 'phylonodeprop_id' => array(
  944. // 'description' => 'TODO: please describe this field!',
  945. 'type' => 'serial',
  946. 'not null' => '1',
  947. ),
  948. 'phylonode_id' => array(
  949. // 'description' => 'TODO: please describe this field!',
  950. 'type' => 'int',
  951. 'not null' => '1',
  952. ),
  953. 'type_id' => array(
  954. // 'description' => 'TODO: please describe this field!',
  955. 'type' => 'int',
  956. 'not null' => '1',
  957. ),
  958. 'value' => array(
  959. // 'description' => 'TODO: please describe this field!',
  960. 'type' => 'text',
  961. 'not null' => '1',
  962. 'default' => '',
  963. ),
  964. 'rank' => array(
  965. // 'description' => 'TODO: please describe this field!',
  966. 'type' => 'int',
  967. 'not null' => '1',
  968. 'default' => '0',
  969. ),
  970. ),
  971. 'primary key' => array(
  972. '0' => 'phylonodeprop_id',
  973. ),
  974. 'unique keys' => array(
  975. 'phylonode_id' => array(
  976. '0' => 'phylonode_id',
  977. '1' => 'type_id',
  978. '2' => 'value',
  979. '3' => 'rank',
  980. ),
  981. ),
  982. 'indexes' => array(
  983. 'phylonodeprop_idx1' => array(
  984. '0' => 'phylonode_id',
  985. ),
  986. 'phylonodeprop_idx2' => array(
  987. '0' => 'type_id',
  988. ),
  989. ),
  990. 'foreign keys' => array(
  991. ),
  992. );
  993. return $description;
  994. }
  995. /**
  996. * Implements hook_phylotree_schema()
  997. * Purpose: To describe the structure of phylotree to tripal
  998. * @see tripal_core.api.inc: tripal_core_chado_insert()
  999. * @see tripal_core.api.inc: tripal_core_chado_update()
  1000. * @see tripal_core.api.inc: tripal_core_chado_select()
  1001. *
  1002. * @return
  1003. * An array describing the current table
  1004. *
  1005. * @ingroup tripal_schema_api
  1006. *
  1007. */
  1008. function tripal_core_chado_phylotree_schema () {
  1009. $description = array();
  1010. $description = array(
  1011. 'table' => 'phylotree',
  1012. // 'description' => 'TODO: please describe this table!',
  1013. 'fields' => array(
  1014. 'phylotree_id' => array(
  1015. // 'description' => 'TODO: please describe this field!',
  1016. 'type' => 'serial',
  1017. 'not null' => '1',
  1018. ),
  1019. 'dbxref_id' => array(
  1020. // 'description' => 'TODO: please describe this field!',
  1021. 'type' => 'int',
  1022. 'not null' => '1',
  1023. ),
  1024. 'name' => array(
  1025. // 'description' => 'TODO: please describe this field!',
  1026. 'type' => 'varchar',
  1027. 'length' => '255',
  1028. 'not null' => '',
  1029. ),
  1030. 'type_id' => array(
  1031. // 'description' => 'TODO: please describe this field!',
  1032. 'type' => 'int',
  1033. 'not null' => '',
  1034. ),
  1035. 'analysis_id' => array(
  1036. // 'description' => 'TODO: please describe this field!',
  1037. 'type' => 'int',
  1038. 'not null' => '',
  1039. ),
  1040. 'comment' => array(
  1041. // 'description' => 'TODO: please describe this field!',
  1042. 'type' => 'text',
  1043. 'not null' => '',
  1044. ),
  1045. ),
  1046. 'primary key' => array(
  1047. '0' => 'phylotree_id',
  1048. ),
  1049. 'unique keys' => array(
  1050. ),
  1051. 'indexes' => array(
  1052. 'phylotree_idx1' => array(
  1053. '0' => 'phylotree_id',
  1054. ),
  1055. ),
  1056. 'foreign keys' => array(
  1057. ),
  1058. );
  1059. return $description;
  1060. }
  1061. /**
  1062. * Implements hook_phylotree_pub_schema()
  1063. * Purpose: To describe the structure of phylotree_pub to tripal
  1064. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1065. * @see tripal_core.api.inc: tripal_core_chado_update()
  1066. * @see tripal_core.api.inc: tripal_core_chado_select()
  1067. *
  1068. * @return
  1069. * An array describing the current table
  1070. *
  1071. * @ingroup tripal_schema_api
  1072. *
  1073. */
  1074. function tripal_core_chado_phylotree_pub_schema () {
  1075. $description = array();
  1076. $description = array(
  1077. 'table' => 'phylotree_pub',
  1078. // 'description' => 'TODO: please describe this table!',
  1079. 'fields' => array(
  1080. 'phylotree_pub_id' => array(
  1081. // 'description' => 'TODO: please describe this field!',
  1082. 'type' => 'serial',
  1083. 'not null' => '1',
  1084. ),
  1085. 'phylotree_id' => array(
  1086. // 'description' => 'TODO: please describe this field!',
  1087. 'type' => 'int',
  1088. 'not null' => '1',
  1089. ),
  1090. 'pub_id' => array(
  1091. // 'description' => 'TODO: please describe this field!',
  1092. 'type' => 'int',
  1093. 'not null' => '1',
  1094. ),
  1095. ),
  1096. 'primary key' => array(
  1097. '0' => 'phylotree_pub_id',
  1098. ),
  1099. 'unique keys' => array(
  1100. 'phylotree_id' => array(
  1101. '0' => 'phylotree_id',
  1102. '1' => 'pub_id',
  1103. ),
  1104. ),
  1105. 'indexes' => array(
  1106. 'phylotree_pub_idx1' => array(
  1107. '0' => 'phylotree_id',
  1108. ),
  1109. 'phylotree_pub_idx2' => array(
  1110. '0' => 'pub_id',
  1111. ),
  1112. ),
  1113. 'foreign keys' => array(
  1114. ),
  1115. );
  1116. return $description;
  1117. }
  1118. /**
  1119. * Implements hook_phylonode_pub_schema()
  1120. * Purpose: To describe the structure of phylonode_pub to tripal
  1121. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1122. * @see tripal_core.api.inc: tripal_core_chado_update()
  1123. * @see tripal_core.api.inc: tripal_core_chado_select()
  1124. *
  1125. * @return
  1126. * An array describing the current table
  1127. *
  1128. * @ingroup tripal_schema_api
  1129. *
  1130. */
  1131. function tripal_core_chado_phylonode_pub_schema () {
  1132. $description = array();
  1133. $description = array(
  1134. 'table' => 'phylonode_pub',
  1135. // 'description' => 'TODO: please describe this table!',
  1136. 'fields' => array(
  1137. 'phylonode_pub_id' => array(
  1138. // 'description' => 'TODO: please describe this field!',
  1139. 'type' => 'serial',
  1140. 'not null' => '1',
  1141. ),
  1142. 'phylonode_id' => array(
  1143. // 'description' => 'TODO: please describe this field!',
  1144. 'type' => 'int',
  1145. 'not null' => '1',
  1146. ),
  1147. 'pub_id' => array(
  1148. // 'description' => 'TODO: please describe this field!',
  1149. 'type' => 'int',
  1150. 'not null' => '1',
  1151. ),
  1152. ),
  1153. 'primary key' => array(
  1154. '0' => 'phylonode_pub_id',
  1155. ),
  1156. 'unique keys' => array(
  1157. 'phylonode_id' => array(
  1158. '0' => 'phylonode_id',
  1159. '1' => 'pub_id',
  1160. ),
  1161. ),
  1162. 'indexes' => array(
  1163. 'phylonode_pub_idx1' => array(
  1164. '0' => 'phylonode_id',
  1165. ),
  1166. 'phylonode_pub_idx2' => array(
  1167. '0' => 'pub_id',
  1168. ),
  1169. ),
  1170. 'foreign keys' => array(
  1171. ),
  1172. );
  1173. return $description;
  1174. }
  1175. /**
  1176. * Implements hook_phylonode_organism_schema()
  1177. * Purpose: To describe the structure of phylonode_organism to tripal
  1178. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1179. * @see tripal_core.api.inc: tripal_core_chado_update()
  1180. * @see tripal_core.api.inc: tripal_core_chado_select()
  1181. *
  1182. * @return
  1183. * An array describing the current table
  1184. *
  1185. * @ingroup tripal_schema_api
  1186. *
  1187. */
  1188. function tripal_core_chado_phylonode_organism_schema () {
  1189. $description = array();
  1190. $description = array(
  1191. 'table' => 'phylonode_organism',
  1192. // 'description' => 'TODO: please describe this table!',
  1193. 'fields' => array(
  1194. 'phylonode_organism_id' => array(
  1195. // 'description' => 'TODO: please describe this field!',
  1196. 'type' => 'serial',
  1197. 'not null' => '1',
  1198. ),
  1199. 'phylonode_id' => array(
  1200. // 'description' => 'TODO: please describe this field!',
  1201. 'type' => 'int',
  1202. 'not null' => '1',
  1203. ),
  1204. 'organism_id' => array(
  1205. // 'description' => 'TODO: please describe this field!',
  1206. 'type' => 'int',
  1207. 'not null' => '1',
  1208. ),
  1209. ),
  1210. 'primary key' => array(
  1211. '0' => 'phylonode_organism_id',
  1212. ),
  1213. 'unique keys' => array(
  1214. 'phylonode_id' => array(
  1215. '0' => 'phylonode_id',
  1216. ),
  1217. ),
  1218. 'indexes' => array(
  1219. 'phylonode_organism_idx1' => array(
  1220. '0' => 'phylonode_id',
  1221. ),
  1222. 'phylonode_organism_idx2' => array(
  1223. '0' => 'organism_id',
  1224. ),
  1225. ),
  1226. 'foreign keys' => array(
  1227. ),
  1228. );
  1229. return $description;
  1230. }
  1231. /**
  1232. * Implements hook_phenotype_cvterm_schema()
  1233. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1234. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1235. * @see tripal_core.api.inc: tripal_core_chado_update()
  1236. * @see tripal_core.api.inc: tripal_core_chado_select()
  1237. *
  1238. * @return
  1239. * An array describing the current table
  1240. *
  1241. * @ingroup tripal_schema_api
  1242. *
  1243. */
  1244. function tripal_core_chado_phenotype_cvterm_schema () {
  1245. $description = array();
  1246. $description = array(
  1247. 'table' => 'phenotype_cvterm',
  1248. // 'description' => 'TODO: please describe this table!',
  1249. 'fields' => array(
  1250. 'phenotype_cvterm_id' => array(
  1251. // 'description' => 'TODO: please describe this field!',
  1252. 'type' => 'serial',
  1253. 'not null' => '1',
  1254. ),
  1255. 'phenotype_id' => array(
  1256. // 'description' => 'TODO: please describe this field!',
  1257. 'type' => 'int',
  1258. 'not null' => '1',
  1259. ),
  1260. 'cvterm_id' => array(
  1261. // 'description' => 'TODO: please describe this field!',
  1262. 'type' => 'int',
  1263. 'not null' => '1',
  1264. ),
  1265. 'rank' => array(
  1266. // 'description' => 'TODO: please describe this field!',
  1267. 'type' => 'int',
  1268. 'not null' => '1',
  1269. 'default' => '0',
  1270. ),
  1271. ),
  1272. 'primary key' => array(
  1273. '0' => 'phenotype_cvterm_id',
  1274. ),
  1275. 'unique keys' => array(
  1276. 'phenotype_cvterm_c1' => array(
  1277. '0' => 'phenotype_id',
  1278. '1' => 'cvterm_id',
  1279. '2' => 'rank',
  1280. ),
  1281. ),
  1282. 'indexes' => array(
  1283. 'phenotype_cvterm_idx1' => array(
  1284. '0' => 'phenotype_id',
  1285. ),
  1286. 'phenotype_cvterm_idx2' => array(
  1287. '0' => 'cvterm_id',
  1288. ),
  1289. ),
  1290. 'foreign keys' => array(
  1291. ),
  1292. );
  1293. return $description;
  1294. }
  1295. /**
  1296. * Implements hook_phenstatement_schema()
  1297. * Purpose: To describe the structure of phenstatement to tripal
  1298. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1299. * @see tripal_core.api.inc: tripal_core_chado_update()
  1300. * @see tripal_core.api.inc: tripal_core_chado_select()
  1301. *
  1302. * @return
  1303. * An array describing the current table
  1304. *
  1305. * @ingroup tripal_schema_api
  1306. *
  1307. */
  1308. function tripal_core_chado_phenstatement_schema () {
  1309. $description = array();
  1310. $description = array(
  1311. 'table' => 'phenstatement',
  1312. // 'description' => 'TODO: please describe this table!',
  1313. 'fields' => array(
  1314. 'phenstatement_id' => array(
  1315. // 'description' => 'TODO: please describe this field!',
  1316. 'type' => 'serial',
  1317. 'not null' => '1',
  1318. ),
  1319. 'genotype_id' => array(
  1320. // 'description' => 'TODO: please describe this field!',
  1321. 'type' => 'int',
  1322. 'not null' => '1',
  1323. ),
  1324. 'environment_id' => array(
  1325. // 'description' => 'TODO: please describe this field!',
  1326. 'type' => 'int',
  1327. 'not null' => '1',
  1328. ),
  1329. 'phenotype_id' => array(
  1330. // 'description' => 'TODO: please describe this field!',
  1331. 'type' => 'int',
  1332. 'not null' => '1',
  1333. ),
  1334. 'type_id' => array(
  1335. // 'description' => 'TODO: please describe this field!',
  1336. 'type' => 'int',
  1337. 'not null' => '1',
  1338. ),
  1339. 'pub_id' => array(
  1340. // 'description' => 'TODO: please describe this field!',
  1341. 'type' => 'int',
  1342. 'not null' => '1',
  1343. ),
  1344. ),
  1345. 'primary key' => array(
  1346. '0' => 'phenstatement_id',
  1347. ),
  1348. 'unique keys' => array(
  1349. 'phenstatement_c1' => array(
  1350. '0' => 'genotype_id',
  1351. '1' => 'phenotype_id',
  1352. '2' => 'environment_id',
  1353. '3' => 'type_id',
  1354. '4' => 'pub_id',
  1355. ),
  1356. ),
  1357. 'indexes' => array(
  1358. 'phenstatement_idx1' => array(
  1359. '0' => 'genotype_id',
  1360. ),
  1361. 'phenstatement_idx2' => array(
  1362. '0' => 'phenotype_id',
  1363. ),
  1364. ),
  1365. 'foreign keys' => array(
  1366. ),
  1367. );
  1368. return $description;
  1369. }
  1370. /**
  1371. * Implements hook_phylonode_schema()
  1372. * Purpose: To describe the structure of phylonode to tripal
  1373. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1374. * @see tripal_core.api.inc: tripal_core_chado_update()
  1375. * @see tripal_core.api.inc: tripal_core_chado_select()
  1376. *
  1377. * @return
  1378. * An array describing the current table
  1379. *
  1380. * @ingroup tripal_schema_api
  1381. *
  1382. */
  1383. function tripal_core_chado_phylonode_schema () {
  1384. $description = array();
  1385. $description = array(
  1386. 'table' => 'phylonode',
  1387. // 'description' => 'TODO: please describe this table!',
  1388. 'fields' => array(
  1389. 'phylonode_id' => array(
  1390. // 'description' => 'TODO: please describe this field!',
  1391. 'type' => 'serial',
  1392. 'not null' => '1',
  1393. ),
  1394. 'phylotree_id' => array(
  1395. // 'description' => 'TODO: please describe this field!',
  1396. 'type' => 'int',
  1397. 'not null' => '1',
  1398. ),
  1399. 'parent_phylonode_id' => array(
  1400. // 'description' => 'TODO: please describe this field!',
  1401. 'type' => 'int',
  1402. 'not null' => '',
  1403. ),
  1404. 'left_idx' => array(
  1405. // 'description' => 'TODO: please describe this field!',
  1406. 'type' => 'int',
  1407. 'not null' => '1',
  1408. ),
  1409. 'right_idx' => array(
  1410. // 'description' => 'TODO: please describe this field!',
  1411. 'type' => 'int',
  1412. 'not null' => '1',
  1413. ),
  1414. 'type_id' => array(
  1415. // 'description' => 'TODO: please describe this field!',
  1416. 'type' => 'int',
  1417. 'not null' => '',
  1418. ),
  1419. 'feature_id' => array(
  1420. // 'description' => 'TODO: please describe this field!',
  1421. 'type' => 'int',
  1422. 'not null' => '',
  1423. ),
  1424. 'label' => array(
  1425. // 'description' => 'TODO: please describe this field!',
  1426. 'type' => 'varchar',
  1427. 'length' => '255',
  1428. 'not null' => '',
  1429. ),
  1430. 'distance' => array(
  1431. // 'description' => 'TODO: please describe this field!',
  1432. 'type' => 'float',
  1433. 'size' => 'big',
  1434. 'not null' => '',
  1435. ),
  1436. ),
  1437. 'primary key' => array(
  1438. '0' => 'phylonode_id',
  1439. ),
  1440. 'unique keys' => array(
  1441. 'phylotree_id' => array(
  1442. '0' => 'phylotree_id',
  1443. '1' => 'left_idx',
  1444. ),
  1445. 'phylonode_phylotree_id_key1' => array(
  1446. '0' => 'phylotree_id',
  1447. '1' => 'right_idx',
  1448. ),
  1449. ),
  1450. 'indexes' => array(
  1451. ),
  1452. 'foreign keys' => array(
  1453. ),
  1454. );
  1455. return $description;
  1456. }
  1457. /**
  1458. * Implements hook_phylonode_dbxref_schema()
  1459. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1460. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1461. * @see tripal_core.api.inc: tripal_core_chado_update()
  1462. * @see tripal_core.api.inc: tripal_core_chado_select()
  1463. *
  1464. * @return
  1465. * An array describing the current table
  1466. *
  1467. * @ingroup tripal_schema_api
  1468. *
  1469. */
  1470. function tripal_core_chado_phylonode_dbxref_schema () {
  1471. $description = array();
  1472. $description = array(
  1473. 'table' => 'phylonode_dbxref',
  1474. // 'description' => 'TODO: please describe this table!',
  1475. 'fields' => array(
  1476. 'phylonode_dbxref_id' => array(
  1477. // 'description' => 'TODO: please describe this field!',
  1478. 'type' => 'serial',
  1479. 'not null' => '1',
  1480. ),
  1481. 'phylonode_id' => array(
  1482. // 'description' => 'TODO: please describe this field!',
  1483. 'type' => 'int',
  1484. 'not null' => '1',
  1485. ),
  1486. 'dbxref_id' => array(
  1487. // 'description' => 'TODO: please describe this field!',
  1488. 'type' => 'int',
  1489. 'not null' => '1',
  1490. ),
  1491. ),
  1492. 'primary key' => array(
  1493. '0' => 'phylonode_dbxref_id',
  1494. ),
  1495. 'unique keys' => array(
  1496. 'phylonode_id' => array(
  1497. '0' => 'phylonode_id',
  1498. '1' => 'dbxref_id',
  1499. ),
  1500. ),
  1501. 'indexes' => array(
  1502. 'phylonode_dbxref_idx1' => array(
  1503. '0' => 'phylonode_id',
  1504. ),
  1505. 'phylonode_dbxref_idx2' => array(
  1506. '0' => 'dbxref_id',
  1507. ),
  1508. ),
  1509. 'foreign keys' => array(
  1510. ),
  1511. );
  1512. return $description;
  1513. }
  1514. /**
  1515. * Implements hook_library_synonym_schema()
  1516. * Purpose: To describe the structure of library_synonym to tripal
  1517. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1518. * @see tripal_core.api.inc: tripal_core_chado_update()
  1519. * @see tripal_core.api.inc: tripal_core_chado_select()
  1520. *
  1521. * @return
  1522. * An array describing the current table
  1523. *
  1524. * @ingroup tripal_schema_api
  1525. *
  1526. */
  1527. function tripal_core_chado_library_synonym_schema () {
  1528. $description = array();
  1529. $description = array(
  1530. 'table' => 'library_synonym',
  1531. // 'description' => 'TODO: please describe this table!',
  1532. 'fields' => array(
  1533. 'library_synonym_id' => array(
  1534. // 'description' => 'TODO: please describe this field!',
  1535. 'type' => 'serial',
  1536. 'not null' => '1',
  1537. ),
  1538. 'synonym_id' => array(
  1539. // 'description' => 'TODO: please describe this field!',
  1540. 'type' => 'int',
  1541. 'not null' => '1',
  1542. ),
  1543. 'library_id' => array(
  1544. // 'description' => 'TODO: please describe this field!',
  1545. 'type' => 'int',
  1546. 'not null' => '1',
  1547. ),
  1548. 'pub_id' => array(
  1549. // 'description' => 'TODO: please describe this field!',
  1550. 'type' => 'int',
  1551. 'not null' => '1',
  1552. ),
  1553. 'is_current' => array(
  1554. // 'description' => 'TODO: please describe this field!',
  1555. 'type' => 'boolean',
  1556. 'not null' => '1',
  1557. 'default' => 'ru',
  1558. ),
  1559. 'is_internal' => array(
  1560. // 'description' => 'TODO: please describe this field!',
  1561. 'type' => 'boolean',
  1562. 'not null' => '1',
  1563. 'default' => 'als',
  1564. ),
  1565. ),
  1566. 'primary key' => array(
  1567. '0' => 'library_synonym_id',
  1568. ),
  1569. 'unique keys' => array(
  1570. 'library_synonym_c1' => array(
  1571. '0' => 'synonym_id',
  1572. '1' => 'library_id',
  1573. '2' => 'pub_id',
  1574. ),
  1575. ),
  1576. 'indexes' => array(
  1577. 'library_synonym_idx1' => array(
  1578. '0' => 'synonym_id',
  1579. ),
  1580. 'library_synonym_idx2' => array(
  1581. '0' => 'library_id',
  1582. ),
  1583. 'library_synonym_idx3' => array(
  1584. '0' => 'pub_id',
  1585. ),
  1586. ),
  1587. 'foreign keys' => array(
  1588. ),
  1589. );
  1590. return $description;
  1591. }
  1592. /**
  1593. * Implements hook_library_pub_schema()
  1594. * Purpose: To describe the structure of library_pub to tripal
  1595. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1596. * @see tripal_core.api.inc: tripal_core_chado_update()
  1597. * @see tripal_core.api.inc: tripal_core_chado_select()
  1598. *
  1599. * @return
  1600. * An array describing the current table
  1601. *
  1602. * @ingroup tripal_schema_api
  1603. *
  1604. */
  1605. function tripal_core_chado_library_pub_schema () {
  1606. $description = array();
  1607. $description = array(
  1608. 'table' => 'library_pub',
  1609. // 'description' => 'TODO: please describe this table!',
  1610. 'fields' => array(
  1611. 'library_pub_id' => array(
  1612. // 'description' => 'TODO: please describe this field!',
  1613. 'type' => 'serial',
  1614. 'not null' => '1',
  1615. ),
  1616. 'library_id' => array(
  1617. // 'description' => 'TODO: please describe this field!',
  1618. 'type' => 'int',
  1619. 'not null' => '1',
  1620. ),
  1621. 'pub_id' => array(
  1622. // 'description' => 'TODO: please describe this field!',
  1623. 'type' => 'int',
  1624. 'not null' => '1',
  1625. ),
  1626. ),
  1627. 'primary key' => array(
  1628. '0' => 'library_pub_id',
  1629. ),
  1630. 'unique keys' => array(
  1631. 'library_pub_c1' => array(
  1632. '0' => 'library_id',
  1633. '1' => 'pub_id',
  1634. ),
  1635. ),
  1636. 'indexes' => array(
  1637. 'library_pub_idx1' => array(
  1638. '0' => 'library_id',
  1639. ),
  1640. 'library_pub_idx2' => array(
  1641. '0' => 'pub_id',
  1642. ),
  1643. ),
  1644. 'foreign keys' => array(
  1645. ),
  1646. );
  1647. return $description;
  1648. }
  1649. /**
  1650. * Implements hook_featureprop_pub_schema()
  1651. * Purpose: To describe the structure of featureprop_pub to tripal
  1652. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1653. * @see tripal_core.api.inc: tripal_core_chado_update()
  1654. * @see tripal_core.api.inc: tripal_core_chado_select()
  1655. *
  1656. * @return
  1657. * An array describing the current table
  1658. *
  1659. * @ingroup tripal_schema_api
  1660. *
  1661. */
  1662. function tripal_core_chado_featureprop_pub_schema () {
  1663. $description = array();
  1664. $description = array(
  1665. 'table' => 'featureprop_pub',
  1666. // 'description' => 'TODO: please describe this table!',
  1667. 'fields' => array(
  1668. 'featureprop_pub_id' => array(
  1669. // 'description' => 'TODO: please describe this field!',
  1670. 'type' => 'serial',
  1671. 'not null' => '1',
  1672. ),
  1673. 'featureprop_id' => array(
  1674. // 'description' => 'TODO: please describe this field!',
  1675. 'type' => 'int',
  1676. 'not null' => '1',
  1677. ),
  1678. 'pub_id' => array(
  1679. // 'description' => 'TODO: please describe this field!',
  1680. 'type' => 'int',
  1681. 'not null' => '1',
  1682. ),
  1683. ),
  1684. 'primary key' => array(
  1685. '0' => 'featureprop_pub_id',
  1686. ),
  1687. 'unique keys' => array(
  1688. 'featureprop_pub_c1' => array(
  1689. '0' => 'featureprop_id',
  1690. '1' => 'pub_id',
  1691. ),
  1692. ),
  1693. 'indexes' => array(
  1694. 'featureprop_pub_idx1' => array(
  1695. '0' => 'featureprop_id',
  1696. ),
  1697. 'featureprop_pub_idx2' => array(
  1698. '0' => 'pub_id',
  1699. ),
  1700. ),
  1701. 'foreign keys' => array(
  1702. ),
  1703. );
  1704. return $description;
  1705. }
  1706. /**
  1707. * Implements hook_featureprop_schema()
  1708. * Purpose: To describe the structure of featureprop to tripal
  1709. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1710. * @see tripal_core.api.inc: tripal_core_chado_update()
  1711. * @see tripal_core.api.inc: tripal_core_chado_select()
  1712. *
  1713. * @return
  1714. * An array describing the current table
  1715. *
  1716. * @ingroup tripal_schema_api
  1717. *
  1718. */
  1719. function tripal_core_chado_featureprop_schema () {
  1720. $description = array();
  1721. $description = array(
  1722. 'table' => 'featureprop',
  1723. // 'description' => 'TODO: please describe this table!',
  1724. 'fields' => array(
  1725. 'featureprop_id' => array(
  1726. // 'description' => 'TODO: please describe this field!',
  1727. 'type' => 'serial',
  1728. 'not null' => '1',
  1729. ),
  1730. 'feature_id' => array(
  1731. // 'description' => 'TODO: please describe this field!',
  1732. 'type' => 'int',
  1733. 'not null' => '1',
  1734. ),
  1735. 'type_id' => array(
  1736. // 'description' => 'TODO: please describe this field!',
  1737. 'type' => 'int',
  1738. 'not null' => '1',
  1739. ),
  1740. 'value' => array(
  1741. // 'description' => 'TODO: please describe this field!',
  1742. 'type' => 'text',
  1743. 'not null' => '',
  1744. ),
  1745. 'rank' => array(
  1746. // 'description' => 'TODO: please describe this field!',
  1747. 'type' => 'int',
  1748. 'not null' => '1',
  1749. 'default' => '0',
  1750. ),
  1751. ),
  1752. 'primary key' => array(
  1753. '0' => 'featureprop_id',
  1754. ),
  1755. 'unique keys' => array(
  1756. 'featureprop_c1' => array(
  1757. '0' => 'feature_id',
  1758. '1' => 'type_id',
  1759. '2' => 'rank',
  1760. ),
  1761. ),
  1762. 'indexes' => array(
  1763. 'featureprop_idx1' => array(
  1764. '0' => 'feature_id',
  1765. ),
  1766. 'featureprop_idx2' => array(
  1767. '0' => 'type_id',
  1768. ),
  1769. ),
  1770. 'foreign keys' => array(
  1771. ),
  1772. );
  1773. return $description;
  1774. }
  1775. /**
  1776. * Implements hook_featurerange_schema()
  1777. * Purpose: To describe the structure of featurerange to tripal
  1778. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1779. * @see tripal_core.api.inc: tripal_core_chado_update()
  1780. * @see tripal_core.api.inc: tripal_core_chado_select()
  1781. *
  1782. * @return
  1783. * An array describing the current table
  1784. *
  1785. * @ingroup tripal_schema_api
  1786. *
  1787. */
  1788. function tripal_core_chado_featurerange_schema () {
  1789. $description = array();
  1790. $description = array(
  1791. 'table' => 'featurerange',
  1792. // 'description' => 'TODO: please describe this table!',
  1793. 'fields' => array(
  1794. 'featurerange_id' => array(
  1795. // 'description' => 'TODO: please describe this field!',
  1796. 'type' => 'serial',
  1797. 'not null' => '1',
  1798. ),
  1799. 'featuremap_id' => array(
  1800. // 'description' => 'TODO: please describe this field!',
  1801. 'type' => 'int',
  1802. 'not null' => '1',
  1803. ),
  1804. 'feature_id' => array(
  1805. // 'description' => 'TODO: please describe this field!',
  1806. 'type' => 'int',
  1807. 'not null' => '1',
  1808. ),
  1809. 'leftstartf_id' => array(
  1810. // 'description' => 'TODO: please describe this field!',
  1811. 'type' => 'int',
  1812. 'not null' => '1',
  1813. ),
  1814. 'leftendf_id' => array(
  1815. // 'description' => 'TODO: please describe this field!',
  1816. 'type' => 'int',
  1817. 'not null' => '',
  1818. ),
  1819. 'rightstartf_id' => array(
  1820. // 'description' => 'TODO: please describe this field!',
  1821. 'type' => 'int',
  1822. 'not null' => '',
  1823. ),
  1824. 'rightendf_id' => array(
  1825. // 'description' => 'TODO: please describe this field!',
  1826. 'type' => 'int',
  1827. 'not null' => '1',
  1828. ),
  1829. 'rangestr' => array(
  1830. // 'description' => 'TODO: please describe this field!',
  1831. 'type' => 'varchar',
  1832. 'length' => '255',
  1833. 'not null' => '',
  1834. ),
  1835. ),
  1836. 'primary key' => array(
  1837. '0' => 'featurerange_id',
  1838. ),
  1839. 'unique keys' => array(
  1840. ),
  1841. 'indexes' => array(
  1842. 'featurerange_idx1' => array(
  1843. '0' => 'featuremap_id',
  1844. ),
  1845. 'featurerange_idx2' => array(
  1846. '0' => 'feature_id',
  1847. ),
  1848. 'featurerange_idx3' => array(
  1849. '0' => 'leftstartf_id',
  1850. ),
  1851. 'featurerange_idx4' => array(
  1852. '0' => 'leftendf_id',
  1853. ),
  1854. 'featurerange_idx5' => array(
  1855. '0' => 'rightstartf_id',
  1856. ),
  1857. 'featurerange_idx6' => array(
  1858. '0' => 'rightendf_id',
  1859. ),
  1860. ),
  1861. 'foreign keys' => array(
  1862. ),
  1863. );
  1864. return $description;
  1865. }
  1866. /**
  1867. * Implements hook_featureset_meets_schema()
  1868. * Purpose: To describe the structure of featureset_meets to tripal
  1869. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1870. * @see tripal_core.api.inc: tripal_core_chado_update()
  1871. * @see tripal_core.api.inc: tripal_core_chado_select()
  1872. *
  1873. * @return
  1874. * An array describing the current table
  1875. *
  1876. * @ingroup tripal_schema_api
  1877. *
  1878. */
  1879. function tripal_core_chado_featureset_meets_schema () {
  1880. $description = array();
  1881. $description = array(
  1882. 'table' => 'featureset_meets',
  1883. // 'description' => 'TODO: please describe this table!',
  1884. 'fields' => array(
  1885. 'subject_id' => array(
  1886. // 'description' => 'TODO: please describe this field!',
  1887. 'type' => 'int',
  1888. 'not null' => '',
  1889. ),
  1890. 'object_id' => array(
  1891. // 'description' => 'TODO: please describe this field!',
  1892. 'type' => 'int',
  1893. 'not null' => '',
  1894. ),
  1895. ),
  1896. 'primary key' => array(
  1897. ),
  1898. 'unique keys' => array(
  1899. ),
  1900. 'indexes' => array(
  1901. ),
  1902. 'foreign keys' => array(
  1903. ),
  1904. );
  1905. return $description;
  1906. }
  1907. /**
  1908. * Implements hook_fnr_type_schema()
  1909. * Purpose: To describe the structure of fnr_type to tripal
  1910. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1911. * @see tripal_core.api.inc: tripal_core_chado_update()
  1912. * @see tripal_core.api.inc: tripal_core_chado_select()
  1913. *
  1914. * @return
  1915. * An array describing the current table
  1916. *
  1917. * @ingroup tripal_schema_api
  1918. *
  1919. */
  1920. function tripal_core_chado_fnr_type_schema () {
  1921. $description = array();
  1922. $description = array(
  1923. 'table' => 'fnr_type',
  1924. // 'description' => 'TODO: please describe this table!',
  1925. 'fields' => array(
  1926. 'feature_id' => array(
  1927. // 'description' => 'TODO: please describe this field!',
  1928. 'type' => 'int',
  1929. 'not null' => '',
  1930. ),
  1931. 'name' => array(
  1932. // 'description' => 'TODO: please describe this field!',
  1933. 'type' => 'varchar',
  1934. 'length' => '255',
  1935. 'not null' => '',
  1936. ),
  1937. 'dbxref_id' => array(
  1938. // 'description' => 'TODO: please describe this field!',
  1939. 'type' => 'int',
  1940. 'not null' => '',
  1941. ),
  1942. 'type' => array(
  1943. // 'description' => 'TODO: please describe this field!',
  1944. 'type' => 'varchar',
  1945. 'length' => '1024',
  1946. 'not null' => '',
  1947. ),
  1948. 'residues' => array(
  1949. // 'description' => 'TODO: please describe this field!',
  1950. 'type' => 'text',
  1951. 'not null' => '',
  1952. ),
  1953. 'seqlen' => array(
  1954. // 'description' => 'TODO: please describe this field!',
  1955. 'type' => 'int',
  1956. 'not null' => '',
  1957. ),
  1958. 'md5checksum' => array(
  1959. // 'description' => 'TODO: please describe this field!',
  1960. 'type' => 'char',
  1961. 'length' => '32',
  1962. 'not null' => '',
  1963. ),
  1964. 'type_id' => array(
  1965. // 'description' => 'TODO: please describe this field!',
  1966. 'type' => 'int',
  1967. 'not null' => '',
  1968. ),
  1969. 'timeaccessioned' => array(
  1970. // 'description' => 'TODO: please describe this field!',
  1971. 'type' => 'datetime',
  1972. 'not null' => '',
  1973. ),
  1974. 'timelastmodified' => array(
  1975. // 'description' => 'TODO: please describe this field!',
  1976. 'type' => 'datetime',
  1977. 'not null' => '',
  1978. ),
  1979. ),
  1980. 'primary key' => array(
  1981. ),
  1982. 'unique keys' => array(
  1983. ),
  1984. 'indexes' => array(
  1985. ),
  1986. 'foreign keys' => array(
  1987. ),
  1988. );
  1989. return $description;
  1990. }
  1991. /**
  1992. * Implements hook_featurepos_schema()
  1993. * Purpose: To describe the structure of featurepos to tripal
  1994. * @see tripal_core.api.inc: tripal_core_chado_insert()
  1995. * @see tripal_core.api.inc: tripal_core_chado_update()
  1996. * @see tripal_core.api.inc: tripal_core_chado_select()
  1997. *
  1998. * @return
  1999. * An array describing the current table
  2000. *
  2001. * @ingroup tripal_schema_api
  2002. *
  2003. */
  2004. function tripal_core_chado_featurepos_schema () {
  2005. $description = array();
  2006. $description = array(
  2007. 'table' => 'featurepos',
  2008. // 'description' => 'TODO: please describe this table!',
  2009. 'fields' => array(
  2010. 'featurepos_id' => array(
  2011. // 'description' => 'TODO: please describe this field!',
  2012. 'type' => 'serial',
  2013. 'not null' => '1',
  2014. ),
  2015. 'featuremap_id' => array(
  2016. // 'description' => 'TODO: please describe this field!',
  2017. 'type' => 'serial',
  2018. 'not null' => '1',
  2019. ),
  2020. 'feature_id' => array(
  2021. // 'description' => 'TODO: please describe this field!',
  2022. 'type' => 'int',
  2023. 'not null' => '1',
  2024. ),
  2025. 'map_feature_id' => array(
  2026. // 'description' => 'TODO: please describe this field!',
  2027. 'type' => 'int',
  2028. 'not null' => '1',
  2029. ),
  2030. 'mappos' => array(
  2031. // 'description' => 'TODO: please describe this field!',
  2032. 'type' => 'float',
  2033. 'size' => 'big',
  2034. 'not null' => '1',
  2035. ),
  2036. ),
  2037. 'primary key' => array(
  2038. '0' => 'featurepos_id',
  2039. ),
  2040. 'unique keys' => array(
  2041. ),
  2042. 'indexes' => array(
  2043. 'featurepos_idx1' => array(
  2044. '0' => 'featuremap_id',
  2045. ),
  2046. 'featurepos_idx2' => array(
  2047. '0' => 'feature_id',
  2048. ),
  2049. 'featurepos_idx3' => array(
  2050. '0' => 'map_feature_id',
  2051. ),
  2052. ),
  2053. 'foreign keys' => array(
  2054. ),
  2055. );
  2056. return $description;
  2057. }
  2058. /**
  2059. * Implements hook_featuremap_pub_schema()
  2060. * Purpose: To describe the structure of featuremap_pub to tripal
  2061. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2062. * @see tripal_core.api.inc: tripal_core_chado_update()
  2063. * @see tripal_core.api.inc: 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_featuremap_pub_schema () {
  2072. $description = array();
  2073. $description = array(
  2074. 'table' => 'featuremap_pub',
  2075. // 'description' => 'TODO: please describe this table!',
  2076. 'fields' => array(
  2077. 'featuremap_pub_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' => 'int',
  2085. 'not null' => '1',
  2086. ),
  2087. 'pub_id' => array(
  2088. // 'description' => 'TODO: please describe this field!',
  2089. 'type' => 'int',
  2090. 'not null' => '1',
  2091. ),
  2092. ),
  2093. 'primary key' => array(
  2094. '0' => 'featuremap_pub_id',
  2095. ),
  2096. 'unique keys' => array(
  2097. ),
  2098. 'indexes' => array(
  2099. 'featuremap_pub_idx1' => array(
  2100. '0' => 'featuremap_id',
  2101. ),
  2102. 'featuremap_pub_idx2' => array(
  2103. '0' => 'pub_id',
  2104. ),
  2105. ),
  2106. 'foreign keys' => array(
  2107. ),
  2108. );
  2109. return $description;
  2110. }
  2111. /**
  2112. * Implements hook_feature_union_schema()
  2113. * Purpose: To describe the structure of feature_union to tripal
  2114. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2115. * @see tripal_core.api.inc: tripal_core_chado_update()
  2116. * @see tripal_core.api.inc: tripal_core_chado_select()
  2117. *
  2118. * @return
  2119. * An array describing the current table
  2120. *
  2121. * @ingroup tripal_schema_api
  2122. *
  2123. */
  2124. function tripal_core_chado_feature_union_schema () {
  2125. $description = array();
  2126. $description = array(
  2127. 'table' => 'feature_union',
  2128. // 'description' => 'TODO: please describe this table!',
  2129. 'fields' => array(
  2130. 'subject_id' => array(
  2131. // 'description' => 'TODO: please describe this field!',
  2132. 'type' => 'int',
  2133. 'not null' => '',
  2134. ),
  2135. 'object_id' => array(
  2136. // 'description' => 'TODO: please describe this field!',
  2137. 'type' => 'int',
  2138. 'not null' => '',
  2139. ),
  2140. 'srcfeature_id' => array(
  2141. // 'description' => 'TODO: please describe this field!',
  2142. 'type' => 'int',
  2143. 'not null' => '',
  2144. ),
  2145. 'subject_strand' => array(
  2146. // 'description' => 'TODO: please describe this field!',
  2147. 'type' => 'int',
  2148. 'size' => 'small',
  2149. 'not null' => '',
  2150. ),
  2151. 'object_strand' => array(
  2152. // 'description' => 'TODO: please describe this field!',
  2153. 'type' => 'int',
  2154. 'size' => 'small',
  2155. 'not null' => '',
  2156. ),
  2157. 'fmin' => array(
  2158. // 'description' => 'TODO: please describe this field!',
  2159. 'type' => 'int',
  2160. 'not null' => '',
  2161. ),
  2162. 'fmax' => array(
  2163. // 'description' => 'TODO: please describe this field!',
  2164. 'type' => 'int',
  2165. 'not null' => '',
  2166. ),
  2167. ),
  2168. 'primary key' => array(
  2169. ),
  2170. 'unique keys' => array(
  2171. ),
  2172. 'indexes' => array(
  2173. ),
  2174. 'foreign keys' => array(
  2175. ),
  2176. );
  2177. return $description;
  2178. }
  2179. /**
  2180. * Implements hook_featureloc_schema()
  2181. * Purpose: To describe the structure of featureloc to tripal
  2182. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2183. * @see tripal_core.api.inc: tripal_core_chado_update()
  2184. * @see tripal_core.api.inc: tripal_core_chado_select()
  2185. *
  2186. * @return
  2187. * An array describing the current table
  2188. *
  2189. * @ingroup tripal_schema_api
  2190. *
  2191. */
  2192. function tripal_core_chado_featureloc_schema () {
  2193. $description = array();
  2194. $description = array(
  2195. 'table' => 'featureloc',
  2196. // 'description' => 'TODO: please describe this table!',
  2197. 'fields' => array(
  2198. 'featureloc_id' => array(
  2199. // 'description' => 'TODO: please describe this field!',
  2200. 'type' => 'serial',
  2201. 'not null' => '1',
  2202. ),
  2203. 'feature_id' => array(
  2204. // 'description' => 'TODO: please describe this field!',
  2205. 'type' => 'int',
  2206. 'not null' => '1',
  2207. ),
  2208. 'srcfeature_id' => array(
  2209. // 'description' => 'TODO: please describe this field!',
  2210. 'type' => 'int',
  2211. 'not null' => '',
  2212. ),
  2213. 'fmin' => array(
  2214. // 'description' => 'TODO: please describe this field!',
  2215. 'type' => 'int',
  2216. 'not null' => '',
  2217. ),
  2218. 'is_fmin_partial' => array(
  2219. // 'description' => 'TODO: please describe this field!',
  2220. 'type' => 'boolean',
  2221. 'not null' => '1',
  2222. 'default' => 'als',
  2223. ),
  2224. 'fmax' => array(
  2225. // 'description' => 'TODO: please describe this field!',
  2226. 'type' => 'int',
  2227. 'not null' => '',
  2228. ),
  2229. 'is_fmax_partial' => array(
  2230. // 'description' => 'TODO: please describe this field!',
  2231. 'type' => 'boolean',
  2232. 'not null' => '1',
  2233. 'default' => 'als',
  2234. ),
  2235. 'strand' => array(
  2236. // 'description' => 'TODO: please describe this field!',
  2237. 'type' => 'int',
  2238. 'size' => 'small',
  2239. 'not null' => '',
  2240. ),
  2241. 'phase' => array(
  2242. // 'description' => 'TODO: please describe this field!',
  2243. 'type' => 'int',
  2244. 'not null' => '',
  2245. ),
  2246. 'residue_info' => array(
  2247. // 'description' => 'TODO: please describe this field!',
  2248. 'type' => 'text',
  2249. 'not null' => '',
  2250. ),
  2251. 'locgroup' => array(
  2252. // 'description' => 'TODO: please describe this field!',
  2253. 'type' => 'int',
  2254. 'not null' => '1',
  2255. 'default' => '0',
  2256. ),
  2257. 'rank' => array(
  2258. // 'description' => 'TODO: please describe this field!',
  2259. 'type' => 'int',
  2260. 'not null' => '1',
  2261. 'default' => '0',
  2262. ),
  2263. ),
  2264. 'primary key' => array(
  2265. '0' => 'featureloc_id',
  2266. ),
  2267. 'unique keys' => array(
  2268. 'featureloc_c1' => array(
  2269. '0' => 'feature_id',
  2270. '1' => 'locgroup',
  2271. '2' => 'rank',
  2272. ),
  2273. ),
  2274. 'indexes' => array(
  2275. 'binloc_boxrange' => array(
  2276. '0' => 'fmin',
  2277. ),
  2278. 'binloc_boxrange_src' => array(
  2279. '0' => 'srcfeature_id',
  2280. '1' => 'fmin',
  2281. ),
  2282. 'featureloc_idx1' => array(
  2283. '0' => 'feature_id',
  2284. ),
  2285. 'featureloc_idx2' => array(
  2286. '0' => 'srcfeature_id',
  2287. ),
  2288. 'featureloc_idx3' => array(
  2289. '0' => 'srcfeature_id',
  2290. '1' => 'fmin',
  2291. '2' => 'fmax',
  2292. ),
  2293. ),
  2294. 'foreign keys' => array(
  2295. ),
  2296. );
  2297. return $description;
  2298. }
  2299. /**
  2300. * Implements hook_featureloc_pub_schema()
  2301. * Purpose: To describe the structure of featureloc_pub to tripal
  2302. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2303. * @see tripal_core.api.inc: tripal_core_chado_update()
  2304. * @see tripal_core.api.inc: tripal_core_chado_select()
  2305. *
  2306. * @return
  2307. * An array describing the current table
  2308. *
  2309. * @ingroup tripal_schema_api
  2310. *
  2311. */
  2312. function tripal_core_chado_featureloc_pub_schema () {
  2313. $description = array();
  2314. $description = array(
  2315. 'table' => 'featureloc_pub',
  2316. // 'description' => 'TODO: please describe this table!',
  2317. 'fields' => array(
  2318. 'featureloc_pub_id' => array(
  2319. // 'description' => 'TODO: please describe this field!',
  2320. 'type' => 'serial',
  2321. 'not null' => '1',
  2322. ),
  2323. 'featureloc_id' => array(
  2324. // 'description' => 'TODO: please describe this field!',
  2325. 'type' => 'int',
  2326. 'not null' => '1',
  2327. ),
  2328. 'pub_id' => array(
  2329. // 'description' => 'TODO: please describe this field!',
  2330. 'type' => 'int',
  2331. 'not null' => '1',
  2332. ),
  2333. ),
  2334. 'primary key' => array(
  2335. '0' => 'featureloc_pub_id',
  2336. ),
  2337. 'unique keys' => array(
  2338. 'featureloc_pub_c1' => array(
  2339. '0' => 'featureloc_id',
  2340. '1' => 'pub_id',
  2341. ),
  2342. ),
  2343. 'indexes' => array(
  2344. 'featureloc_pub_idx1' => array(
  2345. '0' => 'featureloc_id',
  2346. ),
  2347. 'featureloc_pub_idx2' => array(
  2348. '0' => 'pub_id',
  2349. ),
  2350. ),
  2351. 'foreign keys' => array(
  2352. ),
  2353. );
  2354. return $description;
  2355. }
  2356. /**
  2357. * Implements hook_featuremap_schema()
  2358. * Purpose: To describe the structure of featuremap to tripal
  2359. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2360. * @see tripal_core.api.inc: tripal_core_chado_update()
  2361. * @see tripal_core.api.inc: tripal_core_chado_select()
  2362. *
  2363. * @return
  2364. * An array describing the current table
  2365. *
  2366. * @ingroup tripal_schema_api
  2367. *
  2368. */
  2369. function tripal_core_chado_featuremap_schema () {
  2370. $description = array();
  2371. $description = array(
  2372. 'table' => 'featuremap',
  2373. // 'description' => 'TODO: please describe this table!',
  2374. 'fields' => array(
  2375. 'featuremap_id' => array(
  2376. // 'description' => 'TODO: please describe this field!',
  2377. 'type' => 'serial',
  2378. 'not null' => '1',
  2379. ),
  2380. 'name' => array(
  2381. // 'description' => 'TODO: please describe this field!',
  2382. 'type' => 'varchar',
  2383. 'length' => '255',
  2384. 'not null' => '',
  2385. ),
  2386. 'description' => array(
  2387. // 'description' => 'TODO: please describe this field!',
  2388. 'type' => 'text',
  2389. 'not null' => '',
  2390. ),
  2391. 'unittype_id' => array(
  2392. // 'description' => 'TODO: please describe this field!',
  2393. 'type' => 'int',
  2394. 'not null' => '',
  2395. ),
  2396. ),
  2397. 'primary key' => array(
  2398. '0' => 'featuremap_id',
  2399. ),
  2400. 'unique keys' => array(
  2401. 'featuremap_c1' => array(
  2402. '0' => 'name',
  2403. ),
  2404. ),
  2405. 'indexes' => array(
  2406. ),
  2407. 'foreign keys' => array(
  2408. ),
  2409. );
  2410. return $description;
  2411. }
  2412. /**
  2413. * Implements hook_fp_key_schema()
  2414. * Purpose: To describe the structure of fp_key to tripal
  2415. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2416. * @see tripal_core.api.inc: tripal_core_chado_update()
  2417. * @see tripal_core.api.inc: tripal_core_chado_select()
  2418. *
  2419. * @return
  2420. * An array describing the current table
  2421. *
  2422. * @ingroup tripal_schema_api
  2423. *
  2424. */
  2425. function tripal_core_chado_fp_key_schema () {
  2426. $description = array();
  2427. $description = array(
  2428. 'table' => 'fp_key',
  2429. // 'description' => 'TODO: please describe this table!',
  2430. 'fields' => array(
  2431. 'feature_id' => array(
  2432. // 'description' => 'TODO: please describe this field!',
  2433. 'type' => 'int',
  2434. 'not null' => '',
  2435. ),
  2436. 'pkey' => array(
  2437. // 'description' => 'TODO: please describe this field!',
  2438. 'type' => 'varchar',
  2439. 'length' => '1024',
  2440. 'not null' => '',
  2441. ),
  2442. 'value' => array(
  2443. // 'description' => 'TODO: please describe this field!',
  2444. 'type' => 'text',
  2445. 'not null' => '',
  2446. ),
  2447. ),
  2448. 'primary key' => array(
  2449. ),
  2450. 'unique keys' => array(
  2451. ),
  2452. 'indexes' => array(
  2453. ),
  2454. 'foreign keys' => array(
  2455. ),
  2456. );
  2457. return $description;
  2458. }
  2459. /**
  2460. * Implements hook_genotype_schema()
  2461. * Purpose: To describe the structure of genotype to tripal
  2462. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2463. * @see tripal_core.api.inc: tripal_core_chado_update()
  2464. * @see tripal_core.api.inc: tripal_core_chado_select()
  2465. *
  2466. * @return
  2467. * An array describing the current table
  2468. *
  2469. * @ingroup tripal_schema_api
  2470. *
  2471. */
  2472. function tripal_core_chado_genotype_schema () {
  2473. $description = array();
  2474. $description = array(
  2475. 'table' => 'genotype',
  2476. // 'description' => 'TODO: please describe this table!',
  2477. 'fields' => array(
  2478. 'genotype_id' => array(
  2479. // 'description' => 'TODO: please describe this field!',
  2480. 'type' => 'serial',
  2481. 'not null' => '1',
  2482. ),
  2483. 'name' => array(
  2484. // 'description' => 'TODO: please describe this field!',
  2485. 'type' => 'text',
  2486. 'not null' => '',
  2487. ),
  2488. 'uniquename' => array(
  2489. // 'description' => 'TODO: please describe this field!',
  2490. 'type' => 'text',
  2491. 'not null' => '1',
  2492. ),
  2493. 'description' => array(
  2494. // 'description' => 'TODO: please describe this field!',
  2495. 'type' => 'varchar',
  2496. 'length' => '255',
  2497. 'not null' => '',
  2498. ),
  2499. ),
  2500. 'primary key' => array(
  2501. '0' => 'genotype_id',
  2502. ),
  2503. 'unique keys' => array(
  2504. 'genotype_c1' => array(
  2505. '0' => 'uniquename',
  2506. ),
  2507. ),
  2508. 'indexes' => array(
  2509. 'genotype_idx1' => array(
  2510. '0' => 'uniquename',
  2511. ),
  2512. 'genotype_idx2' => array(
  2513. '0' => 'name',
  2514. ),
  2515. ),
  2516. 'foreign keys' => array(
  2517. ),
  2518. );
  2519. return $description;
  2520. }
  2521. /**
  2522. * Implements hook_library_cvterm_schema()
  2523. * Purpose: To describe the structure of library_cvterm to tripal
  2524. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2525. * @see tripal_core.api.inc: tripal_core_chado_update()
  2526. * @see tripal_core.api.inc: tripal_core_chado_select()
  2527. *
  2528. * @return
  2529. * An array describing the current table
  2530. *
  2531. * @ingroup tripal_schema_api
  2532. *
  2533. */
  2534. function tripal_core_chado_library_cvterm_schema () {
  2535. $description = array();
  2536. $description = array(
  2537. 'table' => 'library_cvterm',
  2538. // 'description' => 'TODO: please describe this table!',
  2539. 'fields' => array(
  2540. 'library_cvterm_id' => array(
  2541. // 'description' => 'TODO: please describe this field!',
  2542. 'type' => 'serial',
  2543. 'not null' => '1',
  2544. ),
  2545. 'library_id' => array(
  2546. // 'description' => 'TODO: please describe this field!',
  2547. 'type' => 'int',
  2548. 'not null' => '1',
  2549. ),
  2550. 'cvterm_id' => array(
  2551. // 'description' => 'TODO: please describe this field!',
  2552. 'type' => 'int',
  2553. 'not null' => '1',
  2554. ),
  2555. 'pub_id' => array(
  2556. // 'description' => 'TODO: please describe this field!',
  2557. 'type' => 'int',
  2558. 'not null' => '1',
  2559. ),
  2560. ),
  2561. 'primary key' => array(
  2562. '0' => 'library_cvterm_id',
  2563. ),
  2564. 'unique keys' => array(
  2565. 'library_cvterm_c1' => array(
  2566. '0' => 'library_id',
  2567. '1' => 'cvterm_id',
  2568. '2' => 'pub_id',
  2569. ),
  2570. ),
  2571. 'indexes' => array(
  2572. 'library_cvterm_idx1' => array(
  2573. '0' => 'library_id',
  2574. ),
  2575. 'library_cvterm_idx2' => array(
  2576. '0' => 'cvterm_id',
  2577. ),
  2578. 'library_cvterm_idx3' => array(
  2579. '0' => 'pub_id',
  2580. ),
  2581. ),
  2582. 'foreign keys' => array(
  2583. ),
  2584. );
  2585. return $description;
  2586. }
  2587. /**
  2588. * Implements hook_library_dbxref_schema()
  2589. * Purpose: To describe the structure of library_dbxref to tripal
  2590. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2591. * @see tripal_core.api.inc: tripal_core_chado_update()
  2592. * @see tripal_core.api.inc: tripal_core_chado_select()
  2593. *
  2594. * @return
  2595. * An array describing the current table
  2596. *
  2597. * @ingroup tripal_schema_api
  2598. *
  2599. */
  2600. function tripal_core_chado_library_dbxref_schema () {
  2601. $description = array();
  2602. $description = array(
  2603. 'table' => 'library_dbxref',
  2604. // 'description' => 'TODO: please describe this table!',
  2605. 'fields' => array(
  2606. 'library_dbxref_id' => array(
  2607. // 'description' => 'TODO: please describe this field!',
  2608. 'type' => 'serial',
  2609. 'not null' => '1',
  2610. ),
  2611. 'library_id' => array(
  2612. // 'description' => 'TODO: please describe this field!',
  2613. 'type' => 'int',
  2614. 'not null' => '1',
  2615. ),
  2616. 'dbxref_id' => array(
  2617. // 'description' => 'TODO: please describe this field!',
  2618. 'type' => 'int',
  2619. 'not null' => '1',
  2620. ),
  2621. 'is_current' => array(
  2622. // 'description' => 'TODO: please describe this field!',
  2623. 'type' => 'boolean',
  2624. 'not null' => '1',
  2625. 'default' => 'ru',
  2626. ),
  2627. ),
  2628. 'primary key' => array(
  2629. '0' => 'library_dbxref_id',
  2630. ),
  2631. 'unique keys' => array(
  2632. 'library_dbxref_c1' => array(
  2633. '0' => 'library_id',
  2634. '1' => 'dbxref_id',
  2635. ),
  2636. ),
  2637. 'indexes' => array(
  2638. 'library_dbxref_idx1' => array(
  2639. '0' => 'library_id',
  2640. ),
  2641. 'library_dbxref_idx2' => array(
  2642. '0' => 'dbxref_id',
  2643. ),
  2644. ),
  2645. 'foreign keys' => array(
  2646. ),
  2647. );
  2648. return $description;
  2649. }
  2650. /**
  2651. * Implements hook_library_feature_schema()
  2652. * Purpose: To describe the structure of library_feature to tripal
  2653. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2654. * @see tripal_core.api.inc: tripal_core_chado_update()
  2655. * @see tripal_core.api.inc: tripal_core_chado_select()
  2656. *
  2657. * @return
  2658. * An array describing the current table
  2659. *
  2660. * @ingroup tripal_schema_api
  2661. *
  2662. */
  2663. function tripal_core_chado_library_feature_schema () {
  2664. $description = array();
  2665. $description = array(
  2666. 'table' => 'library_feature',
  2667. // 'description' => 'TODO: please describe this table!',
  2668. 'fields' => array(
  2669. 'library_feature_id' => array(
  2670. // 'description' => 'TODO: please describe this field!',
  2671. 'type' => 'serial',
  2672. 'not null' => '1',
  2673. ),
  2674. 'library_id' => array(
  2675. // 'description' => 'TODO: please describe this field!',
  2676. 'type' => 'int',
  2677. 'not null' => '1',
  2678. ),
  2679. 'feature_id' => array(
  2680. // 'description' => 'TODO: please describe this field!',
  2681. 'type' => 'int',
  2682. 'not null' => '1',
  2683. ),
  2684. ),
  2685. 'primary key' => array(
  2686. '0' => 'library_feature_id',
  2687. ),
  2688. 'unique keys' => array(
  2689. 'library_feature_c1' => array(
  2690. '0' => 'library_id',
  2691. '1' => 'feature_id',
  2692. ),
  2693. ),
  2694. 'indexes' => array(
  2695. 'library_feature_idx1' => array(
  2696. '0' => 'library_id',
  2697. ),
  2698. 'library_feature_idx2' => array(
  2699. '0' => 'feature_id',
  2700. ),
  2701. ),
  2702. 'foreign keys' => array(
  2703. ),
  2704. );
  2705. return $description;
  2706. }
  2707. /**
  2708. * Implements hook_library_feature_count_schema()
  2709. * Purpose: To describe the structure of library_feature_count to tripal
  2710. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2711. * @see tripal_core.api.inc: tripal_core_chado_update()
  2712. * @see tripal_core.api.inc: tripal_core_chado_select()
  2713. *
  2714. * @return
  2715. * An array describing the current table
  2716. *
  2717. * @ingroup tripal_schema_api
  2718. *
  2719. */
  2720. function tripal_core_chado_library_feature_count_schema () {
  2721. $description = array();
  2722. $description = array(
  2723. 'table' => 'library_feature_count',
  2724. // 'description' => 'TODO: please describe this table!',
  2725. 'fields' => array(
  2726. 'library_id' => array(
  2727. // 'description' => 'TODO: please describe this field!',
  2728. 'type' => 'int',
  2729. 'not null' => '',
  2730. ),
  2731. 'name' => array(
  2732. // 'description' => 'TODO: please describe this field!',
  2733. 'type' => 'varchar',
  2734. 'length' => '255',
  2735. 'not null' => '',
  2736. ),
  2737. 'num_features' => array(
  2738. // 'description' => 'TODO: please describe this field!',
  2739. 'type' => 'int',
  2740. 'not null' => '',
  2741. ),
  2742. 'feature_type' => array(
  2743. // 'description' => 'TODO: please describe this field!',
  2744. 'type' => 'varchar',
  2745. 'length' => '255',
  2746. 'not null' => '',
  2747. ),
  2748. ),
  2749. 'primary key' => array(
  2750. ),
  2751. 'unique keys' => array(
  2752. 'library_feature_count_index' => array(
  2753. '0' => 'library_id',
  2754. ),
  2755. ),
  2756. 'indexes' => array(
  2757. ),
  2758. 'foreign keys' => array(
  2759. ),
  2760. );
  2761. return $description;
  2762. }
  2763. /**
  2764. * Implements hook_library_schema()
  2765. * Purpose: To describe the structure of library to tripal
  2766. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2767. * @see tripal_core.api.inc: tripal_core_chado_update()
  2768. * @see tripal_core.api.inc: tripal_core_chado_select()
  2769. *
  2770. * @return
  2771. * An array describing the current table
  2772. *
  2773. * @ingroup tripal_schema_api
  2774. *
  2775. */
  2776. function tripal_core_chado_library_schema () {
  2777. $description = array();
  2778. $description = array(
  2779. 'table' => 'library',
  2780. // 'description' => 'TODO: please describe this table!',
  2781. 'fields' => array(
  2782. 'library_id' => array(
  2783. // 'description' => 'TODO: please describe this field!',
  2784. 'type' => 'serial',
  2785. 'not null' => '1',
  2786. ),
  2787. 'organism_id' => array(
  2788. // 'description' => 'TODO: please describe this field!',
  2789. 'type' => 'int',
  2790. 'not null' => '1',
  2791. ),
  2792. 'name' => array(
  2793. // 'description' => 'TODO: please describe this field!',
  2794. 'type' => 'varchar',
  2795. 'length' => '255',
  2796. 'not null' => '',
  2797. ),
  2798. 'uniquename' => array(
  2799. // 'description' => 'TODO: please describe this field!',
  2800. 'type' => 'text',
  2801. 'not null' => '1',
  2802. ),
  2803. 'type_id' => array(
  2804. // 'description' => 'TODO: please describe this field!',
  2805. 'type' => 'int',
  2806. 'not null' => '1',
  2807. ),
  2808. 'is_obsolete' => array(
  2809. // 'description' => 'TODO: please describe this field!',
  2810. 'type' => 'int',
  2811. 'not null' => '1',
  2812. 'default' => '0',
  2813. ),
  2814. 'timeaccessioned' => array(
  2815. // 'description' => 'TODO: please describe this field!',
  2816. 'type' => 'datetime',
  2817. 'not null' => '1',
  2818. 'default' => 'ow(',
  2819. ),
  2820. 'timelastmodified' => array(
  2821. // 'description' => 'TODO: please describe this field!',
  2822. 'type' => 'datetime',
  2823. 'not null' => '1',
  2824. 'default' => 'ow(',
  2825. ),
  2826. ),
  2827. 'primary key' => array(
  2828. '0' => 'library_id',
  2829. ),
  2830. 'unique keys' => array(
  2831. 'library_c1' => array(
  2832. '0' => 'organism_id',
  2833. '1' => 'uniquename',
  2834. '2' => 'type_id',
  2835. ),
  2836. ),
  2837. 'indexes' => array(
  2838. 'library_idx1' => array(
  2839. '0' => 'organism_id',
  2840. ),
  2841. 'library_idx2' => array(
  2842. '0' => 'type_id',
  2843. ),
  2844. 'library_idx3' => array(
  2845. '0' => 'uniquename',
  2846. ),
  2847. 'library_name_ind1' => array(
  2848. '0' => 'name',
  2849. ),
  2850. ),
  2851. 'foreign keys' => array(
  2852. ),
  2853. );
  2854. return $description;
  2855. }
  2856. /**
  2857. * Implements hook_intronloc_view_schema()
  2858. * Purpose: To describe the structure of intronloc_view to tripal
  2859. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2860. * @see tripal_core.api.inc: tripal_core_chado_update()
  2861. * @see tripal_core.api.inc: tripal_core_chado_select()
  2862. *
  2863. * @return
  2864. * An array describing the current table
  2865. *
  2866. * @ingroup tripal_schema_api
  2867. *
  2868. */
  2869. function tripal_core_chado_intronloc_view_schema () {
  2870. $description = array();
  2871. $description = array(
  2872. 'table' => 'intronloc_view',
  2873. // 'description' => 'TODO: please describe this table!',
  2874. 'fields' => array(
  2875. 'exon1_id' => array(
  2876. // 'description' => 'TODO: please describe this field!',
  2877. 'type' => 'int',
  2878. 'not null' => '',
  2879. ),
  2880. 'exon2_id' => array(
  2881. // 'description' => 'TODO: please describe this field!',
  2882. 'type' => 'int',
  2883. 'not null' => '',
  2884. ),
  2885. 'fmin' => array(
  2886. // 'description' => 'TODO: please describe this field!',
  2887. 'type' => 'int',
  2888. 'not null' => '',
  2889. ),
  2890. 'fmax' => array(
  2891. // 'description' => 'TODO: please describe this field!',
  2892. 'type' => 'int',
  2893. 'not null' => '',
  2894. ),
  2895. 'strand' => array(
  2896. // 'description' => 'TODO: please describe this field!',
  2897. 'type' => 'int',
  2898. 'size' => 'small',
  2899. 'not null' => '',
  2900. ),
  2901. 'srcfeature_id' => array(
  2902. // 'description' => 'TODO: please describe this field!',
  2903. 'type' => 'int',
  2904. 'not null' => '',
  2905. ),
  2906. ),
  2907. 'primary key' => array(
  2908. ),
  2909. 'unique keys' => array(
  2910. ),
  2911. 'indexes' => array(
  2912. ),
  2913. 'foreign keys' => array(
  2914. ),
  2915. );
  2916. return $description;
  2917. }
  2918. /**
  2919. * Implements hook_gff3atts_schema()
  2920. * Purpose: To describe the structure of gff3atts to tripal
  2921. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2922. * @see tripal_core.api.inc: tripal_core_chado_update()
  2923. * @see tripal_core.api.inc: tripal_core_chado_select()
  2924. *
  2925. * @return
  2926. * An array describing the current table
  2927. *
  2928. * @ingroup tripal_schema_api
  2929. *
  2930. */
  2931. function tripal_core_chado_gff3atts_schema () {
  2932. $description = array();
  2933. $description = array(
  2934. 'table' => 'gff3atts',
  2935. // 'description' => 'TODO: please describe this table!',
  2936. 'fields' => array(
  2937. 'feature_id' => array(
  2938. // 'description' => 'TODO: please describe this field!',
  2939. 'type' => 'int',
  2940. 'not null' => '',
  2941. ),
  2942. 'type' => array(
  2943. // 'description' => 'TODO: please describe this field!',
  2944. 'type' => 'text',
  2945. 'not null' => '',
  2946. ),
  2947. 'attribute' => array(
  2948. // 'description' => 'TODO: please describe this field!',
  2949. 'type' => 'varchar',
  2950. 'not null' => '',
  2951. ),
  2952. ),
  2953. 'primary key' => array(
  2954. ),
  2955. 'unique keys' => array(
  2956. ),
  2957. 'indexes' => array(
  2958. ),
  2959. 'foreign keys' => array(
  2960. ),
  2961. );
  2962. return $description;
  2963. }
  2964. /**
  2965. * Implements hook_gff3view_schema()
  2966. * Purpose: To describe the structure of gff3view to tripal
  2967. * @see tripal_core.api.inc: tripal_core_chado_insert()
  2968. * @see tripal_core.api.inc: tripal_core_chado_update()
  2969. * @see tripal_core.api.inc: tripal_core_chado_select()
  2970. *
  2971. * @return
  2972. * An array describing the current table
  2973. *
  2974. * @ingroup tripal_schema_api
  2975. *
  2976. */
  2977. function tripal_core_chado_gff3view_schema () {
  2978. $description = array();
  2979. $description = array(
  2980. 'table' => 'gff3view',
  2981. // 'description' => 'TODO: please describe this table!',
  2982. 'fields' => array(
  2983. 'feature_id' => array(
  2984. // 'description' => 'TODO: please describe this field!',
  2985. 'type' => 'int',
  2986. 'not null' => '',
  2987. ),
  2988. 'ref' => array(
  2989. // 'description' => 'TODO: please describe this field!',
  2990. 'type' => 'varchar',
  2991. 'length' => '255',
  2992. 'not null' => '',
  2993. ),
  2994. 'source' => array(
  2995. // 'description' => 'TODO: please describe this field!',
  2996. 'type' => 'varchar',
  2997. 'length' => '255',
  2998. 'not null' => '',
  2999. ),
  3000. 'type' => array(
  3001. // 'description' => 'TODO: please describe this field!',
  3002. 'type' => 'varchar',
  3003. 'length' => '1024',
  3004. 'not null' => '',
  3005. ),
  3006. 'fstart' => array(
  3007. // 'description' => 'TODO: please describe this field!',
  3008. 'type' => 'int',
  3009. 'not null' => '',
  3010. ),
  3011. 'fend' => array(
  3012. // 'description' => 'TODO: please describe this field!',
  3013. 'type' => 'int',
  3014. 'not null' => '',
  3015. ),
  3016. 'score' => array(
  3017. // 'description' => 'TODO: please describe this field!',
  3018. 'type' => 'float',
  3019. 'size' => 'big',
  3020. 'not null' => '',
  3021. ),
  3022. 'strand' => array(
  3023. // 'description' => 'TODO: please describe this field!',
  3024. 'type' => 'int',
  3025. 'size' => 'small',
  3026. 'not null' => '',
  3027. ),
  3028. 'phase' => array(
  3029. // 'description' => 'TODO: please describe this field!',
  3030. 'type' => 'int',
  3031. 'not null' => '',
  3032. ),
  3033. 'seqlen' => array(
  3034. // 'description' => 'TODO: please describe this field!',
  3035. 'type' => 'int',
  3036. 'not null' => '',
  3037. ),
  3038. 'name' => array(
  3039. // 'description' => 'TODO: please describe this field!',
  3040. 'type' => 'varchar',
  3041. 'length' => '255',
  3042. 'not null' => '',
  3043. ),
  3044. 'organism_id' => array(
  3045. // 'description' => 'TODO: please describe this field!',
  3046. 'type' => 'int',
  3047. 'not null' => '',
  3048. ),
  3049. ),
  3050. 'primary key' => array(
  3051. ),
  3052. 'unique keys' => array(
  3053. ),
  3054. 'indexes' => array(
  3055. ),
  3056. 'foreign keys' => array(
  3057. ),
  3058. );
  3059. return $description;
  3060. }
  3061. /**
  3062. * Implements hook_gffatts_schema()
  3063. * Purpose: To describe the structure of gffatts to tripal
  3064. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3065. * @see tripal_core.api.inc: tripal_core_chado_update()
  3066. * @see tripal_core.api.inc: tripal_core_chado_select()
  3067. *
  3068. * @return
  3069. * An array describing the current table
  3070. *
  3071. * @ingroup tripal_schema_api
  3072. *
  3073. */
  3074. function tripal_core_chado_gffatts_schema () {
  3075. $description = array();
  3076. $description = array(
  3077. 'table' => 'gffatts',
  3078. // 'description' => 'TODO: please describe this table!',
  3079. 'fields' => array(
  3080. 'feature_id' => array(
  3081. // 'description' => 'TODO: please describe this field!',
  3082. 'type' => 'int',
  3083. 'not null' => '',
  3084. ),
  3085. 'type' => array(
  3086. // 'description' => 'TODO: please describe this field!',
  3087. 'type' => 'text',
  3088. 'not null' => '',
  3089. ),
  3090. 'attribute' => array(
  3091. // 'description' => 'TODO: please describe this field!',
  3092. 'type' => 'varchar',
  3093. 'not null' => '',
  3094. ),
  3095. ),
  3096. 'primary key' => array(
  3097. ),
  3098. 'unique keys' => array(
  3099. ),
  3100. 'indexes' => array(
  3101. ),
  3102. 'foreign keys' => array(
  3103. ),
  3104. );
  3105. return $description;
  3106. }
  3107. /**
  3108. * Implements hook_intron_combined_view_schema()
  3109. * Purpose: To describe the structure of intron_combined_view to tripal
  3110. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3111. * @see tripal_core.api.inc: tripal_core_chado_update()
  3112. * @see tripal_core.api.inc: tripal_core_chado_select()
  3113. *
  3114. * @return
  3115. * An array describing the current table
  3116. *
  3117. * @ingroup tripal_schema_api
  3118. *
  3119. */
  3120. function tripal_core_chado_intron_combined_view_schema () {
  3121. $description = array();
  3122. $description = array(
  3123. 'table' => 'intron_combined_view',
  3124. // 'description' => 'TODO: please describe this table!',
  3125. 'fields' => array(
  3126. 'exon1_id' => array(
  3127. // 'description' => 'TODO: please describe this field!',
  3128. 'type' => 'int',
  3129. 'not null' => '',
  3130. ),
  3131. 'exon2_id' => array(
  3132. // 'description' => 'TODO: please describe this field!',
  3133. 'type' => 'int',
  3134. 'not null' => '',
  3135. ),
  3136. 'fmin' => array(
  3137. // 'description' => 'TODO: please describe this field!',
  3138. 'type' => 'int',
  3139. 'not null' => '',
  3140. ),
  3141. 'fmax' => array(
  3142. // 'description' => 'TODO: please describe this field!',
  3143. 'type' => 'int',
  3144. 'not null' => '',
  3145. ),
  3146. 'strand' => array(
  3147. // 'description' => 'TODO: please describe this field!',
  3148. 'type' => 'int',
  3149. 'size' => 'small',
  3150. 'not null' => '',
  3151. ),
  3152. 'srcfeature_id' => array(
  3153. // 'description' => 'TODO: please describe this field!',
  3154. 'type' => 'int',
  3155. 'not null' => '',
  3156. ),
  3157. 'intron_rank' => array(
  3158. // 'description' => 'TODO: please describe this field!',
  3159. 'type' => 'int',
  3160. 'not null' => '',
  3161. ),
  3162. 'transcript_id' => array(
  3163. // 'description' => 'TODO: please describe this field!',
  3164. 'type' => 'int',
  3165. 'not null' => '',
  3166. ),
  3167. ),
  3168. 'primary key' => array(
  3169. ),
  3170. 'unique keys' => array(
  3171. ),
  3172. 'indexes' => array(
  3173. ),
  3174. 'foreign keys' => array(
  3175. ),
  3176. );
  3177. return $description;
  3178. }
  3179. /**
  3180. * Implements hook_project_schema()
  3181. * Purpose: To describe the structure of project to tripal
  3182. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3183. * @see tripal_core.api.inc: tripal_core_chado_update()
  3184. * @see tripal_core.api.inc: tripal_core_chado_select()
  3185. *
  3186. * @return
  3187. * An array describing the current table
  3188. *
  3189. * @ingroup tripal_schema_api
  3190. *
  3191. */
  3192. function tripal_core_chado_project_schema () {
  3193. $description = array();
  3194. $description = array(
  3195. 'table' => 'project',
  3196. // 'description' => 'TODO: please describe this table!',
  3197. 'fields' => array(
  3198. 'project_id' => array(
  3199. // 'description' => 'TODO: please describe this field!',
  3200. 'type' => 'serial',
  3201. 'not null' => '1',
  3202. ),
  3203. 'name' => array(
  3204. // 'description' => 'TODO: please describe this field!',
  3205. 'type' => 'varchar',
  3206. 'length' => '255',
  3207. 'not null' => '1',
  3208. ),
  3209. 'description' => array(
  3210. // 'description' => 'TODO: please describe this field!',
  3211. 'type' => 'varchar',
  3212. 'length' => '255',
  3213. 'not null' => '1',
  3214. ),
  3215. ),
  3216. 'primary key' => array(
  3217. '0' => 'project_id',
  3218. ),
  3219. 'unique keys' => array(
  3220. 'project_c1' => array(
  3221. '0' => 'name',
  3222. ),
  3223. ),
  3224. 'indexes' => array(
  3225. ),
  3226. 'foreign keys' => array(
  3227. ),
  3228. );
  3229. return $description;
  3230. }
  3231. /**
  3232. * Implements hook_protein_coding_gene_schema()
  3233. * Purpose: To describe the structure of protein_coding_gene to tripal
  3234. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3235. * @see tripal_core.api.inc: tripal_core_chado_update()
  3236. * @see tripal_core.api.inc: tripal_core_chado_select()
  3237. *
  3238. * @return
  3239. * An array describing the current table
  3240. *
  3241. * @ingroup tripal_schema_api
  3242. *
  3243. */
  3244. function tripal_core_chado_protein_coding_gene_schema () {
  3245. $description = array();
  3246. $description = array(
  3247. 'table' => 'protein_coding_gene',
  3248. // 'description' => 'TODO: please describe this table!',
  3249. 'fields' => array(
  3250. 'feature_id' => array(
  3251. // 'description' => 'TODO: please describe this field!',
  3252. 'type' => 'int',
  3253. 'not null' => '',
  3254. ),
  3255. 'dbxref_id' => array(
  3256. // 'description' => 'TODO: please describe this field!',
  3257. 'type' => 'int',
  3258. 'not null' => '',
  3259. ),
  3260. 'organism_id' => array(
  3261. // 'description' => 'TODO: please describe this field!',
  3262. 'type' => 'int',
  3263. 'not null' => '',
  3264. ),
  3265. 'name' => array(
  3266. // 'description' => 'TODO: please describe this field!',
  3267. 'type' => 'varchar',
  3268. 'length' => '255',
  3269. 'not null' => '',
  3270. ),
  3271. 'uniquename' => array(
  3272. // 'description' => 'TODO: please describe this field!',
  3273. 'type' => 'text',
  3274. 'not null' => '',
  3275. ),
  3276. 'residues' => array(
  3277. // 'description' => 'TODO: please describe this field!',
  3278. 'type' => 'text',
  3279. 'not null' => '',
  3280. ),
  3281. 'seqlen' => array(
  3282. // 'description' => 'TODO: please describe this field!',
  3283. 'type' => 'int',
  3284. 'not null' => '',
  3285. ),
  3286. 'md5checksum' => array(
  3287. // 'description' => 'TODO: please describe this field!',
  3288. 'type' => 'char',
  3289. 'length' => '32',
  3290. 'not null' => '',
  3291. ),
  3292. 'type_id' => array(
  3293. // 'description' => 'TODO: please describe this field!',
  3294. 'type' => 'int',
  3295. 'not null' => '',
  3296. ),
  3297. 'is_analysis' => array(
  3298. // 'description' => 'TODO: please describe this field!',
  3299. 'type' => 'boolean',
  3300. 'not null' => '',
  3301. ),
  3302. 'is_obsolete' => array(
  3303. // 'description' => 'TODO: please describe this field!',
  3304. 'type' => 'boolean',
  3305. 'not null' => '',
  3306. ),
  3307. 'timeaccessioned' => array(
  3308. // 'description' => 'TODO: please describe this field!',
  3309. 'type' => 'datetime',
  3310. 'not null' => '',
  3311. ),
  3312. 'timelastmodified' => array(
  3313. // 'description' => 'TODO: please describe this field!',
  3314. 'type' => 'datetime',
  3315. 'not null' => '',
  3316. ),
  3317. ),
  3318. 'primary key' => array(
  3319. ),
  3320. 'unique keys' => array(
  3321. ),
  3322. 'indexes' => array(
  3323. ),
  3324. 'foreign keys' => array(
  3325. ),
  3326. );
  3327. return $description;
  3328. }
  3329. /**
  3330. * Implements hook_studyfactorvalue_schema()
  3331. * Purpose: To describe the structure of studyfactorvalue to tripal
  3332. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3333. * @see tripal_core.api.inc: tripal_core_chado_update()
  3334. * @see tripal_core.api.inc: tripal_core_chado_select()
  3335. *
  3336. * @return
  3337. * An array describing the current table
  3338. *
  3339. * @ingroup tripal_schema_api
  3340. *
  3341. */
  3342. function tripal_core_chado_studyfactorvalue_schema () {
  3343. $description = array();
  3344. $description = array(
  3345. 'table' => 'studyfactorvalue',
  3346. // 'description' => 'TODO: please describe this table!',
  3347. 'fields' => array(
  3348. 'studyfactorvalue_id' => array(
  3349. // 'description' => 'TODO: please describe this field!',
  3350. 'type' => 'serial',
  3351. 'not null' => '1',
  3352. ),
  3353. 'studyfactor_id' => array(
  3354. // 'description' => 'TODO: please describe this field!',
  3355. 'type' => 'int',
  3356. 'not null' => '1',
  3357. ),
  3358. 'assay_id' => array(
  3359. // 'description' => 'TODO: please describe this field!',
  3360. 'type' => 'int',
  3361. 'not null' => '1',
  3362. ),
  3363. 'factorvalue' => array(
  3364. // 'description' => 'TODO: please describe this field!',
  3365. 'type' => 'text',
  3366. 'not null' => '',
  3367. ),
  3368. 'name' => array(
  3369. // 'description' => 'TODO: please describe this field!',
  3370. 'type' => 'text',
  3371. 'not null' => '',
  3372. ),
  3373. 'rank' => array(
  3374. // 'description' => 'TODO: please describe this field!',
  3375. 'type' => 'int',
  3376. 'not null' => '1',
  3377. 'default' => '0',
  3378. ),
  3379. ),
  3380. 'primary key' => array(
  3381. '0' => 'studyfactorvalue_id',
  3382. ),
  3383. 'unique keys' => array(
  3384. ),
  3385. 'indexes' => array(
  3386. 'studyfactorvalue_idx1' => array(
  3387. '0' => 'studyfactor_id',
  3388. ),
  3389. 'studyfactorvalue_idx2' => array(
  3390. '0' => 'assay_id',
  3391. ),
  3392. ),
  3393. 'foreign keys' => array(
  3394. ),
  3395. );
  3396. return $description;
  3397. }
  3398. /**
  3399. * Implements hook_studyfactor_schema()
  3400. * Purpose: To describe the structure of studyfactor to tripal
  3401. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3402. * @see tripal_core.api.inc: tripal_core_chado_update()
  3403. * @see tripal_core.api.inc: tripal_core_chado_select()
  3404. *
  3405. * @return
  3406. * An array describing the current table
  3407. *
  3408. * @ingroup tripal_schema_api
  3409. *
  3410. */
  3411. function tripal_core_chado_studyfactor_schema () {
  3412. $description = array();
  3413. $description = array(
  3414. 'table' => 'studyfactor',
  3415. // 'description' => 'TODO: please describe this table!',
  3416. 'fields' => array(
  3417. 'studyfactor_id' => array(
  3418. // 'description' => 'TODO: please describe this field!',
  3419. 'type' => 'serial',
  3420. 'not null' => '1',
  3421. ),
  3422. 'studydesign_id' => array(
  3423. // 'description' => 'TODO: please describe this field!',
  3424. 'type' => 'int',
  3425. 'not null' => '1',
  3426. ),
  3427. 'type_id' => array(
  3428. // 'description' => 'TODO: please describe this field!',
  3429. 'type' => 'int',
  3430. 'not null' => '',
  3431. ),
  3432. 'name' => array(
  3433. // 'description' => 'TODO: please describe this field!',
  3434. 'type' => 'text',
  3435. 'not null' => '1',
  3436. ),
  3437. 'description' => array(
  3438. // 'description' => 'TODO: please describe this field!',
  3439. 'type' => 'text',
  3440. 'not null' => '',
  3441. ),
  3442. ),
  3443. 'primary key' => array(
  3444. '0' => 'studyfactor_id',
  3445. ),
  3446. 'unique keys' => array(
  3447. ),
  3448. 'indexes' => array(
  3449. 'studyfactor_idx1' => array(
  3450. '0' => 'studydesign_id',
  3451. ),
  3452. 'studyfactor_idx2' => array(
  3453. '0' => 'type_id',
  3454. ),
  3455. ),
  3456. 'foreign keys' => array(
  3457. ),
  3458. );
  3459. return $description;
  3460. }
  3461. /**
  3462. * Implements hook_studyprop_schema()
  3463. * Purpose: To describe the structure of studyprop to tripal
  3464. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3465. * @see tripal_core.api.inc: tripal_core_chado_update()
  3466. * @see tripal_core.api.inc: tripal_core_chado_select()
  3467. *
  3468. * @return
  3469. * An array describing the current table
  3470. *
  3471. * @ingroup tripal_schema_api
  3472. *
  3473. */
  3474. function tripal_core_chado_studyprop_schema () {
  3475. $description = array();
  3476. $description = array(
  3477. 'table' => 'studyprop',
  3478. // 'description' => 'TODO: please describe this table!',
  3479. 'fields' => array(
  3480. 'studyprop_id' => array(
  3481. // 'description' => 'TODO: please describe this field!',
  3482. 'type' => 'serial',
  3483. 'not null' => '1',
  3484. ),
  3485. 'study_id' => array(
  3486. // 'description' => 'TODO: please describe this field!',
  3487. 'type' => 'int',
  3488. 'not null' => '1',
  3489. ),
  3490. 'type_id' => array(
  3491. // 'description' => 'TODO: please describe this field!',
  3492. 'type' => 'int',
  3493. 'not null' => '1',
  3494. ),
  3495. 'value' => array(
  3496. // 'description' => 'TODO: please describe this field!',
  3497. 'type' => 'text',
  3498. 'not null' => '',
  3499. ),
  3500. 'rank' => array(
  3501. // 'description' => 'TODO: please describe this field!',
  3502. 'type' => 'int',
  3503. 'not null' => '1',
  3504. 'default' => '0',
  3505. ),
  3506. ),
  3507. 'primary key' => array(
  3508. '0' => 'studyprop_id',
  3509. ),
  3510. 'unique keys' => array(
  3511. 'study_id' => array(
  3512. '0' => 'study_id',
  3513. '1' => 'type_id',
  3514. '2' => 'rank',
  3515. ),
  3516. ),
  3517. 'indexes' => array(
  3518. 'studyprop_idx1' => array(
  3519. '0' => 'study_id',
  3520. ),
  3521. 'studyprop_idx2' => array(
  3522. '0' => 'type_id',
  3523. ),
  3524. ),
  3525. 'foreign keys' => array(
  3526. ),
  3527. );
  3528. return $description;
  3529. }
  3530. /**
  3531. * Implements hook_studyprop_feature_schema()
  3532. * Purpose: To describe the structure of studyprop_feature to tripal
  3533. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3534. * @see tripal_core.api.inc: tripal_core_chado_update()
  3535. * @see tripal_core.api.inc: tripal_core_chado_select()
  3536. *
  3537. * @return
  3538. * An array describing the current table
  3539. *
  3540. * @ingroup tripal_schema_api
  3541. *
  3542. */
  3543. function tripal_core_chado_studyprop_feature_schema () {
  3544. $description = array();
  3545. $description = array(
  3546. 'table' => 'studyprop_feature',
  3547. // 'description' => 'TODO: please describe this table!',
  3548. 'fields' => array(
  3549. 'studyprop_feature_id' => array(
  3550. // 'description' => 'TODO: please describe this field!',
  3551. 'type' => 'serial',
  3552. 'not null' => '1',
  3553. ),
  3554. 'studyprop_id' => array(
  3555. // 'description' => 'TODO: please describe this field!',
  3556. 'type' => 'int',
  3557. 'not null' => '1',
  3558. ),
  3559. 'feature_id' => array(
  3560. // 'description' => 'TODO: please describe this field!',
  3561. 'type' => 'int',
  3562. 'not null' => '1',
  3563. ),
  3564. 'type_id' => array(
  3565. // 'description' => 'TODO: please describe this field!',
  3566. 'type' => 'int',
  3567. 'not null' => '',
  3568. ),
  3569. ),
  3570. 'primary key' => array(
  3571. '0' => 'studyprop_feature_id',
  3572. ),
  3573. 'unique keys' => array(
  3574. 'studyprop_id' => array(
  3575. '0' => 'studyprop_id',
  3576. '1' => 'feature_id',
  3577. ),
  3578. ),
  3579. 'indexes' => array(
  3580. 'studyprop_feature_idx1' => array(
  3581. '0' => 'studyprop_id',
  3582. ),
  3583. 'studyprop_feature_idx2' => array(
  3584. '0' => 'feature_id',
  3585. ),
  3586. ),
  3587. 'foreign keys' => array(
  3588. ),
  3589. );
  3590. return $description;
  3591. }
  3592. /**
  3593. * Implements hook_synonym_schema()
  3594. * Purpose: To describe the structure of synonym to tripal
  3595. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3596. * @see tripal_core.api.inc: tripal_core_chado_update()
  3597. * @see tripal_core.api.inc: tripal_core_chado_select()
  3598. *
  3599. * @return
  3600. * An array describing the current table
  3601. *
  3602. * @ingroup tripal_schema_api
  3603. *
  3604. */
  3605. function tripal_core_chado_synonym_schema () {
  3606. $description = array();
  3607. $description = array(
  3608. 'table' => 'synonym',
  3609. // 'description' => 'TODO: please describe this table!',
  3610. 'fields' => array(
  3611. 'synonym_id' => array(
  3612. // 'description' => 'TODO: please describe this field!',
  3613. 'type' => 'serial',
  3614. 'not null' => '1',
  3615. ),
  3616. 'name' => array(
  3617. // 'description' => 'TODO: please describe this field!',
  3618. 'type' => 'varchar',
  3619. 'length' => '255',
  3620. 'not null' => '1',
  3621. ),
  3622. 'type_id' => array(
  3623. // 'description' => 'TODO: please describe this field!',
  3624. 'type' => 'int',
  3625. 'not null' => '1',
  3626. ),
  3627. 'synonym_sgml' => array(
  3628. // 'description' => 'TODO: please describe this field!',
  3629. 'type' => 'varchar',
  3630. 'length' => '255',
  3631. 'not null' => '1',
  3632. ),
  3633. ),
  3634. 'primary key' => array(
  3635. '0' => 'synonym_id',
  3636. ),
  3637. 'unique keys' => array(
  3638. 'synonym_c1' => array(
  3639. '0' => 'name',
  3640. '1' => 'type_id',
  3641. ),
  3642. ),
  3643. 'indexes' => array(
  3644. 'synonym_idx1' => array(
  3645. '0' => 'type_id',
  3646. ),
  3647. ),
  3648. 'foreign keys' => array(
  3649. ),
  3650. );
  3651. return $description;
  3652. }
  3653. /**
  3654. * Implements hook_studydesignprop_schema()
  3655. * Purpose: To describe the structure of studydesignprop to tripal
  3656. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3657. * @see tripal_core.api.inc: tripal_core_chado_update()
  3658. * @see tripal_core.api.inc: tripal_core_chado_select()
  3659. *
  3660. * @return
  3661. * An array describing the current table
  3662. *
  3663. * @ingroup tripal_schema_api
  3664. *
  3665. */
  3666. function tripal_core_chado_studydesignprop_schema () {
  3667. $description = array();
  3668. $description = array(
  3669. 'table' => 'studydesignprop',
  3670. // 'description' => 'TODO: please describe this table!',
  3671. 'fields' => array(
  3672. 'studydesignprop_id' => array(
  3673. // 'description' => 'TODO: please describe this field!',
  3674. 'type' => 'serial',
  3675. 'not null' => '1',
  3676. ),
  3677. 'studydesign_id' => array(
  3678. // 'description' => 'TODO: please describe this field!',
  3679. 'type' => 'int',
  3680. 'not null' => '1',
  3681. ),
  3682. 'type_id' => array(
  3683. // 'description' => 'TODO: please describe this field!',
  3684. 'type' => 'int',
  3685. 'not null' => '1',
  3686. ),
  3687. 'value' => array(
  3688. // 'description' => 'TODO: please describe this field!',
  3689. 'type' => 'text',
  3690. 'not null' => '',
  3691. ),
  3692. 'rank' => array(
  3693. // 'description' => 'TODO: please describe this field!',
  3694. 'type' => 'int',
  3695. 'not null' => '1',
  3696. 'default' => '0',
  3697. ),
  3698. ),
  3699. 'primary key' => array(
  3700. '0' => 'studydesignprop_id',
  3701. ),
  3702. 'unique keys' => array(
  3703. 'studydesignprop_c1' => array(
  3704. '0' => 'studydesign_id',
  3705. '1' => 'type_id',
  3706. '2' => 'rank',
  3707. ),
  3708. ),
  3709. 'indexes' => array(
  3710. 'studydesignprop_idx1' => array(
  3711. '0' => 'studydesign_id',
  3712. ),
  3713. 'studydesignprop_idx2' => array(
  3714. '0' => 'type_id',
  3715. ),
  3716. ),
  3717. 'foreign keys' => array(
  3718. ),
  3719. );
  3720. return $description;
  3721. }
  3722. /**
  3723. * Implements hook_studydesign_schema()
  3724. * Purpose: To describe the structure of studydesign to tripal
  3725. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3726. * @see tripal_core.api.inc: tripal_core_chado_update()
  3727. * @see tripal_core.api.inc: tripal_core_chado_select()
  3728. *
  3729. * @return
  3730. * An array describing the current table
  3731. *
  3732. * @ingroup tripal_schema_api
  3733. *
  3734. */
  3735. function tripal_core_chado_studydesign_schema () {
  3736. $description = array();
  3737. $description = array(
  3738. 'table' => 'studydesign',
  3739. // 'description' => 'TODO: please describe this table!',
  3740. 'fields' => array(
  3741. 'studydesign_id' => array(
  3742. // 'description' => 'TODO: please describe this field!',
  3743. 'type' => 'serial',
  3744. 'not null' => '1',
  3745. ),
  3746. 'study_id' => array(
  3747. // 'description' => 'TODO: please describe this field!',
  3748. 'type' => 'int',
  3749. 'not null' => '1',
  3750. ),
  3751. 'description' => array(
  3752. // 'description' => 'TODO: please describe this field!',
  3753. 'type' => 'text',
  3754. 'not null' => '',
  3755. ),
  3756. ),
  3757. 'primary key' => array(
  3758. '0' => 'studydesign_id',
  3759. ),
  3760. 'unique keys' => array(
  3761. ),
  3762. 'indexes' => array(
  3763. 'studydesign_idx1' => array(
  3764. '0' => 'study_id',
  3765. ),
  3766. ),
  3767. 'foreign keys' => array(
  3768. ),
  3769. );
  3770. return $description;
  3771. }
  3772. /**
  3773. * Implements hook_stockprop_schema()
  3774. * Purpose: To describe the structure of stockprop to tripal
  3775. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3776. * @see tripal_core.api.inc: tripal_core_chado_update()
  3777. * @see tripal_core.api.inc: tripal_core_chado_select()
  3778. *
  3779. * @return
  3780. * An array describing the current table
  3781. *
  3782. * @ingroup tripal_schema_api
  3783. *
  3784. */
  3785. function tripal_core_chado_stockprop_schema () {
  3786. $description = array();
  3787. $description = array(
  3788. 'table' => 'stockprop',
  3789. // 'description' => 'TODO: please describe this table!',
  3790. 'fields' => array(
  3791. 'stockprop_id' => array(
  3792. // 'description' => 'TODO: please describe this field!',
  3793. 'type' => 'serial',
  3794. 'not null' => '1',
  3795. ),
  3796. 'stock_id' => array(
  3797. // 'description' => 'TODO: please describe this field!',
  3798. 'type' => 'int',
  3799. 'not null' => '1',
  3800. ),
  3801. 'type_id' => array(
  3802. // 'description' => 'TODO: please describe this field!',
  3803. 'type' => 'int',
  3804. 'not null' => '1',
  3805. ),
  3806. 'value' => array(
  3807. // 'description' => 'TODO: please describe this field!',
  3808. 'type' => 'text',
  3809. 'not null' => '',
  3810. ),
  3811. 'rank' => array(
  3812. // 'description' => 'TODO: please describe this field!',
  3813. 'type' => 'int',
  3814. 'not null' => '1',
  3815. 'default' => '0',
  3816. ),
  3817. ),
  3818. 'primary key' => array(
  3819. '0' => 'stockprop_id',
  3820. ),
  3821. 'unique keys' => array(
  3822. 'stockprop_c1' => array(
  3823. '0' => 'stock_id',
  3824. '1' => 'type_id',
  3825. '2' => 'rank',
  3826. ),
  3827. ),
  3828. 'indexes' => array(
  3829. 'stockprop_idx1' => array(
  3830. '0' => 'stock_id',
  3831. ),
  3832. 'stockprop_idx2' => array(
  3833. '0' => 'type_id',
  3834. ),
  3835. ),
  3836. 'foreign keys' => array(
  3837. ),
  3838. );
  3839. return $description;
  3840. }
  3841. /**
  3842. * Implements hook_stockprop_pub_schema()
  3843. * Purpose: To describe the structure of stockprop_pub to tripal
  3844. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3845. * @see tripal_core.api.inc: tripal_core_chado_update()
  3846. * @see tripal_core.api.inc: tripal_core_chado_select()
  3847. *
  3848. * @return
  3849. * An array describing the current table
  3850. *
  3851. * @ingroup tripal_schema_api
  3852. *
  3853. */
  3854. function tripal_core_chado_stockprop_pub_schema () {
  3855. $description = array();
  3856. $description = array(
  3857. 'table' => 'stockprop_pub',
  3858. // 'description' => 'TODO: please describe this table!',
  3859. 'fields' => array(
  3860. 'stockprop_pub_id' => array(
  3861. // 'description' => 'TODO: please describe this field!',
  3862. 'type' => 'serial',
  3863. 'not null' => '1',
  3864. ),
  3865. 'stockprop_id' => array(
  3866. // 'description' => 'TODO: please describe this field!',
  3867. 'type' => 'int',
  3868. 'not null' => '1',
  3869. ),
  3870. 'pub_id' => array(
  3871. // 'description' => 'TODO: please describe this field!',
  3872. 'type' => 'int',
  3873. 'not null' => '1',
  3874. ),
  3875. ),
  3876. 'primary key' => array(
  3877. '0' => 'stockprop_pub_id',
  3878. ),
  3879. 'unique keys' => array(
  3880. 'stockprop_pub_c1' => array(
  3881. '0' => 'stockprop_id',
  3882. '1' => 'pub_id',
  3883. ),
  3884. ),
  3885. 'indexes' => array(
  3886. 'stockprop_pub_idx1' => array(
  3887. '0' => 'stockprop_id',
  3888. ),
  3889. 'stockprop_pub_idx2' => array(
  3890. '0' => 'pub_id',
  3891. ),
  3892. ),
  3893. 'foreign keys' => array(
  3894. ),
  3895. );
  3896. return $description;
  3897. }
  3898. /**
  3899. * Implements hook_study_schema()
  3900. * Purpose: To describe the structure of study to tripal
  3901. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3902. * @see tripal_core.api.inc: tripal_core_chado_update()
  3903. * @see tripal_core.api.inc: tripal_core_chado_select()
  3904. *
  3905. * @return
  3906. * An array describing the current table
  3907. *
  3908. * @ingroup tripal_schema_api
  3909. *
  3910. */
  3911. function tripal_core_chado_study_schema () {
  3912. $description = array();
  3913. $description = array(
  3914. 'table' => 'study',
  3915. // 'description' => 'TODO: please describe this table!',
  3916. 'fields' => array(
  3917. 'study_id' => array(
  3918. // 'description' => 'TODO: please describe this field!',
  3919. 'type' => 'serial',
  3920. 'not null' => '1',
  3921. ),
  3922. 'contact_id' => array(
  3923. // 'description' => 'TODO: please describe this field!',
  3924. 'type' => 'int',
  3925. 'not null' => '1',
  3926. ),
  3927. 'pub_id' => array(
  3928. // 'description' => 'TODO: please describe this field!',
  3929. 'type' => 'int',
  3930. 'not null' => '',
  3931. ),
  3932. 'dbxref_id' => array(
  3933. // 'description' => 'TODO: please describe this field!',
  3934. 'type' => 'int',
  3935. 'not null' => '',
  3936. ),
  3937. 'name' => array(
  3938. // 'description' => 'TODO: please describe this field!',
  3939. 'type' => 'text',
  3940. 'not null' => '1',
  3941. ),
  3942. 'description' => array(
  3943. // 'description' => 'TODO: please describe this field!',
  3944. 'type' => 'text',
  3945. 'not null' => '',
  3946. ),
  3947. ),
  3948. 'primary key' => array(
  3949. '0' => 'study_id',
  3950. ),
  3951. 'unique keys' => array(
  3952. 'study_c1' => array(
  3953. '0' => 'name',
  3954. ),
  3955. ),
  3956. 'indexes' => array(
  3957. 'study_idx1' => array(
  3958. '0' => 'contact_id',
  3959. ),
  3960. 'study_idx2' => array(
  3961. '0' => 'pub_id',
  3962. ),
  3963. 'study_idx3' => array(
  3964. '0' => 'dbxref_id',
  3965. ),
  3966. ),
  3967. 'foreign keys' => array(
  3968. ),
  3969. );
  3970. return $description;
  3971. }
  3972. /**
  3973. * Implements hook_study_assay_schema()
  3974. * Purpose: To describe the structure of study_assay to tripal
  3975. * @see tripal_core.api.inc: tripal_core_chado_insert()
  3976. * @see tripal_core.api.inc: tripal_core_chado_update()
  3977. * @see tripal_core.api.inc: tripal_core_chado_select()
  3978. *
  3979. * @return
  3980. * An array describing the current table
  3981. *
  3982. * @ingroup tripal_schema_api
  3983. *
  3984. */
  3985. function tripal_core_chado_study_assay_schema () {
  3986. $description = array();
  3987. $description = array(
  3988. 'table' => 'study_assay',
  3989. // 'description' => 'TODO: please describe this table!',
  3990. 'fields' => array(
  3991. 'study_assay_id' => array(
  3992. // 'description' => 'TODO: please describe this field!',
  3993. 'type' => 'serial',
  3994. 'not null' => '1',
  3995. ),
  3996. 'study_id' => array(
  3997. // 'description' => 'TODO: please describe this field!',
  3998. 'type' => 'int',
  3999. 'not null' => '1',
  4000. ),
  4001. 'assay_id' => array(
  4002. // 'description' => 'TODO: please describe this field!',
  4003. 'type' => 'int',
  4004. 'not null' => '1',
  4005. ),
  4006. ),
  4007. 'primary key' => array(
  4008. '0' => 'study_assay_id',
  4009. ),
  4010. 'unique keys' => array(
  4011. 'study_assay_c1' => array(
  4012. '0' => 'study_id',
  4013. '1' => 'assay_id',
  4014. ),
  4015. ),
  4016. 'indexes' => array(
  4017. 'study_assay_idx1' => array(
  4018. '0' => 'study_id',
  4019. ),
  4020. 'study_assay_idx2' => array(
  4021. '0' => 'assay_id',
  4022. ),
  4023. ),
  4024. 'foreign keys' => array(
  4025. ),
  4026. );
  4027. return $description;
  4028. }
  4029. /**
  4030. * Implements hook_tableinfo_schema()
  4031. * Purpose: To describe the structure of tableinfo to tripal
  4032. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4033. * @see tripal_core.api.inc: tripal_core_chado_update()
  4034. * @see tripal_core.api.inc: tripal_core_chado_select()
  4035. *
  4036. * @return
  4037. * An array describing the current table
  4038. *
  4039. * @ingroup tripal_schema_api
  4040. *
  4041. */
  4042. function tripal_core_chado_tableinfo_schema () {
  4043. $description = array();
  4044. $description = array(
  4045. 'table' => 'tableinfo',
  4046. // 'description' => 'TODO: please describe this table!',
  4047. 'fields' => array(
  4048. 'tableinfo_id' => array(
  4049. // 'description' => 'TODO: please describe this field!',
  4050. 'type' => 'serial',
  4051. 'not null' => '1',
  4052. ),
  4053. 'name' => array(
  4054. // 'description' => 'TODO: please describe this field!',
  4055. 'type' => 'varchar',
  4056. 'length' => '30',
  4057. 'not null' => '1',
  4058. ),
  4059. 'primary_key_column' => array(
  4060. // 'description' => 'TODO: please describe this field!',
  4061. 'type' => 'varchar',
  4062. 'length' => '30',
  4063. 'not null' => '',
  4064. ),
  4065. 'is_view' => array(
  4066. // 'description' => 'TODO: please describe this field!',
  4067. 'type' => 'int',
  4068. 'not null' => '1',
  4069. 'default' => '0',
  4070. ),
  4071. 'view_on_table_id' => array(
  4072. // 'description' => 'TODO: please describe this field!',
  4073. 'type' => 'int',
  4074. 'not null' => '',
  4075. ),
  4076. 'superclass_table_id' => array(
  4077. // 'description' => 'TODO: please describe this field!',
  4078. 'type' => 'int',
  4079. 'not null' => '',
  4080. ),
  4081. 'is_updateable' => array(
  4082. // 'description' => 'TODO: please describe this field!',
  4083. 'type' => 'int',
  4084. 'not null' => '1',
  4085. 'default' => '1',
  4086. ),
  4087. 'modification_date' => array(
  4088. // 'description' => 'TODO: please describe this field!',
  4089. 'type' => 'date',
  4090. 'not null' => '1',
  4091. 'default' => 'ow(',
  4092. ),
  4093. ),
  4094. 'primary key' => array(
  4095. '0' => 'tableinfo_id',
  4096. ),
  4097. 'unique keys' => array(
  4098. 'tableinfo_c1' => array(
  4099. '0' => 'name',
  4100. ),
  4101. ),
  4102. 'indexes' => array(
  4103. ),
  4104. 'foreign keys' => array(
  4105. ),
  4106. );
  4107. return $description;
  4108. }
  4109. /**
  4110. * Implements hook_treatment_schema()
  4111. * Purpose: To describe the structure of treatment to tripal
  4112. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4113. * @see tripal_core.api.inc: tripal_core_chado_update()
  4114. * @see tripal_core.api.inc: tripal_core_chado_select()
  4115. *
  4116. * @return
  4117. * An array describing the current table
  4118. *
  4119. * @ingroup tripal_schema_api
  4120. *
  4121. */
  4122. function tripal_core_chado_treatment_schema () {
  4123. $description = array();
  4124. $description = array(
  4125. 'table' => 'treatment',
  4126. // 'description' => 'TODO: please describe this table!',
  4127. 'fields' => array(
  4128. 'treatment_id' => array(
  4129. // 'description' => 'TODO: please describe this field!',
  4130. 'type' => 'serial',
  4131. 'not null' => '1',
  4132. ),
  4133. 'rank' => array(
  4134. // 'description' => 'TODO: please describe this field!',
  4135. 'type' => 'int',
  4136. 'not null' => '1',
  4137. 'default' => '0',
  4138. ),
  4139. 'biomaterial_id' => array(
  4140. // 'description' => 'TODO: please describe this field!',
  4141. 'type' => 'int',
  4142. 'not null' => '1',
  4143. ),
  4144. 'type_id' => array(
  4145. // 'description' => 'TODO: please describe this field!',
  4146. 'type' => 'int',
  4147. 'not null' => '1',
  4148. ),
  4149. 'protocol_id' => array(
  4150. // 'description' => 'TODO: please describe this field!',
  4151. 'type' => 'int',
  4152. 'not null' => '',
  4153. ),
  4154. 'name' => array(
  4155. // 'description' => 'TODO: please describe this field!',
  4156. 'type' => 'text',
  4157. 'not null' => '',
  4158. ),
  4159. ),
  4160. 'primary key' => array(
  4161. '0' => 'treatment_id',
  4162. ),
  4163. 'unique keys' => array(
  4164. ),
  4165. 'indexes' => array(
  4166. 'treatment_idx1' => array(
  4167. '0' => 'biomaterial_id',
  4168. ),
  4169. 'treatment_idx2' => array(
  4170. '0' => 'type_id',
  4171. ),
  4172. 'treatment_idx3' => array(
  4173. '0' => 'protocol_id',
  4174. ),
  4175. ),
  4176. 'foreign keys' => array(
  4177. ),
  4178. );
  4179. return $description;
  4180. }
  4181. /**
  4182. * Implements hook_tripal_obo_schema()
  4183. * Purpose: To describe the structure of tripal_obo to tripal
  4184. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4185. * @see tripal_core.api.inc: tripal_core_chado_update()
  4186. * @see tripal_core.api.inc: tripal_core_chado_select()
  4187. *
  4188. * @return
  4189. * An array describing the current table
  4190. *
  4191. * @ingroup tripal_schema_api
  4192. *
  4193. */
  4194. function tripal_core_chado_tripal_obo_schema () {
  4195. $description = array();
  4196. $description = array(
  4197. 'table' => 'tripal_obo',
  4198. // 'description' => 'TODO: please describe this table!',
  4199. 'fields' => array(
  4200. 'cv_id' => array(
  4201. // 'description' => 'TODO: please describe this field!',
  4202. 'type' => 'int',
  4203. 'unsigned' => '1',
  4204. 'not null' => '1',
  4205. 'default' => '0',
  4206. ),
  4207. 'file' => array(
  4208. // 'description' => 'TODO: please describe this field!',
  4209. 'type' => 'varchar',
  4210. 'length' => '1024',
  4211. 'not null' => '',
  4212. ),
  4213. 'url' => array(
  4214. // 'description' => 'TODO: please describe this field!',
  4215. 'type' => 'varchar',
  4216. 'length' => '1024',
  4217. 'not null' => '',
  4218. ),
  4219. ),
  4220. 'primary key' => array(
  4221. '0' => 'cv_id',
  4222. ),
  4223. 'unique keys' => array(
  4224. ),
  4225. 'indexes' => array(
  4226. 'cv_id' => array(
  4227. '0' => 'cv_id',
  4228. ),
  4229. ),
  4230. 'foreign keys' => array(
  4231. ),
  4232. );
  4233. return $description;
  4234. }
  4235. /**
  4236. * Implements hook_tripal_organism_views_common_name_schema()
  4237. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4238. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4239. * @see tripal_core.api.inc: tripal_core_chado_update()
  4240. * @see tripal_core.api.inc: tripal_core_chado_select()
  4241. *
  4242. * @return
  4243. * An array describing the current table
  4244. *
  4245. * @ingroup tripal_schema_api
  4246. *
  4247. */
  4248. function tripal_core_chado_tripal_organism_views_common_name_schema () {
  4249. $description = array();
  4250. $description = array(
  4251. 'table' => 'tripal_organism_views_common_name',
  4252. // 'description' => 'TODO: please describe this table!',
  4253. 'fields' => array(
  4254. 'nid' => array(
  4255. // 'description' => 'TODO: please describe this field!',
  4256. 'type' => 'int',
  4257. 'unsigned' => '1',
  4258. 'not null' => '1',
  4259. 'default' => '0',
  4260. ),
  4261. 'common_name' => array(
  4262. // 'description' => 'TODO: please describe this field!',
  4263. 'type' => 'varchar',
  4264. 'length' => '255',
  4265. 'not null' => '1',
  4266. 'default' => 'NA',
  4267. ),
  4268. ),
  4269. 'primary key' => array(
  4270. ),
  4271. 'unique keys' => array(
  4272. ),
  4273. 'indexes' => array(
  4274. ),
  4275. 'foreign keys' => array(
  4276. ),
  4277. );
  4278. return $description;
  4279. }
  4280. /**
  4281. * Implements hook_type_feature_count_schema()
  4282. * Purpose: To describe the structure of type_feature_count to tripal
  4283. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4284. * @see tripal_core.api.inc: tripal_core_chado_update()
  4285. * @see tripal_core.api.inc: tripal_core_chado_select()
  4286. *
  4287. * @return
  4288. * An array describing the current table
  4289. *
  4290. * @ingroup tripal_schema_api
  4291. *
  4292. */
  4293. function tripal_core_chado_type_feature_count_schema () {
  4294. $description = array();
  4295. $description = array(
  4296. 'table' => 'type_feature_count',
  4297. // 'description' => 'TODO: please describe this table!',
  4298. 'fields' => array(
  4299. 'type' => array(
  4300. // 'description' => 'TODO: please describe this field!',
  4301. 'type' => 'varchar',
  4302. 'length' => '1024',
  4303. 'not null' => '',
  4304. ),
  4305. 'num_features' => array(
  4306. // 'description' => 'TODO: please describe this field!',
  4307. 'type' => 'int',
  4308. 'size' => 'big',
  4309. 'not null' => '',
  4310. ),
  4311. ),
  4312. 'primary key' => array(
  4313. ),
  4314. 'unique keys' => array(
  4315. ),
  4316. 'indexes' => array(
  4317. ),
  4318. 'foreign keys' => array(
  4319. ),
  4320. );
  4321. return $description;
  4322. }
  4323. /**
  4324. * Implements hook_stockcollectionprop_schema()
  4325. * Purpose: To describe the structure of stockcollectionprop to tripal
  4326. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4327. * @see tripal_core.api.inc: tripal_core_chado_update()
  4328. * @see tripal_core.api.inc: tripal_core_chado_select()
  4329. *
  4330. * @return
  4331. * An array describing the current table
  4332. *
  4333. * @ingroup tripal_schema_api
  4334. *
  4335. */
  4336. function tripal_core_chado_stockcollectionprop_schema () {
  4337. $description = array();
  4338. $description = array(
  4339. 'table' => 'stockcollectionprop',
  4340. // 'description' => 'TODO: please describe this table!',
  4341. 'fields' => array(
  4342. 'stockcollectionprop_id' => array(
  4343. // 'description' => 'TODO: please describe this field!',
  4344. 'type' => 'serial',
  4345. 'not null' => '1',
  4346. ),
  4347. 'stockcollection_id' => array(
  4348. // 'description' => 'TODO: please describe this field!',
  4349. 'type' => 'int',
  4350. 'not null' => '1',
  4351. ),
  4352. 'type_id' => array(
  4353. // 'description' => 'TODO: please describe this field!',
  4354. 'type' => 'int',
  4355. 'not null' => '1',
  4356. ),
  4357. 'value' => array(
  4358. // 'description' => 'TODO: please describe this field!',
  4359. 'type' => 'text',
  4360. 'not null' => '',
  4361. ),
  4362. 'rank' => array(
  4363. // 'description' => 'TODO: please describe this field!',
  4364. 'type' => 'int',
  4365. 'not null' => '1',
  4366. 'default' => '0',
  4367. ),
  4368. ),
  4369. 'primary key' => array(
  4370. '0' => 'stockcollectionprop_id',
  4371. ),
  4372. 'unique keys' => array(
  4373. 'stockcollectionprop_c1' => array(
  4374. '0' => 'stockcollection_id',
  4375. '1' => 'type_id',
  4376. '2' => 'rank',
  4377. ),
  4378. ),
  4379. 'indexes' => array(
  4380. 'stockcollectionprop_idx1' => array(
  4381. '0' => 'stockcollection_id',
  4382. ),
  4383. 'stockcollectionprop_idx2' => array(
  4384. '0' => 'type_id',
  4385. ),
  4386. ),
  4387. 'foreign keys' => array(
  4388. ),
  4389. );
  4390. return $description;
  4391. }
  4392. /**
  4393. * Implements hook_stockcollection_stock_schema()
  4394. * Purpose: To describe the structure of stockcollection_stock to tripal
  4395. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4396. * @see tripal_core.api.inc: tripal_core_chado_update()
  4397. * @see tripal_core.api.inc: tripal_core_chado_select()
  4398. *
  4399. * @return
  4400. * An array describing the current table
  4401. *
  4402. * @ingroup tripal_schema_api
  4403. *
  4404. */
  4405. function tripal_core_chado_stockcollection_stock_schema () {
  4406. $description = array();
  4407. $description = array(
  4408. 'table' => 'stockcollection_stock',
  4409. // 'description' => 'TODO: please describe this table!',
  4410. 'fields' => array(
  4411. 'stockcollection_stock_id' => array(
  4412. // 'description' => 'TODO: please describe this field!',
  4413. 'type' => 'serial',
  4414. 'not null' => '1',
  4415. ),
  4416. 'stockcollection_id' => array(
  4417. // 'description' => 'TODO: please describe this field!',
  4418. 'type' => 'int',
  4419. 'not null' => '1',
  4420. ),
  4421. 'stock_id' => array(
  4422. // 'description' => 'TODO: please describe this field!',
  4423. 'type' => 'int',
  4424. 'not null' => '1',
  4425. ),
  4426. ),
  4427. 'primary key' => array(
  4428. '0' => 'stockcollection_stock_id',
  4429. ),
  4430. 'unique keys' => array(
  4431. 'stockcollection_stock_c1' => array(
  4432. '0' => 'stockcollection_id',
  4433. '1' => 'stock_id',
  4434. ),
  4435. ),
  4436. 'indexes' => array(
  4437. 'stockcollection_stock_idx1' => array(
  4438. '0' => 'stockcollection_id',
  4439. ),
  4440. 'stockcollection_stock_idx2' => array(
  4441. '0' => 'stock_id',
  4442. ),
  4443. ),
  4444. 'foreign keys' => array(
  4445. ),
  4446. );
  4447. return $description;
  4448. }
  4449. /**
  4450. * Implements hook_public_feature_schema()
  4451. * Purpose: To describe the structure of public_feature to tripal
  4452. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4453. * @see tripal_core.api.inc: tripal_core_chado_update()
  4454. * @see tripal_core.api.inc: tripal_core_chado_select()
  4455. *
  4456. * @return
  4457. * An array describing the current table
  4458. *
  4459. * @ingroup tripal_schema_api
  4460. *
  4461. */
  4462. function tripal_core_chado_public_feature_schema () {
  4463. $description = array();
  4464. $description = array(
  4465. 'table' => 'public_feature',
  4466. // 'description' => 'TODO: please describe this table!',
  4467. 'fields' => array(
  4468. 'vid' => array(
  4469. // 'description' => 'TODO: please describe this field!',
  4470. 'type' => 'int',
  4471. 'unsigned' => '1',
  4472. 'not null' => '1',
  4473. 'default' => '0',
  4474. ),
  4475. 'nid' => array(
  4476. // 'description' => 'TODO: please describe this field!',
  4477. 'type' => 'int',
  4478. 'unsigned' => '1',
  4479. 'not null' => '1',
  4480. 'default' => '0',
  4481. ),
  4482. 'feature_id' => array(
  4483. // 'description' => 'TODO: please describe this field!',
  4484. 'type' => 'int',
  4485. 'not null' => '1',
  4486. 'default' => '0',
  4487. ),
  4488. 'sync_date' => array(
  4489. // 'description' => 'TODO: please describe this field!',
  4490. 'type' => 'int',
  4491. 'not null' => '',
  4492. ),
  4493. ),
  4494. 'primary key' => array(
  4495. '0' => 'nid',
  4496. ),
  4497. 'unique keys' => array(
  4498. 'nid_vid' => array(
  4499. '0' => 'nid',
  4500. '1' => 'vid',
  4501. ),
  4502. 'vid' => array(
  4503. '0' => 'vid',
  4504. ),
  4505. ),
  4506. 'indexes' => array(
  4507. 'feature_id' => array(
  4508. '0' => 'feature_id',
  4509. ),
  4510. ),
  4511. 'foreign keys' => array(
  4512. ),
  4513. );
  4514. return $description;
  4515. }
  4516. /**
  4517. * Implements hook_public_library_schema()
  4518. * Purpose: To describe the structure of public_library to tripal
  4519. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4520. * @see tripal_core.api.inc: tripal_core_chado_update()
  4521. * @see tripal_core.api.inc: tripal_core_chado_select()
  4522. *
  4523. * @return
  4524. * An array describing the current table
  4525. *
  4526. * @ingroup tripal_schema_api
  4527. *
  4528. */
  4529. function tripal_core_chado_public_library_schema () {
  4530. $description = array();
  4531. $description = array(
  4532. 'table' => 'public_library',
  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. 'library_id' => array(
  4550. // 'description' => 'TODO: please describe this field!',
  4551. 'type' => 'int',
  4552. 'not null' => '1',
  4553. 'default' => '0',
  4554. ),
  4555. ),
  4556. 'primary key' => array(
  4557. '0' => 'nid',
  4558. ),
  4559. 'unique keys' => array(
  4560. 'nid_vid' => array(
  4561. '0' => 'nid',
  4562. '1' => 'vid',
  4563. ),
  4564. 'vid' => array(
  4565. '0' => 'vid',
  4566. ),
  4567. ),
  4568. 'indexes' => array(
  4569. 'library_id' => array(
  4570. '0' => 'library_id',
  4571. ),
  4572. ),
  4573. 'foreign keys' => array(
  4574. ),
  4575. );
  4576. return $description;
  4577. }
  4578. /**
  4579. * Implements hook_public_organism_schema()
  4580. * Purpose: To describe the structure of public_organism to tripal
  4581. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4582. * @see tripal_core.api.inc: tripal_core_chado_update()
  4583. * @see tripal_core.api.inc: tripal_core_chado_select()
  4584. *
  4585. * @return
  4586. * An array describing the current table
  4587. *
  4588. * @ingroup tripal_schema_api
  4589. *
  4590. */
  4591. function tripal_core_chado_public_organism_schema () {
  4592. $description = array();
  4593. $description = array(
  4594. 'table' => 'public_organism',
  4595. // 'description' => 'TODO: please describe this table!',
  4596. 'fields' => array(
  4597. 'vid' => array(
  4598. // 'description' => 'TODO: please describe this field!',
  4599. 'type' => 'int',
  4600. 'unsigned' => '1',
  4601. 'not null' => '1',
  4602. 'default' => '0',
  4603. ),
  4604. 'nid' => array(
  4605. // 'description' => 'TODO: please describe this field!',
  4606. 'type' => 'int',
  4607. 'unsigned' => '1',
  4608. 'not null' => '1',
  4609. 'default' => '0',
  4610. ),
  4611. 'organism_id' => array(
  4612. // 'description' => 'TODO: please describe this field!',
  4613. 'type' => 'int',
  4614. 'not null' => '1',
  4615. 'default' => '0',
  4616. ),
  4617. ),
  4618. 'primary key' => array(
  4619. '0' => 'nid',
  4620. ),
  4621. 'unique keys' => array(
  4622. 'nid_vid' => array(
  4623. '0' => 'nid',
  4624. '1' => 'vid',
  4625. ),
  4626. 'vid' => array(
  4627. '0' => 'vid',
  4628. ),
  4629. ),
  4630. 'indexes' => array(
  4631. 'organism_id' => array(
  4632. '0' => 'organism_id',
  4633. ),
  4634. ),
  4635. 'foreign keys' => array(
  4636. ),
  4637. );
  4638. return $description;
  4639. }
  4640. /**
  4641. * Implements hook_pubprop_schema()
  4642. * Purpose: To describe the structure of pubprop to tripal
  4643. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4644. * @see tripal_core.api.inc: tripal_core_chado_update()
  4645. * @see tripal_core.api.inc: tripal_core_chado_select()
  4646. *
  4647. * @return
  4648. * An array describing the current table
  4649. *
  4650. * @ingroup tripal_schema_api
  4651. *
  4652. */
  4653. function tripal_core_chado_pubprop_schema () {
  4654. $description = array();
  4655. $description = array(
  4656. 'table' => 'pubprop',
  4657. // 'description' => 'TODO: please describe this table!',
  4658. 'fields' => array(
  4659. 'pubprop_id' => array(
  4660. // 'description' => 'TODO: please describe this field!',
  4661. 'type' => 'serial',
  4662. 'not null' => '1',
  4663. ),
  4664. 'pub_id' => array(
  4665. // 'description' => 'TODO: please describe this field!',
  4666. 'type' => 'int',
  4667. 'not null' => '1',
  4668. ),
  4669. 'type_id' => array(
  4670. // 'description' => 'TODO: please describe this field!',
  4671. 'type' => 'int',
  4672. 'not null' => '1',
  4673. ),
  4674. 'value' => array(
  4675. // 'description' => 'TODO: please describe this field!',
  4676. 'type' => 'text',
  4677. 'not null' => '1',
  4678. ),
  4679. 'rank' => array(
  4680. // 'description' => 'TODO: please describe this field!',
  4681. 'type' => 'int',
  4682. 'not null' => '',
  4683. ),
  4684. ),
  4685. 'primary key' => array(
  4686. '0' => 'pubprop_id',
  4687. ),
  4688. 'unique keys' => array(
  4689. 'pubprop_c1' => array(
  4690. '0' => 'pub_id',
  4691. '1' => 'type_id',
  4692. '2' => 'rank',
  4693. ),
  4694. ),
  4695. 'indexes' => array(
  4696. 'pubprop_idx1' => array(
  4697. '0' => 'pub_id',
  4698. ),
  4699. 'pubprop_idx2' => array(
  4700. '0' => 'type_id',
  4701. ),
  4702. ),
  4703. 'foreign keys' => array(
  4704. ),
  4705. );
  4706. return $description;
  4707. }
  4708. /**
  4709. * Implements hook_pubauthor_schema()
  4710. * Purpose: To describe the structure of pubauthor to tripal
  4711. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4712. * @see tripal_core.api.inc: tripal_core_chado_update()
  4713. * @see tripal_core.api.inc: tripal_core_chado_select()
  4714. *
  4715. * @return
  4716. * An array describing the current table
  4717. *
  4718. * @ingroup tripal_schema_api
  4719. *
  4720. */
  4721. function tripal_core_chado_pubauthor_schema () {
  4722. $description = array();
  4723. $description = array(
  4724. 'table' => 'pubauthor',
  4725. // 'description' => 'TODO: please describe this table!',
  4726. 'fields' => array(
  4727. 'pubauthor_id' => array(
  4728. // 'description' => 'TODO: please describe this field!',
  4729. 'type' => 'serial',
  4730. 'not null' => '1',
  4731. ),
  4732. 'pub_id' => array(
  4733. // 'description' => 'TODO: please describe this field!',
  4734. 'type' => 'int',
  4735. 'not null' => '1',
  4736. ),
  4737. 'rank' => array(
  4738. // 'description' => 'TODO: please describe this field!',
  4739. 'type' => 'int',
  4740. 'not null' => '1',
  4741. ),
  4742. 'editor' => array(
  4743. // 'description' => 'TODO: please describe this field!',
  4744. 'type' => 'boolean',
  4745. 'not null' => '',
  4746. 'default' => 'als',
  4747. ),
  4748. 'surname' => array(
  4749. // 'description' => 'TODO: please describe this field!',
  4750. 'type' => 'varchar',
  4751. 'length' => '100',
  4752. 'not null' => '1',
  4753. ),
  4754. 'givennames' => array(
  4755. // 'description' => 'TODO: please describe this field!',
  4756. 'type' => 'varchar',
  4757. 'length' => '100',
  4758. 'not null' => '',
  4759. ),
  4760. 'suffix' => array(
  4761. // 'description' => 'TODO: please describe this field!',
  4762. 'type' => 'varchar',
  4763. 'length' => '100',
  4764. 'not null' => '',
  4765. ),
  4766. ),
  4767. 'primary key' => array(
  4768. '0' => 'pubauthor_id',
  4769. ),
  4770. 'unique keys' => array(
  4771. 'pubauthor_c1' => array(
  4772. '0' => 'pub_id',
  4773. '1' => 'rank',
  4774. ),
  4775. ),
  4776. 'indexes' => array(
  4777. 'pubauthor_idx2' => array(
  4778. '0' => 'pub_id',
  4779. ),
  4780. ),
  4781. 'foreign keys' => array(
  4782. ),
  4783. );
  4784. return $description;
  4785. }
  4786. /**
  4787. * Implements hook_pub_relationship_schema()
  4788. * Purpose: To describe the structure of pub_relationship to tripal
  4789. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4790. * @see tripal_core.api.inc: tripal_core_chado_update()
  4791. * @see tripal_core.api.inc: tripal_core_chado_select()
  4792. *
  4793. * @return
  4794. * An array describing the current table
  4795. *
  4796. * @ingroup tripal_schema_api
  4797. *
  4798. */
  4799. function tripal_core_chado_pub_relationship_schema () {
  4800. $description = array();
  4801. $description = array(
  4802. 'table' => 'pub_relationship',
  4803. // 'description' => 'TODO: please describe this table!',
  4804. 'fields' => array(
  4805. 'pub_relationship_id' => array(
  4806. // 'description' => 'TODO: please describe this field!',
  4807. 'type' => 'serial',
  4808. 'not null' => '1',
  4809. ),
  4810. 'subject_id' => array(
  4811. // 'description' => 'TODO: please describe this field!',
  4812. 'type' => 'int',
  4813. 'not null' => '1',
  4814. ),
  4815. 'object_id' => array(
  4816. // 'description' => 'TODO: please describe this field!',
  4817. 'type' => 'int',
  4818. 'not null' => '1',
  4819. ),
  4820. 'type_id' => array(
  4821. // 'description' => 'TODO: please describe this field!',
  4822. 'type' => 'int',
  4823. 'not null' => '1',
  4824. ),
  4825. ),
  4826. 'primary key' => array(
  4827. '0' => 'pub_relationship_id',
  4828. ),
  4829. 'unique keys' => array(
  4830. 'pub_relationship_c1' => array(
  4831. '0' => 'subject_id',
  4832. '1' => 'object_id',
  4833. '2' => 'type_id',
  4834. ),
  4835. ),
  4836. 'indexes' => array(
  4837. 'pub_relationship_idx1' => array(
  4838. '0' => 'subject_id',
  4839. ),
  4840. 'pub_relationship_idx2' => array(
  4841. '0' => 'object_id',
  4842. ),
  4843. 'pub_relationship_idx3' => array(
  4844. '0' => 'type_id',
  4845. ),
  4846. ),
  4847. 'foreign keys' => array(
  4848. ),
  4849. );
  4850. return $description;
  4851. }
  4852. /**
  4853. * Implements hook_protocol_schema()
  4854. * Purpose: To describe the structure of protocol to tripal
  4855. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4856. * @see tripal_core.api.inc: tripal_core_chado_update()
  4857. * @see tripal_core.api.inc: tripal_core_chado_select()
  4858. *
  4859. * @return
  4860. * An array describing the current table
  4861. *
  4862. * @ingroup tripal_schema_api
  4863. *
  4864. */
  4865. function tripal_core_chado_protocol_schema () {
  4866. $description = array();
  4867. $description = array(
  4868. 'table' => 'protocol',
  4869. // 'description' => 'TODO: please describe this table!',
  4870. 'fields' => array(
  4871. 'protocol_id' => array(
  4872. // 'description' => 'TODO: please describe this field!',
  4873. 'type' => 'serial',
  4874. 'not null' => '1',
  4875. ),
  4876. 'type_id' => array(
  4877. // 'description' => 'TODO: please describe this field!',
  4878. 'type' => 'int',
  4879. 'not null' => '1',
  4880. ),
  4881. 'pub_id' => array(
  4882. // 'description' => 'TODO: please describe this field!',
  4883. 'type' => 'int',
  4884. 'not null' => '',
  4885. ),
  4886. 'dbxref_id' => array(
  4887. // 'description' => 'TODO: please describe this field!',
  4888. 'type' => 'int',
  4889. 'not null' => '',
  4890. ),
  4891. 'name' => array(
  4892. // 'description' => 'TODO: please describe this field!',
  4893. 'type' => 'text',
  4894. 'not null' => '1',
  4895. ),
  4896. 'uri' => array(
  4897. // 'description' => 'TODO: please describe this field!',
  4898. 'type' => 'text',
  4899. 'not null' => '',
  4900. ),
  4901. 'protocoldescription' => array(
  4902. // 'description' => 'TODO: please describe this field!',
  4903. 'type' => 'text',
  4904. 'not null' => '',
  4905. ),
  4906. 'hardwaredescription' => array(
  4907. // 'description' => 'TODO: please describe this field!',
  4908. 'type' => 'text',
  4909. 'not null' => '',
  4910. ),
  4911. 'softwaredescription' => array(
  4912. // 'description' => 'TODO: please describe this field!',
  4913. 'type' => 'text',
  4914. 'not null' => '',
  4915. ),
  4916. ),
  4917. 'primary key' => array(
  4918. '0' => 'protocol_id',
  4919. ),
  4920. 'unique keys' => array(
  4921. 'protocol_c1' => array(
  4922. '0' => 'name',
  4923. ),
  4924. ),
  4925. 'indexes' => array(
  4926. 'protocol_idx1' => array(
  4927. '0' => 'type_id',
  4928. ),
  4929. 'protocol_idx2' => array(
  4930. '0' => 'pub_id',
  4931. ),
  4932. 'protocol_idx3' => array(
  4933. '0' => 'dbxref_id',
  4934. ),
  4935. ),
  4936. 'foreign keys' => array(
  4937. ),
  4938. );
  4939. return $description;
  4940. }
  4941. /**
  4942. * Implements hook_protocolparam_schema()
  4943. * Purpose: To describe the structure of protocolparam to tripal
  4944. * @see tripal_core.api.inc: tripal_core_chado_insert()
  4945. * @see tripal_core.api.inc: tripal_core_chado_update()
  4946. * @see tripal_core.api.inc: tripal_core_chado_select()
  4947. *
  4948. * @return
  4949. * An array describing the current table
  4950. *
  4951. * @ingroup tripal_schema_api
  4952. *
  4953. */
  4954. function tripal_core_chado_protocolparam_schema () {
  4955. $description = array();
  4956. $description = array(
  4957. 'table' => 'protocolparam',
  4958. // 'description' => 'TODO: please describe this table!',
  4959. 'fields' => array(
  4960. 'protocolparam_id' => array(
  4961. // 'description' => 'TODO: please describe this field!',
  4962. 'type' => 'serial',
  4963. 'not null' => '1',
  4964. ),
  4965. 'protocol_id' => array(
  4966. // 'description' => 'TODO: please describe this field!',
  4967. 'type' => 'int',
  4968. 'not null' => '1',
  4969. ),
  4970. 'name' => array(
  4971. // 'description' => 'TODO: please describe this field!',
  4972. 'type' => 'text',
  4973. 'not null' => '1',
  4974. ),
  4975. 'datatype_id' => array(
  4976. // 'description' => 'TODO: please describe this field!',
  4977. 'type' => 'int',
  4978. 'not null' => '',
  4979. ),
  4980. 'unittype_id' => array(
  4981. // 'description' => 'TODO: please describe this field!',
  4982. 'type' => 'int',
  4983. 'not null' => '',
  4984. ),
  4985. 'value' => array(
  4986. // 'description' => 'TODO: please describe this field!',
  4987. 'type' => 'text',
  4988. 'not null' => '',
  4989. ),
  4990. 'rank' => array(
  4991. // 'description' => 'TODO: please describe this field!',
  4992. 'type' => 'int',
  4993. 'not null' => '1',
  4994. 'default' => '0',
  4995. ),
  4996. ),
  4997. 'primary key' => array(
  4998. '0' => 'protocolparam_id',
  4999. ),
  5000. 'unique keys' => array(
  5001. ),
  5002. 'indexes' => array(
  5003. 'protocolparam_idx1' => array(
  5004. '0' => 'protocol_id',
  5005. ),
  5006. 'protocolparam_idx2' => array(
  5007. '0' => 'datatype_id',
  5008. ),
  5009. 'protocolparam_idx3' => array(
  5010. '0' => 'unittype_id',
  5011. ),
  5012. ),
  5013. 'foreign keys' => array(
  5014. ),
  5015. );
  5016. return $description;
  5017. }
  5018. /**
  5019. * Implements hook_pub_schema()
  5020. * Purpose: To describe the structure of pub to tripal
  5021. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5022. * @see tripal_core.api.inc: tripal_core_chado_update()
  5023. * @see tripal_core.api.inc: tripal_core_chado_select()
  5024. *
  5025. * @return
  5026. * An array describing the current table
  5027. *
  5028. * @ingroup tripal_schema_api
  5029. *
  5030. */
  5031. function tripal_core_chado_pub_schema () {
  5032. $description = array();
  5033. $description = array(
  5034. 'table' => 'pub',
  5035. // 'description' => 'TODO: please describe this table!',
  5036. 'fields' => array(
  5037. 'pub_id' => array(
  5038. // 'description' => 'TODO: please describe this field!',
  5039. 'type' => 'serial',
  5040. 'not null' => '1',
  5041. ),
  5042. 'title' => array(
  5043. // 'description' => 'TODO: please describe this field!',
  5044. 'type' => 'text',
  5045. 'not null' => '',
  5046. ),
  5047. 'volumetitle' => array(
  5048. // 'description' => 'TODO: please describe this field!',
  5049. 'type' => 'text',
  5050. 'not null' => '',
  5051. ),
  5052. 'volume' => array(
  5053. // 'description' => 'TODO: please describe this field!',
  5054. 'type' => 'varchar',
  5055. 'length' => '255',
  5056. 'not null' => '',
  5057. ),
  5058. 'series_name' => array(
  5059. // 'description' => 'TODO: please describe this field!',
  5060. 'type' => 'varchar',
  5061. 'length' => '255',
  5062. 'not null' => '',
  5063. ),
  5064. 'issue' => array(
  5065. // 'description' => 'TODO: please describe this field!',
  5066. 'type' => 'varchar',
  5067. 'length' => '255',
  5068. 'not null' => '',
  5069. ),
  5070. 'pyear' => array(
  5071. // 'description' => 'TODO: please describe this field!',
  5072. 'type' => 'varchar',
  5073. 'length' => '255',
  5074. 'not null' => '',
  5075. ),
  5076. 'pages' => array(
  5077. // 'description' => 'TODO: please describe this field!',
  5078. 'type' => 'varchar',
  5079. 'length' => '255',
  5080. 'not null' => '',
  5081. ),
  5082. 'miniref' => array(
  5083. // 'description' => 'TODO: please describe this field!',
  5084. 'type' => 'varchar',
  5085. 'length' => '255',
  5086. 'not null' => '',
  5087. ),
  5088. 'uniquename' => array(
  5089. // 'description' => 'TODO: please describe this field!',
  5090. 'type' => 'text',
  5091. 'not null' => '1',
  5092. ),
  5093. 'type_id' => array(
  5094. // 'description' => 'TODO: please describe this field!',
  5095. 'type' => 'int',
  5096. 'not null' => '1',
  5097. ),
  5098. 'is_obsolete' => array(
  5099. // 'description' => 'TODO: please describe this field!',
  5100. 'type' => 'boolean',
  5101. 'not null' => '',
  5102. 'default' => 'als',
  5103. ),
  5104. 'publisher' => array(
  5105. // 'description' => 'TODO: please describe this field!',
  5106. 'type' => 'varchar',
  5107. 'length' => '255',
  5108. 'not null' => '',
  5109. ),
  5110. 'pubplace' => array(
  5111. // 'description' => 'TODO: please describe this field!',
  5112. 'type' => 'varchar',
  5113. 'length' => '255',
  5114. 'not null' => '',
  5115. ),
  5116. ),
  5117. 'primary key' => array(
  5118. '0' => 'pub_id',
  5119. ),
  5120. 'unique keys' => array(
  5121. 'pub_c1' => array(
  5122. '0' => 'uniquename',
  5123. ),
  5124. ),
  5125. 'indexes' => array(
  5126. 'pub_idx1' => array(
  5127. '0' => 'type_id',
  5128. ),
  5129. ),
  5130. 'foreign keys' => array(
  5131. ),
  5132. );
  5133. return $description;
  5134. }
  5135. /**
  5136. * Implements hook_pub_dbxref_schema()
  5137. * Purpose: To describe the structure of pub_dbxref to tripal
  5138. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5139. * @see tripal_core.api.inc: tripal_core_chado_update()
  5140. * @see tripal_core.api.inc: tripal_core_chado_select()
  5141. *
  5142. * @return
  5143. * An array describing the current table
  5144. *
  5145. * @ingroup tripal_schema_api
  5146. *
  5147. */
  5148. function tripal_core_chado_pub_dbxref_schema () {
  5149. $description = array();
  5150. $description = array(
  5151. 'table' => 'pub_dbxref',
  5152. // 'description' => 'TODO: please describe this table!',
  5153. 'fields' => array(
  5154. 'pub_dbxref_id' => array(
  5155. // 'description' => 'TODO: please describe this field!',
  5156. 'type' => 'serial',
  5157. 'not null' => '1',
  5158. ),
  5159. 'pub_id' => array(
  5160. // 'description' => 'TODO: please describe this field!',
  5161. 'type' => 'int',
  5162. 'not null' => '1',
  5163. ),
  5164. 'dbxref_id' => array(
  5165. // 'description' => 'TODO: please describe this field!',
  5166. 'type' => 'int',
  5167. 'not null' => '1',
  5168. ),
  5169. 'is_current' => array(
  5170. // 'description' => 'TODO: please describe this field!',
  5171. 'type' => 'boolean',
  5172. 'not null' => '1',
  5173. 'default' => 'ru',
  5174. ),
  5175. ),
  5176. 'primary key' => array(
  5177. '0' => 'pub_dbxref_id',
  5178. ),
  5179. 'unique keys' => array(
  5180. 'pub_dbxref_c1' => array(
  5181. '0' => 'pub_id',
  5182. '1' => 'dbxref_id',
  5183. ),
  5184. ),
  5185. 'indexes' => array(
  5186. 'pub_dbxref_idx1' => array(
  5187. '0' => 'pub_id',
  5188. ),
  5189. 'pub_dbxref_idx2' => array(
  5190. '0' => 'dbxref_id',
  5191. ),
  5192. ),
  5193. 'foreign keys' => array(
  5194. ),
  5195. );
  5196. return $description;
  5197. }
  5198. /**
  5199. * Implements hook_quantification_schema()
  5200. * Purpose: To describe the structure of quantification to tripal
  5201. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5202. * @see tripal_core.api.inc: tripal_core_chado_update()
  5203. * @see tripal_core.api.inc: tripal_core_chado_select()
  5204. *
  5205. * @return
  5206. * An array describing the current table
  5207. *
  5208. * @ingroup tripal_schema_api
  5209. *
  5210. */
  5211. function tripal_core_chado_quantification_schema () {
  5212. $description = array();
  5213. $description = array(
  5214. 'table' => 'quantification',
  5215. // 'description' => 'TODO: please describe this table!',
  5216. 'fields' => array(
  5217. 'quantification_id' => array(
  5218. // 'description' => 'TODO: please describe this field!',
  5219. 'type' => 'serial',
  5220. 'not null' => '1',
  5221. ),
  5222. 'acquisition_id' => array(
  5223. // 'description' => 'TODO: please describe this field!',
  5224. 'type' => 'int',
  5225. 'not null' => '1',
  5226. ),
  5227. 'operator_id' => array(
  5228. // 'description' => 'TODO: please describe this field!',
  5229. 'type' => 'int',
  5230. 'not null' => '',
  5231. ),
  5232. 'protocol_id' => array(
  5233. // 'description' => 'TODO: please describe this field!',
  5234. 'type' => 'int',
  5235. 'not null' => '',
  5236. ),
  5237. 'analysis_id' => array(
  5238. // 'description' => 'TODO: please describe this field!',
  5239. 'type' => 'int',
  5240. 'not null' => '1',
  5241. ),
  5242. 'quantificationdate' => array(
  5243. // 'description' => 'TODO: please describe this field!',
  5244. 'type' => 'datetime',
  5245. 'not null' => '',
  5246. 'default' => 'ow(',
  5247. ),
  5248. 'name' => array(
  5249. // 'description' => 'TODO: please describe this field!',
  5250. 'type' => 'text',
  5251. 'not null' => '',
  5252. ),
  5253. 'uri' => array(
  5254. // 'description' => 'TODO: please describe this field!',
  5255. 'type' => 'text',
  5256. 'not null' => '',
  5257. ),
  5258. ),
  5259. 'primary key' => array(
  5260. '0' => 'quantification_id',
  5261. ),
  5262. 'unique keys' => array(
  5263. 'quantification_c1' => array(
  5264. '0' => 'name',
  5265. '1' => 'analysis_id',
  5266. ),
  5267. ),
  5268. 'indexes' => array(
  5269. 'quantification_idx1' => array(
  5270. '0' => 'acquisition_id',
  5271. ),
  5272. 'quantification_idx2' => array(
  5273. '0' => 'operator_id',
  5274. ),
  5275. 'quantification_idx3' => array(
  5276. '0' => 'protocol_id',
  5277. ),
  5278. 'quantification_idx4' => array(
  5279. '0' => 'analysis_id',
  5280. ),
  5281. ),
  5282. 'foreign keys' => array(
  5283. ),
  5284. );
  5285. return $description;
  5286. }
  5287. /**
  5288. * Implements hook_quantification_relationship_schema()
  5289. * Purpose: To describe the structure of quantification_relationship to tripal
  5290. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5291. * @see tripal_core.api.inc: tripal_core_chado_update()
  5292. * @see tripal_core.api.inc: tripal_core_chado_select()
  5293. *
  5294. * @return
  5295. * An array describing the current table
  5296. *
  5297. * @ingroup tripal_schema_api
  5298. *
  5299. */
  5300. function tripal_core_chado_quantification_relationship_schema () {
  5301. $description = array();
  5302. $description = array(
  5303. 'table' => 'quantification_relationship',
  5304. // 'description' => 'TODO: please describe this table!',
  5305. 'fields' => array(
  5306. 'quantification_relationship_id' => array(
  5307. // 'description' => 'TODO: please describe this field!',
  5308. 'type' => 'serial',
  5309. 'not null' => '1',
  5310. ),
  5311. 'subject_id' => array(
  5312. // 'description' => 'TODO: please describe this field!',
  5313. 'type' => 'int',
  5314. 'not null' => '1',
  5315. ),
  5316. 'type_id' => array(
  5317. // 'description' => 'TODO: please describe this field!',
  5318. 'type' => 'int',
  5319. 'not null' => '1',
  5320. ),
  5321. 'object_id' => array(
  5322. // 'description' => 'TODO: please describe this field!',
  5323. 'type' => 'int',
  5324. 'not null' => '1',
  5325. ),
  5326. ),
  5327. 'primary key' => array(
  5328. '0' => 'quantification_relationship_id',
  5329. ),
  5330. 'unique keys' => array(
  5331. 'quantification_relationship_c1' => array(
  5332. '0' => 'subject_id',
  5333. '1' => 'object_id',
  5334. '2' => 'type_id',
  5335. ),
  5336. ),
  5337. 'indexes' => array(
  5338. 'quantification_relationship_idx1' => array(
  5339. '0' => 'subject_id',
  5340. ),
  5341. 'quantification_relationship_idx2' => array(
  5342. '0' => 'type_id',
  5343. ),
  5344. 'quantification_relationship_idx3' => array(
  5345. '0' => 'object_id',
  5346. ),
  5347. ),
  5348. 'foreign keys' => array(
  5349. ),
  5350. );
  5351. return $description;
  5352. }
  5353. /**
  5354. * Implements hook_stock_pub_schema()
  5355. * Purpose: To describe the structure of stock_pub to tripal
  5356. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5357. * @see tripal_core.api.inc: tripal_core_chado_update()
  5358. * @see tripal_core.api.inc: tripal_core_chado_select()
  5359. *
  5360. * @return
  5361. * An array describing the current table
  5362. *
  5363. * @ingroup tripal_schema_api
  5364. *
  5365. */
  5366. function tripal_core_chado_stock_pub_schema () {
  5367. $description = array();
  5368. $description = array(
  5369. 'table' => 'stock_pub',
  5370. // 'description' => 'TODO: please describe this table!',
  5371. 'fields' => array(
  5372. 'stock_pub_id' => array(
  5373. // 'description' => 'TODO: please describe this field!',
  5374. 'type' => 'serial',
  5375. 'not null' => '1',
  5376. ),
  5377. 'stock_id' => array(
  5378. // 'description' => 'TODO: please describe this field!',
  5379. 'type' => 'int',
  5380. 'not null' => '1',
  5381. ),
  5382. 'pub_id' => array(
  5383. // 'description' => 'TODO: please describe this field!',
  5384. 'type' => 'int',
  5385. 'not null' => '1',
  5386. ),
  5387. ),
  5388. 'primary key' => array(
  5389. '0' => 'stock_pub_id',
  5390. ),
  5391. 'unique keys' => array(
  5392. 'stock_pub_c1' => array(
  5393. '0' => 'stock_id',
  5394. '1' => 'pub_id',
  5395. ),
  5396. ),
  5397. 'indexes' => array(
  5398. 'stock_pub_idx1' => array(
  5399. '0' => 'stock_id',
  5400. ),
  5401. 'stock_pub_idx2' => array(
  5402. '0' => 'pub_id',
  5403. ),
  5404. ),
  5405. 'foreign keys' => array(
  5406. ),
  5407. );
  5408. return $description;
  5409. }
  5410. /**
  5411. * Implements hook_stock_relationship_schema()
  5412. * Purpose: To describe the structure of stock_relationship to tripal
  5413. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5414. * @see tripal_core.api.inc: tripal_core_chado_update()
  5415. * @see tripal_core.api.inc: tripal_core_chado_select()
  5416. *
  5417. * @return
  5418. * An array describing the current table
  5419. *
  5420. * @ingroup tripal_schema_api
  5421. *
  5422. */
  5423. function tripal_core_chado_stock_relationship_schema () {
  5424. $description = array();
  5425. $description = array(
  5426. 'table' => 'stock_relationship',
  5427. // 'description' => 'TODO: please describe this table!',
  5428. 'fields' => array(
  5429. 'stock_relationship_id' => array(
  5430. // 'description' => 'TODO: please describe this field!',
  5431. 'type' => 'serial',
  5432. 'not null' => '1',
  5433. ),
  5434. 'subject_id' => array(
  5435. // 'description' => 'TODO: please describe this field!',
  5436. 'type' => 'int',
  5437. 'not null' => '1',
  5438. ),
  5439. 'object_id' => array(
  5440. // 'description' => 'TODO: please describe this field!',
  5441. 'type' => 'int',
  5442. 'not null' => '1',
  5443. ),
  5444. 'type_id' => array(
  5445. // 'description' => 'TODO: please describe this field!',
  5446. 'type' => 'int',
  5447. 'not null' => '1',
  5448. ),
  5449. 'value' => array(
  5450. // 'description' => 'TODO: please describe this field!',
  5451. 'type' => 'text',
  5452. 'not null' => '',
  5453. ),
  5454. 'rank' => array(
  5455. // 'description' => 'TODO: please describe this field!',
  5456. 'type' => 'int',
  5457. 'not null' => '1',
  5458. 'default' => '0',
  5459. ),
  5460. ),
  5461. 'primary key' => array(
  5462. '0' => 'stock_relationship_id',
  5463. ),
  5464. 'unique keys' => array(
  5465. 'stock_relationship_c1' => array(
  5466. '0' => 'subject_id',
  5467. '1' => 'object_id',
  5468. '2' => 'type_id',
  5469. '3' => 'rank',
  5470. ),
  5471. ),
  5472. 'indexes' => array(
  5473. 'stock_relationship_idx1' => array(
  5474. '0' => 'subject_id',
  5475. ),
  5476. 'stock_relationship_idx2' => array(
  5477. '0' => 'object_id',
  5478. ),
  5479. 'stock_relationship_idx3' => array(
  5480. '0' => 'type_id',
  5481. ),
  5482. ),
  5483. 'foreign keys' => array(
  5484. ),
  5485. );
  5486. return $description;
  5487. }
  5488. /**
  5489. * Implements hook_stock_relationship_pub_schema()
  5490. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5491. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5492. * @see tripal_core.api.inc: tripal_core_chado_update()
  5493. * @see tripal_core.api.inc: tripal_core_chado_select()
  5494. *
  5495. * @return
  5496. * An array describing the current table
  5497. *
  5498. * @ingroup tripal_schema_api
  5499. *
  5500. */
  5501. function tripal_core_chado_stock_relationship_pub_schema () {
  5502. $description = array();
  5503. $description = array(
  5504. 'table' => 'stock_relationship_pub',
  5505. // 'description' => 'TODO: please describe this table!',
  5506. 'fields' => array(
  5507. 'stock_relationship_pub_id' => array(
  5508. // 'description' => 'TODO: please describe this field!',
  5509. 'type' => 'serial',
  5510. 'not null' => '1',
  5511. ),
  5512. 'stock_relationship_id' => array(
  5513. // 'description' => 'TODO: please describe this field!',
  5514. 'type' => 'int',
  5515. 'not null' => '1',
  5516. ),
  5517. 'pub_id' => array(
  5518. // 'description' => 'TODO: please describe this field!',
  5519. 'type' => 'int',
  5520. 'not null' => '1',
  5521. ),
  5522. ),
  5523. 'primary key' => array(
  5524. '0' => 'stock_relationship_pub_id',
  5525. ),
  5526. 'unique keys' => array(
  5527. 'stock_relationship_pub_c1' => array(
  5528. '0' => 'stock_relationship_id',
  5529. '1' => 'pub_id',
  5530. ),
  5531. ),
  5532. 'indexes' => array(
  5533. 'stock_relationship_pub_idx1' => array(
  5534. '0' => 'stock_relationship_id',
  5535. ),
  5536. 'stock_relationship_pub_idx2' => array(
  5537. '0' => 'pub_id',
  5538. ),
  5539. ),
  5540. 'foreign keys' => array(
  5541. ),
  5542. );
  5543. return $description;
  5544. }
  5545. /**
  5546. * Implements hook_stockcollection_schema()
  5547. * Purpose: To describe the structure of stockcollection to tripal
  5548. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5549. * @see tripal_core.api.inc: tripal_core_chado_update()
  5550. * @see tripal_core.api.inc: tripal_core_chado_select()
  5551. *
  5552. * @return
  5553. * An array describing the current table
  5554. *
  5555. * @ingroup tripal_schema_api
  5556. *
  5557. */
  5558. function tripal_core_chado_stockcollection_schema () {
  5559. $description = array();
  5560. $description = array(
  5561. 'table' => 'stockcollection',
  5562. // 'description' => 'TODO: please describe this table!',
  5563. 'fields' => array(
  5564. 'stockcollection_id' => array(
  5565. // 'description' => 'TODO: please describe this field!',
  5566. 'type' => 'serial',
  5567. 'not null' => '1',
  5568. ),
  5569. 'type_id' => array(
  5570. // 'description' => 'TODO: please describe this field!',
  5571. 'type' => 'int',
  5572. 'not null' => '1',
  5573. ),
  5574. 'contact_id' => array(
  5575. // 'description' => 'TODO: please describe this field!',
  5576. 'type' => 'int',
  5577. 'not null' => '',
  5578. ),
  5579. 'name' => array(
  5580. // 'description' => 'TODO: please describe this field!',
  5581. 'type' => 'varchar',
  5582. 'length' => '255',
  5583. 'not null' => '',
  5584. ),
  5585. 'uniquename' => array(
  5586. // 'description' => 'TODO: please describe this field!',
  5587. 'type' => 'text',
  5588. 'not null' => '1',
  5589. ),
  5590. ),
  5591. 'primary key' => array(
  5592. '0' => 'stockcollection_id',
  5593. ),
  5594. 'unique keys' => array(
  5595. 'stockcollection_c1' => array(
  5596. '0' => 'uniquename',
  5597. '1' => 'type_id',
  5598. ),
  5599. ),
  5600. 'indexes' => array(
  5601. 'stockcollection_idx1' => array(
  5602. '0' => 'contact_id',
  5603. ),
  5604. 'stockcollection_idx2' => array(
  5605. '0' => 'type_id',
  5606. ),
  5607. 'stockcollection_idx3' => array(
  5608. '0' => 'uniquename',
  5609. ),
  5610. 'stockcollection_name_ind1' => array(
  5611. '0' => 'name',
  5612. ),
  5613. ),
  5614. 'foreign keys' => array(
  5615. ),
  5616. );
  5617. return $description;
  5618. }
  5619. /**
  5620. * Implements hook_stock_genotype_schema()
  5621. * Purpose: To describe the structure of stock_genotype to tripal
  5622. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5623. * @see tripal_core.api.inc: tripal_core_chado_update()
  5624. * @see tripal_core.api.inc: tripal_core_chado_select()
  5625. *
  5626. * @return
  5627. * An array describing the current table
  5628. *
  5629. * @ingroup tripal_schema_api
  5630. *
  5631. */
  5632. function tripal_core_chado_stock_genotype_schema () {
  5633. $description = array();
  5634. $description = array(
  5635. 'table' => 'stock_genotype',
  5636. // 'description' => 'TODO: please describe this table!',
  5637. 'fields' => array(
  5638. 'stock_genotype_id' => array(
  5639. // 'description' => 'TODO: please describe this field!',
  5640. 'type' => 'serial',
  5641. 'not null' => '1',
  5642. ),
  5643. 'stock_id' => array(
  5644. // 'description' => 'TODO: please describe this field!',
  5645. 'type' => 'int',
  5646. 'not null' => '1',
  5647. ),
  5648. 'genotype_id' => array(
  5649. // 'description' => 'TODO: please describe this field!',
  5650. 'type' => 'int',
  5651. 'not null' => '1',
  5652. ),
  5653. ),
  5654. 'primary key' => array(
  5655. '0' => 'stock_genotype_id',
  5656. ),
  5657. 'unique keys' => array(
  5658. 'stock_genotype_c1' => array(
  5659. '0' => 'stock_id',
  5660. '1' => 'genotype_id',
  5661. ),
  5662. ),
  5663. 'indexes' => array(
  5664. 'stock_genotype_idx1' => array(
  5665. '0' => 'stock_id',
  5666. ),
  5667. 'stock_genotype_idx2' => array(
  5668. '0' => 'genotype_id',
  5669. ),
  5670. ),
  5671. 'foreign keys' => array(
  5672. ),
  5673. );
  5674. return $description;
  5675. }
  5676. /**
  5677. * Implements hook_stock_dbxref_schema()
  5678. * Purpose: To describe the structure of stock_dbxref to tripal
  5679. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5680. * @see tripal_core.api.inc: tripal_core_chado_update()
  5681. * @see tripal_core.api.inc: tripal_core_chado_select()
  5682. *
  5683. * @return
  5684. * An array describing the current table
  5685. *
  5686. * @ingroup tripal_schema_api
  5687. *
  5688. */
  5689. function tripal_core_chado_stock_dbxref_schema () {
  5690. $description = array();
  5691. $description = array(
  5692. 'table' => 'stock_dbxref',
  5693. // 'description' => 'TODO: please describe this table!',
  5694. 'fields' => array(
  5695. 'stock_dbxref_id' => array(
  5696. // 'description' => 'TODO: please describe this field!',
  5697. 'type' => 'serial',
  5698. 'not null' => '1',
  5699. ),
  5700. 'stock_id' => array(
  5701. // 'description' => 'TODO: please describe this field!',
  5702. 'type' => 'int',
  5703. 'not null' => '1',
  5704. ),
  5705. 'dbxref_id' => array(
  5706. // 'description' => 'TODO: please describe this field!',
  5707. 'type' => 'int',
  5708. 'not null' => '1',
  5709. ),
  5710. 'is_current' => array(
  5711. // 'description' => 'TODO: please describe this field!',
  5712. 'type' => 'boolean',
  5713. 'not null' => '1',
  5714. 'default' => 'ru',
  5715. ),
  5716. ),
  5717. 'primary key' => array(
  5718. '0' => 'stock_dbxref_id',
  5719. ),
  5720. 'unique keys' => array(
  5721. 'stock_dbxref_c1' => array(
  5722. '0' => 'stock_id',
  5723. '1' => 'dbxref_id',
  5724. ),
  5725. ),
  5726. 'indexes' => array(
  5727. 'stock_dbxref_idx1' => array(
  5728. '0' => 'stock_id',
  5729. ),
  5730. 'stock_dbxref_idx2' => array(
  5731. '0' => 'dbxref_id',
  5732. ),
  5733. ),
  5734. 'foreign keys' => array(
  5735. ),
  5736. );
  5737. return $description;
  5738. }
  5739. /**
  5740. * Implements hook_quantificationprop_schema()
  5741. * Purpose: To describe the structure of quantificationprop to tripal
  5742. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5743. * @see tripal_core.api.inc: tripal_core_chado_update()
  5744. * @see tripal_core.api.inc: tripal_core_chado_select()
  5745. *
  5746. * @return
  5747. * An array describing the current table
  5748. *
  5749. * @ingroup tripal_schema_api
  5750. *
  5751. */
  5752. function tripal_core_chado_quantificationprop_schema () {
  5753. $description = array();
  5754. $description = array(
  5755. 'table' => 'quantificationprop',
  5756. // 'description' => 'TODO: please describe this table!',
  5757. 'fields' => array(
  5758. 'quantificationprop_id' => array(
  5759. // 'description' => 'TODO: please describe this field!',
  5760. 'type' => 'serial',
  5761. 'not null' => '1',
  5762. ),
  5763. 'quantification_id' => array(
  5764. // 'description' => 'TODO: please describe this field!',
  5765. 'type' => 'int',
  5766. 'not null' => '1',
  5767. ),
  5768. 'type_id' => array(
  5769. // 'description' => 'TODO: please describe this field!',
  5770. 'type' => 'int',
  5771. 'not null' => '1',
  5772. ),
  5773. 'value' => array(
  5774. // 'description' => 'TODO: please describe this field!',
  5775. 'type' => 'text',
  5776. 'not null' => '',
  5777. ),
  5778. 'rank' => array(
  5779. // 'description' => 'TODO: please describe this field!',
  5780. 'type' => 'int',
  5781. 'not null' => '1',
  5782. 'default' => '0',
  5783. ),
  5784. ),
  5785. 'primary key' => array(
  5786. '0' => 'quantificationprop_id',
  5787. ),
  5788. 'unique keys' => array(
  5789. 'quantificationprop_c1' => array(
  5790. '0' => 'quantification_id',
  5791. '1' => 'type_id',
  5792. '2' => 'rank',
  5793. ),
  5794. ),
  5795. 'indexes' => array(
  5796. 'quantificationprop_idx1' => array(
  5797. '0' => 'quantification_id',
  5798. ),
  5799. 'quantificationprop_idx2' => array(
  5800. '0' => 'type_id',
  5801. ),
  5802. ),
  5803. 'foreign keys' => array(
  5804. ),
  5805. );
  5806. return $description;
  5807. }
  5808. /**
  5809. * Implements hook_stats_paths_to_root_schema()
  5810. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5811. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5812. * @see tripal_core.api.inc: tripal_core_chado_update()
  5813. * @see tripal_core.api.inc: tripal_core_chado_select()
  5814. *
  5815. * @return
  5816. * An array describing the current table
  5817. *
  5818. * @ingroup tripal_schema_api
  5819. *
  5820. */
  5821. function tripal_core_chado_stats_paths_to_root_schema () {
  5822. $description = array();
  5823. $description = array(
  5824. 'table' => 'stats_paths_to_root',
  5825. // 'description' => 'TODO: please describe this table!',
  5826. 'fields' => array(
  5827. 'cvterm_id' => array(
  5828. // 'description' => 'TODO: please describe this field!',
  5829. 'type' => 'int',
  5830. 'not null' => '',
  5831. ),
  5832. 'total_paths' => array(
  5833. // 'description' => 'TODO: please describe this field!',
  5834. 'type' => 'int',
  5835. 'size' => 'big',
  5836. 'not null' => '',
  5837. ),
  5838. 'avg_distance' => array(
  5839. // 'description' => 'TODO: please describe this field!',
  5840. 'type' => 'numeric',
  5841. 'not null' => '',
  5842. 'precision' => '0',
  5843. 'scale' => '0',
  5844. ),
  5845. 'min_distance' => array(
  5846. // 'description' => 'TODO: please describe this field!',
  5847. 'type' => 'int',
  5848. 'not null' => '',
  5849. ),
  5850. 'max_distance' => array(
  5851. // 'description' => 'TODO: please describe this field!',
  5852. 'type' => 'int',
  5853. 'not null' => '',
  5854. ),
  5855. ),
  5856. 'primary key' => array(
  5857. ),
  5858. 'unique keys' => array(
  5859. ),
  5860. 'indexes' => array(
  5861. ),
  5862. 'foreign keys' => array(
  5863. ),
  5864. );
  5865. return $description;
  5866. }
  5867. /**
  5868. * Implements hook_stock_schema()
  5869. * Purpose: To describe the structure of stock to tripal
  5870. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5871. * @see tripal_core.api.inc: tripal_core_chado_update()
  5872. * @see tripal_core.api.inc: tripal_core_chado_select()
  5873. *
  5874. * @return
  5875. * An array describing the current table
  5876. *
  5877. * @ingroup tripal_schema_api
  5878. *
  5879. */
  5880. function tripal_core_chado_stock_schema () {
  5881. $description = array();
  5882. $description = array(
  5883. 'table' => 'stock',
  5884. // 'description' => 'TODO: please describe this table!',
  5885. 'fields' => array(
  5886. 'stock_id' => array(
  5887. // 'description' => 'TODO: please describe this field!',
  5888. 'type' => 'serial',
  5889. 'not null' => '1',
  5890. ),
  5891. 'dbxref_id' => array(
  5892. // 'description' => 'TODO: please describe this field!',
  5893. 'type' => 'int',
  5894. 'not null' => '',
  5895. ),
  5896. 'organism_id' => array(
  5897. // 'description' => 'TODO: please describe this field!',
  5898. 'type' => 'int',
  5899. 'not null' => '1',
  5900. ),
  5901. 'name' => array(
  5902. // 'description' => 'TODO: please describe this field!',
  5903. 'type' => 'varchar',
  5904. 'length' => '255',
  5905. 'not null' => '',
  5906. ),
  5907. 'uniquename' => array(
  5908. // 'description' => 'TODO: please describe this field!',
  5909. 'type' => 'text',
  5910. 'not null' => '1',
  5911. ),
  5912. 'description' => array(
  5913. // 'description' => 'TODO: please describe this field!',
  5914. 'type' => 'text',
  5915. 'not null' => '',
  5916. ),
  5917. 'type_id' => array(
  5918. // 'description' => 'TODO: please describe this field!',
  5919. 'type' => 'int',
  5920. 'not null' => '1',
  5921. ),
  5922. 'is_obsolete' => array(
  5923. // 'description' => 'TODO: please describe this field!',
  5924. 'type' => 'boolean',
  5925. 'not null' => '1',
  5926. 'default' => 'als',
  5927. ),
  5928. ),
  5929. 'primary key' => array(
  5930. '0' => 'stock_id',
  5931. ),
  5932. 'unique keys' => array(
  5933. 'stock_c1' => array(
  5934. '0' => 'organism_id',
  5935. '1' => 'uniquename',
  5936. '2' => 'type_id',
  5937. ),
  5938. ),
  5939. 'indexes' => array(
  5940. 'stock_idx1' => array(
  5941. '0' => 'dbxref_id',
  5942. ),
  5943. 'stock_idx2' => array(
  5944. '0' => 'organism_id',
  5945. ),
  5946. 'stock_idx3' => array(
  5947. '0' => 'type_id',
  5948. ),
  5949. 'stock_idx4' => array(
  5950. '0' => 'uniquename',
  5951. ),
  5952. 'stock_name_ind1' => array(
  5953. '0' => 'name',
  5954. ),
  5955. ),
  5956. 'foreign keys' => array(
  5957. ),
  5958. );
  5959. return $description;
  5960. }
  5961. /**
  5962. * Implements hook_stock_cvterm_schema()
  5963. * Purpose: To describe the structure of stock_cvterm to tripal
  5964. * @see tripal_core.api.inc: tripal_core_chado_insert()
  5965. * @see tripal_core.api.inc: tripal_core_chado_update()
  5966. * @see tripal_core.api.inc: tripal_core_chado_select()
  5967. *
  5968. * @return
  5969. * An array describing the current table
  5970. *
  5971. * @ingroup tripal_schema_api
  5972. *
  5973. */
  5974. function tripal_core_chado_stock_cvterm_schema () {
  5975. $description = array();
  5976. $description = array(
  5977. 'table' => 'stock_cvterm',
  5978. // 'description' => 'TODO: please describe this table!',
  5979. 'fields' => array(
  5980. 'stock_cvterm_id' => array(
  5981. // 'description' => 'TODO: please describe this field!',
  5982. 'type' => 'serial',
  5983. 'not null' => '1',
  5984. ),
  5985. 'stock_id' => array(
  5986. // 'description' => 'TODO: please describe this field!',
  5987. 'type' => 'int',
  5988. 'not null' => '1',
  5989. ),
  5990. 'cvterm_id' => array(
  5991. // 'description' => 'TODO: please describe this field!',
  5992. 'type' => 'int',
  5993. 'not null' => '1',
  5994. ),
  5995. 'pub_id' => array(
  5996. // 'description' => 'TODO: please describe this field!',
  5997. 'type' => 'int',
  5998. 'not null' => '1',
  5999. ),
  6000. ),
  6001. 'primary key' => array(
  6002. '0' => 'stock_cvterm_id',
  6003. ),
  6004. 'unique keys' => array(
  6005. 'stock_cvterm_c1' => array(
  6006. '0' => 'stock_id',
  6007. '1' => 'cvterm_id',
  6008. '2' => 'pub_id',
  6009. ),
  6010. ),
  6011. 'indexes' => array(
  6012. 'stock_cvterm_idx1' => array(
  6013. '0' => 'stock_id',
  6014. ),
  6015. 'stock_cvterm_idx2' => array(
  6016. '0' => 'cvterm_id',
  6017. ),
  6018. 'stock_cvterm_idx3' => array(
  6019. '0' => 'pub_id',
  6020. ),
  6021. ),
  6022. 'foreign keys' => array(
  6023. ),
  6024. );
  6025. return $description;
  6026. }
  6027. /**
  6028. * Implements hook_feature_synonym_schema()
  6029. * Purpose: To describe the structure of feature_synonym to tripal
  6030. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6031. * @see tripal_core.api.inc: tripal_core_chado_update()
  6032. * @see tripal_core.api.inc: tripal_core_chado_select()
  6033. *
  6034. * @return
  6035. * An array describing the current table
  6036. *
  6037. * @ingroup tripal_schema_api
  6038. *
  6039. */
  6040. function tripal_core_chado_feature_synonym_schema () {
  6041. $description = array();
  6042. $description = array(
  6043. 'table' => 'feature_synonym',
  6044. // 'description' => 'TODO: please describe this table!',
  6045. 'fields' => array(
  6046. 'feature_synonym_id' => array(
  6047. // 'description' => 'TODO: please describe this field!',
  6048. 'type' => 'serial',
  6049. 'not null' => '1',
  6050. ),
  6051. 'synonym_id' => array(
  6052. // 'description' => 'TODO: please describe this field!',
  6053. 'type' => 'int',
  6054. 'not null' => '1',
  6055. ),
  6056. 'feature_id' => array(
  6057. // 'description' => 'TODO: please describe this field!',
  6058. 'type' => 'int',
  6059. 'not null' => '1',
  6060. ),
  6061. 'pub_id' => array(
  6062. // 'description' => 'TODO: please describe this field!',
  6063. 'type' => 'int',
  6064. 'not null' => '1',
  6065. ),
  6066. 'is_current' => array(
  6067. // 'description' => 'TODO: please describe this field!',
  6068. 'type' => 'boolean',
  6069. 'not null' => '1',
  6070. 'default' => 'als',
  6071. ),
  6072. 'is_internal' => array(
  6073. // 'description' => 'TODO: please describe this field!',
  6074. 'type' => 'boolean',
  6075. 'not null' => '1',
  6076. 'default' => 'als',
  6077. ),
  6078. ),
  6079. 'primary key' => array(
  6080. '0' => 'feature_synonym_id',
  6081. ),
  6082. 'unique keys' => array(
  6083. 'feature_synonym_c1' => array(
  6084. '0' => 'synonym_id',
  6085. '1' => 'feature_id',
  6086. '2' => 'pub_id',
  6087. ),
  6088. ),
  6089. 'indexes' => array(
  6090. 'feature_synonym_idx1' => array(
  6091. '0' => 'synonym_id',
  6092. ),
  6093. 'feature_synonym_idx2' => array(
  6094. '0' => 'feature_id',
  6095. ),
  6096. 'feature_synonym_idx3' => array(
  6097. '0' => 'pub_id',
  6098. ),
  6099. ),
  6100. 'foreign keys' => array(
  6101. ),
  6102. );
  6103. return $description;
  6104. }
  6105. /**
  6106. * Implements hook_feature_relationshipprop_pub_schema()
  6107. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6108. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6109. * @see tripal_core.api.inc: tripal_core_chado_update()
  6110. * @see tripal_core.api.inc: tripal_core_chado_select()
  6111. *
  6112. * @return
  6113. * An array describing the current table
  6114. *
  6115. * @ingroup tripal_schema_api
  6116. *
  6117. */
  6118. function tripal_core_chado_feature_relationshipprop_pub_schema () {
  6119. $description = array();
  6120. $description = array(
  6121. 'table' => 'feature_relationshipprop_pub',
  6122. // 'description' => 'TODO: please describe this table!',
  6123. 'fields' => array(
  6124. 'feature_relationshipprop_pub_id' => array(
  6125. // 'description' => 'TODO: please describe this field!',
  6126. 'type' => 'serial',
  6127. 'not null' => '1',
  6128. ),
  6129. 'feature_relationshipprop_id' => array(
  6130. // 'description' => 'TODO: please describe this field!',
  6131. 'type' => 'int',
  6132. 'not null' => '1',
  6133. ),
  6134. 'pub_id' => array(
  6135. // 'description' => 'TODO: please describe this field!',
  6136. 'type' => 'int',
  6137. 'not null' => '1',
  6138. ),
  6139. ),
  6140. 'primary key' => array(
  6141. '0' => 'feature_relationshipprop_pub_id',
  6142. ),
  6143. 'unique keys' => array(
  6144. 'feature_relationshipprop_pub_c1' => array(
  6145. '0' => 'feature_relationshipprop_id',
  6146. '1' => 'pub_id',
  6147. ),
  6148. ),
  6149. 'indexes' => array(
  6150. 'feature_relationshipprop_pub_idx1' => array(
  6151. '0' => 'feature_relationshipprop_id',
  6152. ),
  6153. 'feature_relationshipprop_pub_idx2' => array(
  6154. '0' => 'pub_id',
  6155. ),
  6156. ),
  6157. 'foreign keys' => array(
  6158. ),
  6159. );
  6160. return $description;
  6161. }
  6162. /**
  6163. * Implements hook_cell_line_relationship_schema()
  6164. * Purpose: To describe the structure of cell_line_relationship to tripal
  6165. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6166. * @see tripal_core.api.inc: tripal_core_chado_update()
  6167. * @see tripal_core.api.inc: tripal_core_chado_select()
  6168. *
  6169. * @return
  6170. * An array describing the current table
  6171. *
  6172. * @ingroup tripal_schema_api
  6173. *
  6174. */
  6175. function tripal_core_chado_cell_line_relationship_schema () {
  6176. $description = array();
  6177. $description = array(
  6178. 'table' => 'cell_line_relationship',
  6179. // 'description' => 'TODO: please describe this table!',
  6180. 'fields' => array(
  6181. 'cell_line_relationship_id' => array(
  6182. // 'description' => 'TODO: please describe this field!',
  6183. 'type' => 'serial',
  6184. 'not null' => '1',
  6185. ),
  6186. 'subject_id' => array(
  6187. // 'description' => 'TODO: please describe this field!',
  6188. 'type' => 'int',
  6189. 'not null' => '1',
  6190. ),
  6191. 'object_id' => array(
  6192. // 'description' => 'TODO: please describe this field!',
  6193. 'type' => 'int',
  6194. 'not null' => '1',
  6195. ),
  6196. 'type_id' => array(
  6197. // 'description' => 'TODO: please describe this field!',
  6198. 'type' => 'int',
  6199. 'not null' => '1',
  6200. ),
  6201. ),
  6202. 'primary key' => array(
  6203. '0' => 'cell_line_relationship_id',
  6204. ),
  6205. 'unique keys' => array(
  6206. 'cell_line_relationship_c1' => array(
  6207. '0' => 'subject_id',
  6208. '1' => 'object_id',
  6209. '2' => 'type_id',
  6210. ),
  6211. ),
  6212. 'indexes' => array(
  6213. ),
  6214. 'foreign keys' => array(
  6215. ),
  6216. );
  6217. return $description;
  6218. }
  6219. /**
  6220. * Implements hook_cell_line_pub_schema()
  6221. * Purpose: To describe the structure of cell_line_pub to tripal
  6222. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6223. * @see tripal_core.api.inc: tripal_core_chado_update()
  6224. * @see tripal_core.api.inc: tripal_core_chado_select()
  6225. *
  6226. * @return
  6227. * An array describing the current table
  6228. *
  6229. * @ingroup tripal_schema_api
  6230. *
  6231. */
  6232. function tripal_core_chado_cell_line_pub_schema () {
  6233. $description = array();
  6234. $description = array(
  6235. 'table' => 'cell_line_pub',
  6236. // 'description' => 'TODO: please describe this table!',
  6237. 'fields' => array(
  6238. 'cell_line_pub_id' => array(
  6239. // 'description' => 'TODO: please describe this field!',
  6240. 'type' => 'serial',
  6241. 'not null' => '1',
  6242. ),
  6243. 'cell_line_id' => array(
  6244. // 'description' => 'TODO: please describe this field!',
  6245. 'type' => 'int',
  6246. 'not null' => '1',
  6247. ),
  6248. 'pub_id' => array(
  6249. // 'description' => 'TODO: please describe this field!',
  6250. 'type' => 'int',
  6251. 'not null' => '1',
  6252. ),
  6253. ),
  6254. 'primary key' => array(
  6255. '0' => 'cell_line_pub_id',
  6256. ),
  6257. 'unique keys' => array(
  6258. 'cell_line_pub_c1' => array(
  6259. '0' => 'cell_line_id',
  6260. '1' => 'pub_id',
  6261. ),
  6262. ),
  6263. 'indexes' => array(
  6264. ),
  6265. 'foreign keys' => array(
  6266. ),
  6267. );
  6268. return $description;
  6269. }
  6270. /**
  6271. * Implements hook_cell_line_synonym_schema()
  6272. * Purpose: To describe the structure of cell_line_synonym to tripal
  6273. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6274. * @see tripal_core.api.inc: tripal_core_chado_update()
  6275. * @see tripal_core.api.inc: tripal_core_chado_select()
  6276. *
  6277. * @return
  6278. * An array describing the current table
  6279. *
  6280. * @ingroup tripal_schema_api
  6281. *
  6282. */
  6283. function tripal_core_chado_cell_line_synonym_schema () {
  6284. $description = array();
  6285. $description = array(
  6286. 'table' => 'cell_line_synonym',
  6287. // 'description' => 'TODO: please describe this table!',
  6288. 'fields' => array(
  6289. 'cell_line_synonym_id' => array(
  6290. // 'description' => 'TODO: please describe this field!',
  6291. 'type' => 'serial',
  6292. 'not null' => '1',
  6293. ),
  6294. 'cell_line_id' => array(
  6295. // 'description' => 'TODO: please describe this field!',
  6296. 'type' => 'int',
  6297. 'not null' => '1',
  6298. ),
  6299. 'synonym_id' => array(
  6300. // 'description' => 'TODO: please describe this field!',
  6301. 'type' => 'int',
  6302. 'not null' => '1',
  6303. ),
  6304. 'pub_id' => array(
  6305. // 'description' => 'TODO: please describe this field!',
  6306. 'type' => 'int',
  6307. 'not null' => '1',
  6308. ),
  6309. 'is_current' => array(
  6310. // 'description' => 'TODO: please describe this field!',
  6311. 'type' => 'boolean',
  6312. 'not null' => '1',
  6313. 'default' => 'als',
  6314. ),
  6315. 'is_internal' => array(
  6316. // 'description' => 'TODO: please describe this field!',
  6317. 'type' => 'boolean',
  6318. 'not null' => '1',
  6319. 'default' => 'als',
  6320. ),
  6321. ),
  6322. 'primary key' => array(
  6323. '0' => 'cell_line_synonym_id',
  6324. ),
  6325. 'unique keys' => array(
  6326. 'cell_line_synonym_c1' => array(
  6327. '0' => 'synonym_id',
  6328. '1' => 'cell_line_id',
  6329. '2' => 'pub_id',
  6330. ),
  6331. ),
  6332. 'indexes' => array(
  6333. ),
  6334. 'foreign keys' => array(
  6335. ),
  6336. );
  6337. return $description;
  6338. }
  6339. /**
  6340. * Implements hook_cell_lineprop_schema()
  6341. * Purpose: To describe the structure of cell_lineprop to tripal
  6342. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6343. * @see tripal_core.api.inc: tripal_core_chado_update()
  6344. * @see tripal_core.api.inc: tripal_core_chado_select()
  6345. *
  6346. * @return
  6347. * An array describing the current table
  6348. *
  6349. * @ingroup tripal_schema_api
  6350. *
  6351. */
  6352. function tripal_core_chado_cell_lineprop_schema () {
  6353. $description = array();
  6354. $description = array(
  6355. 'table' => 'cell_lineprop',
  6356. // 'description' => 'TODO: please describe this table!',
  6357. 'fields' => array(
  6358. 'cell_lineprop_id' => array(
  6359. // 'description' => 'TODO: please describe this field!',
  6360. 'type' => 'serial',
  6361. 'not null' => '1',
  6362. ),
  6363. 'cell_line_id' => array(
  6364. // 'description' => 'TODO: please describe this field!',
  6365. 'type' => 'int',
  6366. 'not null' => '1',
  6367. ),
  6368. 'type_id' => array(
  6369. // 'description' => 'TODO: please describe this field!',
  6370. 'type' => 'int',
  6371. 'not null' => '1',
  6372. ),
  6373. 'value' => array(
  6374. // 'description' => 'TODO: please describe this field!',
  6375. 'type' => 'text',
  6376. 'not null' => '',
  6377. ),
  6378. 'rank' => array(
  6379. // 'description' => 'TODO: please describe this field!',
  6380. 'type' => 'int',
  6381. 'not null' => '1',
  6382. 'default' => '0',
  6383. ),
  6384. ),
  6385. 'primary key' => array(
  6386. '0' => 'cell_lineprop_id',
  6387. ),
  6388. 'unique keys' => array(
  6389. 'cell_lineprop_c1' => array(
  6390. '0' => 'cell_line_id',
  6391. '1' => 'type_id',
  6392. '2' => 'rank',
  6393. ),
  6394. ),
  6395. 'indexes' => array(
  6396. ),
  6397. 'foreign keys' => array(
  6398. ),
  6399. );
  6400. return $description;
  6401. }
  6402. /**
  6403. * Implements hook_cell_lineprop_pub_schema()
  6404. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6405. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6406. * @see tripal_core.api.inc: tripal_core_chado_update()
  6407. * @see tripal_core.api.inc: tripal_core_chado_select()
  6408. *
  6409. * @return
  6410. * An array describing the current table
  6411. *
  6412. * @ingroup tripal_schema_api
  6413. *
  6414. */
  6415. function tripal_core_chado_cell_lineprop_pub_schema () {
  6416. $description = array();
  6417. $description = array(
  6418. 'table' => 'cell_lineprop_pub',
  6419. // 'description' => 'TODO: please describe this table!',
  6420. 'fields' => array(
  6421. 'cell_lineprop_pub_id' => array(
  6422. // 'description' => 'TODO: please describe this field!',
  6423. 'type' => 'serial',
  6424. 'not null' => '1',
  6425. ),
  6426. 'cell_lineprop_id' => array(
  6427. // 'description' => 'TODO: please describe this field!',
  6428. 'type' => 'int',
  6429. 'not null' => '1',
  6430. ),
  6431. 'pub_id' => array(
  6432. // 'description' => 'TODO: please describe this field!',
  6433. 'type' => 'int',
  6434. 'not null' => '1',
  6435. ),
  6436. ),
  6437. 'primary key' => array(
  6438. '0' => 'cell_lineprop_pub_id',
  6439. ),
  6440. 'unique keys' => array(
  6441. 'cell_lineprop_pub_c1' => array(
  6442. '0' => 'cell_lineprop_id',
  6443. '1' => 'pub_id',
  6444. ),
  6445. ),
  6446. 'indexes' => array(
  6447. ),
  6448. 'foreign keys' => array(
  6449. ),
  6450. );
  6451. return $description;
  6452. }
  6453. /**
  6454. * Implements hook_cell_line_library_schema()
  6455. * Purpose: To describe the structure of cell_line_library to tripal
  6456. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6457. * @see tripal_core.api.inc: tripal_core_chado_update()
  6458. * @see tripal_core.api.inc: tripal_core_chado_select()
  6459. *
  6460. * @return
  6461. * An array describing the current table
  6462. *
  6463. * @ingroup tripal_schema_api
  6464. *
  6465. */
  6466. function tripal_core_chado_cell_line_library_schema () {
  6467. $description = array();
  6468. $description = array(
  6469. 'table' => 'cell_line_library',
  6470. // 'description' => 'TODO: please describe this table!',
  6471. 'fields' => array(
  6472. 'cell_line_library_id' => array(
  6473. // 'description' => 'TODO: please describe this field!',
  6474. 'type' => 'serial',
  6475. 'not null' => '1',
  6476. ),
  6477. 'cell_line_id' => array(
  6478. // 'description' => 'TODO: please describe this field!',
  6479. 'type' => 'int',
  6480. 'not null' => '1',
  6481. ),
  6482. 'library_id' => array(
  6483. // 'description' => 'TODO: please describe this field!',
  6484. 'type' => 'int',
  6485. 'not null' => '1',
  6486. ),
  6487. 'pub_id' => array(
  6488. // 'description' => 'TODO: please describe this field!',
  6489. 'type' => 'int',
  6490. 'not null' => '1',
  6491. ),
  6492. ),
  6493. 'primary key' => array(
  6494. '0' => 'cell_line_library_id',
  6495. ),
  6496. 'unique keys' => array(
  6497. 'cell_line_library_c1' => array(
  6498. '0' => 'cell_line_id',
  6499. '1' => 'library_id',
  6500. '2' => 'pub_id',
  6501. ),
  6502. ),
  6503. 'indexes' => array(
  6504. ),
  6505. 'foreign keys' => array(
  6506. ),
  6507. );
  6508. return $description;
  6509. }
  6510. /**
  6511. * Implements hook_cell_line_feature_schema()
  6512. * Purpose: To describe the structure of cell_line_feature to tripal
  6513. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6514. * @see tripal_core.api.inc: tripal_core_chado_update()
  6515. * @see tripal_core.api.inc: tripal_core_chado_select()
  6516. *
  6517. * @return
  6518. * An array describing the current table
  6519. *
  6520. * @ingroup tripal_schema_api
  6521. *
  6522. */
  6523. function tripal_core_chado_cell_line_feature_schema () {
  6524. $description = array();
  6525. $description = array(
  6526. 'table' => 'cell_line_feature',
  6527. // 'description' => 'TODO: please describe this table!',
  6528. 'fields' => array(
  6529. 'cell_line_feature_id' => array(
  6530. // 'description' => 'TODO: please describe this field!',
  6531. 'type' => 'serial',
  6532. 'not null' => '1',
  6533. ),
  6534. 'cell_line_id' => array(
  6535. // 'description' => 'TODO: please describe this field!',
  6536. 'type' => 'int',
  6537. 'not null' => '1',
  6538. ),
  6539. 'feature_id' => array(
  6540. // 'description' => 'TODO: please describe this field!',
  6541. 'type' => 'int',
  6542. 'not null' => '1',
  6543. ),
  6544. 'pub_id' => array(
  6545. // 'description' => 'TODO: please describe this field!',
  6546. 'type' => 'int',
  6547. 'not null' => '1',
  6548. ),
  6549. ),
  6550. 'primary key' => array(
  6551. '0' => 'cell_line_feature_id',
  6552. ),
  6553. 'unique keys' => array(
  6554. 'cell_line_feature_c1' => array(
  6555. '0' => 'cell_line_id',
  6556. '1' => 'feature_id',
  6557. '2' => 'pub_id',
  6558. ),
  6559. ),
  6560. 'indexes' => array(
  6561. ),
  6562. 'foreign keys' => array(
  6563. ),
  6564. );
  6565. return $description;
  6566. }
  6567. /**
  6568. * Implements hook_cell_line_schema()
  6569. * Purpose: To describe the structure of cell_line to tripal
  6570. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6571. * @see tripal_core.api.inc: tripal_core_chado_update()
  6572. * @see tripal_core.api.inc: tripal_core_chado_select()
  6573. *
  6574. * @return
  6575. * An array describing the current table
  6576. *
  6577. * @ingroup tripal_schema_api
  6578. *
  6579. */
  6580. function tripal_core_chado_cell_line_schema () {
  6581. $description = array();
  6582. $description = array(
  6583. 'table' => 'cell_line',
  6584. // 'description' => 'TODO: please describe this table!',
  6585. 'fields' => array(
  6586. 'cell_line_id' => array(
  6587. // 'description' => 'TODO: please describe this field!',
  6588. 'type' => 'serial',
  6589. 'not null' => '1',
  6590. ),
  6591. 'name' => array(
  6592. // 'description' => 'TODO: please describe this field!',
  6593. 'type' => 'varchar',
  6594. 'length' => '255',
  6595. 'not null' => '',
  6596. ),
  6597. 'uniquename' => array(
  6598. // 'description' => 'TODO: please describe this field!',
  6599. 'type' => 'varchar',
  6600. 'length' => '255',
  6601. 'not null' => '1',
  6602. ),
  6603. 'organism_id' => array(
  6604. // 'description' => 'TODO: please describe this field!',
  6605. 'type' => 'int',
  6606. 'not null' => '1',
  6607. ),
  6608. 'timeaccessioned' => array(
  6609. // 'description' => 'TODO: please describe this field!',
  6610. 'type' => 'datetime',
  6611. 'not null' => '1',
  6612. 'default' => 'ow(',
  6613. ),
  6614. 'timelastmodified' => array(
  6615. // 'description' => 'TODO: please describe this field!',
  6616. 'type' => 'datetime',
  6617. 'not null' => '1',
  6618. 'default' => 'ow(',
  6619. ),
  6620. ),
  6621. 'primary key' => array(
  6622. '0' => 'cell_line_id',
  6623. ),
  6624. 'unique keys' => array(
  6625. 'cell_line_c1' => array(
  6626. '0' => 'uniquename',
  6627. '1' => 'organism_id',
  6628. ),
  6629. ),
  6630. 'indexes' => array(
  6631. ),
  6632. 'foreign keys' => array(
  6633. ),
  6634. );
  6635. return $description;
  6636. }
  6637. /**
  6638. * Implements hook_cell_line_cvterm_schema()
  6639. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6640. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6641. * @see tripal_core.api.inc: tripal_core_chado_update()
  6642. * @see tripal_core.api.inc: tripal_core_chado_select()
  6643. *
  6644. * @return
  6645. * An array describing the current table
  6646. *
  6647. * @ingroup tripal_schema_api
  6648. *
  6649. */
  6650. function tripal_core_chado_cell_line_cvterm_schema () {
  6651. $description = array();
  6652. $description = array(
  6653. 'table' => 'cell_line_cvterm',
  6654. // 'description' => 'TODO: please describe this table!',
  6655. 'fields' => array(
  6656. 'cell_line_cvterm_id' => array(
  6657. // 'description' => 'TODO: please describe this field!',
  6658. 'type' => 'serial',
  6659. 'not null' => '1',
  6660. ),
  6661. 'cell_line_id' => array(
  6662. // 'description' => 'TODO: please describe this field!',
  6663. 'type' => 'int',
  6664. 'not null' => '1',
  6665. ),
  6666. 'cvterm_id' => array(
  6667. // 'description' => 'TODO: please describe this field!',
  6668. 'type' => 'int',
  6669. 'not null' => '1',
  6670. ),
  6671. 'pub_id' => array(
  6672. // 'description' => 'TODO: please describe this field!',
  6673. 'type' => 'int',
  6674. 'not null' => '1',
  6675. ),
  6676. 'rank' => array(
  6677. // 'description' => 'TODO: please describe this field!',
  6678. 'type' => 'int',
  6679. 'not null' => '1',
  6680. 'default' => '0',
  6681. ),
  6682. ),
  6683. 'primary key' => array(
  6684. '0' => 'cell_line_cvterm_id',
  6685. ),
  6686. 'unique keys' => array(
  6687. 'cell_line_cvterm_c1' => array(
  6688. '0' => 'cell_line_id',
  6689. '1' => 'cvterm_id',
  6690. '2' => 'pub_id',
  6691. '3' => 'rank',
  6692. ),
  6693. ),
  6694. 'indexes' => array(
  6695. ),
  6696. 'foreign keys' => array(
  6697. ),
  6698. );
  6699. return $description;
  6700. }
  6701. /**
  6702. * Implements hook_cell_line_cvtermprop_schema()
  6703. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6704. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6705. * @see tripal_core.api.inc: tripal_core_chado_update()
  6706. * @see tripal_core.api.inc: tripal_core_chado_select()
  6707. *
  6708. * @return
  6709. * An array describing the current table
  6710. *
  6711. * @ingroup tripal_schema_api
  6712. *
  6713. */
  6714. function tripal_core_chado_cell_line_cvtermprop_schema () {
  6715. $description = array();
  6716. $description = array(
  6717. 'table' => 'cell_line_cvtermprop',
  6718. // 'description' => 'TODO: please describe this table!',
  6719. 'fields' => array(
  6720. 'cell_line_cvtermprop_id' => array(
  6721. // 'description' => 'TODO: please describe this field!',
  6722. 'type' => 'serial',
  6723. 'not null' => '1',
  6724. ),
  6725. 'cell_line_cvterm_id' => array(
  6726. // 'description' => 'TODO: please describe this field!',
  6727. 'type' => 'int',
  6728. 'not null' => '1',
  6729. ),
  6730. 'type_id' => array(
  6731. // 'description' => 'TODO: please describe this field!',
  6732. 'type' => 'int',
  6733. 'not null' => '1',
  6734. ),
  6735. 'value' => array(
  6736. // 'description' => 'TODO: please describe this field!',
  6737. 'type' => 'text',
  6738. 'not null' => '',
  6739. ),
  6740. 'rank' => array(
  6741. // 'description' => 'TODO: please describe this field!',
  6742. 'type' => 'int',
  6743. 'not null' => '1',
  6744. 'default' => '0',
  6745. ),
  6746. ),
  6747. 'primary key' => array(
  6748. '0' => 'cell_line_cvtermprop_id',
  6749. ),
  6750. 'unique keys' => array(
  6751. 'cell_line_cvtermprop_c1' => array(
  6752. '0' => 'cell_line_cvterm_id',
  6753. '1' => 'type_id',
  6754. '2' => 'rank',
  6755. ),
  6756. ),
  6757. 'indexes' => array(
  6758. ),
  6759. 'foreign keys' => array(
  6760. ),
  6761. );
  6762. return $description;
  6763. }
  6764. /**
  6765. * Implements hook_cell_line_dbxref_schema()
  6766. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6767. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6768. * @see tripal_core.api.inc: tripal_core_chado_update()
  6769. * @see tripal_core.api.inc: tripal_core_chado_select()
  6770. *
  6771. * @return
  6772. * An array describing the current table
  6773. *
  6774. * @ingroup tripal_schema_api
  6775. *
  6776. */
  6777. function tripal_core_chado_cell_line_dbxref_schema () {
  6778. $description = array();
  6779. $description = array(
  6780. 'table' => 'cell_line_dbxref',
  6781. // 'description' => 'TODO: please describe this table!',
  6782. 'fields' => array(
  6783. 'cell_line_dbxref_id' => array(
  6784. // 'description' => 'TODO: please describe this field!',
  6785. 'type' => 'serial',
  6786. 'not null' => '1',
  6787. ),
  6788. 'cell_line_id' => array(
  6789. // 'description' => 'TODO: please describe this field!',
  6790. 'type' => 'int',
  6791. 'not null' => '1',
  6792. ),
  6793. 'dbxref_id' => array(
  6794. // 'description' => 'TODO: please describe this field!',
  6795. 'type' => 'int',
  6796. 'not null' => '1',
  6797. ),
  6798. 'is_current' => array(
  6799. // 'description' => 'TODO: please describe this field!',
  6800. 'type' => 'boolean',
  6801. 'not null' => '1',
  6802. 'default' => 'ru',
  6803. ),
  6804. ),
  6805. 'primary key' => array(
  6806. '0' => 'cell_line_dbxref_id',
  6807. ),
  6808. 'unique keys' => array(
  6809. 'cell_line_dbxref_c1' => array(
  6810. '0' => 'cell_line_id',
  6811. '1' => 'dbxref_id',
  6812. ),
  6813. ),
  6814. 'indexes' => array(
  6815. ),
  6816. 'foreign keys' => array(
  6817. ),
  6818. );
  6819. return $description;
  6820. }
  6821. /**
  6822. * Implements hook_channel_schema()
  6823. * Purpose: To describe the structure of channel to tripal
  6824. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6825. * @see tripal_core.api.inc: tripal_core_chado_update()
  6826. * @see tripal_core.api.inc: tripal_core_chado_select()
  6827. *
  6828. * @return
  6829. * An array describing the current table
  6830. *
  6831. * @ingroup tripal_schema_api
  6832. *
  6833. */
  6834. function tripal_core_chado_channel_schema () {
  6835. $description = array();
  6836. $description = array(
  6837. 'table' => 'channel',
  6838. // 'description' => 'TODO: please describe this table!',
  6839. 'fields' => array(
  6840. 'channel_id' => array(
  6841. // 'description' => 'TODO: please describe this field!',
  6842. 'type' => 'serial',
  6843. 'not null' => '1',
  6844. ),
  6845. 'name' => array(
  6846. // 'description' => 'TODO: please describe this field!',
  6847. 'type' => 'text',
  6848. 'not null' => '1',
  6849. ),
  6850. 'definition' => array(
  6851. // 'description' => 'TODO: please describe this field!',
  6852. 'type' => 'text',
  6853. 'not null' => '1',
  6854. ),
  6855. ),
  6856. 'primary key' => array(
  6857. '0' => 'channel_id',
  6858. ),
  6859. 'unique keys' => array(
  6860. 'channel_c1' => array(
  6861. '0' => 'name',
  6862. ),
  6863. ),
  6864. 'indexes' => array(
  6865. ),
  6866. 'foreign keys' => array(
  6867. ),
  6868. );
  6869. return $description;
  6870. }
  6871. /**
  6872. * Implements hook_common_ancestor_cvterm_schema()
  6873. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6874. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6875. * @see tripal_core.api.inc: tripal_core_chado_update()
  6876. * @see tripal_core.api.inc: tripal_core_chado_select()
  6877. *
  6878. * @return
  6879. * An array describing the current table
  6880. *
  6881. * @ingroup tripal_schema_api
  6882. *
  6883. */
  6884. function tripal_core_chado_common_ancestor_cvterm_schema () {
  6885. $description = array();
  6886. $description = array(
  6887. 'table' => 'common_ancestor_cvterm',
  6888. // 'description' => 'TODO: please describe this table!',
  6889. 'fields' => array(
  6890. 'cvterm1_id' => array(
  6891. // 'description' => 'TODO: please describe this field!',
  6892. 'type' => 'int',
  6893. 'not null' => '',
  6894. ),
  6895. 'cvterm2_id' => array(
  6896. // 'description' => 'TODO: please describe this field!',
  6897. 'type' => 'int',
  6898. 'not null' => '',
  6899. ),
  6900. 'ancestor_cvterm_id' => array(
  6901. // 'description' => 'TODO: please describe this field!',
  6902. 'type' => 'int',
  6903. 'not null' => '',
  6904. ),
  6905. 'pathdistance1' => array(
  6906. // 'description' => 'TODO: please describe this field!',
  6907. 'type' => 'int',
  6908. 'not null' => '',
  6909. ),
  6910. 'pathdistance2' => array(
  6911. // 'description' => 'TODO: please describe this field!',
  6912. 'type' => 'int',
  6913. 'not null' => '',
  6914. ),
  6915. 'total_pathdistance' => array(
  6916. // 'description' => 'TODO: please describe this field!',
  6917. 'type' => 'int',
  6918. 'not null' => '',
  6919. ),
  6920. ),
  6921. 'primary key' => array(
  6922. ),
  6923. 'unique keys' => array(
  6924. ),
  6925. 'indexes' => array(
  6926. ),
  6927. 'foreign keys' => array(
  6928. ),
  6929. );
  6930. return $description;
  6931. }
  6932. /**
  6933. * Implements hook_cv_cvterm_count_with_obs_schema()
  6934. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  6935. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6936. * @see tripal_core.api.inc: tripal_core_chado_update()
  6937. * @see tripal_core.api.inc: tripal_core_chado_select()
  6938. *
  6939. * @return
  6940. * An array describing the current table
  6941. *
  6942. * @ingroup tripal_schema_api
  6943. *
  6944. */
  6945. function tripal_core_chado_cv_cvterm_count_with_obs_schema () {
  6946. $description = array();
  6947. $description = array(
  6948. 'table' => 'cv_cvterm_count_with_obs',
  6949. // 'description' => 'TODO: please describe this table!',
  6950. 'fields' => array(
  6951. 'name' => array(
  6952. // 'description' => 'TODO: please describe this field!',
  6953. 'type' => 'varchar',
  6954. 'length' => '255',
  6955. 'not null' => '',
  6956. ),
  6957. 'num_terms_incl_obs' => array(
  6958. // 'description' => 'TODO: please describe this field!',
  6959. 'type' => 'int',
  6960. 'size' => 'big',
  6961. 'not null' => '',
  6962. ),
  6963. ),
  6964. 'primary key' => array(
  6965. ),
  6966. 'unique keys' => array(
  6967. ),
  6968. 'indexes' => array(
  6969. ),
  6970. 'foreign keys' => array(
  6971. ),
  6972. );
  6973. return $description;
  6974. }
  6975. /**
  6976. * Implements hook_cv_leaf_schema()
  6977. * Purpose: To describe the structure of cv_leaf to tripal
  6978. * @see tripal_core.api.inc: tripal_core_chado_insert()
  6979. * @see tripal_core.api.inc: tripal_core_chado_update()
  6980. * @see tripal_core.api.inc: tripal_core_chado_select()
  6981. *
  6982. * @return
  6983. * An array describing the current table
  6984. *
  6985. * @ingroup tripal_schema_api
  6986. *
  6987. */
  6988. function tripal_core_chado_cv_leaf_schema () {
  6989. $description = array();
  6990. $description = array(
  6991. 'table' => 'cv_leaf',
  6992. // 'description' => 'TODO: please describe this table!',
  6993. 'fields' => array(
  6994. 'cv_id' => array(
  6995. // 'description' => 'TODO: please describe this field!',
  6996. 'type' => 'int',
  6997. 'not null' => '',
  6998. ),
  6999. 'cvterm_id' => array(
  7000. // 'description' => 'TODO: please describe this field!',
  7001. 'type' => 'int',
  7002. 'not null' => '',
  7003. ),
  7004. ),
  7005. 'primary key' => array(
  7006. ),
  7007. 'unique keys' => array(
  7008. ),
  7009. 'indexes' => array(
  7010. ),
  7011. 'foreign keys' => array(
  7012. ),
  7013. );
  7014. return $description;
  7015. }
  7016. /**
  7017. * Implements hook_cv_link_count_schema()
  7018. * Purpose: To describe the structure of cv_link_count to tripal
  7019. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7020. * @see tripal_core.api.inc: tripal_core_chado_update()
  7021. * @see tripal_core.api.inc: tripal_core_chado_select()
  7022. *
  7023. * @return
  7024. * An array describing the current table
  7025. *
  7026. * @ingroup tripal_schema_api
  7027. *
  7028. */
  7029. function tripal_core_chado_cv_link_count_schema () {
  7030. $description = array();
  7031. $description = array(
  7032. 'table' => 'cv_link_count',
  7033. // 'description' => 'TODO: please describe this table!',
  7034. 'fields' => array(
  7035. 'cv_name' => array(
  7036. // 'description' => 'TODO: please describe this field!',
  7037. 'type' => 'varchar',
  7038. 'length' => '255',
  7039. 'not null' => '',
  7040. ),
  7041. 'relation_name' => array(
  7042. // 'description' => 'TODO: please describe this field!',
  7043. 'type' => 'varchar',
  7044. 'length' => '1024',
  7045. 'not null' => '',
  7046. ),
  7047. 'relation_cv_name' => array(
  7048. // 'description' => 'TODO: please describe this field!',
  7049. 'type' => 'varchar',
  7050. 'length' => '255',
  7051. 'not null' => '',
  7052. ),
  7053. 'num_links' => array(
  7054. // 'description' => 'TODO: please describe this field!',
  7055. 'type' => 'int',
  7056. 'size' => 'big',
  7057. 'not null' => '',
  7058. ),
  7059. ),
  7060. 'primary key' => array(
  7061. ),
  7062. 'unique keys' => array(
  7063. ),
  7064. 'indexes' => array(
  7065. ),
  7066. 'foreign keys' => array(
  7067. ),
  7068. );
  7069. return $description;
  7070. }
  7071. /**
  7072. * Implements hook_cv_path_count_schema()
  7073. * Purpose: To describe the structure of cv_path_count to tripal
  7074. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7075. * @see tripal_core.api.inc: tripal_core_chado_update()
  7076. * @see tripal_core.api.inc: tripal_core_chado_select()
  7077. *
  7078. * @return
  7079. * An array describing the current table
  7080. *
  7081. * @ingroup tripal_schema_api
  7082. *
  7083. */
  7084. function tripal_core_chado_cv_path_count_schema () {
  7085. $description = array();
  7086. $description = array(
  7087. 'table' => 'cv_path_count',
  7088. // 'description' => 'TODO: please describe this table!',
  7089. 'fields' => array(
  7090. 'cv_name' => array(
  7091. // 'description' => 'TODO: please describe this field!',
  7092. 'type' => 'varchar',
  7093. 'length' => '255',
  7094. 'not null' => '',
  7095. ),
  7096. 'relation_name' => array(
  7097. // 'description' => 'TODO: please describe this field!',
  7098. 'type' => 'varchar',
  7099. 'length' => '1024',
  7100. 'not null' => '',
  7101. ),
  7102. 'relation_cv_name' => array(
  7103. // 'description' => 'TODO: please describe this field!',
  7104. 'type' => 'varchar',
  7105. 'length' => '255',
  7106. 'not null' => '',
  7107. ),
  7108. 'num_paths' => array(
  7109. // 'description' => 'TODO: please describe this field!',
  7110. 'type' => 'int',
  7111. 'size' => 'big',
  7112. 'not null' => '',
  7113. ),
  7114. ),
  7115. 'primary key' => array(
  7116. ),
  7117. 'unique keys' => array(
  7118. ),
  7119. 'indexes' => array(
  7120. ),
  7121. 'foreign keys' => array(
  7122. ),
  7123. );
  7124. return $description;
  7125. }
  7126. /**
  7127. * Implements hook_cv_cvterm_count_schema()
  7128. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7129. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7130. * @see tripal_core.api.inc: tripal_core_chado_update()
  7131. * @see tripal_core.api.inc: tripal_core_chado_select()
  7132. *
  7133. * @return
  7134. * An array describing the current table
  7135. *
  7136. * @ingroup tripal_schema_api
  7137. *
  7138. */
  7139. function tripal_core_chado_cv_cvterm_count_schema () {
  7140. $description = array();
  7141. $description = array(
  7142. 'table' => 'cv_cvterm_count',
  7143. // 'description' => 'TODO: please describe this table!',
  7144. 'fields' => array(
  7145. 'name' => array(
  7146. // 'description' => 'TODO: please describe this field!',
  7147. 'type' => 'varchar',
  7148. 'length' => '255',
  7149. 'not null' => '',
  7150. ),
  7151. 'num_terms_excl_obs' => array(
  7152. // 'description' => 'TODO: please describe this field!',
  7153. 'type' => 'int',
  7154. 'size' => 'big',
  7155. 'not null' => '',
  7156. ),
  7157. ),
  7158. 'primary key' => array(
  7159. ),
  7160. 'unique keys' => array(
  7161. ),
  7162. 'indexes' => array(
  7163. ),
  7164. 'foreign keys' => array(
  7165. ),
  7166. );
  7167. return $description;
  7168. }
  7169. /**
  7170. * Implements hook_cv_schema()
  7171. * Purpose: To describe the structure of cv to tripal
  7172. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7173. * @see tripal_core.api.inc: tripal_core_chado_update()
  7174. * @see tripal_core.api.inc: tripal_core_chado_select()
  7175. *
  7176. * @return
  7177. * An array describing the current table
  7178. *
  7179. * @ingroup tripal_schema_api
  7180. *
  7181. */
  7182. function tripal_core_chado_cv_schema () {
  7183. $description = array();
  7184. $description = array(
  7185. 'table' => 'cv',
  7186. // 'description' => 'TODO: please describe this table!',
  7187. 'fields' => array(
  7188. 'cv_id' => array(
  7189. // 'description' => 'TODO: please describe this field!',
  7190. 'type' => 'serial',
  7191. 'not null' => '1',
  7192. ),
  7193. 'name' => array(
  7194. // 'description' => 'TODO: please describe this field!',
  7195. 'type' => 'varchar',
  7196. 'length' => '255',
  7197. 'not null' => '1',
  7198. ),
  7199. 'definition' => array(
  7200. // 'description' => 'TODO: please describe this field!',
  7201. 'type' => 'text',
  7202. 'not null' => '',
  7203. ),
  7204. ),
  7205. 'primary key' => array(
  7206. '0' => 'cv_id',
  7207. ),
  7208. 'unique keys' => array(
  7209. 'cv_c1' => array(
  7210. '0' => 'name',
  7211. ),
  7212. ),
  7213. 'indexes' => array(
  7214. ),
  7215. 'foreign keys' => array(
  7216. ),
  7217. );
  7218. return $description;
  7219. }
  7220. /**
  7221. * Implements hook_common_descendant_cvterm_schema()
  7222. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7223. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7224. * @see tripal_core.api.inc: tripal_core_chado_update()
  7225. * @see tripal_core.api.inc: tripal_core_chado_select()
  7226. *
  7227. * @return
  7228. * An array describing the current table
  7229. *
  7230. * @ingroup tripal_schema_api
  7231. *
  7232. */
  7233. function tripal_core_chado_common_descendant_cvterm_schema () {
  7234. $description = array();
  7235. $description = array(
  7236. 'table' => 'common_descendant_cvterm',
  7237. // 'description' => 'TODO: please describe this table!',
  7238. 'fields' => array(
  7239. 'cvterm1_id' => array(
  7240. // 'description' => 'TODO: please describe this field!',
  7241. 'type' => 'int',
  7242. 'not null' => '',
  7243. ),
  7244. 'cvterm2_id' => array(
  7245. // 'description' => 'TODO: please describe this field!',
  7246. 'type' => 'int',
  7247. 'not null' => '',
  7248. ),
  7249. 'ancestor_cvterm_id' => array(
  7250. // 'description' => 'TODO: please describe this field!',
  7251. 'type' => 'int',
  7252. 'not null' => '',
  7253. ),
  7254. 'pathdistance1' => array(
  7255. // 'description' => 'TODO: please describe this field!',
  7256. 'type' => 'int',
  7257. 'not null' => '',
  7258. ),
  7259. 'pathdistance2' => array(
  7260. // 'description' => 'TODO: please describe this field!',
  7261. 'type' => 'int',
  7262. 'not null' => '',
  7263. ),
  7264. 'total_pathdistance' => array(
  7265. // 'description' => 'TODO: please describe this field!',
  7266. 'type' => 'int',
  7267. 'not null' => '',
  7268. ),
  7269. ),
  7270. 'primary key' => array(
  7271. ),
  7272. 'unique keys' => array(
  7273. ),
  7274. 'indexes' => array(
  7275. ),
  7276. 'foreign keys' => array(
  7277. ),
  7278. );
  7279. return $description;
  7280. }
  7281. /**
  7282. * Implements hook_contact_schema()
  7283. * Purpose: To describe the structure of contact to tripal
  7284. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7285. * @see tripal_core.api.inc: tripal_core_chado_update()
  7286. * @see tripal_core.api.inc: tripal_core_chado_select()
  7287. *
  7288. * @return
  7289. * An array describing the current table
  7290. *
  7291. * @ingroup tripal_schema_api
  7292. *
  7293. */
  7294. function tripal_core_chado_contact_schema () {
  7295. $description = array();
  7296. $description = array(
  7297. 'table' => 'contact',
  7298. // 'description' => 'TODO: please describe this table!',
  7299. 'fields' => array(
  7300. 'contact_id' => array(
  7301. // 'description' => 'TODO: please describe this field!',
  7302. 'type' => 'serial',
  7303. 'not null' => '1',
  7304. ),
  7305. 'type_id' => array(
  7306. // 'description' => 'TODO: please describe this field!',
  7307. 'type' => 'int',
  7308. 'not null' => '',
  7309. ),
  7310. 'name' => array(
  7311. // 'description' => 'TODO: please describe this field!',
  7312. 'type' => 'varchar',
  7313. 'length' => '255',
  7314. 'not null' => '1',
  7315. ),
  7316. 'description' => array(
  7317. // 'description' => 'TODO: please describe this field!',
  7318. 'type' => 'varchar',
  7319. 'length' => '255',
  7320. 'not null' => '',
  7321. ),
  7322. ),
  7323. 'primary key' => array(
  7324. '0' => 'contact_id',
  7325. ),
  7326. 'unique keys' => array(
  7327. 'contact_c1' => array(
  7328. '0' => 'name',
  7329. ),
  7330. ),
  7331. 'indexes' => array(
  7332. ),
  7333. 'foreign keys' => array(
  7334. ),
  7335. );
  7336. return $description;
  7337. }
  7338. /**
  7339. * Implements hook_contact_relationship_schema()
  7340. * Purpose: To describe the structure of contact_relationship to tripal
  7341. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7342. * @see tripal_core.api.inc: tripal_core_chado_update()
  7343. * @see tripal_core.api.inc: tripal_core_chado_select()
  7344. *
  7345. * @return
  7346. * An array describing the current table
  7347. *
  7348. * @ingroup tripal_schema_api
  7349. *
  7350. */
  7351. function tripal_core_chado_contact_relationship_schema () {
  7352. $description = array();
  7353. $description = array(
  7354. 'table' => 'contact_relationship',
  7355. // 'description' => 'TODO: please describe this table!',
  7356. 'fields' => array(
  7357. 'contact_relationship_id' => array(
  7358. // 'description' => 'TODO: please describe this field!',
  7359. 'type' => 'serial',
  7360. 'not null' => '1',
  7361. ),
  7362. 'type_id' => array(
  7363. // 'description' => 'TODO: please describe this field!',
  7364. 'type' => 'int',
  7365. 'not null' => '1',
  7366. ),
  7367. 'subject_id' => array(
  7368. // 'description' => 'TODO: please describe this field!',
  7369. 'type' => 'int',
  7370. 'not null' => '1',
  7371. ),
  7372. 'object_id' => array(
  7373. // 'description' => 'TODO: please describe this field!',
  7374. 'type' => 'int',
  7375. 'not null' => '1',
  7376. ),
  7377. ),
  7378. 'primary key' => array(
  7379. '0' => 'contact_relationship_id',
  7380. ),
  7381. 'unique keys' => array(
  7382. 'contact_relationship_c1' => array(
  7383. '0' => 'subject_id',
  7384. '1' => 'object_id',
  7385. '2' => 'type_id',
  7386. ),
  7387. ),
  7388. 'indexes' => array(
  7389. 'contact_relationship_idx1' => array(
  7390. '0' => 'type_id',
  7391. ),
  7392. 'contact_relationship_idx2' => array(
  7393. '0' => 'subject_id',
  7394. ),
  7395. 'contact_relationship_idx3' => array(
  7396. '0' => 'object_id',
  7397. ),
  7398. ),
  7399. 'foreign keys' => array(
  7400. ),
  7401. );
  7402. return $description;
  7403. }
  7404. /**
  7405. * Implements hook_control_schema()
  7406. * Purpose: To describe the structure of control to tripal
  7407. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7408. * @see tripal_core.api.inc: tripal_core_chado_update()
  7409. * @see tripal_core.api.inc: tripal_core_chado_select()
  7410. *
  7411. * @return
  7412. * An array describing the current table
  7413. *
  7414. * @ingroup tripal_schema_api
  7415. *
  7416. */
  7417. function tripal_core_chado_control_schema () {
  7418. $description = array();
  7419. $description = array(
  7420. 'table' => 'control',
  7421. // 'description' => 'TODO: please describe this table!',
  7422. 'fields' => array(
  7423. 'control_id' => array(
  7424. // 'description' => 'TODO: please describe this field!',
  7425. 'type' => 'serial',
  7426. 'not null' => '1',
  7427. ),
  7428. 'type_id' => array(
  7429. // 'description' => 'TODO: please describe this field!',
  7430. 'type' => 'int',
  7431. 'not null' => '1',
  7432. ),
  7433. 'assay_id' => array(
  7434. // 'description' => 'TODO: please describe this field!',
  7435. 'type' => 'int',
  7436. 'not null' => '1',
  7437. ),
  7438. 'tableinfo_id' => array(
  7439. // 'description' => 'TODO: please describe this field!',
  7440. 'type' => 'int',
  7441. 'not null' => '1',
  7442. ),
  7443. 'row_id' => array(
  7444. // 'description' => 'TODO: please describe this field!',
  7445. 'type' => 'int',
  7446. 'not null' => '1',
  7447. ),
  7448. 'name' => array(
  7449. // 'description' => 'TODO: please describe this field!',
  7450. 'type' => 'text',
  7451. 'not null' => '',
  7452. ),
  7453. 'value' => array(
  7454. // 'description' => 'TODO: please describe this field!',
  7455. 'type' => 'text',
  7456. 'not null' => '',
  7457. ),
  7458. 'rank' => array(
  7459. // 'description' => 'TODO: please describe this field!',
  7460. 'type' => 'int',
  7461. 'not null' => '1',
  7462. 'default' => '0',
  7463. ),
  7464. ),
  7465. 'primary key' => array(
  7466. '0' => 'control_id',
  7467. ),
  7468. 'unique keys' => array(
  7469. ),
  7470. 'indexes' => array(
  7471. 'control_idx1' => array(
  7472. '0' => 'type_id',
  7473. ),
  7474. 'control_idx2' => array(
  7475. '0' => 'assay_id',
  7476. ),
  7477. 'control_idx3' => array(
  7478. '0' => 'tableinfo_id',
  7479. ),
  7480. 'control_idx4' => array(
  7481. '0' => 'row_id',
  7482. ),
  7483. ),
  7484. 'foreign keys' => array(
  7485. ),
  7486. );
  7487. return $description;
  7488. }
  7489. /**
  7490. * Implements hook_biomaterialprop_schema()
  7491. * Purpose: To describe the structure of biomaterialprop to tripal
  7492. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7493. * @see tripal_core.api.inc: tripal_core_chado_update()
  7494. * @see tripal_core.api.inc: tripal_core_chado_select()
  7495. *
  7496. * @return
  7497. * An array describing the current table
  7498. *
  7499. * @ingroup tripal_schema_api
  7500. *
  7501. */
  7502. function tripal_core_chado_biomaterialprop_schema () {
  7503. $description = array();
  7504. $description = array(
  7505. 'table' => 'biomaterialprop',
  7506. // 'description' => 'TODO: please describe this table!',
  7507. 'fields' => array(
  7508. 'biomaterialprop_id' => array(
  7509. // 'description' => 'TODO: please describe this field!',
  7510. 'type' => 'serial',
  7511. 'not null' => '1',
  7512. ),
  7513. 'biomaterial_id' => array(
  7514. // 'description' => 'TODO: please describe this field!',
  7515. 'type' => 'int',
  7516. 'not null' => '1',
  7517. ),
  7518. 'type_id' => array(
  7519. // 'description' => 'TODO: please describe this field!',
  7520. 'type' => 'int',
  7521. 'not null' => '1',
  7522. ),
  7523. 'value' => array(
  7524. // 'description' => 'TODO: please describe this field!',
  7525. 'type' => 'text',
  7526. 'not null' => '',
  7527. ),
  7528. 'rank' => array(
  7529. // 'description' => 'TODO: please describe this field!',
  7530. 'type' => 'int',
  7531. 'not null' => '1',
  7532. 'default' => '0',
  7533. ),
  7534. ),
  7535. 'primary key' => array(
  7536. '0' => 'biomaterialprop_id',
  7537. ),
  7538. 'unique keys' => array(
  7539. 'biomaterialprop_c1' => array(
  7540. '0' => 'biomaterial_id',
  7541. '1' => 'type_id',
  7542. '2' => 'rank',
  7543. ),
  7544. ),
  7545. 'indexes' => array(
  7546. 'biomaterialprop_idx1' => array(
  7547. '0' => 'biomaterial_id',
  7548. ),
  7549. 'biomaterialprop_idx2' => array(
  7550. '0' => 'type_id',
  7551. ),
  7552. ),
  7553. 'foreign keys' => array(
  7554. ),
  7555. );
  7556. return $description;
  7557. }
  7558. /**
  7559. * Implements hook_biomaterial_treatment_schema()
  7560. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7561. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7562. * @see tripal_core.api.inc: tripal_core_chado_update()
  7563. * @see tripal_core.api.inc: tripal_core_chado_select()
  7564. *
  7565. * @return
  7566. * An array describing the current table
  7567. *
  7568. * @ingroup tripal_schema_api
  7569. *
  7570. */
  7571. function tripal_core_chado_biomaterial_treatment_schema () {
  7572. $description = array();
  7573. $description = array(
  7574. 'table' => 'biomaterial_treatment',
  7575. // 'description' => 'TODO: please describe this table!',
  7576. 'fields' => array(
  7577. 'biomaterial_treatment_id' => array(
  7578. // 'description' => 'TODO: please describe this field!',
  7579. 'type' => 'serial',
  7580. 'not null' => '1',
  7581. ),
  7582. 'biomaterial_id' => array(
  7583. // 'description' => 'TODO: please describe this field!',
  7584. 'type' => 'int',
  7585. 'not null' => '1',
  7586. ),
  7587. 'treatment_id' => array(
  7588. // 'description' => 'TODO: please describe this field!',
  7589. 'type' => 'int',
  7590. 'not null' => '1',
  7591. ),
  7592. 'unittype_id' => array(
  7593. // 'description' => 'TODO: please describe this field!',
  7594. 'type' => 'int',
  7595. 'not null' => '',
  7596. ),
  7597. 'value' => array(
  7598. // 'description' => 'TODO: please describe this field!',
  7599. 'type' => 'float',
  7600. 'not null' => '',
  7601. ),
  7602. 'rank' => array(
  7603. // 'description' => 'TODO: please describe this field!',
  7604. 'type' => 'int',
  7605. 'not null' => '1',
  7606. 'default' => '0',
  7607. ),
  7608. ),
  7609. 'primary key' => array(
  7610. '0' => 'biomaterial_treatment_id',
  7611. ),
  7612. 'unique keys' => array(
  7613. 'biomaterial_treatment_c1' => array(
  7614. '0' => 'biomaterial_id',
  7615. '1' => 'treatment_id',
  7616. ),
  7617. ),
  7618. 'indexes' => array(
  7619. 'biomaterial_treatment_idx1' => array(
  7620. '0' => 'biomaterial_id',
  7621. ),
  7622. 'biomaterial_treatment_idx2' => array(
  7623. '0' => 'treatment_id',
  7624. ),
  7625. 'biomaterial_treatment_idx3' => array(
  7626. '0' => 'unittype_id',
  7627. ),
  7628. ),
  7629. 'foreign keys' => array(
  7630. ),
  7631. );
  7632. return $description;
  7633. }
  7634. /**
  7635. * Implements hook_acquisition_relationship_schema()
  7636. * Purpose: To describe the structure of acquisition_relationship to tripal
  7637. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7638. * @see tripal_core.api.inc: tripal_core_chado_update()
  7639. * @see tripal_core.api.inc: tripal_core_chado_select()
  7640. *
  7641. * @return
  7642. * An array describing the current table
  7643. *
  7644. * @ingroup tripal_schema_api
  7645. *
  7646. */
  7647. function tripal_core_chado_acquisition_relationship_schema () {
  7648. $description = array();
  7649. $description = array(
  7650. 'table' => 'acquisition_relationship',
  7651. // 'description' => 'TODO: please describe this table!',
  7652. 'fields' => array(
  7653. 'acquisition_relationship_id' => array(
  7654. // 'description' => 'TODO: please describe this field!',
  7655. 'type' => 'serial',
  7656. 'not null' => '1',
  7657. ),
  7658. 'subject_id' => array(
  7659. // 'description' => 'TODO: please describe this field!',
  7660. 'type' => 'int',
  7661. 'not null' => '1',
  7662. ),
  7663. 'type_id' => array(
  7664. // 'description' => 'TODO: please describe this field!',
  7665. 'type' => 'int',
  7666. 'not null' => '1',
  7667. ),
  7668. 'object_id' => array(
  7669. // 'description' => 'TODO: please describe this field!',
  7670. 'type' => 'int',
  7671. 'not null' => '1',
  7672. ),
  7673. 'value' => array(
  7674. // 'description' => 'TODO: please describe this field!',
  7675. 'type' => 'text',
  7676. 'not null' => '',
  7677. ),
  7678. 'rank' => array(
  7679. // 'description' => 'TODO: please describe this field!',
  7680. 'type' => 'int',
  7681. 'not null' => '1',
  7682. 'default' => '0',
  7683. ),
  7684. ),
  7685. 'primary key' => array(
  7686. '0' => 'acquisition_relationship_id',
  7687. ),
  7688. 'unique keys' => array(
  7689. 'acquisition_relationship_c1' => array(
  7690. '0' => 'subject_id',
  7691. '1' => 'object_id',
  7692. '2' => 'type_id',
  7693. '3' => 'rank',
  7694. ),
  7695. ),
  7696. 'indexes' => array(
  7697. 'acquisition_relationship_idx1' => array(
  7698. '0' => 'subject_id',
  7699. ),
  7700. 'acquisition_relationship_idx2' => array(
  7701. '0' => 'type_id',
  7702. ),
  7703. 'acquisition_relationship_idx3' => array(
  7704. '0' => 'object_id',
  7705. ),
  7706. ),
  7707. 'foreign keys' => array(
  7708. ),
  7709. );
  7710. return $description;
  7711. }
  7712. /**
  7713. * Implements hook_acquisition_schema()
  7714. * Purpose: To describe the structure of acquisition to tripal
  7715. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7716. * @see tripal_core.api.inc: tripal_core_chado_update()
  7717. * @see tripal_core.api.inc: tripal_core_chado_select()
  7718. *
  7719. * @return
  7720. * An array describing the current table
  7721. *
  7722. * @ingroup tripal_schema_api
  7723. *
  7724. */
  7725. function tripal_core_chado_acquisition_schema () {
  7726. $description = array();
  7727. $description = array(
  7728. 'table' => 'acquisition',
  7729. // 'description' => 'TODO: please describe this table!',
  7730. 'fields' => array(
  7731. 'acquisition_id' => array(
  7732. // 'description' => 'TODO: please describe this field!',
  7733. 'type' => 'serial',
  7734. 'not null' => '1',
  7735. ),
  7736. 'assay_id' => array(
  7737. // 'description' => 'TODO: please describe this field!',
  7738. 'type' => 'int',
  7739. 'not null' => '1',
  7740. ),
  7741. 'protocol_id' => array(
  7742. // 'description' => 'TODO: please describe this field!',
  7743. 'type' => 'int',
  7744. 'not null' => '',
  7745. ),
  7746. 'channel_id' => array(
  7747. // 'description' => 'TODO: please describe this field!',
  7748. 'type' => 'int',
  7749. 'not null' => '',
  7750. ),
  7751. 'acquisitiondate' => array(
  7752. // 'description' => 'TODO: please describe this field!',
  7753. 'type' => 'datetime',
  7754. 'not null' => '',
  7755. 'default' => 'ow(',
  7756. ),
  7757. 'name' => array(
  7758. // 'description' => 'TODO: please describe this field!',
  7759. 'type' => 'text',
  7760. 'not null' => '',
  7761. ),
  7762. 'uri' => array(
  7763. // 'description' => 'TODO: please describe this field!',
  7764. 'type' => 'text',
  7765. 'not null' => '',
  7766. ),
  7767. ),
  7768. 'primary key' => array(
  7769. '0' => 'acquisition_id',
  7770. ),
  7771. 'unique keys' => array(
  7772. 'acquisition_c1' => array(
  7773. '0' => 'name',
  7774. ),
  7775. ),
  7776. 'indexes' => array(
  7777. 'acquisition_idx1' => array(
  7778. '0' => 'assay_id',
  7779. ),
  7780. 'acquisition_idx2' => array(
  7781. '0' => 'protocol_id',
  7782. ),
  7783. 'acquisition_idx3' => array(
  7784. '0' => 'channel_id',
  7785. ),
  7786. ),
  7787. 'foreign keys' => array(
  7788. ),
  7789. );
  7790. return $description;
  7791. }
  7792. /**
  7793. * Implements hook_acquisitionprop_schema()
  7794. * Purpose: To describe the structure of acquisitionprop to tripal
  7795. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7796. * @see tripal_core.api.inc: tripal_core_chado_update()
  7797. * @see tripal_core.api.inc: tripal_core_chado_select()
  7798. *
  7799. * @return
  7800. * An array describing the current table
  7801. *
  7802. * @ingroup tripal_schema_api
  7803. *
  7804. */
  7805. function tripal_core_chado_acquisitionprop_schema () {
  7806. $description = array();
  7807. $description = array(
  7808. 'table' => 'acquisitionprop',
  7809. // 'description' => 'TODO: please describe this table!',
  7810. 'fields' => array(
  7811. 'acquisitionprop_id' => array(
  7812. // 'description' => 'TODO: please describe this field!',
  7813. 'type' => 'serial',
  7814. 'not null' => '1',
  7815. ),
  7816. 'acquisition_id' => array(
  7817. // 'description' => 'TODO: please describe this field!',
  7818. 'type' => 'int',
  7819. 'not null' => '1',
  7820. ),
  7821. 'type_id' => array(
  7822. // 'description' => 'TODO: please describe this field!',
  7823. 'type' => 'int',
  7824. 'not null' => '1',
  7825. ),
  7826. 'value' => array(
  7827. // 'description' => 'TODO: please describe this field!',
  7828. 'type' => 'text',
  7829. 'not null' => '',
  7830. ),
  7831. 'rank' => array(
  7832. // 'description' => 'TODO: please describe this field!',
  7833. 'type' => 'int',
  7834. 'not null' => '1',
  7835. 'default' => '0',
  7836. ),
  7837. ),
  7838. 'primary key' => array(
  7839. '0' => 'acquisitionprop_id',
  7840. ),
  7841. 'unique keys' => array(
  7842. 'acquisitionprop_c1' => array(
  7843. '0' => 'acquisition_id',
  7844. '1' => 'type_id',
  7845. '2' => 'rank',
  7846. ),
  7847. ),
  7848. 'indexes' => array(
  7849. 'acquisitionprop_idx1' => array(
  7850. '0' => 'acquisition_id',
  7851. ),
  7852. 'acquisitionprop_idx2' => array(
  7853. '0' => 'type_id',
  7854. ),
  7855. ),
  7856. 'foreign keys' => array(
  7857. ),
  7858. );
  7859. return $description;
  7860. }
  7861. /**
  7862. * Implements hook_all_feature_names_schema()
  7863. * Purpose: To describe the structure of all_feature_names to tripal
  7864. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7865. * @see tripal_core.api.inc: tripal_core_chado_update()
  7866. * @see tripal_core.api.inc: tripal_core_chado_select()
  7867. *
  7868. * @return
  7869. * An array describing the current table
  7870. *
  7871. * @ingroup tripal_schema_api
  7872. *
  7873. */
  7874. function tripal_core_chado_all_feature_names_schema () {
  7875. $description = array();
  7876. $description = array(
  7877. 'table' => 'all_feature_names',
  7878. // 'description' => 'TODO: please describe this table!',
  7879. 'fields' => array(
  7880. 'feature_id' => array(
  7881. // 'description' => 'TODO: please describe this field!',
  7882. 'type' => 'int',
  7883. 'not null' => '',
  7884. ),
  7885. 'name' => array(
  7886. // 'description' => 'TODO: please describe this field!',
  7887. 'type' => 'varchar',
  7888. 'length' => '255',
  7889. 'not null' => '',
  7890. ),
  7891. 'organism_id' => array(
  7892. // 'description' => 'TODO: please describe this field!',
  7893. 'type' => 'int',
  7894. 'not null' => '',
  7895. ),
  7896. ),
  7897. 'primary key' => array(
  7898. ),
  7899. 'unique keys' => array(
  7900. ),
  7901. 'indexes' => array(
  7902. ),
  7903. 'foreign keys' => array(
  7904. ),
  7905. );
  7906. return $description;
  7907. }
  7908. /**
  7909. * Implements hook_analysis_schema()
  7910. * Purpose: To describe the structure of analysis to tripal
  7911. * @see tripal_core.api.inc: tripal_core_chado_insert()
  7912. * @see tripal_core.api.inc: tripal_core_chado_update()
  7913. * @see tripal_core.api.inc: tripal_core_chado_select()
  7914. *
  7915. * @return
  7916. * An array describing the current table
  7917. *
  7918. * @ingroup tripal_schema_api
  7919. *
  7920. */
  7921. function tripal_core_chado_analysis_schema () {
  7922. $description = array();
  7923. $description = array(
  7924. 'table' => 'analysis',
  7925. // 'description' => 'TODO: please describe this table!',
  7926. 'fields' => array(
  7927. 'analysis_id' => array(
  7928. // 'description' => 'TODO: please describe this field!',
  7929. 'type' => 'serial',
  7930. 'not null' => '1',
  7931. ),
  7932. 'name' => array(
  7933. // 'description' => 'TODO: please describe this field!',
  7934. 'type' => 'varchar',
  7935. 'length' => '255',
  7936. 'not null' => '',
  7937. ),
  7938. 'description' => array(
  7939. // 'description' => 'TODO: please describe this field!',
  7940. 'type' => 'text',
  7941. 'not null' => '',
  7942. ),
  7943. 'program' => array(
  7944. // 'description' => 'TODO: please describe this field!',
  7945. 'type' => 'varchar',
  7946. 'length' => '255',
  7947. 'not null' => '1',
  7948. ),
  7949. 'programversion' => array(
  7950. // 'description' => 'TODO: please describe this field!',
  7951. 'type' => 'varchar',
  7952. 'length' => '255',
  7953. 'not null' => '1',
  7954. ),
  7955. 'algorithm' => array(
  7956. // 'description' => 'TODO: please describe this field!',
  7957. 'type' => 'varchar',
  7958. 'length' => '255',
  7959. 'not null' => '',
  7960. ),
  7961. 'sourcename' => array(
  7962. // 'description' => 'TODO: please describe this field!',
  7963. 'type' => 'varchar',
  7964. 'length' => '255',
  7965. 'not null' => '',
  7966. ),
  7967. 'sourceversion' => array(
  7968. // 'description' => 'TODO: please describe this field!',
  7969. 'type' => 'varchar',
  7970. 'length' => '255',
  7971. 'not null' => '',
  7972. ),
  7973. 'sourceuri' => array(
  7974. // 'description' => 'TODO: please describe this field!',
  7975. 'type' => 'text',
  7976. 'not null' => '',
  7977. ),
  7978. 'timeexecuted' => array(
  7979. // 'description' => 'TODO: please describe this field!',
  7980. 'type' => 'datetime',
  7981. 'not null' => '1',
  7982. 'default' => 'ow(',
  7983. ),
  7984. ),
  7985. 'primary key' => array(
  7986. '0' => 'analysis_id',
  7987. ),
  7988. 'unique keys' => array(
  7989. 'analysis_c1' => array(
  7990. '0' => 'program',
  7991. '1' => 'programversion',
  7992. '2' => 'sourcename',
  7993. ),
  7994. ),
  7995. 'indexes' => array(
  7996. ),
  7997. 'foreign keys' => array(
  7998. ),
  7999. );
  8000. return $description;
  8001. }
  8002. /**
  8003. * Implements hook_analysisfeature_schema()
  8004. * Purpose: To describe the structure of analysisfeature to tripal
  8005. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8006. * @see tripal_core.api.inc: tripal_core_chado_update()
  8007. * @see tripal_core.api.inc: tripal_core_chado_select()
  8008. *
  8009. * @return
  8010. * An array describing the current table
  8011. *
  8012. * @ingroup tripal_schema_api
  8013. *
  8014. */
  8015. function tripal_core_chado_analysisfeature_schema () {
  8016. $description = array();
  8017. $description = array(
  8018. 'table' => 'analysisfeature',
  8019. // 'description' => 'TODO: please describe this table!',
  8020. 'fields' => array(
  8021. 'analysisfeature_id' => array(
  8022. // 'description' => 'TODO: please describe this field!',
  8023. 'type' => 'serial',
  8024. 'not null' => '1',
  8025. ),
  8026. 'feature_id' => array(
  8027. // 'description' => 'TODO: please describe this field!',
  8028. 'type' => 'int',
  8029. 'not null' => '1',
  8030. ),
  8031. 'analysis_id' => array(
  8032. // 'description' => 'TODO: please describe this field!',
  8033. 'type' => 'int',
  8034. 'not null' => '1',
  8035. ),
  8036. 'rawscore' => array(
  8037. // 'description' => 'TODO: please describe this field!',
  8038. 'type' => 'float',
  8039. 'size' => 'big',
  8040. 'not null' => '',
  8041. ),
  8042. 'normscore' => array(
  8043. // 'description' => 'TODO: please describe this field!',
  8044. 'type' => 'float',
  8045. 'size' => 'big',
  8046. 'not null' => '',
  8047. ),
  8048. 'significance' => array(
  8049. // 'description' => 'TODO: please describe this field!',
  8050. 'type' => 'float',
  8051. 'size' => 'big',
  8052. 'not null' => '',
  8053. ),
  8054. 'identity' => array(
  8055. // 'description' => 'TODO: please describe this field!',
  8056. 'type' => 'float',
  8057. 'size' => 'big',
  8058. 'not null' => '',
  8059. ),
  8060. ),
  8061. 'primary key' => array(
  8062. '0' => 'analysisfeature_id',
  8063. ),
  8064. 'unique keys' => array(
  8065. 'analysisfeature_c1' => array(
  8066. '0' => 'feature_id',
  8067. '1' => 'analysis_id',
  8068. ),
  8069. ),
  8070. 'indexes' => array(
  8071. 'analysisfeature_idx1' => array(
  8072. '0' => 'feature_id',
  8073. ),
  8074. 'analysisfeature_idx2' => array(
  8075. '0' => 'analysis_id',
  8076. ),
  8077. ),
  8078. 'foreign keys' => array(
  8079. ),
  8080. );
  8081. return $description;
  8082. }
  8083. /**
  8084. * Implements hook_analysisfeatureprop_schema()
  8085. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8086. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8087. * @see tripal_core.api.inc: tripal_core_chado_update()
  8088. * @see tripal_core.api.inc: tripal_core_chado_select()
  8089. *
  8090. * @return
  8091. * An array describing the current table
  8092. *
  8093. * @ingroup tripal_schema_api
  8094. *
  8095. */
  8096. function tripal_core_chado_analysisfeatureprop_schema () {
  8097. $description = array();
  8098. $description = array(
  8099. 'table' => 'analysisfeatureprop',
  8100. // 'description' => 'TODO: please describe this table!',
  8101. 'fields' => array(
  8102. 'analysisfeatureprop_id' => array(
  8103. // 'description' => 'TODO: please describe this field!',
  8104. 'type' => 'serial',
  8105. 'not null' => '1',
  8106. ),
  8107. 'analysisfeature_id' => array(
  8108. // 'description' => 'TODO: please describe this field!',
  8109. 'type' => 'int',
  8110. 'not null' => '1',
  8111. ),
  8112. 'type_id' => array(
  8113. // 'description' => 'TODO: please describe this field!',
  8114. 'type' => 'int',
  8115. 'not null' => '1',
  8116. ),
  8117. 'value' => array(
  8118. // 'description' => 'TODO: please describe this field!',
  8119. 'type' => 'text',
  8120. 'not null' => '',
  8121. ),
  8122. 'rank' => array(
  8123. // 'description' => 'TODO: please describe this field!',
  8124. 'type' => 'int',
  8125. 'not null' => '1',
  8126. ),
  8127. ),
  8128. 'primary key' => array(
  8129. '0' => 'analysisfeatureprop_id',
  8130. ),
  8131. 'unique keys' => array(
  8132. 'analysisfeature_id_type_id_rank' => array(
  8133. '0' => 'analysisfeature_id',
  8134. '1' => 'type_id',
  8135. '2' => 'rank',
  8136. ),
  8137. ),
  8138. 'indexes' => array(
  8139. ),
  8140. 'foreign keys' => array(
  8141. ),
  8142. );
  8143. return $description;
  8144. }
  8145. /**
  8146. * Implements hook_assayprop_schema()
  8147. * Purpose: To describe the structure of assayprop to tripal
  8148. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8149. * @see tripal_core.api.inc: tripal_core_chado_update()
  8150. * @see tripal_core.api.inc: tripal_core_chado_select()
  8151. *
  8152. * @return
  8153. * An array describing the current table
  8154. *
  8155. * @ingroup tripal_schema_api
  8156. *
  8157. */
  8158. function tripal_core_chado_assayprop_schema () {
  8159. $description = array();
  8160. $description = array(
  8161. 'table' => 'assayprop',
  8162. // 'description' => 'TODO: please describe this table!',
  8163. 'fields' => array(
  8164. 'assayprop_id' => array(
  8165. // 'description' => 'TODO: please describe this field!',
  8166. 'type' => 'serial',
  8167. 'not null' => '1',
  8168. ),
  8169. 'assay_id' => array(
  8170. // 'description' => 'TODO: please describe this field!',
  8171. 'type' => 'int',
  8172. 'not null' => '1',
  8173. ),
  8174. 'type_id' => array(
  8175. // 'description' => 'TODO: please describe this field!',
  8176. 'type' => 'int',
  8177. 'not null' => '1',
  8178. ),
  8179. 'value' => array(
  8180. // 'description' => 'TODO: please describe this field!',
  8181. 'type' => 'text',
  8182. 'not null' => '',
  8183. ),
  8184. 'rank' => array(
  8185. // 'description' => 'TODO: please describe this field!',
  8186. 'type' => 'int',
  8187. 'not null' => '1',
  8188. 'default' => '0',
  8189. ),
  8190. ),
  8191. 'primary key' => array(
  8192. '0' => 'assayprop_id',
  8193. ),
  8194. 'unique keys' => array(
  8195. 'assayprop_c1' => array(
  8196. '0' => 'assay_id',
  8197. '1' => 'type_id',
  8198. '2' => 'rank',
  8199. ),
  8200. ),
  8201. 'indexes' => array(
  8202. 'assayprop_idx1' => array(
  8203. '0' => 'assay_id',
  8204. ),
  8205. 'assayprop_idx2' => array(
  8206. '0' => 'type_id',
  8207. ),
  8208. ),
  8209. 'foreign keys' => array(
  8210. ),
  8211. );
  8212. return $description;
  8213. }
  8214. /**
  8215. * Implements hook_biomaterial_schema()
  8216. * Purpose: To describe the structure of biomaterial to tripal
  8217. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8218. * @see tripal_core.api.inc: tripal_core_chado_update()
  8219. * @see tripal_core.api.inc: tripal_core_chado_select()
  8220. *
  8221. * @return
  8222. * An array describing the current table
  8223. *
  8224. * @ingroup tripal_schema_api
  8225. *
  8226. */
  8227. function tripal_core_chado_biomaterial_schema () {
  8228. $description = array();
  8229. $description = array(
  8230. 'table' => 'biomaterial',
  8231. // 'description' => 'TODO: please describe this table!',
  8232. 'fields' => array(
  8233. 'biomaterial_id' => array(
  8234. // 'description' => 'TODO: please describe this field!',
  8235. 'type' => 'serial',
  8236. 'not null' => '1',
  8237. ),
  8238. 'taxon_id' => array(
  8239. // 'description' => 'TODO: please describe this field!',
  8240. 'type' => 'int',
  8241. 'not null' => '',
  8242. ),
  8243. 'biosourceprovider_id' => array(
  8244. // 'description' => 'TODO: please describe this field!',
  8245. 'type' => 'int',
  8246. 'not null' => '',
  8247. ),
  8248. 'dbxref_id' => array(
  8249. // 'description' => 'TODO: please describe this field!',
  8250. 'type' => 'int',
  8251. 'not null' => '',
  8252. ),
  8253. 'name' => array(
  8254. // 'description' => 'TODO: please describe this field!',
  8255. 'type' => 'text',
  8256. 'not null' => '',
  8257. ),
  8258. 'description' => array(
  8259. // 'description' => 'TODO: please describe this field!',
  8260. 'type' => 'text',
  8261. 'not null' => '',
  8262. ),
  8263. ),
  8264. 'primary key' => array(
  8265. '0' => 'biomaterial_id',
  8266. ),
  8267. 'unique keys' => array(
  8268. 'biomaterial_c1' => array(
  8269. '0' => 'name',
  8270. ),
  8271. ),
  8272. 'indexes' => array(
  8273. 'biomaterial_idx1' => array(
  8274. '0' => 'taxon_id',
  8275. ),
  8276. 'biomaterial_idx2' => array(
  8277. '0' => 'biosourceprovider_id',
  8278. ),
  8279. 'biomaterial_idx3' => array(
  8280. '0' => 'dbxref_id',
  8281. ),
  8282. ),
  8283. 'foreign keys' => array(
  8284. ),
  8285. );
  8286. return $description;
  8287. }
  8288. /**
  8289. * Implements hook_biomaterial_dbxref_schema()
  8290. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8291. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8292. * @see tripal_core.api.inc: tripal_core_chado_update()
  8293. * @see tripal_core.api.inc: tripal_core_chado_select()
  8294. *
  8295. * @return
  8296. * An array describing the current table
  8297. *
  8298. * @ingroup tripal_schema_api
  8299. *
  8300. */
  8301. function tripal_core_chado_biomaterial_dbxref_schema () {
  8302. $description = array();
  8303. $description = array(
  8304. 'table' => 'biomaterial_dbxref',
  8305. // 'description' => 'TODO: please describe this table!',
  8306. 'fields' => array(
  8307. 'biomaterial_dbxref_id' => array(
  8308. // 'description' => 'TODO: please describe this field!',
  8309. 'type' => 'serial',
  8310. 'not null' => '1',
  8311. ),
  8312. 'biomaterial_id' => array(
  8313. // 'description' => 'TODO: please describe this field!',
  8314. 'type' => 'int',
  8315. 'not null' => '1',
  8316. ),
  8317. 'dbxref_id' => array(
  8318. // 'description' => 'TODO: please describe this field!',
  8319. 'type' => 'int',
  8320. 'not null' => '1',
  8321. ),
  8322. ),
  8323. 'primary key' => array(
  8324. '0' => 'biomaterial_dbxref_id',
  8325. ),
  8326. 'unique keys' => array(
  8327. 'biomaterial_dbxref_c1' => array(
  8328. '0' => 'biomaterial_id',
  8329. '1' => 'dbxref_id',
  8330. ),
  8331. ),
  8332. 'indexes' => array(
  8333. 'biomaterial_dbxref_idx1' => array(
  8334. '0' => 'biomaterial_id',
  8335. ),
  8336. 'biomaterial_dbxref_idx2' => array(
  8337. '0' => 'dbxref_id',
  8338. ),
  8339. ),
  8340. 'foreign keys' => array(
  8341. ),
  8342. );
  8343. return $description;
  8344. }
  8345. /**
  8346. * Implements hook_biomaterial_relationship_schema()
  8347. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8348. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8349. * @see tripal_core.api.inc: tripal_core_chado_update()
  8350. * @see tripal_core.api.inc: tripal_core_chado_select()
  8351. *
  8352. * @return
  8353. * An array describing the current table
  8354. *
  8355. * @ingroup tripal_schema_api
  8356. *
  8357. */
  8358. function tripal_core_chado_biomaterial_relationship_schema () {
  8359. $description = array();
  8360. $description = array(
  8361. 'table' => 'biomaterial_relationship',
  8362. // 'description' => 'TODO: please describe this table!',
  8363. 'fields' => array(
  8364. 'biomaterial_relationship_id' => array(
  8365. // 'description' => 'TODO: please describe this field!',
  8366. 'type' => 'serial',
  8367. 'not null' => '1',
  8368. ),
  8369. 'subject_id' => array(
  8370. // 'description' => 'TODO: please describe this field!',
  8371. 'type' => 'int',
  8372. 'not null' => '1',
  8373. ),
  8374. 'type_id' => array(
  8375. // 'description' => 'TODO: please describe this field!',
  8376. 'type' => 'int',
  8377. 'not null' => '1',
  8378. ),
  8379. 'object_id' => array(
  8380. // 'description' => 'TODO: please describe this field!',
  8381. 'type' => 'int',
  8382. 'not null' => '1',
  8383. ),
  8384. ),
  8385. 'primary key' => array(
  8386. '0' => 'biomaterial_relationship_id',
  8387. ),
  8388. 'unique keys' => array(
  8389. 'biomaterial_relationship_c1' => array(
  8390. '0' => 'subject_id',
  8391. '1' => 'object_id',
  8392. '2' => 'type_id',
  8393. ),
  8394. ),
  8395. 'indexes' => array(
  8396. 'biomaterial_relationship_idx1' => array(
  8397. '0' => 'subject_id',
  8398. ),
  8399. 'biomaterial_relationship_idx2' => array(
  8400. '0' => 'object_id',
  8401. ),
  8402. 'biomaterial_relationship_idx3' => array(
  8403. '0' => 'type_id',
  8404. ),
  8405. ),
  8406. 'foreign keys' => array(
  8407. ),
  8408. );
  8409. return $description;
  8410. }
  8411. /**
  8412. * Implements hook_assay_project_schema()
  8413. * Purpose: To describe the structure of assay_project to tripal
  8414. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8415. * @see tripal_core.api.inc: tripal_core_chado_update()
  8416. * @see tripal_core.api.inc: tripal_core_chado_select()
  8417. *
  8418. * @return
  8419. * An array describing the current table
  8420. *
  8421. * @ingroup tripal_schema_api
  8422. *
  8423. */
  8424. function tripal_core_chado_assay_project_schema () {
  8425. $description = array();
  8426. $description = array(
  8427. 'table' => 'assay_project',
  8428. // 'description' => 'TODO: please describe this table!',
  8429. 'fields' => array(
  8430. 'assay_project_id' => array(
  8431. // 'description' => 'TODO: please describe this field!',
  8432. 'type' => 'serial',
  8433. 'not null' => '1',
  8434. ),
  8435. 'assay_id' => array(
  8436. // 'description' => 'TODO: please describe this field!',
  8437. 'type' => 'int',
  8438. 'not null' => '1',
  8439. ),
  8440. 'project_id' => array(
  8441. // 'description' => 'TODO: please describe this field!',
  8442. 'type' => 'int',
  8443. 'not null' => '1',
  8444. ),
  8445. ),
  8446. 'primary key' => array(
  8447. '0' => 'assay_project_id',
  8448. ),
  8449. 'unique keys' => array(
  8450. 'assay_project_c1' => array(
  8451. '0' => 'assay_id',
  8452. '1' => 'project_id',
  8453. ),
  8454. ),
  8455. 'indexes' => array(
  8456. 'assay_project_idx1' => array(
  8457. '0' => 'assay_id',
  8458. ),
  8459. 'assay_project_idx2' => array(
  8460. '0' => 'project_id',
  8461. ),
  8462. ),
  8463. 'foreign keys' => array(
  8464. ),
  8465. );
  8466. return $description;
  8467. }
  8468. /**
  8469. * Implements hook_assay_biomaterial_schema()
  8470. * Purpose: To describe the structure of assay_biomaterial to tripal
  8471. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8472. * @see tripal_core.api.inc: tripal_core_chado_update()
  8473. * @see tripal_core.api.inc: tripal_core_chado_select()
  8474. *
  8475. * @return
  8476. * An array describing the current table
  8477. *
  8478. * @ingroup tripal_schema_api
  8479. *
  8480. */
  8481. function tripal_core_chado_assay_biomaterial_schema () {
  8482. $description = array();
  8483. $description = array(
  8484. 'table' => 'assay_biomaterial',
  8485. // 'description' => 'TODO: please describe this table!',
  8486. 'fields' => array(
  8487. 'assay_biomaterial_id' => array(
  8488. // 'description' => 'TODO: please describe this field!',
  8489. 'type' => 'serial',
  8490. 'not null' => '1',
  8491. ),
  8492. 'assay_id' => array(
  8493. // 'description' => 'TODO: please describe this field!',
  8494. 'type' => 'int',
  8495. 'not null' => '1',
  8496. ),
  8497. 'biomaterial_id' => array(
  8498. // 'description' => 'TODO: please describe this field!',
  8499. 'type' => 'int',
  8500. 'not null' => '1',
  8501. ),
  8502. 'channel_id' => array(
  8503. // 'description' => 'TODO: please describe this field!',
  8504. 'type' => 'int',
  8505. 'not null' => '',
  8506. ),
  8507. 'rank' => array(
  8508. // 'description' => 'TODO: please describe this field!',
  8509. 'type' => 'int',
  8510. 'not null' => '1',
  8511. 'default' => '0',
  8512. ),
  8513. ),
  8514. 'primary key' => array(
  8515. '0' => 'assay_biomaterial_id',
  8516. ),
  8517. 'unique keys' => array(
  8518. 'assay_biomaterial_c1' => array(
  8519. '0' => 'assay_id',
  8520. '1' => 'biomaterial_id',
  8521. '2' => 'channel_id',
  8522. '3' => 'rank',
  8523. ),
  8524. ),
  8525. 'indexes' => array(
  8526. 'assay_biomaterial_idx1' => array(
  8527. '0' => 'assay_id',
  8528. ),
  8529. 'assay_biomaterial_idx2' => array(
  8530. '0' => 'biomaterial_id',
  8531. ),
  8532. 'assay_biomaterial_idx3' => array(
  8533. '0' => 'channel_id',
  8534. ),
  8535. ),
  8536. 'foreign keys' => array(
  8537. ),
  8538. );
  8539. return $description;
  8540. }
  8541. /**
  8542. * Implements hook_analysisprop_schema()
  8543. * Purpose: To describe the structure of analysisprop to tripal
  8544. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8545. * @see tripal_core.api.inc: tripal_core_chado_update()
  8546. * @see tripal_core.api.inc: tripal_core_chado_select()
  8547. *
  8548. * @return
  8549. * An array describing the current table
  8550. *
  8551. * @ingroup tripal_schema_api
  8552. *
  8553. */
  8554. function tripal_core_chado_analysisprop_schema () {
  8555. $description = array();
  8556. $description = array(
  8557. 'table' => 'analysisprop',
  8558. // 'description' => 'TODO: please describe this table!',
  8559. 'fields' => array(
  8560. 'analysisprop_id' => array(
  8561. // 'description' => 'TODO: please describe this field!',
  8562. 'type' => 'serial',
  8563. 'not null' => '1',
  8564. ),
  8565. 'analysis_id' => array(
  8566. // 'description' => 'TODO: please describe this field!',
  8567. 'type' => 'int',
  8568. 'not null' => '1',
  8569. ),
  8570. 'type_id' => array(
  8571. // 'description' => 'TODO: please describe this field!',
  8572. 'type' => 'int',
  8573. 'not null' => '1',
  8574. ),
  8575. 'value' => array(
  8576. // 'description' => 'TODO: please describe this field!',
  8577. 'type' => 'text',
  8578. 'not null' => '',
  8579. ),
  8580. 'rank' => array(
  8581. // 'description' => 'TODO: please describe this field!',
  8582. 'type' => 'int',
  8583. 'not null' => '1',
  8584. 'default' => '0',
  8585. ),
  8586. ),
  8587. 'primary key' => array(
  8588. '0' => 'analysisprop_id',
  8589. ),
  8590. 'unique keys' => array(
  8591. 'analysisprop_c1' => array(
  8592. '0' => 'analysis_id',
  8593. '1' => 'type_id',
  8594. '2' => 'rank',
  8595. ),
  8596. ),
  8597. 'indexes' => array(
  8598. 'analysisprop_idx1' => array(
  8599. '0' => 'analysis_id',
  8600. ),
  8601. 'analysisprop_idx2' => array(
  8602. '0' => 'type_id',
  8603. ),
  8604. ),
  8605. 'foreign keys' => array(
  8606. ),
  8607. );
  8608. return $description;
  8609. }
  8610. /**
  8611. * Implements hook_arraydesign_schema()
  8612. * Purpose: To describe the structure of arraydesign to tripal
  8613. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8614. * @see tripal_core.api.inc: tripal_core_chado_update()
  8615. * @see tripal_core.api.inc: tripal_core_chado_select()
  8616. *
  8617. * @return
  8618. * An array describing the current table
  8619. *
  8620. * @ingroup tripal_schema_api
  8621. *
  8622. */
  8623. function tripal_core_chado_arraydesign_schema () {
  8624. $description = array();
  8625. $description = array(
  8626. 'table' => 'arraydesign',
  8627. // 'description' => 'TODO: please describe this table!',
  8628. 'fields' => array(
  8629. 'arraydesign_id' => array(
  8630. // 'description' => 'TODO: please describe this field!',
  8631. 'type' => 'serial',
  8632. 'not null' => '1',
  8633. ),
  8634. 'manufacturer_id' => array(
  8635. // 'description' => 'TODO: please describe this field!',
  8636. 'type' => 'int',
  8637. 'not null' => '1',
  8638. ),
  8639. 'platformtype_id' => array(
  8640. // 'description' => 'TODO: please describe this field!',
  8641. 'type' => 'int',
  8642. 'not null' => '1',
  8643. ),
  8644. 'substratetype_id' => array(
  8645. // 'description' => 'TODO: please describe this field!',
  8646. 'type' => 'int',
  8647. 'not null' => '',
  8648. ),
  8649. 'protocol_id' => array(
  8650. // 'description' => 'TODO: please describe this field!',
  8651. 'type' => 'int',
  8652. 'not null' => '',
  8653. ),
  8654. 'dbxref_id' => array(
  8655. // 'description' => 'TODO: please describe this field!',
  8656. 'type' => 'int',
  8657. 'not null' => '',
  8658. ),
  8659. 'name' => array(
  8660. // 'description' => 'TODO: please describe this field!',
  8661. 'type' => 'text',
  8662. 'not null' => '1',
  8663. ),
  8664. 'version' => array(
  8665. // 'description' => 'TODO: please describe this field!',
  8666. 'type' => 'text',
  8667. 'not null' => '',
  8668. ),
  8669. 'description' => array(
  8670. // 'description' => 'TODO: please describe this field!',
  8671. 'type' => 'text',
  8672. 'not null' => '',
  8673. ),
  8674. 'array_dimensions' => array(
  8675. // 'description' => 'TODO: please describe this field!',
  8676. 'type' => 'text',
  8677. 'not null' => '',
  8678. ),
  8679. 'element_dimensions' => array(
  8680. // 'description' => 'TODO: please describe this field!',
  8681. 'type' => 'text',
  8682. 'not null' => '',
  8683. ),
  8684. 'num_of_elements' => array(
  8685. // 'description' => 'TODO: please describe this field!',
  8686. 'type' => 'int',
  8687. 'not null' => '',
  8688. ),
  8689. 'num_array_columns' => array(
  8690. // 'description' => 'TODO: please describe this field!',
  8691. 'type' => 'int',
  8692. 'not null' => '',
  8693. ),
  8694. 'num_array_rows' => array(
  8695. // 'description' => 'TODO: please describe this field!',
  8696. 'type' => 'int',
  8697. 'not null' => '',
  8698. ),
  8699. 'num_grid_columns' => array(
  8700. // 'description' => 'TODO: please describe this field!',
  8701. 'type' => 'int',
  8702. 'not null' => '',
  8703. ),
  8704. 'num_grid_rows' => array(
  8705. // 'description' => 'TODO: please describe this field!',
  8706. 'type' => 'int',
  8707. 'not null' => '',
  8708. ),
  8709. 'num_sub_columns' => array(
  8710. // 'description' => 'TODO: please describe this field!',
  8711. 'type' => 'int',
  8712. 'not null' => '',
  8713. ),
  8714. 'num_sub_rows' => array(
  8715. // 'description' => 'TODO: please describe this field!',
  8716. 'type' => 'int',
  8717. 'not null' => '',
  8718. ),
  8719. ),
  8720. 'primary key' => array(
  8721. '0' => 'arraydesign_id',
  8722. ),
  8723. 'unique keys' => array(
  8724. 'arraydesign_c1' => array(
  8725. '0' => 'name',
  8726. ),
  8727. ),
  8728. 'indexes' => array(
  8729. 'arraydesign_idx1' => array(
  8730. '0' => 'manufacturer_id',
  8731. ),
  8732. 'arraydesign_idx2' => array(
  8733. '0' => 'platformtype_id',
  8734. ),
  8735. 'arraydesign_idx3' => array(
  8736. '0' => 'substratetype_id',
  8737. ),
  8738. 'arraydesign_idx4' => array(
  8739. '0' => 'protocol_id',
  8740. ),
  8741. 'arraydesign_idx5' => array(
  8742. '0' => 'dbxref_id',
  8743. ),
  8744. ),
  8745. 'foreign keys' => array(
  8746. ),
  8747. );
  8748. return $description;
  8749. }
  8750. /**
  8751. * Implements hook_arraydesignprop_schema()
  8752. * Purpose: To describe the structure of arraydesignprop to tripal
  8753. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8754. * @see tripal_core.api.inc: tripal_core_chado_update()
  8755. * @see tripal_core.api.inc: tripal_core_chado_select()
  8756. *
  8757. * @return
  8758. * An array describing the current table
  8759. *
  8760. * @ingroup tripal_schema_api
  8761. *
  8762. */
  8763. function tripal_core_chado_arraydesignprop_schema () {
  8764. $description = array();
  8765. $description = array(
  8766. 'table' => 'arraydesignprop',
  8767. // 'description' => 'TODO: please describe this table!',
  8768. 'fields' => array(
  8769. 'arraydesignprop_id' => array(
  8770. // 'description' => 'TODO: please describe this field!',
  8771. 'type' => 'serial',
  8772. 'not null' => '1',
  8773. ),
  8774. 'arraydesign_id' => array(
  8775. // 'description' => 'TODO: please describe this field!',
  8776. 'type' => 'int',
  8777. 'not null' => '1',
  8778. ),
  8779. 'type_id' => array(
  8780. // 'description' => 'TODO: please describe this field!',
  8781. 'type' => 'int',
  8782. 'not null' => '1',
  8783. ),
  8784. 'value' => array(
  8785. // 'description' => 'TODO: please describe this field!',
  8786. 'type' => 'text',
  8787. 'not null' => '',
  8788. ),
  8789. 'rank' => array(
  8790. // 'description' => 'TODO: please describe this field!',
  8791. 'type' => 'int',
  8792. 'not null' => '1',
  8793. 'default' => '0',
  8794. ),
  8795. ),
  8796. 'primary key' => array(
  8797. '0' => 'arraydesignprop_id',
  8798. ),
  8799. 'unique keys' => array(
  8800. 'arraydesignprop_c1' => array(
  8801. '0' => 'arraydesign_id',
  8802. '1' => 'type_id',
  8803. '2' => 'rank',
  8804. ),
  8805. ),
  8806. 'indexes' => array(
  8807. 'arraydesignprop_idx1' => array(
  8808. '0' => 'arraydesign_id',
  8809. ),
  8810. 'arraydesignprop_idx2' => array(
  8811. '0' => 'type_id',
  8812. ),
  8813. ),
  8814. 'foreign keys' => array(
  8815. ),
  8816. );
  8817. return $description;
  8818. }
  8819. /**
  8820. * Implements hook_assay_schema()
  8821. * Purpose: To describe the structure of assay to tripal
  8822. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8823. * @see tripal_core.api.inc: tripal_core_chado_update()
  8824. * @see tripal_core.api.inc: tripal_core_chado_select()
  8825. *
  8826. * @return
  8827. * An array describing the current table
  8828. *
  8829. * @ingroup tripal_schema_api
  8830. *
  8831. */
  8832. function tripal_core_chado_assay_schema () {
  8833. $description = array();
  8834. $description = array(
  8835. 'table' => 'assay',
  8836. // 'description' => 'TODO: please describe this table!',
  8837. 'fields' => array(
  8838. 'assay_id' => array(
  8839. // 'description' => 'TODO: please describe this field!',
  8840. 'type' => 'serial',
  8841. 'not null' => '1',
  8842. ),
  8843. 'arraydesign_id' => array(
  8844. // 'description' => 'TODO: please describe this field!',
  8845. 'type' => 'int',
  8846. 'not null' => '1',
  8847. ),
  8848. 'protocol_id' => array(
  8849. // 'description' => 'TODO: please describe this field!',
  8850. 'type' => 'int',
  8851. 'not null' => '',
  8852. ),
  8853. 'assaydate' => array(
  8854. // 'description' => 'TODO: please describe this field!',
  8855. 'type' => 'datetime',
  8856. 'not null' => '',
  8857. 'default' => 'ow(',
  8858. ),
  8859. 'arrayidentifier' => array(
  8860. // 'description' => 'TODO: please describe this field!',
  8861. 'type' => 'text',
  8862. 'not null' => '',
  8863. ),
  8864. 'arraybatchidentifier' => array(
  8865. // 'description' => 'TODO: please describe this field!',
  8866. 'type' => 'text',
  8867. 'not null' => '',
  8868. ),
  8869. 'operator_id' => array(
  8870. // 'description' => 'TODO: please describe this field!',
  8871. 'type' => 'int',
  8872. 'not null' => '1',
  8873. ),
  8874. 'dbxref_id' => array(
  8875. // 'description' => 'TODO: please describe this field!',
  8876. 'type' => 'int',
  8877. 'not null' => '',
  8878. ),
  8879. 'name' => array(
  8880. // 'description' => 'TODO: please describe this field!',
  8881. 'type' => 'text',
  8882. 'not null' => '',
  8883. ),
  8884. 'description' => array(
  8885. // 'description' => 'TODO: please describe this field!',
  8886. 'type' => 'text',
  8887. 'not null' => '',
  8888. ),
  8889. ),
  8890. 'primary key' => array(
  8891. '0' => 'assay_id',
  8892. ),
  8893. 'unique keys' => array(
  8894. 'assay_c1' => array(
  8895. '0' => 'name',
  8896. ),
  8897. ),
  8898. 'indexes' => array(
  8899. 'assay_idx1' => array(
  8900. '0' => 'arraydesign_id',
  8901. ),
  8902. 'assay_idx2' => array(
  8903. '0' => 'protocol_id',
  8904. ),
  8905. 'assay_idx3' => array(
  8906. '0' => 'operator_id',
  8907. ),
  8908. 'assay_idx4' => array(
  8909. '0' => 'dbxref_id',
  8910. ),
  8911. ),
  8912. 'foreign keys' => array(
  8913. ),
  8914. );
  8915. return $description;
  8916. }
  8917. /**
  8918. * Implements hook_cv_root_schema()
  8919. * Purpose: To describe the structure of cv_root to tripal
  8920. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8921. * @see tripal_core.api.inc: tripal_core_chado_update()
  8922. * @see tripal_core.api.inc: tripal_core_chado_select()
  8923. *
  8924. * @return
  8925. * An array describing the current table
  8926. *
  8927. * @ingroup tripal_schema_api
  8928. *
  8929. */
  8930. function tripal_core_chado_cv_root_schema () {
  8931. $description = array();
  8932. $description = array(
  8933. 'table' => 'cv_root',
  8934. // 'description' => 'TODO: please describe this table!',
  8935. 'fields' => array(
  8936. 'cv_id' => array(
  8937. // 'description' => 'TODO: please describe this field!',
  8938. 'type' => 'int',
  8939. 'not null' => '',
  8940. ),
  8941. 'root_cvterm_id' => array(
  8942. // 'description' => 'TODO: please describe this field!',
  8943. 'type' => 'int',
  8944. 'not null' => '',
  8945. ),
  8946. ),
  8947. 'primary key' => array(
  8948. ),
  8949. 'unique keys' => array(
  8950. ),
  8951. 'indexes' => array(
  8952. ),
  8953. 'foreign keys' => array(
  8954. ),
  8955. );
  8956. return $description;
  8957. }
  8958. /**
  8959. * Implements hook_cvterm_schema()
  8960. * Purpose: To describe the structure of cvterm to tripal
  8961. * @see tripal_core.api.inc: tripal_core_chado_insert()
  8962. * @see tripal_core.api.inc: tripal_core_chado_update()
  8963. * @see tripal_core.api.inc: tripal_core_chado_select()
  8964. *
  8965. * @return
  8966. * An array describing the current table
  8967. *
  8968. * @ingroup tripal_schema_api
  8969. *
  8970. */
  8971. function tripal_core_chado_cvterm_schema () {
  8972. $description = array();
  8973. $description = array(
  8974. 'table' => 'cvterm',
  8975. // 'description' => 'TODO: please describe this table!',
  8976. 'fields' => array(
  8977. 'cvterm_id' => array(
  8978. // 'description' => 'TODO: please describe this field!',
  8979. 'type' => 'serial',
  8980. 'not null' => '1',
  8981. ),
  8982. 'cv_id' => array(
  8983. // 'description' => 'TODO: please describe this field!',
  8984. 'type' => 'int',
  8985. 'not null' => '1',
  8986. ),
  8987. 'name' => array(
  8988. // 'description' => 'TODO: please describe this field!',
  8989. 'type' => 'varchar',
  8990. 'length' => '1024',
  8991. 'not null' => '1',
  8992. ),
  8993. 'definition' => array(
  8994. // 'description' => 'TODO: please describe this field!',
  8995. 'type' => 'text',
  8996. 'not null' => '',
  8997. ),
  8998. 'dbxref_id' => array(
  8999. // 'description' => 'TODO: please describe this field!',
  9000. 'type' => 'int',
  9001. 'not null' => '1',
  9002. ),
  9003. 'is_obsolete' => array(
  9004. // 'description' => 'TODO: please describe this field!',
  9005. 'type' => 'int',
  9006. 'not null' => '1',
  9007. 'default' => '0',
  9008. ),
  9009. 'is_relationshiptype' => array(
  9010. // 'description' => 'TODO: please describe this field!',
  9011. 'type' => 'int',
  9012. 'not null' => '1',
  9013. 'default' => '0',
  9014. ),
  9015. ),
  9016. 'primary key' => array(
  9017. '0' => 'cvterm_id',
  9018. ),
  9019. 'unique keys' => array(
  9020. 'cvterm_c1' => array(
  9021. '0' => 'name',
  9022. '1' => 'cv_id',
  9023. '2' => 'is_obsolete',
  9024. ),
  9025. 'cvterm_c2' => array(
  9026. '0' => 'dbxref_id',
  9027. ),
  9028. ),
  9029. 'indexes' => array(
  9030. 'cvterm_idx1' => array(
  9031. '0' => 'cv_id',
  9032. ),
  9033. 'cvterm_idx2' => array(
  9034. '0' => 'name',
  9035. ),
  9036. 'cvterm_idx3' => array(
  9037. '0' => 'dbxref_id',
  9038. ),
  9039. ),
  9040. 'foreign keys' => array(
  9041. ),
  9042. );
  9043. return $description;
  9044. }
  9045. /**
  9046. * Implements hook_feature_dbxref_schema()
  9047. * Purpose: To describe the structure of feature_dbxref to tripal
  9048. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9049. * @see tripal_core.api.inc: tripal_core_chado_update()
  9050. * @see tripal_core.api.inc: tripal_core_chado_select()
  9051. *
  9052. * @return
  9053. * An array describing the current table
  9054. *
  9055. * @ingroup tripal_schema_api
  9056. *
  9057. */
  9058. function tripal_core_chado_feature_dbxref_schema () {
  9059. $description = array();
  9060. $description = array(
  9061. 'table' => 'feature_dbxref',
  9062. // 'description' => 'TODO: please describe this table!',
  9063. 'fields' => array(
  9064. 'feature_dbxref_id' => array(
  9065. // 'description' => 'TODO: please describe this field!',
  9066. 'type' => 'serial',
  9067. 'not null' => '1',
  9068. ),
  9069. 'feature_id' => array(
  9070. // 'description' => 'TODO: please describe this field!',
  9071. 'type' => 'int',
  9072. 'not null' => '1',
  9073. ),
  9074. 'dbxref_id' => array(
  9075. // 'description' => 'TODO: please describe this field!',
  9076. 'type' => 'int',
  9077. 'not null' => '1',
  9078. ),
  9079. 'is_current' => array(
  9080. // 'description' => 'TODO: please describe this field!',
  9081. 'type' => 'boolean',
  9082. 'not null' => '1',
  9083. 'default' => 'ru',
  9084. ),
  9085. ),
  9086. 'primary key' => array(
  9087. '0' => 'feature_dbxref_id',
  9088. ),
  9089. 'unique keys' => array(
  9090. 'feature_dbxref_c1' => array(
  9091. '0' => 'feature_id',
  9092. '1' => 'dbxref_id',
  9093. ),
  9094. ),
  9095. 'indexes' => array(
  9096. 'feature_dbxref_idx1' => array(
  9097. '0' => 'feature_id',
  9098. ),
  9099. 'feature_dbxref_idx2' => array(
  9100. '0' => 'dbxref_id',
  9101. ),
  9102. ),
  9103. 'foreign keys' => array(
  9104. ),
  9105. );
  9106. return $description;
  9107. }
  9108. /**
  9109. * Implements hook_feature_cvtermprop_schema()
  9110. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9111. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9112. * @see tripal_core.api.inc: tripal_core_chado_update()
  9113. * @see tripal_core.api.inc: tripal_core_chado_select()
  9114. *
  9115. * @return
  9116. * An array describing the current table
  9117. *
  9118. * @ingroup tripal_schema_api
  9119. *
  9120. */
  9121. function tripal_core_chado_feature_cvtermprop_schema () {
  9122. $description = array();
  9123. $description = array(
  9124. 'table' => 'feature_cvtermprop',
  9125. // 'description' => 'TODO: please describe this table!',
  9126. 'fields' => array(
  9127. 'feature_cvtermprop_id' => array(
  9128. // 'description' => 'TODO: please describe this field!',
  9129. 'type' => 'serial',
  9130. 'not null' => '1',
  9131. ),
  9132. 'feature_cvterm_id' => array(
  9133. // 'description' => 'TODO: please describe this field!',
  9134. 'type' => 'int',
  9135. 'not null' => '1',
  9136. ),
  9137. 'type_id' => array(
  9138. // 'description' => 'TODO: please describe this field!',
  9139. 'type' => 'int',
  9140. 'not null' => '1',
  9141. ),
  9142. 'value' => array(
  9143. // 'description' => 'TODO: please describe this field!',
  9144. 'type' => 'text',
  9145. 'not null' => '',
  9146. ),
  9147. 'rank' => array(
  9148. // 'description' => 'TODO: please describe this field!',
  9149. 'type' => 'int',
  9150. 'not null' => '1',
  9151. 'default' => '0',
  9152. ),
  9153. ),
  9154. 'primary key' => array(
  9155. '0' => 'feature_cvtermprop_id',
  9156. ),
  9157. 'unique keys' => array(
  9158. 'feature_cvtermprop_c1' => array(
  9159. '0' => 'feature_cvterm_id',
  9160. '1' => 'type_id',
  9161. '2' => 'rank',
  9162. ),
  9163. ),
  9164. 'indexes' => array(
  9165. 'feature_cvtermprop_idx1' => array(
  9166. '0' => 'feature_cvterm_id',
  9167. ),
  9168. 'feature_cvtermprop_idx2' => array(
  9169. '0' => 'type_id',
  9170. ),
  9171. ),
  9172. 'foreign keys' => array(
  9173. ),
  9174. );
  9175. return $description;
  9176. }
  9177. /**
  9178. * Implements hook_feature_difference_schema()
  9179. * Purpose: To describe the structure of feature_difference to tripal
  9180. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9181. * @see tripal_core.api.inc: tripal_core_chado_update()
  9182. * @see tripal_core.api.inc: tripal_core_chado_select()
  9183. *
  9184. * @return
  9185. * An array describing the current table
  9186. *
  9187. * @ingroup tripal_schema_api
  9188. *
  9189. */
  9190. function tripal_core_chado_feature_difference_schema () {
  9191. $description = array();
  9192. $description = array(
  9193. 'table' => 'feature_difference',
  9194. // 'description' => 'TODO: please describe this table!',
  9195. 'fields' => array(
  9196. 'subject_id' => array(
  9197. // 'description' => 'TODO: please describe this field!',
  9198. 'type' => 'int',
  9199. 'not null' => '',
  9200. ),
  9201. 'object_id' => array(
  9202. // 'description' => 'TODO: please describe this field!',
  9203. 'type' => 'int',
  9204. 'not null' => '',
  9205. ),
  9206. 'srcfeature_id' => array(
  9207. // 'description' => 'TODO: please describe this field!',
  9208. 'type' => 'int',
  9209. 'size' => 'small',
  9210. 'not null' => '',
  9211. ),
  9212. 'fmin' => array(
  9213. // 'description' => 'TODO: please describe this field!',
  9214. 'type' => 'int',
  9215. 'not null' => '',
  9216. ),
  9217. 'fmax' => array(
  9218. // 'description' => 'TODO: please describe this field!',
  9219. 'type' => 'int',
  9220. 'not null' => '',
  9221. ),
  9222. 'strand' => array(
  9223. // 'description' => 'TODO: please describe this field!',
  9224. 'type' => 'int',
  9225. 'not null' => '',
  9226. ),
  9227. ),
  9228. 'primary key' => array(
  9229. ),
  9230. 'unique keys' => array(
  9231. ),
  9232. 'indexes' => array(
  9233. ),
  9234. 'foreign keys' => array(
  9235. ),
  9236. );
  9237. return $description;
  9238. }
  9239. /**
  9240. * Implements hook_feature_disjoint_schema()
  9241. * Purpose: To describe the structure of feature_disjoint to tripal
  9242. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9243. * @see tripal_core.api.inc: tripal_core_chado_update()
  9244. * @see tripal_core.api.inc: tripal_core_chado_select()
  9245. *
  9246. * @return
  9247. * An array describing the current table
  9248. *
  9249. * @ingroup tripal_schema_api
  9250. *
  9251. */
  9252. function tripal_core_chado_feature_disjoint_schema () {
  9253. $description = array();
  9254. $description = array(
  9255. 'table' => 'feature_disjoint',
  9256. // 'description' => 'TODO: please describe this table!',
  9257. 'fields' => array(
  9258. 'subject_id' => array(
  9259. // 'description' => 'TODO: please describe this field!',
  9260. 'type' => 'int',
  9261. 'not null' => '',
  9262. ),
  9263. 'object_id' => array(
  9264. // 'description' => 'TODO: please describe this field!',
  9265. 'type' => 'int',
  9266. 'not null' => '',
  9267. ),
  9268. ),
  9269. 'primary key' => array(
  9270. ),
  9271. 'unique keys' => array(
  9272. ),
  9273. 'indexes' => array(
  9274. ),
  9275. 'foreign keys' => array(
  9276. ),
  9277. );
  9278. return $description;
  9279. }
  9280. /**
  9281. * Implements hook_feature_distance_schema()
  9282. * Purpose: To describe the structure of feature_distance to tripal
  9283. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9284. * @see tripal_core.api.inc: tripal_core_chado_update()
  9285. * @see tripal_core.api.inc: tripal_core_chado_select()
  9286. *
  9287. * @return
  9288. * An array describing the current table
  9289. *
  9290. * @ingroup tripal_schema_api
  9291. *
  9292. */
  9293. function tripal_core_chado_feature_distance_schema () {
  9294. $description = array();
  9295. $description = array(
  9296. 'table' => 'feature_distance',
  9297. // 'description' => 'TODO: please describe this table!',
  9298. 'fields' => array(
  9299. 'subject_id' => array(
  9300. // 'description' => 'TODO: please describe this field!',
  9301. 'type' => 'int',
  9302. 'not null' => '',
  9303. ),
  9304. 'object_id' => array(
  9305. // 'description' => 'TODO: please describe this field!',
  9306. 'type' => 'int',
  9307. 'not null' => '',
  9308. ),
  9309. 'srcfeature_id' => array(
  9310. // 'description' => 'TODO: please describe this field!',
  9311. 'type' => 'int',
  9312. 'not null' => '',
  9313. ),
  9314. 'subject_strand' => array(
  9315. // 'description' => 'TODO: please describe this field!',
  9316. 'type' => 'int',
  9317. 'size' => 'small',
  9318. 'not null' => '',
  9319. ),
  9320. 'object_strand' => array(
  9321. // 'description' => 'TODO: please describe this field!',
  9322. 'type' => 'int',
  9323. 'size' => 'small',
  9324. 'not null' => '',
  9325. ),
  9326. 'distance' => array(
  9327. // 'description' => 'TODO: please describe this field!',
  9328. 'type' => 'int',
  9329. 'not null' => '',
  9330. ),
  9331. ),
  9332. 'primary key' => array(
  9333. ),
  9334. 'unique keys' => array(
  9335. ),
  9336. 'indexes' => array(
  9337. ),
  9338. 'foreign keys' => array(
  9339. ),
  9340. );
  9341. return $description;
  9342. }
  9343. /**
  9344. * Implements hook_feature_cvterm_pub_schema()
  9345. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9346. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9347. * @see tripal_core.api.inc: tripal_core_chado_update()
  9348. * @see tripal_core.api.inc: tripal_core_chado_select()
  9349. *
  9350. * @return
  9351. * An array describing the current table
  9352. *
  9353. * @ingroup tripal_schema_api
  9354. *
  9355. */
  9356. function tripal_core_chado_feature_cvterm_pub_schema () {
  9357. $description = array();
  9358. $description = array(
  9359. 'table' => 'feature_cvterm_pub',
  9360. // 'description' => 'TODO: please describe this table!',
  9361. 'fields' => array(
  9362. 'feature_cvterm_pub_id' => array(
  9363. // 'description' => 'TODO: please describe this field!',
  9364. 'type' => 'serial',
  9365. 'not null' => '1',
  9366. ),
  9367. 'feature_cvterm_id' => array(
  9368. // 'description' => 'TODO: please describe this field!',
  9369. 'type' => 'int',
  9370. 'not null' => '1',
  9371. ),
  9372. 'pub_id' => array(
  9373. // 'description' => 'TODO: please describe this field!',
  9374. 'type' => 'int',
  9375. 'not null' => '1',
  9376. ),
  9377. ),
  9378. 'primary key' => array(
  9379. '0' => 'feature_cvterm_pub_id',
  9380. ),
  9381. 'unique keys' => array(
  9382. 'feature_cvterm_pub_c1' => array(
  9383. '0' => 'feature_cvterm_id',
  9384. '1' => 'pub_id',
  9385. ),
  9386. ),
  9387. 'indexes' => array(
  9388. 'feature_cvterm_pub_idx1' => array(
  9389. '0' => 'feature_cvterm_id',
  9390. ),
  9391. 'feature_cvterm_pub_idx2' => array(
  9392. '0' => 'pub_id',
  9393. ),
  9394. ),
  9395. 'foreign keys' => array(
  9396. ),
  9397. );
  9398. return $description;
  9399. }
  9400. /**
  9401. * Implements hook_feature_cvterm_dbxref_schema()
  9402. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9403. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9404. * @see tripal_core.api.inc: tripal_core_chado_update()
  9405. * @see tripal_core.api.inc: tripal_core_chado_select()
  9406. *
  9407. * @return
  9408. * An array describing the current table
  9409. *
  9410. * @ingroup tripal_schema_api
  9411. *
  9412. */
  9413. function tripal_core_chado_feature_cvterm_dbxref_schema () {
  9414. $description = array();
  9415. $description = array(
  9416. 'table' => 'feature_cvterm_dbxref',
  9417. // 'description' => 'TODO: please describe this table!',
  9418. 'fields' => array(
  9419. 'feature_cvterm_dbxref_id' => array(
  9420. // 'description' => 'TODO: please describe this field!',
  9421. 'type' => 'serial',
  9422. 'not null' => '1',
  9423. ),
  9424. 'feature_cvterm_id' => array(
  9425. // 'description' => 'TODO: please describe this field!',
  9426. 'type' => 'int',
  9427. 'not null' => '1',
  9428. ),
  9429. 'dbxref_id' => array(
  9430. // 'description' => 'TODO: please describe this field!',
  9431. 'type' => 'int',
  9432. 'not null' => '1',
  9433. ),
  9434. ),
  9435. 'primary key' => array(
  9436. '0' => 'feature_cvterm_dbxref_id',
  9437. ),
  9438. 'unique keys' => array(
  9439. 'feature_cvterm_dbxref_c1' => array(
  9440. '0' => 'feature_cvterm_id',
  9441. '1' => 'dbxref_id',
  9442. ),
  9443. ),
  9444. 'indexes' => array(
  9445. 'feature_cvterm_dbxref_idx1' => array(
  9446. '0' => 'feature_cvterm_id',
  9447. ),
  9448. 'feature_cvterm_dbxref_idx2' => array(
  9449. '0' => 'dbxref_id',
  9450. ),
  9451. ),
  9452. 'foreign keys' => array(
  9453. ),
  9454. );
  9455. return $description;
  9456. }
  9457. /**
  9458. * Implements hook_f_type_schema()
  9459. * Purpose: To describe the structure of f_type to tripal
  9460. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9461. * @see tripal_core.api.inc: tripal_core_chado_update()
  9462. * @see tripal_core.api.inc: tripal_core_chado_select()
  9463. *
  9464. * @return
  9465. * An array describing the current table
  9466. *
  9467. * @ingroup tripal_schema_api
  9468. *
  9469. */
  9470. function tripal_core_chado_f_type_schema () {
  9471. $description = array();
  9472. $description = array(
  9473. 'table' => 'f_type',
  9474. // 'description' => 'TODO: please describe this table!',
  9475. 'fields' => array(
  9476. 'feature_id' => array(
  9477. // 'description' => 'TODO: please describe this field!',
  9478. 'type' => 'int',
  9479. 'not null' => '',
  9480. ),
  9481. 'name' => array(
  9482. // 'description' => 'TODO: please describe this field!',
  9483. 'type' => 'varchar',
  9484. 'length' => '255',
  9485. 'not null' => '',
  9486. ),
  9487. 'dbxref_id' => array(
  9488. // 'description' => 'TODO: please describe this field!',
  9489. 'type' => 'int',
  9490. 'not null' => '',
  9491. ),
  9492. 'type' => array(
  9493. // 'description' => 'TODO: please describe this field!',
  9494. 'type' => 'varchar',
  9495. 'length' => '1024',
  9496. 'not null' => '',
  9497. ),
  9498. 'residues' => array(
  9499. // 'description' => 'TODO: please describe this field!',
  9500. 'type' => 'text',
  9501. 'not null' => '',
  9502. ),
  9503. 'seqlen' => array(
  9504. // 'description' => 'TODO: please describe this field!',
  9505. 'type' => 'int',
  9506. 'not null' => '',
  9507. ),
  9508. 'md5checksum' => array(
  9509. // 'description' => 'TODO: please describe this field!',
  9510. 'type' => 'char',
  9511. 'length' => '32',
  9512. 'not null' => '',
  9513. ),
  9514. 'type_id' => array(
  9515. // 'description' => 'TODO: please describe this field!',
  9516. 'type' => 'int',
  9517. 'not null' => '',
  9518. ),
  9519. 'timeaccessioned' => array(
  9520. // 'description' => 'TODO: please describe this field!',
  9521. 'type' => 'datetime',
  9522. 'not null' => '',
  9523. ),
  9524. 'timelastmodified' => array(
  9525. // 'description' => 'TODO: please describe this field!',
  9526. 'type' => 'datetime',
  9527. 'not null' => '',
  9528. ),
  9529. ),
  9530. 'primary key' => array(
  9531. ),
  9532. 'unique keys' => array(
  9533. ),
  9534. 'indexes' => array(
  9535. ),
  9536. 'foreign keys' => array(
  9537. ),
  9538. );
  9539. return $description;
  9540. }
  9541. /**
  9542. * Implements hook_feature_schema()
  9543. * Purpose: To describe the structure of feature to tripal
  9544. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9545. * @see tripal_core.api.inc: tripal_core_chado_update()
  9546. * @see tripal_core.api.inc: tripal_core_chado_select()
  9547. *
  9548. * @return
  9549. * An array describing the current table
  9550. *
  9551. * @ingroup tripal_schema_api
  9552. *
  9553. */
  9554. function tripal_core_chado_feature_schema () {
  9555. $description = array();
  9556. $description = array(
  9557. 'table' => 'feature',
  9558. // 'description' => 'TODO: please describe this table!',
  9559. 'fields' => array(
  9560. 'feature_id' => array(
  9561. // 'description' => 'TODO: please describe this field!',
  9562. 'type' => 'serial',
  9563. 'not null' => '1',
  9564. ),
  9565. 'dbxref_id' => array(
  9566. // 'description' => 'TODO: please describe this field!',
  9567. 'type' => 'int',
  9568. 'not null' => '',
  9569. ),
  9570. 'organism_id' => array(
  9571. // 'description' => 'TODO: please describe this field!',
  9572. 'type' => 'int',
  9573. 'not null' => '1',
  9574. ),
  9575. 'name' => array(
  9576. // 'description' => 'TODO: please describe this field!',
  9577. 'type' => 'varchar',
  9578. 'length' => '255',
  9579. 'not null' => '',
  9580. ),
  9581. 'uniquename' => array(
  9582. // 'description' => 'TODO: please describe this field!',
  9583. 'type' => 'text',
  9584. 'not null' => '1',
  9585. ),
  9586. 'residues' => array(
  9587. // 'description' => 'TODO: please describe this field!',
  9588. 'type' => 'text',
  9589. 'not null' => '',
  9590. ),
  9591. 'seqlen' => array(
  9592. // 'description' => 'TODO: please describe this field!',
  9593. 'type' => 'int',
  9594. 'not null' => '',
  9595. ),
  9596. 'md5checksum' => array(
  9597. // 'description' => 'TODO: please describe this field!',
  9598. 'type' => 'char',
  9599. 'length' => '32',
  9600. 'not null' => '',
  9601. ),
  9602. 'type_id' => array(
  9603. // 'description' => 'TODO: please describe this field!',
  9604. 'type' => 'int',
  9605. 'not null' => '1',
  9606. ),
  9607. 'is_analysis' => array(
  9608. // 'description' => 'TODO: please describe this field!',
  9609. 'type' => 'boolean',
  9610. 'not null' => '1',
  9611. 'default' => 'als',
  9612. ),
  9613. 'is_obsolete' => array(
  9614. // 'description' => 'TODO: please describe this field!',
  9615. 'type' => 'boolean',
  9616. 'not null' => '1',
  9617. 'default' => 'als',
  9618. ),
  9619. 'timeaccessioned' => array(
  9620. // 'description' => 'TODO: please describe this field!',
  9621. 'type' => 'datetime',
  9622. 'not null' => '1',
  9623. 'default' => 'ow(',
  9624. ),
  9625. 'timelastmodified' => array(
  9626. // 'description' => 'TODO: please describe this field!',
  9627. 'type' => 'datetime',
  9628. 'not null' => '1',
  9629. 'default' => 'ow(',
  9630. ),
  9631. ),
  9632. 'primary key' => array(
  9633. '0' => 'feature_id',
  9634. ),
  9635. 'unique keys' => array(
  9636. 'feature_c1' => array(
  9637. '0' => 'organism_id',
  9638. '1' => 'uniquename',
  9639. '2' => 'type_id',
  9640. ),
  9641. ),
  9642. 'indexes' => array(
  9643. 'feature_idx1' => array(
  9644. '0' => 'dbxref_id',
  9645. ),
  9646. 'feature_idx2' => array(
  9647. '0' => 'organism_id',
  9648. ),
  9649. 'feature_idx3' => array(
  9650. '0' => 'type_id',
  9651. ),
  9652. 'feature_idx4' => array(
  9653. '0' => 'uniquename',
  9654. ),
  9655. 'feature_name_ind1' => array(
  9656. '0' => 'name',
  9657. ),
  9658. ),
  9659. 'foreign keys' => array(
  9660. ),
  9661. );
  9662. return $description;
  9663. }
  9664. /**
  9665. * Implements hook_feature_contains_schema()
  9666. * Purpose: To describe the structure of feature_contains to tripal
  9667. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9668. * @see tripal_core.api.inc: tripal_core_chado_update()
  9669. * @see tripal_core.api.inc: tripal_core_chado_select()
  9670. *
  9671. * @return
  9672. * An array describing the current table
  9673. *
  9674. * @ingroup tripal_schema_api
  9675. *
  9676. */
  9677. function tripal_core_chado_feature_contains_schema () {
  9678. $description = array();
  9679. $description = array(
  9680. 'table' => 'feature_contains',
  9681. // 'description' => 'TODO: please describe this table!',
  9682. 'fields' => array(
  9683. 'subject_id' => array(
  9684. // 'description' => 'TODO: please describe this field!',
  9685. 'type' => 'int',
  9686. 'not null' => '',
  9687. ),
  9688. 'object_id' => array(
  9689. // 'description' => 'TODO: please describe this field!',
  9690. 'type' => 'int',
  9691. 'not null' => '',
  9692. ),
  9693. ),
  9694. 'primary key' => array(
  9695. ),
  9696. 'unique keys' => array(
  9697. ),
  9698. 'indexes' => array(
  9699. ),
  9700. 'foreign keys' => array(
  9701. ),
  9702. );
  9703. return $description;
  9704. }
  9705. /**
  9706. * Implements hook_feature_cvterm_schema()
  9707. * Purpose: To describe the structure of feature_cvterm to tripal
  9708. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9709. * @see tripal_core.api.inc: tripal_core_chado_update()
  9710. * @see tripal_core.api.inc: tripal_core_chado_select()
  9711. *
  9712. * @return
  9713. * An array describing the current table
  9714. *
  9715. * @ingroup tripal_schema_api
  9716. *
  9717. */
  9718. function tripal_core_chado_feature_cvterm_schema () {
  9719. $description = array();
  9720. $description = array(
  9721. 'table' => 'feature_cvterm',
  9722. // 'description' => 'TODO: please describe this table!',
  9723. 'fields' => array(
  9724. 'feature_cvterm_id' => array(
  9725. // 'description' => 'TODO: please describe this field!',
  9726. 'type' => 'serial',
  9727. 'not null' => '1',
  9728. ),
  9729. 'feature_id' => array(
  9730. // 'description' => 'TODO: please describe this field!',
  9731. 'type' => 'int',
  9732. 'not null' => '1',
  9733. ),
  9734. 'cvterm_id' => array(
  9735. // 'description' => 'TODO: please describe this field!',
  9736. 'type' => 'int',
  9737. 'not null' => '1',
  9738. ),
  9739. 'pub_id' => array(
  9740. // 'description' => 'TODO: please describe this field!',
  9741. 'type' => 'int',
  9742. 'not null' => '1',
  9743. ),
  9744. 'is_not' => array(
  9745. // 'description' => 'TODO: please describe this field!',
  9746. 'type' => 'boolean',
  9747. 'not null' => '1',
  9748. 'default' => 'als',
  9749. ),
  9750. 'rank' => array(
  9751. // 'description' => 'TODO: please describe this field!',
  9752. 'type' => 'int',
  9753. 'not null' => '1',
  9754. 'default' => '0',
  9755. ),
  9756. ),
  9757. 'primary key' => array(
  9758. '0' => 'feature_cvterm_id',
  9759. ),
  9760. 'unique keys' => array(
  9761. 'feature_cvterm_c1' => array(
  9762. '0' => 'feature_id',
  9763. '1' => 'cvterm_id',
  9764. '2' => 'pub_id',
  9765. '3' => 'rank',
  9766. ),
  9767. ),
  9768. 'indexes' => array(
  9769. 'feature_cvterm_idx1' => array(
  9770. '0' => 'feature_id',
  9771. ),
  9772. 'feature_cvterm_idx2' => array(
  9773. '0' => 'cvterm_id',
  9774. ),
  9775. 'feature_cvterm_idx3' => array(
  9776. '0' => 'pub_id',
  9777. ),
  9778. ),
  9779. 'foreign keys' => array(
  9780. ),
  9781. );
  9782. return $description;
  9783. }
  9784. /**
  9785. * Implements hook_feature_expression_schema()
  9786. * Purpose: To describe the structure of feature_expression to tripal
  9787. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9788. * @see tripal_core.api.inc: tripal_core_chado_update()
  9789. * @see tripal_core.api.inc: tripal_core_chado_select()
  9790. *
  9791. * @return
  9792. * An array describing the current table
  9793. *
  9794. * @ingroup tripal_schema_api
  9795. *
  9796. */
  9797. function tripal_core_chado_feature_expression_schema () {
  9798. $description = array();
  9799. $description = array(
  9800. 'table' => 'feature_expression',
  9801. // 'description' => 'TODO: please describe this table!',
  9802. 'fields' => array(
  9803. 'feature_expression_id' => array(
  9804. // 'description' => 'TODO: please describe this field!',
  9805. 'type' => 'serial',
  9806. 'not null' => '1',
  9807. ),
  9808. 'expression_id' => array(
  9809. // 'description' => 'TODO: please describe this field!',
  9810. 'type' => 'int',
  9811. 'not null' => '1',
  9812. ),
  9813. 'feature_id' => array(
  9814. // 'description' => 'TODO: please describe this field!',
  9815. 'type' => 'int',
  9816. 'not null' => '1',
  9817. ),
  9818. 'pub_id' => array(
  9819. // 'description' => 'TODO: please describe this field!',
  9820. 'type' => 'int',
  9821. 'not null' => '1',
  9822. ),
  9823. ),
  9824. 'primary key' => array(
  9825. '0' => 'feature_expression_id',
  9826. ),
  9827. 'unique keys' => array(
  9828. 'feature_expression_c1' => array(
  9829. '0' => 'expression_id',
  9830. '1' => 'feature_id',
  9831. '2' => 'pub_id',
  9832. ),
  9833. ),
  9834. 'indexes' => array(
  9835. 'feature_expression_idx1' => array(
  9836. '0' => 'expression_id',
  9837. ),
  9838. 'feature_expression_idx2' => array(
  9839. '0' => 'feature_id',
  9840. ),
  9841. 'feature_expression_idx3' => array(
  9842. '0' => 'pub_id',
  9843. ),
  9844. ),
  9845. 'foreign keys' => array(
  9846. ),
  9847. );
  9848. return $description;
  9849. }
  9850. /**
  9851. * Implements hook_feature_expressionprop_schema()
  9852. * Purpose: To describe the structure of feature_expressionprop to tripal
  9853. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9854. * @see tripal_core.api.inc: tripal_core_chado_update()
  9855. * @see tripal_core.api.inc: tripal_core_chado_select()
  9856. *
  9857. * @return
  9858. * An array describing the current table
  9859. *
  9860. * @ingroup tripal_schema_api
  9861. *
  9862. */
  9863. function tripal_core_chado_feature_expressionprop_schema () {
  9864. $description = array();
  9865. $description = array(
  9866. 'table' => 'feature_expressionprop',
  9867. // 'description' => 'TODO: please describe this table!',
  9868. 'fields' => array(
  9869. 'feature_expressionprop_id' => array(
  9870. // 'description' => 'TODO: please describe this field!',
  9871. 'type' => 'serial',
  9872. 'not null' => '1',
  9873. ),
  9874. 'feature_expression_id' => array(
  9875. // 'description' => 'TODO: please describe this field!',
  9876. 'type' => 'int',
  9877. 'not null' => '1',
  9878. ),
  9879. 'type_id' => array(
  9880. // 'description' => 'TODO: please describe this field!',
  9881. 'type' => 'int',
  9882. 'not null' => '1',
  9883. ),
  9884. 'value' => array(
  9885. // 'description' => 'TODO: please describe this field!',
  9886. 'type' => 'text',
  9887. 'not null' => '',
  9888. ),
  9889. 'rank' => array(
  9890. // 'description' => 'TODO: please describe this field!',
  9891. 'type' => 'int',
  9892. 'not null' => '1',
  9893. 'default' => '0',
  9894. ),
  9895. ),
  9896. 'primary key' => array(
  9897. '0' => 'feature_expressionprop_id',
  9898. ),
  9899. 'unique keys' => array(
  9900. 'feature_expressionprop_c1' => array(
  9901. '0' => 'feature_expression_id',
  9902. '1' => 'type_id',
  9903. '2' => 'rank',
  9904. ),
  9905. ),
  9906. 'indexes' => array(
  9907. 'feature_expressionprop_idx1' => array(
  9908. '0' => 'feature_expression_id',
  9909. ),
  9910. 'feature_expressionprop_idx2' => array(
  9911. '0' => 'type_id',
  9912. ),
  9913. ),
  9914. 'foreign keys' => array(
  9915. ),
  9916. );
  9917. return $description;
  9918. }
  9919. /**
  9920. * Implements hook_feature_pubprop_schema()
  9921. * Purpose: To describe the structure of feature_pubprop to tripal
  9922. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9923. * @see tripal_core.api.inc: tripal_core_chado_update()
  9924. * @see tripal_core.api.inc: tripal_core_chado_select()
  9925. *
  9926. * @return
  9927. * An array describing the current table
  9928. *
  9929. * @ingroup tripal_schema_api
  9930. *
  9931. */
  9932. function tripal_core_chado_feature_pubprop_schema () {
  9933. $description = array();
  9934. $description = array(
  9935. 'table' => 'feature_pubprop',
  9936. // 'description' => 'TODO: please describe this table!',
  9937. 'fields' => array(
  9938. 'feature_pubprop_id' => array(
  9939. // 'description' => 'TODO: please describe this field!',
  9940. 'type' => 'serial',
  9941. 'not null' => '1',
  9942. ),
  9943. 'feature_pub_id' => array(
  9944. // 'description' => 'TODO: please describe this field!',
  9945. 'type' => 'int',
  9946. 'not null' => '1',
  9947. ),
  9948. 'type_id' => array(
  9949. // 'description' => 'TODO: please describe this field!',
  9950. 'type' => 'int',
  9951. 'not null' => '1',
  9952. ),
  9953. 'value' => array(
  9954. // 'description' => 'TODO: please describe this field!',
  9955. 'type' => 'text',
  9956. 'not null' => '',
  9957. ),
  9958. 'rank' => array(
  9959. // 'description' => 'TODO: please describe this field!',
  9960. 'type' => 'int',
  9961. 'not null' => '1',
  9962. 'default' => '0',
  9963. ),
  9964. ),
  9965. 'primary key' => array(
  9966. '0' => 'feature_pubprop_id',
  9967. ),
  9968. 'unique keys' => array(
  9969. 'feature_pubprop_c1' => array(
  9970. '0' => 'feature_pub_id',
  9971. '1' => 'type_id',
  9972. '2' => 'rank',
  9973. ),
  9974. ),
  9975. 'indexes' => array(
  9976. 'feature_pubprop_idx1' => array(
  9977. '0' => 'feature_pub_id',
  9978. ),
  9979. ),
  9980. 'foreign keys' => array(
  9981. ),
  9982. );
  9983. return $description;
  9984. }
  9985. /**
  9986. * Implements hook_feature_relationship_schema()
  9987. * Purpose: To describe the structure of feature_relationship to tripal
  9988. * @see tripal_core.api.inc: tripal_core_chado_insert()
  9989. * @see tripal_core.api.inc: tripal_core_chado_update()
  9990. * @see tripal_core.api.inc: tripal_core_chado_select()
  9991. *
  9992. * @return
  9993. * An array describing the current table
  9994. *
  9995. * @ingroup tripal_schema_api
  9996. *
  9997. */
  9998. function tripal_core_chado_feature_relationship_schema () {
  9999. $description = array();
  10000. $description = array(
  10001. 'table' => 'feature_relationship',
  10002. // 'description' => 'TODO: please describe this table!',
  10003. 'fields' => array(
  10004. 'feature_relationship_id' => array(
  10005. // 'description' => 'TODO: please describe this field!',
  10006. 'type' => 'serial',
  10007. 'not null' => '1',
  10008. ),
  10009. 'subject_id' => array(
  10010. // 'description' => 'TODO: please describe this field!',
  10011. 'type' => 'int',
  10012. 'not null' => '1',
  10013. ),
  10014. 'object_id' => array(
  10015. // 'description' => 'TODO: please describe this field!',
  10016. 'type' => 'int',
  10017. 'not null' => '1',
  10018. ),
  10019. 'type_id' => array(
  10020. // 'description' => 'TODO: please describe this field!',
  10021. 'type' => 'int',
  10022. 'not null' => '1',
  10023. ),
  10024. 'value' => array(
  10025. // 'description' => 'TODO: please describe this field!',
  10026. 'type' => 'text',
  10027. 'not null' => '',
  10028. ),
  10029. 'rank' => array(
  10030. // 'description' => 'TODO: please describe this field!',
  10031. 'type' => 'int',
  10032. 'not null' => '1',
  10033. 'default' => '0',
  10034. ),
  10035. ),
  10036. 'primary key' => array(
  10037. '0' => 'feature_relationship_id',
  10038. ),
  10039. 'unique keys' => array(
  10040. 'feature_relationship_c1' => array(
  10041. '0' => 'subject_id',
  10042. '1' => 'object_id',
  10043. '2' => 'type_id',
  10044. '3' => 'rank',
  10045. ),
  10046. ),
  10047. 'indexes' => array(
  10048. 'feature_relationship_idx1' => array(
  10049. '0' => 'subject_id',
  10050. ),
  10051. 'feature_relationship_idx2' => array(
  10052. '0' => 'object_id',
  10053. ),
  10054. 'feature_relationship_idx3' => array(
  10055. '0' => 'type_id',
  10056. ),
  10057. ),
  10058. 'foreign keys' => array(
  10059. ),
  10060. );
  10061. return $description;
  10062. }
  10063. /**
  10064. * Implements hook_feature_relationship_pub_schema()
  10065. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10066. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10067. * @see tripal_core.api.inc: tripal_core_chado_update()
  10068. * @see tripal_core.api.inc: tripal_core_chado_select()
  10069. *
  10070. * @return
  10071. * An array describing the current table
  10072. *
  10073. * @ingroup tripal_schema_api
  10074. *
  10075. */
  10076. function tripal_core_chado_feature_relationship_pub_schema () {
  10077. $description = array();
  10078. $description = array(
  10079. 'table' => 'feature_relationship_pub',
  10080. // 'description' => 'TODO: please describe this table!',
  10081. 'fields' => array(
  10082. 'feature_relationship_pub_id' => array(
  10083. // 'description' => 'TODO: please describe this field!',
  10084. 'type' => 'serial',
  10085. 'not null' => '1',
  10086. ),
  10087. 'feature_relationship_id' => array(
  10088. // 'description' => 'TODO: please describe this field!',
  10089. 'type' => 'int',
  10090. 'not null' => '1',
  10091. ),
  10092. 'pub_id' => array(
  10093. // 'description' => 'TODO: please describe this field!',
  10094. 'type' => 'int',
  10095. 'not null' => '1',
  10096. ),
  10097. ),
  10098. 'primary key' => array(
  10099. '0' => 'feature_relationship_pub_id',
  10100. ),
  10101. 'unique keys' => array(
  10102. 'feature_relationship_pub_c1' => array(
  10103. '0' => 'feature_relationship_id',
  10104. '1' => 'pub_id',
  10105. ),
  10106. ),
  10107. 'indexes' => array(
  10108. 'feature_relationship_pub_idx1' => array(
  10109. '0' => 'feature_relationship_id',
  10110. ),
  10111. 'feature_relationship_pub_idx2' => array(
  10112. '0' => 'pub_id',
  10113. ),
  10114. ),
  10115. 'foreign keys' => array(
  10116. ),
  10117. );
  10118. return $description;
  10119. }
  10120. /**
  10121. * Implements hook_feature_relationshipprop_schema()
  10122. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10123. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10124. * @see tripal_core.api.inc: tripal_core_chado_update()
  10125. * @see tripal_core.api.inc: tripal_core_chado_select()
  10126. *
  10127. * @return
  10128. * An array describing the current table
  10129. *
  10130. * @ingroup tripal_schema_api
  10131. *
  10132. */
  10133. function tripal_core_chado_feature_relationshipprop_schema () {
  10134. $description = array();
  10135. $description = array(
  10136. 'table' => 'feature_relationshipprop',
  10137. // 'description' => 'TODO: please describe this table!',
  10138. 'fields' => array(
  10139. 'feature_relationshipprop_id' => array(
  10140. // 'description' => 'TODO: please describe this field!',
  10141. 'type' => 'serial',
  10142. 'not null' => '1',
  10143. ),
  10144. 'feature_relationship_id' => array(
  10145. // 'description' => 'TODO: please describe this field!',
  10146. 'type' => 'int',
  10147. 'not null' => '1',
  10148. ),
  10149. 'type_id' => array(
  10150. // 'description' => 'TODO: please describe this field!',
  10151. 'type' => 'int',
  10152. 'not null' => '1',
  10153. ),
  10154. 'value' => array(
  10155. // 'description' => 'TODO: please describe this field!',
  10156. 'type' => 'text',
  10157. 'not null' => '',
  10158. ),
  10159. 'rank' => array(
  10160. // 'description' => 'TODO: please describe this field!',
  10161. 'type' => 'int',
  10162. 'not null' => '1',
  10163. 'default' => '0',
  10164. ),
  10165. ),
  10166. 'primary key' => array(
  10167. '0' => 'feature_relationshipprop_id',
  10168. ),
  10169. 'unique keys' => array(
  10170. 'feature_relationshipprop_c1' => array(
  10171. '0' => 'feature_relationship_id',
  10172. '1' => 'type_id',
  10173. '2' => 'rank',
  10174. ),
  10175. ),
  10176. 'indexes' => array(
  10177. 'feature_relationshipprop_idx1' => array(
  10178. '0' => 'feature_relationship_id',
  10179. ),
  10180. 'feature_relationshipprop_idx2' => array(
  10181. '0' => 'type_id',
  10182. ),
  10183. ),
  10184. 'foreign keys' => array(
  10185. ),
  10186. );
  10187. return $description;
  10188. }
  10189. /**
  10190. * Implements hook_feature_pub_schema()
  10191. * Purpose: To describe the structure of feature_pub to tripal
  10192. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10193. * @see tripal_core.api.inc: tripal_core_chado_update()
  10194. * @see tripal_core.api.inc: tripal_core_chado_select()
  10195. *
  10196. * @return
  10197. * An array describing the current table
  10198. *
  10199. * @ingroup tripal_schema_api
  10200. *
  10201. */
  10202. function tripal_core_chado_feature_pub_schema () {
  10203. $description = array();
  10204. $description = array(
  10205. 'table' => 'feature_pub',
  10206. // 'description' => 'TODO: please describe this table!',
  10207. 'fields' => array(
  10208. 'feature_pub_id' => array(
  10209. // 'description' => 'TODO: please describe this field!',
  10210. 'type' => 'serial',
  10211. 'not null' => '1',
  10212. ),
  10213. 'feature_id' => array(
  10214. // 'description' => 'TODO: please describe this field!',
  10215. 'type' => 'int',
  10216. 'not null' => '1',
  10217. ),
  10218. 'pub_id' => array(
  10219. // 'description' => 'TODO: please describe this field!',
  10220. 'type' => 'int',
  10221. 'not null' => '1',
  10222. ),
  10223. ),
  10224. 'primary key' => array(
  10225. '0' => 'feature_pub_id',
  10226. ),
  10227. 'unique keys' => array(
  10228. 'feature_pub_c1' => array(
  10229. '0' => 'feature_id',
  10230. '1' => 'pub_id',
  10231. ),
  10232. ),
  10233. 'indexes' => array(
  10234. 'feature_pub_idx1' => array(
  10235. '0' => 'feature_id',
  10236. ),
  10237. 'feature_pub_idx2' => array(
  10238. '0' => 'pub_id',
  10239. ),
  10240. ),
  10241. 'foreign keys' => array(
  10242. ),
  10243. );
  10244. return $description;
  10245. }
  10246. /**
  10247. * Implements hook_feature_phenotype_schema()
  10248. * Purpose: To describe the structure of feature_phenotype to tripal
  10249. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10250. * @see tripal_core.api.inc: tripal_core_chado_update()
  10251. * @see tripal_core.api.inc: tripal_core_chado_select()
  10252. *
  10253. * @return
  10254. * An array describing the current table
  10255. *
  10256. * @ingroup tripal_schema_api
  10257. *
  10258. */
  10259. function tripal_core_chado_feature_phenotype_schema () {
  10260. $description = array();
  10261. $description = array(
  10262. 'table' => 'feature_phenotype',
  10263. // 'description' => 'TODO: please describe this table!',
  10264. 'fields' => array(
  10265. 'feature_phenotype_id' => array(
  10266. // 'description' => 'TODO: please describe this field!',
  10267. 'type' => 'serial',
  10268. 'not null' => '1',
  10269. ),
  10270. 'feature_id' => array(
  10271. // 'description' => 'TODO: please describe this field!',
  10272. 'type' => 'int',
  10273. 'not null' => '1',
  10274. ),
  10275. 'phenotype_id' => array(
  10276. // 'description' => 'TODO: please describe this field!',
  10277. 'type' => 'int',
  10278. 'not null' => '1',
  10279. ),
  10280. ),
  10281. 'primary key' => array(
  10282. '0' => 'feature_phenotype_id',
  10283. ),
  10284. 'unique keys' => array(
  10285. 'feature_phenotype_c1' => array(
  10286. '0' => 'feature_id',
  10287. '1' => 'phenotype_id',
  10288. ),
  10289. ),
  10290. 'indexes' => array(
  10291. 'feature_phenotype_idx1' => array(
  10292. '0' => 'feature_id',
  10293. ),
  10294. 'feature_phenotype_idx2' => array(
  10295. '0' => 'phenotype_id',
  10296. ),
  10297. ),
  10298. 'foreign keys' => array(
  10299. ),
  10300. );
  10301. return $description;
  10302. }
  10303. /**
  10304. * Implements hook_feature_genotype_schema()
  10305. * Purpose: To describe the structure of feature_genotype to tripal
  10306. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10307. * @see tripal_core.api.inc: tripal_core_chado_update()
  10308. * @see tripal_core.api.inc: tripal_core_chado_select()
  10309. *
  10310. * @return
  10311. * An array describing the current table
  10312. *
  10313. * @ingroup tripal_schema_api
  10314. *
  10315. */
  10316. function tripal_core_chado_feature_genotype_schema () {
  10317. $description = array();
  10318. $description = array(
  10319. 'table' => 'feature_genotype',
  10320. // 'description' => 'TODO: please describe this table!',
  10321. 'fields' => array(
  10322. 'feature_genotype_id' => array(
  10323. // 'description' => 'TODO: please describe this field!',
  10324. 'type' => 'serial',
  10325. 'not null' => '1',
  10326. ),
  10327. 'feature_id' => array(
  10328. // 'description' => 'TODO: please describe this field!',
  10329. 'type' => 'int',
  10330. 'not null' => '1',
  10331. ),
  10332. 'genotype_id' => array(
  10333. // 'description' => 'TODO: please describe this field!',
  10334. 'type' => 'int',
  10335. 'not null' => '1',
  10336. ),
  10337. 'chromosome_id' => array(
  10338. // 'description' => 'TODO: please describe this field!',
  10339. 'type' => 'int',
  10340. 'not null' => '',
  10341. ),
  10342. 'rank' => array(
  10343. // 'description' => 'TODO: please describe this field!',
  10344. 'type' => 'int',
  10345. 'not null' => '1',
  10346. ),
  10347. 'cgroup' => array(
  10348. // 'description' => 'TODO: please describe this field!',
  10349. 'type' => 'int',
  10350. 'not null' => '1',
  10351. ),
  10352. 'cvterm_id' => array(
  10353. // 'description' => 'TODO: please describe this field!',
  10354. 'type' => 'int',
  10355. 'not null' => '1',
  10356. ),
  10357. ),
  10358. 'primary key' => array(
  10359. '0' => 'feature_genotype_id',
  10360. ),
  10361. 'unique keys' => array(
  10362. 'feature_genotype_c1' => array(
  10363. '0' => 'feature_id',
  10364. '1' => 'genotype_id',
  10365. '2' => 'cvterm_id',
  10366. '3' => 'chromosome_id',
  10367. '4' => 'rank',
  10368. '5' => 'cgroup',
  10369. ),
  10370. ),
  10371. 'indexes' => array(
  10372. 'feature_genotype_idx1' => array(
  10373. '0' => 'feature_id',
  10374. ),
  10375. 'feature_genotype_idx2' => array(
  10376. '0' => 'genotype_id',
  10377. ),
  10378. ),
  10379. 'foreign keys' => array(
  10380. ),
  10381. );
  10382. return $description;
  10383. }
  10384. /**
  10385. * Implements hook_feature_intersection_schema()
  10386. * Purpose: To describe the structure of feature_intersection to tripal
  10387. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10388. * @see tripal_core.api.inc: tripal_core_chado_update()
  10389. * @see tripal_core.api.inc: tripal_core_chado_select()
  10390. *
  10391. * @return
  10392. * An array describing the current table
  10393. *
  10394. * @ingroup tripal_schema_api
  10395. *
  10396. */
  10397. function tripal_core_chado_feature_intersection_schema () {
  10398. $description = array();
  10399. $description = array(
  10400. 'table' => 'feature_intersection',
  10401. // 'description' => 'TODO: please describe this table!',
  10402. 'fields' => array(
  10403. 'subject_id' => array(
  10404. // 'description' => 'TODO: please describe this field!',
  10405. 'type' => 'int',
  10406. 'not null' => '',
  10407. ),
  10408. 'object_id' => array(
  10409. // 'description' => 'TODO: please describe this field!',
  10410. 'type' => 'int',
  10411. 'not null' => '',
  10412. ),
  10413. 'srcfeature_id' => array(
  10414. // 'description' => 'TODO: please describe this field!',
  10415. 'type' => 'int',
  10416. 'not null' => '',
  10417. ),
  10418. 'subject_strand' => array(
  10419. // 'description' => 'TODO: please describe this field!',
  10420. 'type' => 'int',
  10421. 'size' => 'small',
  10422. 'not null' => '',
  10423. ),
  10424. 'object_strand' => array(
  10425. // 'description' => 'TODO: please describe this field!',
  10426. 'type' => 'int',
  10427. 'size' => 'small',
  10428. 'not null' => '',
  10429. ),
  10430. 'fmin' => array(
  10431. // 'description' => 'TODO: please describe this field!',
  10432. 'type' => 'int',
  10433. 'not null' => '',
  10434. ),
  10435. 'fmax' => array(
  10436. // 'description' => 'TODO: please describe this field!',
  10437. 'type' => 'int',
  10438. 'not null' => '',
  10439. ),
  10440. ),
  10441. 'primary key' => array(
  10442. ),
  10443. 'unique keys' => array(
  10444. ),
  10445. 'indexes' => array(
  10446. ),
  10447. 'foreign keys' => array(
  10448. ),
  10449. );
  10450. return $description;
  10451. }
  10452. /**
  10453. * Implements hook_feature_meets_schema()
  10454. * Purpose: To describe the structure of feature_meets to tripal
  10455. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10456. * @see tripal_core.api.inc: tripal_core_chado_update()
  10457. * @see tripal_core.api.inc: tripal_core_chado_select()
  10458. *
  10459. * @return
  10460. * An array describing the current table
  10461. *
  10462. * @ingroup tripal_schema_api
  10463. *
  10464. */
  10465. function tripal_core_chado_feature_meets_schema () {
  10466. $description = array();
  10467. $description = array(
  10468. 'table' => 'feature_meets',
  10469. // 'description' => 'TODO: please describe this table!',
  10470. 'fields' => array(
  10471. 'subject_id' => array(
  10472. // 'description' => 'TODO: please describe this field!',
  10473. 'type' => 'int',
  10474. 'not null' => '',
  10475. ),
  10476. 'object_id' => array(
  10477. // 'description' => 'TODO: please describe this field!',
  10478. 'type' => 'int',
  10479. 'not null' => '',
  10480. ),
  10481. ),
  10482. 'primary key' => array(
  10483. ),
  10484. 'unique keys' => array(
  10485. ),
  10486. 'indexes' => array(
  10487. ),
  10488. 'foreign keys' => array(
  10489. ),
  10490. );
  10491. return $description;
  10492. }
  10493. /**
  10494. * Implements hook_feature_meets_on_same_strand_schema()
  10495. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10496. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10497. * @see tripal_core.api.inc: tripal_core_chado_update()
  10498. * @see tripal_core.api.inc: tripal_core_chado_select()
  10499. *
  10500. * @return
  10501. * An array describing the current table
  10502. *
  10503. * @ingroup tripal_schema_api
  10504. *
  10505. */
  10506. function tripal_core_chado_feature_meets_on_same_strand_schema () {
  10507. $description = array();
  10508. $description = array(
  10509. 'table' => 'feature_meets_on_same_strand',
  10510. // 'description' => 'TODO: please describe this table!',
  10511. 'fields' => array(
  10512. 'subject_id' => array(
  10513. // 'description' => 'TODO: please describe this field!',
  10514. 'type' => 'int',
  10515. 'not null' => '',
  10516. ),
  10517. 'object_id' => array(
  10518. // 'description' => 'TODO: please describe this field!',
  10519. 'type' => 'int',
  10520. 'not null' => '',
  10521. ),
  10522. ),
  10523. 'primary key' => array(
  10524. ),
  10525. 'unique keys' => array(
  10526. ),
  10527. 'indexes' => array(
  10528. ),
  10529. 'foreign keys' => array(
  10530. ),
  10531. );
  10532. return $description;
  10533. }
  10534. /**
  10535. * Implements hook_f_loc_schema()
  10536. * Purpose: To describe the structure of f_loc to tripal
  10537. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10538. * @see tripal_core.api.inc: tripal_core_chado_update()
  10539. * @see tripal_core.api.inc: tripal_core_chado_select()
  10540. *
  10541. * @return
  10542. * An array describing the current table
  10543. *
  10544. * @ingroup tripal_schema_api
  10545. *
  10546. */
  10547. function tripal_core_chado_f_loc_schema () {
  10548. $description = array();
  10549. $description = array(
  10550. 'table' => 'f_loc',
  10551. // 'description' => 'TODO: please describe this table!',
  10552. 'fields' => array(
  10553. 'feature_id' => array(
  10554. // 'description' => 'TODO: please describe this field!',
  10555. 'type' => 'int',
  10556. 'not null' => '',
  10557. ),
  10558. 'name' => array(
  10559. // 'description' => 'TODO: please describe this field!',
  10560. 'type' => 'varchar',
  10561. 'length' => '255',
  10562. 'not null' => '',
  10563. ),
  10564. 'dbxref_id' => array(
  10565. // 'description' => 'TODO: please describe this field!',
  10566. 'type' => 'int',
  10567. 'not null' => '',
  10568. ),
  10569. 'nbeg' => array(
  10570. // 'description' => 'TODO: please describe this field!',
  10571. 'type' => 'int',
  10572. 'not null' => '',
  10573. ),
  10574. 'nend' => array(
  10575. // 'description' => 'TODO: please describe this field!',
  10576. 'type' => 'int',
  10577. 'not null' => '',
  10578. ),
  10579. 'strand' => array(
  10580. // 'description' => 'TODO: please describe this field!',
  10581. 'type' => 'int',
  10582. 'size' => 'small',
  10583. 'not null' => '',
  10584. ),
  10585. ),
  10586. 'primary key' => array(
  10587. ),
  10588. 'unique keys' => array(
  10589. ),
  10590. 'indexes' => array(
  10591. ),
  10592. 'foreign keys' => array(
  10593. ),
  10594. );
  10595. return $description;
  10596. }
  10597. /**
  10598. * Implements hook_expressionprop_schema()
  10599. * Purpose: To describe the structure of expressionprop to tripal
  10600. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10601. * @see tripal_core.api.inc: tripal_core_chado_update()
  10602. * @see tripal_core.api.inc: tripal_core_chado_select()
  10603. *
  10604. * @return
  10605. * An array describing the current table
  10606. *
  10607. * @ingroup tripal_schema_api
  10608. *
  10609. */
  10610. function tripal_core_chado_expressionprop_schema () {
  10611. $description = array();
  10612. $description = array(
  10613. 'table' => 'expressionprop',
  10614. // 'description' => 'TODO: please describe this table!',
  10615. 'fields' => array(
  10616. 'expressionprop_id' => array(
  10617. // 'description' => 'TODO: please describe this field!',
  10618. 'type' => 'serial',
  10619. 'not null' => '1',
  10620. ),
  10621. 'expression_id' => array(
  10622. // 'description' => 'TODO: please describe this field!',
  10623. 'type' => 'int',
  10624. 'not null' => '1',
  10625. ),
  10626. 'type_id' => array(
  10627. // 'description' => 'TODO: please describe this field!',
  10628. 'type' => 'int',
  10629. 'not null' => '1',
  10630. ),
  10631. 'value' => array(
  10632. // 'description' => 'TODO: please describe this field!',
  10633. 'type' => 'text',
  10634. 'not null' => '',
  10635. ),
  10636. 'rank' => array(
  10637. // 'description' => 'TODO: please describe this field!',
  10638. 'type' => 'int',
  10639. 'not null' => '1',
  10640. 'default' => '0',
  10641. ),
  10642. ),
  10643. 'primary key' => array(
  10644. '0' => 'expressionprop_id',
  10645. ),
  10646. 'unique keys' => array(
  10647. 'expressionprop_c1' => array(
  10648. '0' => 'expression_id',
  10649. '1' => 'type_id',
  10650. '2' => 'rank',
  10651. ),
  10652. ),
  10653. 'indexes' => array(
  10654. 'expressionprop_idx1' => array(
  10655. '0' => 'expression_id',
  10656. ),
  10657. 'expressionprop_idx2' => array(
  10658. '0' => 'type_id',
  10659. ),
  10660. ),
  10661. 'foreign keys' => array(
  10662. ),
  10663. );
  10664. return $description;
  10665. }
  10666. /**
  10667. * Implements hook_db_dbxref_count_schema()
  10668. * Purpose: To describe the structure of db_dbxref_count to tripal
  10669. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10670. * @see tripal_core.api.inc: tripal_core_chado_update()
  10671. * @see tripal_core.api.inc: tripal_core_chado_select()
  10672. *
  10673. * @return
  10674. * An array describing the current table
  10675. *
  10676. * @ingroup tripal_schema_api
  10677. *
  10678. */
  10679. function tripal_core_chado_db_dbxref_count_schema () {
  10680. $description = array();
  10681. $description = array(
  10682. 'table' => 'db_dbxref_count',
  10683. // 'description' => 'TODO: please describe this table!',
  10684. 'fields' => array(
  10685. 'name' => array(
  10686. // 'description' => 'TODO: please describe this field!',
  10687. 'type' => 'varchar',
  10688. 'length' => '255',
  10689. 'not null' => '',
  10690. ),
  10691. 'num_dbxrefs' => array(
  10692. // 'description' => 'TODO: please describe this field!',
  10693. 'type' => 'int',
  10694. 'size' => 'big',
  10695. 'not null' => '',
  10696. ),
  10697. ),
  10698. 'primary key' => array(
  10699. ),
  10700. 'unique keys' => array(
  10701. ),
  10702. 'indexes' => array(
  10703. ),
  10704. 'foreign keys' => array(
  10705. ),
  10706. );
  10707. return $description;
  10708. }
  10709. /**
  10710. * Implements hook_dbxref_schema()
  10711. * Purpose: To describe the structure of dbxref to tripal
  10712. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10713. * @see tripal_core.api.inc: tripal_core_chado_update()
  10714. * @see tripal_core.api.inc: tripal_core_chado_select()
  10715. *
  10716. * @return
  10717. * An array describing the current table
  10718. *
  10719. * @ingroup tripal_schema_api
  10720. *
  10721. */
  10722. function tripal_core_chado_dbxref_schema () {
  10723. $description = array();
  10724. $description = array(
  10725. 'table' => 'dbxref',
  10726. // 'description' => 'TODO: please describe this table!',
  10727. 'fields' => array(
  10728. 'dbxref_id' => array(
  10729. // 'description' => 'TODO: please describe this field!',
  10730. 'type' => 'serial',
  10731. 'not null' => '1',
  10732. ),
  10733. 'db_id' => array(
  10734. // 'description' => 'TODO: please describe this field!',
  10735. 'type' => 'int',
  10736. 'not null' => '1',
  10737. ),
  10738. 'accession' => array(
  10739. // 'description' => 'TODO: please describe this field!',
  10740. 'type' => 'varchar',
  10741. 'length' => '255',
  10742. 'not null' => '1',
  10743. ),
  10744. 'version' => array(
  10745. // 'description' => 'TODO: please describe this field!',
  10746. 'type' => 'varchar',
  10747. 'length' => '255',
  10748. 'not null' => '1',
  10749. 'default' => '',
  10750. ),
  10751. 'description' => array(
  10752. // 'description' => 'TODO: please describe this field!',
  10753. 'type' => 'text',
  10754. 'not null' => '',
  10755. ),
  10756. ),
  10757. 'primary key' => array(
  10758. '0' => 'dbxref_id',
  10759. ),
  10760. 'unique keys' => array(
  10761. 'dbxref_c1' => array(
  10762. '0' => 'db_id',
  10763. '1' => 'accession',
  10764. '2' => 'version',
  10765. ),
  10766. ),
  10767. 'indexes' => array(
  10768. 'dbxref_idx1' => array(
  10769. '0' => 'db_id',
  10770. ),
  10771. 'dbxref_idx2' => array(
  10772. '0' => 'accession',
  10773. ),
  10774. 'dbxref_idx3' => array(
  10775. '0' => 'version',
  10776. ),
  10777. ),
  10778. 'foreign keys' => array(
  10779. ),
  10780. );
  10781. return $description;
  10782. }
  10783. /**
  10784. * Implements hook_dbxrefprop_schema()
  10785. * Purpose: To describe the structure of dbxrefprop to tripal
  10786. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10787. * @see tripal_core.api.inc: tripal_core_chado_update()
  10788. * @see tripal_core.api.inc: tripal_core_chado_select()
  10789. *
  10790. * @return
  10791. * An array describing the current table
  10792. *
  10793. * @ingroup tripal_schema_api
  10794. *
  10795. */
  10796. function tripal_core_chado_dbxrefprop_schema () {
  10797. $description = array();
  10798. $description = array(
  10799. 'table' => 'dbxrefprop',
  10800. // 'description' => 'TODO: please describe this table!',
  10801. 'fields' => array(
  10802. 'dbxrefprop_id' => array(
  10803. // 'description' => 'TODO: please describe this field!',
  10804. 'type' => 'serial',
  10805. 'not null' => '1',
  10806. ),
  10807. 'dbxref_id' => array(
  10808. // 'description' => 'TODO: please describe this field!',
  10809. 'type' => 'int',
  10810. 'not null' => '1',
  10811. ),
  10812. 'type_id' => array(
  10813. // 'description' => 'TODO: please describe this field!',
  10814. 'type' => 'int',
  10815. 'not null' => '1',
  10816. ),
  10817. 'value' => array(
  10818. // 'description' => 'TODO: please describe this field!',
  10819. 'type' => 'text',
  10820. 'not null' => '1',
  10821. 'default' => '',
  10822. ),
  10823. 'rank' => array(
  10824. // 'description' => 'TODO: please describe this field!',
  10825. 'type' => 'int',
  10826. 'not null' => '1',
  10827. 'default' => '0',
  10828. ),
  10829. ),
  10830. 'primary key' => array(
  10831. '0' => 'dbxrefprop_id',
  10832. ),
  10833. 'unique keys' => array(
  10834. 'dbxrefprop_c1' => array(
  10835. '0' => 'dbxref_id',
  10836. '1' => 'type_id',
  10837. '2' => 'rank',
  10838. ),
  10839. ),
  10840. 'indexes' => array(
  10841. 'dbxrefprop_idx1' => array(
  10842. '0' => 'dbxref_id',
  10843. ),
  10844. 'dbxrefprop_idx2' => array(
  10845. '0' => 'type_id',
  10846. ),
  10847. ),
  10848. 'foreign keys' => array(
  10849. ),
  10850. );
  10851. return $description;
  10852. }
  10853. /**
  10854. * Implements hook_dfeatureloc_schema()
  10855. * Purpose: To describe the structure of dfeatureloc to tripal
  10856. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10857. * @see tripal_core.api.inc: tripal_core_chado_update()
  10858. * @see tripal_core.api.inc: tripal_core_chado_select()
  10859. *
  10860. * @return
  10861. * An array describing the current table
  10862. *
  10863. * @ingroup tripal_schema_api
  10864. *
  10865. */
  10866. function tripal_core_chado_dfeatureloc_schema () {
  10867. $description = array();
  10868. $description = array(
  10869. 'table' => 'dfeatureloc',
  10870. // 'description' => 'TODO: please describe this table!',
  10871. 'fields' => array(
  10872. 'featureloc_id' => array(
  10873. // 'description' => 'TODO: please describe this field!',
  10874. 'type' => 'int',
  10875. 'not null' => '',
  10876. ),
  10877. 'feature_id' => array(
  10878. // 'description' => 'TODO: please describe this field!',
  10879. 'type' => 'int',
  10880. 'not null' => '',
  10881. ),
  10882. 'srcfeature_id' => array(
  10883. // 'description' => 'TODO: please describe this field!',
  10884. 'type' => 'int',
  10885. 'not null' => '',
  10886. ),
  10887. 'nbeg' => array(
  10888. // 'description' => 'TODO: please describe this field!',
  10889. 'type' => 'int',
  10890. 'not null' => '',
  10891. ),
  10892. 'is_nbeg_partial' => array(
  10893. // 'description' => 'TODO: please describe this field!',
  10894. 'type' => 'boolean',
  10895. 'not null' => '',
  10896. ),
  10897. 'nend' => array(
  10898. // 'description' => 'TODO: please describe this field!',
  10899. 'type' => 'int',
  10900. 'not null' => '',
  10901. ),
  10902. 'is_nend_partial' => array(
  10903. // 'description' => 'TODO: please describe this field!',
  10904. 'type' => 'boolean',
  10905. 'not null' => '',
  10906. ),
  10907. 'strand' => array(
  10908. // 'description' => 'TODO: please describe this field!',
  10909. 'type' => 'int',
  10910. 'size' => 'small',
  10911. 'not null' => '',
  10912. ),
  10913. 'phase' => array(
  10914. // 'description' => 'TODO: please describe this field!',
  10915. 'type' => 'int',
  10916. 'not null' => '',
  10917. ),
  10918. 'residue_info' => array(
  10919. // 'description' => 'TODO: please describe this field!',
  10920. 'type' => 'text',
  10921. 'not null' => '',
  10922. ),
  10923. 'locgroup' => array(
  10924. // 'description' => 'TODO: please describe this field!',
  10925. 'type' => 'int',
  10926. 'not null' => '',
  10927. ),
  10928. 'rank' => array(
  10929. // 'description' => 'TODO: please describe this field!',
  10930. 'type' => 'int',
  10931. 'not null' => '',
  10932. ),
  10933. ),
  10934. 'primary key' => array(
  10935. ),
  10936. 'unique keys' => array(
  10937. ),
  10938. 'indexes' => array(
  10939. ),
  10940. 'foreign keys' => array(
  10941. ),
  10942. );
  10943. return $description;
  10944. }
  10945. /**
  10946. * Implements hook_db_schema()
  10947. * Purpose: To describe the structure of db to tripal
  10948. * @see tripal_core.api.inc: tripal_core_chado_insert()
  10949. * @see tripal_core.api.inc: tripal_core_chado_update()
  10950. * @see tripal_core.api.inc: tripal_core_chado_select()
  10951. *
  10952. * @return
  10953. * An array describing the current table
  10954. *
  10955. * @ingroup tripal_schema_api
  10956. *
  10957. */
  10958. function tripal_core_chado_db_schema () {
  10959. $description = array();
  10960. $description = array(
  10961. 'table' => 'db',
  10962. // 'description' => 'TODO: please describe this table!',
  10963. 'fields' => array(
  10964. 'db_id' => array(
  10965. // 'description' => 'TODO: please describe this field!',
  10966. 'type' => 'serial',
  10967. 'not null' => '1',
  10968. ),
  10969. 'name' => array(
  10970. // 'description' => 'TODO: please describe this field!',
  10971. 'type' => 'varchar',
  10972. 'length' => '255',
  10973. 'not null' => '1',
  10974. ),
  10975. 'description' => array(
  10976. // 'description' => 'TODO: please describe this field!',
  10977. 'type' => 'varchar',
  10978. 'length' => '255',
  10979. 'not null' => '',
  10980. ),
  10981. 'urlprefix' => array(
  10982. // 'description' => 'TODO: please describe this field!',
  10983. 'type' => 'varchar',
  10984. 'length' => '255',
  10985. 'not null' => '',
  10986. ),
  10987. 'url' => array(
  10988. // 'description' => 'TODO: please describe this field!',
  10989. 'type' => 'varchar',
  10990. 'length' => '255',
  10991. 'not null' => '',
  10992. ),
  10993. ),
  10994. 'primary key' => array(
  10995. '0' => 'db_id',
  10996. ),
  10997. 'unique keys' => array(
  10998. 'db_c1' => array(
  10999. '0' => 'name',
  11000. ),
  11001. ),
  11002. 'indexes' => array(
  11003. ),
  11004. 'foreign keys' => array(
  11005. ),
  11006. );
  11007. return $description;
  11008. }
  11009. /**
  11010. * Implements hook_cvtermsynonym_schema()
  11011. * Purpose: To describe the structure of cvtermsynonym to tripal
  11012. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11013. * @see tripal_core.api.inc: tripal_core_chado_update()
  11014. * @see tripal_core.api.inc: tripal_core_chado_select()
  11015. *
  11016. * @return
  11017. * An array describing the current table
  11018. *
  11019. * @ingroup tripal_schema_api
  11020. *
  11021. */
  11022. function tripal_core_chado_cvtermsynonym_schema () {
  11023. $description = array();
  11024. $description = array(
  11025. 'table' => 'cvtermsynonym',
  11026. // 'description' => 'TODO: please describe this table!',
  11027. 'fields' => array(
  11028. 'cvtermsynonym_id' => array(
  11029. // 'description' => 'TODO: please describe this field!',
  11030. 'type' => 'serial',
  11031. 'not null' => '1',
  11032. ),
  11033. 'cvterm_id' => array(
  11034. // 'description' => 'TODO: please describe this field!',
  11035. 'type' => 'int',
  11036. 'not null' => '1',
  11037. ),
  11038. 'synonym' => array(
  11039. // 'description' => 'TODO: please describe this field!',
  11040. 'type' => 'varchar',
  11041. 'length' => '1024',
  11042. 'not null' => '1',
  11043. ),
  11044. 'type_id' => array(
  11045. // 'description' => 'TODO: please describe this field!',
  11046. 'type' => 'int',
  11047. 'not null' => '',
  11048. ),
  11049. ),
  11050. 'primary key' => array(
  11051. '0' => 'cvtermsynonym_id',
  11052. ),
  11053. 'unique keys' => array(
  11054. 'cvtermsynonym_c1' => array(
  11055. '0' => 'cvterm_id',
  11056. '1' => 'synonym',
  11057. ),
  11058. ),
  11059. 'indexes' => array(
  11060. 'cvtermsynonym_idx1' => array(
  11061. '0' => 'cvterm_id',
  11062. ),
  11063. ),
  11064. 'foreign keys' => array(
  11065. ),
  11066. );
  11067. return $description;
  11068. }
  11069. /**
  11070. * Implements hook_cvterm_dbxref_schema()
  11071. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11072. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11073. * @see tripal_core.api.inc: tripal_core_chado_update()
  11074. * @see tripal_core.api.inc: 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_cvterm_dbxref_schema () {
  11083. $description = array();
  11084. $description = array(
  11085. 'table' => 'cvterm_dbxref',
  11086. // 'description' => 'TODO: please describe this table!',
  11087. 'fields' => array(
  11088. 'cvterm_dbxref_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. 'dbxref_id' => array(
  11099. // 'description' => 'TODO: please describe this field!',
  11100. 'type' => 'int',
  11101. 'not null' => '1',
  11102. ),
  11103. 'is_for_definition' => array(
  11104. // 'description' => 'TODO: please describe this field!',
  11105. 'type' => 'int',
  11106. 'not null' => '1',
  11107. 'default' => '0',
  11108. ),
  11109. ),
  11110. 'primary key' => array(
  11111. '0' => 'cvterm_dbxref_id',
  11112. ),
  11113. 'unique keys' => array(
  11114. 'cvterm_dbxref_c1' => array(
  11115. '0' => 'cvterm_id',
  11116. '1' => 'dbxref_id',
  11117. ),
  11118. ),
  11119. 'indexes' => array(
  11120. 'cvterm_dbxref_idx1' => array(
  11121. '0' => 'cvterm_id',
  11122. ),
  11123. 'cvterm_dbxref_idx2' => array(
  11124. '0' => 'dbxref_id',
  11125. ),
  11126. ),
  11127. 'foreign keys' => array(
  11128. ),
  11129. );
  11130. return $description;
  11131. }
  11132. /**
  11133. * Implements hook_cvterm_relationship_schema()
  11134. * Purpose: To describe the structure of cvterm_relationship to tripal
  11135. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11136. * @see tripal_core.api.inc: tripal_core_chado_update()
  11137. * @see tripal_core.api.inc: tripal_core_chado_select()
  11138. *
  11139. * @return
  11140. * An array describing the current table
  11141. *
  11142. * @ingroup tripal_schema_api
  11143. *
  11144. */
  11145. function tripal_core_chado_cvterm_relationship_schema () {
  11146. $description = array();
  11147. $description = array(
  11148. 'table' => 'cvterm_relationship',
  11149. // 'description' => 'TODO: please describe this table!',
  11150. 'fields' => array(
  11151. 'cvterm_relationship_id' => array(
  11152. // 'description' => 'TODO: please describe this field!',
  11153. 'type' => 'serial',
  11154. 'not null' => '1',
  11155. ),
  11156. 'type_id' => array(
  11157. // 'description' => 'TODO: please describe this field!',
  11158. 'type' => 'int',
  11159. 'not null' => '1',
  11160. ),
  11161. 'subject_id' => array(
  11162. // 'description' => 'TODO: please describe this field!',
  11163. 'type' => 'int',
  11164. 'not null' => '1',
  11165. ),
  11166. 'object_id' => array(
  11167. // 'description' => 'TODO: please describe this field!',
  11168. 'type' => 'int',
  11169. 'not null' => '1',
  11170. ),
  11171. ),
  11172. 'primary key' => array(
  11173. '0' => 'cvterm_relationship_id',
  11174. ),
  11175. 'unique keys' => array(
  11176. 'cvterm_relationship_c1' => array(
  11177. '0' => 'subject_id',
  11178. '1' => 'object_id',
  11179. '2' => 'type_id',
  11180. ),
  11181. ),
  11182. 'indexes' => array(
  11183. 'cvterm_relationship_idx1' => array(
  11184. '0' => 'type_id',
  11185. ),
  11186. 'cvterm_relationship_idx2' => array(
  11187. '0' => 'subject_id',
  11188. ),
  11189. 'cvterm_relationship_idx3' => array(
  11190. '0' => 'object_id',
  11191. ),
  11192. ),
  11193. 'foreign keys' => array(
  11194. ),
  11195. );
  11196. return $description;
  11197. }
  11198. /**
  11199. * Implements hook_cvtermpath_schema()
  11200. * Purpose: To describe the structure of cvtermpath to tripal
  11201. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11202. * @see tripal_core.api.inc: tripal_core_chado_update()
  11203. * @see tripal_core.api.inc: tripal_core_chado_select()
  11204. *
  11205. * @return
  11206. * An array describing the current table
  11207. *
  11208. * @ingroup tripal_schema_api
  11209. *
  11210. */
  11211. function tripal_core_chado_cvtermpath_schema () {
  11212. $description = array();
  11213. $description = array(
  11214. 'table' => 'cvtermpath',
  11215. // 'description' => 'TODO: please describe this table!',
  11216. 'fields' => array(
  11217. 'cvtermpath_id' => array(
  11218. // 'description' => 'TODO: please describe this field!',
  11219. 'type' => 'serial',
  11220. 'not null' => '1',
  11221. ),
  11222. 'type_id' => array(
  11223. // 'description' => 'TODO: please describe this field!',
  11224. 'type' => 'int',
  11225. 'not null' => '',
  11226. ),
  11227. 'subject_id' => array(
  11228. // 'description' => 'TODO: please describe this field!',
  11229. 'type' => 'int',
  11230. 'not null' => '1',
  11231. ),
  11232. 'object_id' => array(
  11233. // 'description' => 'TODO: please describe this field!',
  11234. 'type' => 'int',
  11235. 'not null' => '1',
  11236. ),
  11237. 'cv_id' => array(
  11238. // 'description' => 'TODO: please describe this field!',
  11239. 'type' => 'int',
  11240. 'not null' => '1',
  11241. ),
  11242. 'pathdistance' => array(
  11243. // 'description' => 'TODO: please describe this field!',
  11244. 'type' => 'int',
  11245. 'not null' => '',
  11246. ),
  11247. ),
  11248. 'primary key' => array(
  11249. '0' => 'cvtermpath_id',
  11250. ),
  11251. 'unique keys' => array(
  11252. 'cvtermpath_c1' => array(
  11253. '0' => 'subject_id',
  11254. '1' => 'object_id',
  11255. '2' => 'type_id',
  11256. '3' => 'pathdistance',
  11257. ),
  11258. ),
  11259. 'indexes' => array(
  11260. 'cvtermpath_idx1' => array(
  11261. '0' => 'type_id',
  11262. ),
  11263. 'cvtermpath_idx2' => array(
  11264. '0' => 'subject_id',
  11265. ),
  11266. 'cvtermpath_idx3' => array(
  11267. '0' => 'object_id',
  11268. ),
  11269. 'cvtermpath_idx4' => array(
  11270. '0' => 'cv_id',
  11271. ),
  11272. ),
  11273. 'foreign keys' => array(
  11274. ),
  11275. );
  11276. return $description;
  11277. }
  11278. /**
  11279. * Implements hook_cvtermprop_schema()
  11280. * Purpose: To describe the structure of cvtermprop to tripal
  11281. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11282. * @see tripal_core.api.inc: tripal_core_chado_update()
  11283. * @see tripal_core.api.inc: tripal_core_chado_select()
  11284. *
  11285. * @return
  11286. * An array describing the current table
  11287. *
  11288. * @ingroup tripal_schema_api
  11289. *
  11290. */
  11291. function tripal_core_chado_cvtermprop_schema () {
  11292. $description = array();
  11293. $description = array(
  11294. 'table' => 'cvtermprop',
  11295. // 'description' => 'TODO: please describe this table!',
  11296. 'fields' => array(
  11297. 'cvtermprop_id' => array(
  11298. // 'description' => 'TODO: please describe this field!',
  11299. 'type' => 'serial',
  11300. 'not null' => '1',
  11301. ),
  11302. 'cvterm_id' => array(
  11303. // 'description' => 'TODO: please describe this field!',
  11304. 'type' => 'int',
  11305. 'not null' => '1',
  11306. ),
  11307. 'type_id' => array(
  11308. // 'description' => 'TODO: please describe this field!',
  11309. 'type' => 'int',
  11310. 'not null' => '1',
  11311. ),
  11312. 'value' => array(
  11313. // 'description' => 'TODO: please describe this field!',
  11314. 'type' => 'text',
  11315. 'not null' => '1',
  11316. 'default' => '',
  11317. ),
  11318. 'rank' => array(
  11319. // 'description' => 'TODO: please describe this field!',
  11320. 'type' => 'int',
  11321. 'not null' => '1',
  11322. 'default' => '0',
  11323. ),
  11324. ),
  11325. 'primary key' => array(
  11326. '0' => 'cvtermprop_id',
  11327. ),
  11328. 'unique keys' => array(
  11329. 'cvterm_id' => array(
  11330. '0' => 'cvterm_id',
  11331. '1' => 'type_id',
  11332. '2' => 'value',
  11333. '3' => 'rank',
  11334. ),
  11335. ),
  11336. 'indexes' => array(
  11337. 'cvtermprop_idx1' => array(
  11338. '0' => 'cvterm_id',
  11339. ),
  11340. 'cvtermprop_idx2' => array(
  11341. '0' => 'type_id',
  11342. ),
  11343. ),
  11344. 'foreign keys' => array(
  11345. ),
  11346. );
  11347. return $description;
  11348. }
  11349. /**
  11350. * Implements hook_eimage_schema()
  11351. * Purpose: To describe the structure of eimage to tripal
  11352. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11353. * @see tripal_core.api.inc: tripal_core_chado_update()
  11354. * @see tripal_core.api.inc: tripal_core_chado_select()
  11355. *
  11356. * @return
  11357. * An array describing the current table
  11358. *
  11359. * @ingroup tripal_schema_api
  11360. *
  11361. */
  11362. function tripal_core_chado_eimage_schema () {
  11363. $description = array();
  11364. $description = array(
  11365. 'table' => 'eimage',
  11366. // 'description' => 'TODO: please describe this table!',
  11367. 'fields' => array(
  11368. 'eimage_id' => array(
  11369. // 'description' => 'TODO: please describe this field!',
  11370. 'type' => 'serial',
  11371. 'not null' => '1',
  11372. ),
  11373. 'eimage_data' => array(
  11374. // 'description' => 'TODO: please describe this field!',
  11375. 'type' => 'text',
  11376. 'not null' => '',
  11377. ),
  11378. 'eimage_type' => array(
  11379. // 'description' => 'TODO: please describe this field!',
  11380. 'type' => 'varchar',
  11381. 'length' => '255',
  11382. 'not null' => '1',
  11383. ),
  11384. 'image_uri' => array(
  11385. // 'description' => 'TODO: please describe this field!',
  11386. 'type' => 'varchar',
  11387. 'length' => '255',
  11388. 'not null' => '',
  11389. ),
  11390. ),
  11391. 'primary key' => array(
  11392. '0' => 'eimage_id',
  11393. ),
  11394. 'unique keys' => array(
  11395. ),
  11396. 'indexes' => array(
  11397. ),
  11398. 'foreign keys' => array(
  11399. ),
  11400. );
  11401. return $description;
  11402. }
  11403. /**
  11404. * Implements hook_element_schema()
  11405. * Purpose: To describe the structure of element to tripal
  11406. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11407. * @see tripal_core.api.inc: tripal_core_chado_update()
  11408. * @see tripal_core.api.inc: tripal_core_chado_select()
  11409. *
  11410. * @return
  11411. * An array describing the current table
  11412. *
  11413. * @ingroup tripal_schema_api
  11414. *
  11415. */
  11416. function tripal_core_chado_element_schema () {
  11417. $description = array();
  11418. $description = array(
  11419. 'table' => 'element',
  11420. // 'description' => 'TODO: please describe this table!',
  11421. 'fields' => array(
  11422. 'element_id' => array(
  11423. // 'description' => 'TODO: please describe this field!',
  11424. 'type' => 'serial',
  11425. 'not null' => '1',
  11426. ),
  11427. 'feature_id' => array(
  11428. // 'description' => 'TODO: please describe this field!',
  11429. 'type' => 'int',
  11430. 'not null' => '',
  11431. ),
  11432. 'arraydesign_id' => array(
  11433. // 'description' => 'TODO: please describe this field!',
  11434. 'type' => 'int',
  11435. 'not null' => '1',
  11436. ),
  11437. 'type_id' => array(
  11438. // 'description' => 'TODO: please describe this field!',
  11439. 'type' => 'int',
  11440. 'not null' => '',
  11441. ),
  11442. 'dbxref_id' => array(
  11443. // 'description' => 'TODO: please describe this field!',
  11444. 'type' => 'int',
  11445. 'not null' => '',
  11446. ),
  11447. ),
  11448. 'primary key' => array(
  11449. '0' => 'element_id',
  11450. ),
  11451. 'unique keys' => array(
  11452. 'element_c1' => array(
  11453. '0' => 'feature_id',
  11454. '1' => 'arraydesign_id',
  11455. ),
  11456. ),
  11457. 'indexes' => array(
  11458. 'element_idx1' => array(
  11459. '0' => 'feature_id',
  11460. ),
  11461. 'element_idx2' => array(
  11462. '0' => 'arraydesign_id',
  11463. ),
  11464. 'element_idx3' => array(
  11465. '0' => 'type_id',
  11466. ),
  11467. 'element_idx4' => array(
  11468. '0' => 'dbxref_id',
  11469. ),
  11470. ),
  11471. 'foreign keys' => array(
  11472. ),
  11473. );
  11474. return $description;
  11475. }
  11476. /**
  11477. * Implements hook_expression_cvterm_schema()
  11478. * Purpose: To describe the structure of expression_cvterm to tripal
  11479. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11480. * @see tripal_core.api.inc: tripal_core_chado_update()
  11481. * @see tripal_core.api.inc: tripal_core_chado_select()
  11482. *
  11483. * @return
  11484. * An array describing the current table
  11485. *
  11486. * @ingroup tripal_schema_api
  11487. *
  11488. */
  11489. function tripal_core_chado_expression_cvterm_schema () {
  11490. $description = array();
  11491. $description = array(
  11492. 'table' => 'expression_cvterm',
  11493. // 'description' => 'TODO: please describe this table!',
  11494. 'fields' => array(
  11495. 'expression_cvterm_id' => array(
  11496. // 'description' => 'TODO: please describe this field!',
  11497. 'type' => 'serial',
  11498. 'not null' => '1',
  11499. ),
  11500. 'expression_id' => array(
  11501. // 'description' => 'TODO: please describe this field!',
  11502. 'type' => 'int',
  11503. 'not null' => '1',
  11504. ),
  11505. 'cvterm_id' => array(
  11506. // 'description' => 'TODO: please describe this field!',
  11507. 'type' => 'int',
  11508. 'not null' => '1',
  11509. ),
  11510. 'rank' => array(
  11511. // 'description' => 'TODO: please describe this field!',
  11512. 'type' => 'int',
  11513. 'not null' => '1',
  11514. 'default' => '0',
  11515. ),
  11516. 'cvterm_type_id' => array(
  11517. // 'description' => 'TODO: please describe this field!',
  11518. 'type' => 'int',
  11519. 'not null' => '1',
  11520. ),
  11521. ),
  11522. 'primary key' => array(
  11523. '0' => 'expression_cvterm_id',
  11524. ),
  11525. 'unique keys' => array(
  11526. 'expression_cvterm_c1' => array(
  11527. '0' => 'expression_id',
  11528. '1' => 'cvterm_id',
  11529. '2' => 'cvterm_type_id',
  11530. ),
  11531. ),
  11532. 'indexes' => array(
  11533. 'expression_cvterm_idx1' => array(
  11534. '0' => 'expression_id',
  11535. ),
  11536. 'expression_cvterm_idx2' => array(
  11537. '0' => 'cvterm_id',
  11538. ),
  11539. 'expression_cvterm_idx3' => array(
  11540. '0' => 'cvterm_type_id',
  11541. ),
  11542. ),
  11543. 'foreign keys' => array(
  11544. ),
  11545. );
  11546. return $description;
  11547. }
  11548. /**
  11549. * Implements hook_expression_cvtermprop_schema()
  11550. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11551. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11552. * @see tripal_core.api.inc: tripal_core_chado_update()
  11553. * @see tripal_core.api.inc: tripal_core_chado_select()
  11554. *
  11555. * @return
  11556. * An array describing the current table
  11557. *
  11558. * @ingroup tripal_schema_api
  11559. *
  11560. */
  11561. function tripal_core_chado_expression_cvtermprop_schema () {
  11562. $description = array();
  11563. $description = array(
  11564. 'table' => 'expression_cvtermprop',
  11565. // 'description' => 'TODO: please describe this table!',
  11566. 'fields' => array(
  11567. 'expression_cvtermprop_id' => array(
  11568. // 'description' => 'TODO: please describe this field!',
  11569. 'type' => 'serial',
  11570. 'not null' => '1',
  11571. ),
  11572. 'expression_cvterm_id' => array(
  11573. // 'description' => 'TODO: please describe this field!',
  11574. 'type' => 'int',
  11575. 'not null' => '1',
  11576. ),
  11577. 'type_id' => array(
  11578. // 'description' => 'TODO: please describe this field!',
  11579. 'type' => 'int',
  11580. 'not null' => '1',
  11581. ),
  11582. 'value' => array(
  11583. // 'description' => 'TODO: please describe this field!',
  11584. 'type' => 'text',
  11585. 'not null' => '',
  11586. ),
  11587. 'rank' => array(
  11588. // 'description' => 'TODO: please describe this field!',
  11589. 'type' => 'int',
  11590. 'not null' => '1',
  11591. 'default' => '0',
  11592. ),
  11593. ),
  11594. 'primary key' => array(
  11595. '0' => 'expression_cvtermprop_id',
  11596. ),
  11597. 'unique keys' => array(
  11598. 'expression_cvtermprop_c1' => array(
  11599. '0' => 'expression_cvterm_id',
  11600. '1' => 'type_id',
  11601. '2' => 'rank',
  11602. ),
  11603. ),
  11604. 'indexes' => array(
  11605. 'expression_cvtermprop_idx1' => array(
  11606. '0' => 'expression_cvterm_id',
  11607. ),
  11608. 'expression_cvtermprop_idx2' => array(
  11609. '0' => 'type_id',
  11610. ),
  11611. ),
  11612. 'foreign keys' => array(
  11613. ),
  11614. );
  11615. return $description;
  11616. }
  11617. /**
  11618. * Implements hook_expression_image_schema()
  11619. * Purpose: To describe the structure of expression_image to tripal
  11620. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11621. * @see tripal_core.api.inc: tripal_core_chado_update()
  11622. * @see tripal_core.api.inc: tripal_core_chado_select()
  11623. *
  11624. * @return
  11625. * An array describing the current table
  11626. *
  11627. * @ingroup tripal_schema_api
  11628. *
  11629. */
  11630. function tripal_core_chado_expression_image_schema () {
  11631. $description = array();
  11632. $description = array(
  11633. 'table' => 'expression_image',
  11634. // 'description' => 'TODO: please describe this table!',
  11635. 'fields' => array(
  11636. 'expression_image_id' => array(
  11637. // 'description' => 'TODO: please describe this field!',
  11638. 'type' => 'serial',
  11639. 'not null' => '1',
  11640. ),
  11641. 'expression_id' => array(
  11642. // 'description' => 'TODO: please describe this field!',
  11643. 'type' => 'int',
  11644. 'not null' => '1',
  11645. ),
  11646. 'eimage_id' => array(
  11647. // 'description' => 'TODO: please describe this field!',
  11648. 'type' => 'int',
  11649. 'not null' => '1',
  11650. ),
  11651. ),
  11652. 'primary key' => array(
  11653. '0' => 'expression_image_id',
  11654. ),
  11655. 'unique keys' => array(
  11656. 'expression_image_c1' => array(
  11657. '0' => 'expression_id',
  11658. '1' => 'eimage_id',
  11659. ),
  11660. ),
  11661. 'indexes' => array(
  11662. 'expression_image_idx1' => array(
  11663. '0' => 'expression_id',
  11664. ),
  11665. 'expression_image_idx2' => array(
  11666. '0' => 'eimage_id',
  11667. ),
  11668. ),
  11669. 'foreign keys' => array(
  11670. ),
  11671. );
  11672. return $description;
  11673. }
  11674. /**
  11675. * Implements hook_expression_pub_schema()
  11676. * Purpose: To describe the structure of expression_pub to tripal
  11677. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11678. * @see tripal_core.api.inc: tripal_core_chado_update()
  11679. * @see tripal_core.api.inc: tripal_core_chado_select()
  11680. *
  11681. * @return
  11682. * An array describing the current table
  11683. *
  11684. * @ingroup tripal_schema_api
  11685. *
  11686. */
  11687. function tripal_core_chado_expression_pub_schema () {
  11688. $description = array();
  11689. $description = array(
  11690. 'table' => 'expression_pub',
  11691. // 'description' => 'TODO: please describe this table!',
  11692. 'fields' => array(
  11693. 'expression_pub_id' => array(
  11694. // 'description' => 'TODO: please describe this field!',
  11695. 'type' => 'serial',
  11696. 'not null' => '1',
  11697. ),
  11698. 'expression_id' => array(
  11699. // 'description' => 'TODO: please describe this field!',
  11700. 'type' => 'int',
  11701. 'not null' => '1',
  11702. ),
  11703. 'pub_id' => array(
  11704. // 'description' => 'TODO: please describe this field!',
  11705. 'type' => 'int',
  11706. 'not null' => '1',
  11707. ),
  11708. ),
  11709. 'primary key' => array(
  11710. '0' => 'expression_pub_id',
  11711. ),
  11712. 'unique keys' => array(
  11713. 'expression_pub_c1' => array(
  11714. '0' => 'expression_id',
  11715. '1' => 'pub_id',
  11716. ),
  11717. ),
  11718. 'indexes' => array(
  11719. 'expression_pub_idx1' => array(
  11720. '0' => 'expression_id',
  11721. ),
  11722. 'expression_pub_idx2' => array(
  11723. '0' => 'pub_id',
  11724. ),
  11725. ),
  11726. 'foreign keys' => array(
  11727. ),
  11728. );
  11729. return $description;
  11730. }
  11731. /**
  11732. * Implements hook_expression_schema()
  11733. * Purpose: To describe the structure of expression to tripal
  11734. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11735. * @see tripal_core.api.inc: tripal_core_chado_update()
  11736. * @see tripal_core.api.inc: tripal_core_chado_select()
  11737. *
  11738. * @return
  11739. * An array describing the current table
  11740. *
  11741. * @ingroup tripal_schema_api
  11742. *
  11743. */
  11744. function tripal_core_chado_expression_schema () {
  11745. $description = array();
  11746. $description = array(
  11747. 'table' => 'expression',
  11748. // 'description' => 'TODO: please describe this table!',
  11749. 'fields' => array(
  11750. 'expression_id' => array(
  11751. // 'description' => 'TODO: please describe this field!',
  11752. 'type' => 'serial',
  11753. 'not null' => '1',
  11754. ),
  11755. 'uniquename' => array(
  11756. // 'description' => 'TODO: please describe this field!',
  11757. 'type' => 'text',
  11758. 'not null' => '1',
  11759. ),
  11760. 'md5checksum' => array(
  11761. // 'description' => 'TODO: please describe this field!',
  11762. 'type' => 'char',
  11763. 'length' => '32',
  11764. 'not null' => '',
  11765. ),
  11766. 'description' => array(
  11767. // 'description' => 'TODO: please describe this field!',
  11768. 'type' => 'text',
  11769. 'not null' => '',
  11770. ),
  11771. ),
  11772. 'primary key' => array(
  11773. '0' => 'expression_id',
  11774. ),
  11775. 'unique keys' => array(
  11776. 'expression_c1' => array(
  11777. '0' => 'uniquename',
  11778. ),
  11779. ),
  11780. 'indexes' => array(
  11781. ),
  11782. 'foreign keys' => array(
  11783. ),
  11784. );
  11785. return $description;
  11786. }
  11787. /**
  11788. * Implements hook_environment_cvterm_schema()
  11789. * Purpose: To describe the structure of environment_cvterm to tripal
  11790. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11791. * @see tripal_core.api.inc: tripal_core_chado_update()
  11792. * @see tripal_core.api.inc: tripal_core_chado_select()
  11793. *
  11794. * @return
  11795. * An array describing the current table
  11796. *
  11797. * @ingroup tripal_schema_api
  11798. *
  11799. */
  11800. function tripal_core_chado_environment_cvterm_schema () {
  11801. $description = array();
  11802. $description = array(
  11803. 'table' => 'environment_cvterm',
  11804. // 'description' => 'TODO: please describe this table!',
  11805. 'fields' => array(
  11806. 'environment_cvterm_id' => array(
  11807. // 'description' => 'TODO: please describe this field!',
  11808. 'type' => 'serial',
  11809. 'not null' => '1',
  11810. ),
  11811. 'environment_id' => array(
  11812. // 'description' => 'TODO: please describe this field!',
  11813. 'type' => 'int',
  11814. 'not null' => '1',
  11815. ),
  11816. 'cvterm_id' => array(
  11817. // 'description' => 'TODO: please describe this field!',
  11818. 'type' => 'int',
  11819. 'not null' => '1',
  11820. ),
  11821. ),
  11822. 'primary key' => array(
  11823. '0' => 'environment_cvterm_id',
  11824. ),
  11825. 'unique keys' => array(
  11826. 'environment_cvterm_c1' => array(
  11827. '0' => 'environment_id',
  11828. '1' => 'cvterm_id',
  11829. ),
  11830. ),
  11831. 'indexes' => array(
  11832. 'environment_cvterm_idx1' => array(
  11833. '0' => 'environment_id',
  11834. ),
  11835. 'environment_cvterm_idx2' => array(
  11836. '0' => 'cvterm_id',
  11837. ),
  11838. ),
  11839. 'foreign keys' => array(
  11840. ),
  11841. );
  11842. return $description;
  11843. }
  11844. /**
  11845. * Implements hook_element_relationship_schema()
  11846. * Purpose: To describe the structure of element_relationship to tripal
  11847. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11848. * @see tripal_core.api.inc: tripal_core_chado_update()
  11849. * @see tripal_core.api.inc: tripal_core_chado_select()
  11850. *
  11851. * @return
  11852. * An array describing the current table
  11853. *
  11854. * @ingroup tripal_schema_api
  11855. *
  11856. */
  11857. function tripal_core_chado_element_relationship_schema () {
  11858. $description = array();
  11859. $description = array(
  11860. 'table' => 'element_relationship',
  11861. // 'description' => 'TODO: please describe this table!',
  11862. 'fields' => array(
  11863. 'element_relationship_id' => array(
  11864. // 'description' => 'TODO: please describe this field!',
  11865. 'type' => 'serial',
  11866. 'not null' => '1',
  11867. ),
  11868. 'subject_id' => array(
  11869. // 'description' => 'TODO: please describe this field!',
  11870. 'type' => 'int',
  11871. 'not null' => '1',
  11872. ),
  11873. 'type_id' => array(
  11874. // 'description' => 'TODO: please describe this field!',
  11875. 'type' => 'int',
  11876. 'not null' => '1',
  11877. ),
  11878. 'object_id' => array(
  11879. // 'description' => 'TODO: please describe this field!',
  11880. 'type' => 'int',
  11881. 'not null' => '1',
  11882. ),
  11883. 'value' => array(
  11884. // 'description' => 'TODO: please describe this field!',
  11885. 'type' => 'text',
  11886. 'not null' => '',
  11887. ),
  11888. 'rank' => array(
  11889. // 'description' => 'TODO: please describe this field!',
  11890. 'type' => 'int',
  11891. 'not null' => '1',
  11892. 'default' => '0',
  11893. ),
  11894. ),
  11895. 'primary key' => array(
  11896. '0' => 'element_relationship_id',
  11897. ),
  11898. 'unique keys' => array(
  11899. 'element_relationship_c1' => array(
  11900. '0' => 'subject_id',
  11901. '1' => 'object_id',
  11902. '2' => 'type_id',
  11903. '3' => 'rank',
  11904. ),
  11905. ),
  11906. 'indexes' => array(
  11907. 'element_relationship_idx1' => array(
  11908. '0' => 'subject_id',
  11909. ),
  11910. 'element_relationship_idx2' => array(
  11911. '0' => 'type_id',
  11912. ),
  11913. 'element_relationship_idx3' => array(
  11914. '0' => 'object_id',
  11915. ),
  11916. 'element_relationship_idx4' => array(
  11917. '0' => 'value',
  11918. ),
  11919. ),
  11920. 'foreign keys' => array(
  11921. ),
  11922. );
  11923. return $description;
  11924. }
  11925. /**
  11926. * Implements hook_elementresult_schema()
  11927. * Purpose: To describe the structure of elementresult to tripal
  11928. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11929. * @see tripal_core.api.inc: tripal_core_chado_update()
  11930. * @see tripal_core.api.inc: tripal_core_chado_select()
  11931. *
  11932. * @return
  11933. * An array describing the current table
  11934. *
  11935. * @ingroup tripal_schema_api
  11936. *
  11937. */
  11938. function tripal_core_chado_elementresult_schema () {
  11939. $description = array();
  11940. $description = array(
  11941. 'table' => 'elementresult',
  11942. // 'description' => 'TODO: please describe this table!',
  11943. 'fields' => array(
  11944. 'elementresult_id' => array(
  11945. // 'description' => 'TODO: please describe this field!',
  11946. 'type' => 'serial',
  11947. 'not null' => '1',
  11948. ),
  11949. 'element_id' => array(
  11950. // 'description' => 'TODO: please describe this field!',
  11951. 'type' => 'int',
  11952. 'not null' => '1',
  11953. ),
  11954. 'quantification_id' => array(
  11955. // 'description' => 'TODO: please describe this field!',
  11956. 'type' => 'int',
  11957. 'not null' => '1',
  11958. ),
  11959. 'signal' => array(
  11960. // 'description' => 'TODO: please describe this field!',
  11961. 'type' => 'float',
  11962. 'size' => 'big',
  11963. 'not null' => '1',
  11964. ),
  11965. ),
  11966. 'primary key' => array(
  11967. '0' => 'elementresult_id',
  11968. ),
  11969. 'unique keys' => array(
  11970. 'elementresult_c1' => array(
  11971. '0' => 'element_id',
  11972. '1' => 'quantification_id',
  11973. ),
  11974. ),
  11975. 'indexes' => array(
  11976. 'elementresult_idx1' => array(
  11977. '0' => 'element_id',
  11978. ),
  11979. 'elementresult_idx2' => array(
  11980. '0' => 'quantification_id',
  11981. ),
  11982. 'elementresult_idx3' => array(
  11983. '0' => 'signal',
  11984. ),
  11985. ),
  11986. 'foreign keys' => array(
  11987. ),
  11988. );
  11989. return $description;
  11990. }
  11991. /**
  11992. * Implements hook_elementresult_relationship_schema()
  11993. * Purpose: To describe the structure of elementresult_relationship to tripal
  11994. * @see tripal_core.api.inc: tripal_core_chado_insert()
  11995. * @see tripal_core.api.inc: tripal_core_chado_update()
  11996. * @see tripal_core.api.inc: tripal_core_chado_select()
  11997. *
  11998. * @return
  11999. * An array describing the current table
  12000. *
  12001. * @ingroup tripal_schema_api
  12002. *
  12003. */
  12004. function tripal_core_chado_elementresult_relationship_schema () {
  12005. $description = array();
  12006. $description = array(
  12007. 'table' => 'elementresult_relationship',
  12008. // 'description' => 'TODO: please describe this table!',
  12009. 'fields' => array(
  12010. 'elementresult_relationship_id' => array(
  12011. // 'description' => 'TODO: please describe this field!',
  12012. 'type' => 'serial',
  12013. 'not null' => '1',
  12014. ),
  12015. 'subject_id' => array(
  12016. // 'description' => 'TODO: please describe this field!',
  12017. 'type' => 'int',
  12018. 'not null' => '1',
  12019. ),
  12020. 'type_id' => array(
  12021. // 'description' => 'TODO: please describe this field!',
  12022. 'type' => 'int',
  12023. 'not null' => '1',
  12024. ),
  12025. 'object_id' => array(
  12026. // 'description' => 'TODO: please describe this field!',
  12027. 'type' => 'int',
  12028. 'not null' => '1',
  12029. ),
  12030. 'value' => array(
  12031. // 'description' => 'TODO: please describe this field!',
  12032. 'type' => 'text',
  12033. 'not null' => '',
  12034. ),
  12035. 'rank' => array(
  12036. // 'description' => 'TODO: please describe this field!',
  12037. 'type' => 'int',
  12038. 'not null' => '1',
  12039. 'default' => '0',
  12040. ),
  12041. ),
  12042. 'primary key' => array(
  12043. '0' => 'elementresult_relationship_id',
  12044. ),
  12045. 'unique keys' => array(
  12046. 'elementresult_relationship_c1' => array(
  12047. '0' => 'subject_id',
  12048. '1' => 'object_id',
  12049. '2' => 'type_id',
  12050. '3' => 'rank',
  12051. ),
  12052. ),
  12053. 'indexes' => array(
  12054. 'elementresult_relationship_idx1' => array(
  12055. '0' => 'subject_id',
  12056. ),
  12057. 'elementresult_relationship_idx2' => array(
  12058. '0' => 'type_id',
  12059. ),
  12060. 'elementresult_relationship_idx3' => array(
  12061. '0' => 'object_id',
  12062. ),
  12063. 'elementresult_relationship_idx4' => array(
  12064. '0' => 'value',
  12065. ),
  12066. ),
  12067. 'foreign keys' => array(
  12068. ),
  12069. );
  12070. return $description;
  12071. }
  12072. /**
  12073. * Implements hook_environment_schema()
  12074. * Purpose: To describe the structure of environment to tripal
  12075. * @see tripal_core.api.inc: tripal_core_chado_insert()
  12076. * @see tripal_core.api.inc: tripal_core_chado_update()
  12077. * @see tripal_core.api.inc: tripal_core_chado_select()
  12078. *
  12079. * @return
  12080. * An array describing the current table
  12081. *
  12082. * @ingroup tripal_schema_api
  12083. *
  12084. */
  12085. function tripal_core_chado_environment_schema () {
  12086. $description = array();
  12087. $description = array(
  12088. 'table' => 'environment',
  12089. // 'description' => 'TODO: please describe this table!',
  12090. 'fields' => array(
  12091. 'environment_id' => array(
  12092. // 'description' => 'TODO: please describe this field!',
  12093. 'type' => 'serial',
  12094. 'not null' => '1',
  12095. ),
  12096. 'uniquename' => array(
  12097. // 'description' => 'TODO: please describe this field!',
  12098. 'type' => 'text',
  12099. 'not null' => '1',
  12100. ),
  12101. 'description' => array(
  12102. // 'description' => 'TODO: please describe this field!',
  12103. 'type' => 'text',
  12104. 'not null' => '',
  12105. ),
  12106. ),
  12107. 'primary key' => array(
  12108. '0' => 'environment_id',
  12109. ),
  12110. 'unique keys' => array(
  12111. 'environment_c1' => array(
  12112. '0' => 'uniquename',
  12113. ),
  12114. ),
  12115. 'indexes' => array(
  12116. 'environment_idx1' => array(
  12117. '0' => 'uniquename',
  12118. ),
  12119. ),
  12120. 'foreign keys' => array(
  12121. ),
  12122. );
  12123. return $description;
  12124. }