tripal_core.schema.api.inc 316 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737
  1. <?php
  2. /* @file: This file contains default schema definitions for all chado tables
  3. * to be used with tripal_core chado insert/update/select functions.
  4. * These schema definitions can be augmented by the various modules
  5. * (specifically to add missing foreign key definitions) by implementing
  6. * hook_chado_<table name>_schema().
  7. *
  8. * @defgroup tripal_schema_api Core Module Schema API
  9. * @{
  10. * Provides an application programming interface (API) for describing Chado tables.
  11. * This API consists of a set of functions, one for each table in Chado. Each
  12. * function simply returns a Drupal style array that defines the table.
  13. *
  14. * Because Drupal 6 does not handle foreign key relationships, a separate
  15. * hook is used to define the foreign key relationships for each table. As
  16. * of version 0.3b of Tripal, not all foreign key relationships have been
  17. * defined. Therefore, if you need a foreign key you must create the appropriate
  18. * hook. Hooks are named hook_chado_table_schema() where 'hook' is replaced
  19. * with the module name, and 'table' is replaced by the Chado table name.
  20. *
  21. * The functions provided in this documentation should not be called as is, but if you need
  22. * the Drupal-style array definition for any table, use the following function
  23. * call:
  24. *
  25. * $table_desc = module_invoke_all('chado_'.$table.'_schema');
  26. *
  27. * where the variable $table contains the name of the table you want to
  28. * retireve. The function call above uses the Drupal hook infrastructure to
  29. * call the appropriate function in the Schema API as well as the appropriate
  30. * hook to add in any foreign key relationships.
  31. *
  32. * @}
  33. * @ingroup tripal_api
  34. */
  35. /**
  36. * Retrieves the list tables in the Chado schema. By default it only retursn
  37. * the default Chado tables, but may also return custom tables added to the
  38. * Chado schema as well.
  39. *
  40. * @param $include_custom
  41. * Optional. Set as TRUE to include any custom tables created in the
  42. * Chado schema. Custom tables are added to Chado using the
  43. * tripal_core_chado_create_table() function.
  44. *
  45. * @returns
  46. * An associative array where the key and value pairs are the Chado table names.
  47. * @ingroup tripal_schema_api
  48. */
  49. function tripal_core_get_chado_tables($include_custom = NULL) {
  50. if (is_array($db_url) AND array_key_exists('chado', $db_url)) {
  51. $previous_db = tripal_db_set_active('chado');
  52. // @coder-ignore: acting on pg_catalog schema rather then drupal schema therefore, table prefixing does not apply
  53. $sql = 'SELECT tablename FROM pg_tables';
  54. $resource = db_query($sql);
  55. tripal_db_set_active($previous_db);
  56. }
  57. else {
  58. // @coder-ignore: acting on pg_catalog schema rather then drupal schema therefore, table prefixing does not apply
  59. $sql = "SELECT tablename FROM pg_tables WHERE schemaname='chado'";
  60. $resource = db_query($sql);
  61. }
  62. $tables = array();
  63. while ($r = db_fetch_object($resource)) {
  64. $tables[$r->tablename] = $r->tablename;
  65. }
  66. // now add in the custom tables too
  67. if ($include_custom) {
  68. $sql = "SELECT table_name FROM {tripal_custom_tables}";
  69. $resource = db_query($sql);
  70. }
  71. while ($r = db_fetch_object($resource)) {
  72. $tables[$r->table_name] = $r->table_name;
  73. }
  74. asort($tables);
  75. return $tables;
  76. }
  77. /**
  78. * Implements hook_organism_dbxref_schema()
  79. * Purpose: To describe the structure of organism_dbxref to tripal
  80. * @see tripal_core_chado_insert()
  81. * @see tripal_core_chado_update()
  82. * @see tripal_core_chado_select()
  83. *
  84. * @return
  85. * An array describing the current table
  86. *
  87. * @ingroup tripal_schema_api
  88. *
  89. */
  90. function tripal_core_chado_organism_dbxref_schema() {
  91. $description = array();
  92. $description = array(
  93. 'table' => 'organism_dbxref',
  94. // 'description' => 'TODO: please describe this table!',
  95. 'fields' => array(
  96. 'organism_dbxref_id' => array(
  97. // 'description' => 'TODO: please describe this field!',
  98. 'type' => 'serial',
  99. 'not NULL' => '1',
  100. ),
  101. 'organism_id' => array(
  102. // 'description' => 'TODO: please describe this field!',
  103. 'type' => 'int',
  104. 'not NULL' => '1',
  105. ),
  106. 'dbxref_id' => array(
  107. // 'description' => 'TODO: please describe this field!',
  108. 'type' => 'int',
  109. 'not NULL' => '1',
  110. ),
  111. ),
  112. 'primary key' => array(
  113. '0' => 'organism_dbxref_id',
  114. ),
  115. 'unique keys' => array(
  116. 'organism_dbxref_c1' => array(
  117. '0' => 'organism_id',
  118. '1' => 'dbxref_id',
  119. ),
  120. ),
  121. 'indexes' => array(
  122. 'organism_dbxref_idx1' => array(
  123. '0' => 'organism_id',
  124. ),
  125. 'organism_dbxref_idx2' => array(
  126. '0' => 'dbxref_id',
  127. ),
  128. ),
  129. 'foreign keys' => array(
  130. ),
  131. );
  132. return $description;
  133. }
  134. /**
  135. * Implements hook_organismprop_schema()
  136. * Purpose: To describe the structure of organismprop to tripal
  137. * @see tripal_core_chado_insert()
  138. * @see tripal_core_chado_update()
  139. * @see 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_organismprop_schema() {
  148. $description = array();
  149. $description = array(
  150. 'table' => 'organismprop',
  151. // 'description' => 'TODO: please describe this table!',
  152. 'fields' => array(
  153. 'organismprop_id' => array(
  154. // 'description' => 'TODO: please describe this field!',
  155. 'type' => 'serial',
  156. 'not NULL' => '1',
  157. ),
  158. 'organism_id' => array(
  159. // 'description' => 'TODO: please describe this field!',
  160. 'type' => 'int',
  161. 'not NULL' => '1',
  162. ),
  163. 'type_id' => array(
  164. // 'description' => 'TODO: please describe this field!',
  165. 'type' => 'int',
  166. 'not NULL' => '1',
  167. ),
  168. 'value' => array(
  169. // 'description' => 'TODO: please describe this field!',
  170. 'type' => 'text',
  171. 'not NULL' => '',
  172. ),
  173. 'rank' => array(
  174. // 'description' => 'TODO: please describe this field!',
  175. 'type' => 'int',
  176. 'not NULL' => '1',
  177. 'default' => '0',
  178. ),
  179. ),
  180. 'primary key' => array(
  181. '0' => 'organismprop_id',
  182. ),
  183. 'unique keys' => array(
  184. 'organismprop_c1' => array(
  185. '0' => 'organism_id',
  186. '1' => 'type_id',
  187. '2' => 'rank',
  188. ),
  189. ),
  190. 'indexes' => array(
  191. 'organismprop_idx1' => array(
  192. '0' => 'organism_id',
  193. ),
  194. 'organismprop_idx2' => array(
  195. '0' => 'type_id',
  196. ),
  197. ),
  198. 'foreign keys' => array(
  199. ),
  200. );
  201. return $description;
  202. }
  203. /**
  204. * Implements hook_phendesc_schema()
  205. * Purpose: To describe the structure of phendesc to tripal
  206. * @see tripal_core_chado_insert()
  207. * @see tripal_core_chado_update()
  208. * @see tripal_core_chado_select()
  209. *
  210. * @return
  211. * An array describing the current table
  212. *
  213. * @ingroup tripal_schema_api
  214. *
  215. */
  216. function tripal_core_chado_phendesc_schema() {
  217. $description = array();
  218. $description = array(
  219. 'table' => 'phendesc',
  220. // 'description' => 'TODO: please describe this table!',
  221. 'fields' => array(
  222. 'phendesc_id' => array(
  223. // 'description' => 'TODO: please describe this field!',
  224. 'type' => 'serial',
  225. 'not NULL' => '1',
  226. ),
  227. 'genotype_id' => array(
  228. // 'description' => 'TODO: please describe this field!',
  229. 'type' => 'int',
  230. 'not NULL' => '1',
  231. ),
  232. 'environment_id' => array(
  233. // 'description' => 'TODO: please describe this field!',
  234. 'type' => 'int',
  235. 'not NULL' => '1',
  236. ),
  237. 'description' => array(
  238. // 'description' => 'TODO: please describe this field!',
  239. 'type' => 'text',
  240. 'not NULL' => '1',
  241. ),
  242. 'type_id' => array(
  243. // 'description' => 'TODO: please describe this field!',
  244. 'type' => 'int',
  245. 'not NULL' => '1',
  246. ),
  247. 'pub_id' => array(
  248. // 'description' => 'TODO: please describe this field!',
  249. 'type' => 'int',
  250. 'not NULL' => '1',
  251. ),
  252. ),
  253. 'primary key' => array(
  254. '0' => 'phendesc_id',
  255. ),
  256. 'unique keys' => array(
  257. 'phendesc_c1' => array(
  258. '0' => 'genotype_id',
  259. '1' => 'environment_id',
  260. '2' => 'type_id',
  261. '3' => 'pub_id',
  262. ),
  263. ),
  264. 'indexes' => array(
  265. 'phendesc_idx1' => array(
  266. '0' => 'genotype_id',
  267. ),
  268. 'phendesc_idx2' => array(
  269. '0' => 'environment_id',
  270. ),
  271. 'phendesc_idx3' => array(
  272. '0' => 'pub_id',
  273. ),
  274. ),
  275. 'foreign keys' => array(
  276. ),
  277. );
  278. return $description;
  279. }
  280. /**
  281. * Implements hook_phenotype_schema()
  282. * Purpose: To describe the structure of phenotype to tripal
  283. * @see tripal_core_chado_insert()
  284. * @see tripal_core_chado_update()
  285. * @see tripal_core_chado_select()
  286. *
  287. * @return
  288. * An array describing the current table
  289. *
  290. * @ingroup tripal_schema_api
  291. *
  292. */
  293. function tripal_core_chado_phenotype_schema() {
  294. $description = array();
  295. $description = array(
  296. 'table' => 'phenotype',
  297. // 'description' => 'TODO: please describe this table!',
  298. 'fields' => array(
  299. 'phenotype_id' => array(
  300. // 'description' => 'TODO: please describe this field!',
  301. 'type' => 'serial',
  302. 'not NULL' => '1',
  303. ),
  304. 'uniquename' => array(
  305. // 'description' => 'TODO: please describe this field!',
  306. 'type' => 'text',
  307. 'not NULL' => '1',
  308. ),
  309. 'observable_id' => array(
  310. // 'description' => 'TODO: please describe this field!',
  311. 'type' => 'int',
  312. 'not NULL' => '',
  313. ),
  314. 'attr_id' => array(
  315. // 'description' => 'TODO: please describe this field!',
  316. 'type' => 'int',
  317. 'not NULL' => '',
  318. ),
  319. 'value' => array(
  320. // 'description' => 'TODO: please describe this field!',
  321. 'type' => 'text',
  322. 'not NULL' => '',
  323. ),
  324. 'cvalue_id' => array(
  325. // 'description' => 'TODO: please describe this field!',
  326. 'type' => 'int',
  327. 'not NULL' => '',
  328. ),
  329. 'assay_id' => array(
  330. // 'description' => 'TODO: please describe this field!',
  331. 'type' => 'int',
  332. 'not NULL' => '',
  333. ),
  334. ),
  335. 'primary key' => array(
  336. '0' => 'phenotype_id',
  337. ),
  338. 'unique keys' => array(
  339. 'phenotype_c1' => array(
  340. '0' => 'uniquename',
  341. ),
  342. ),
  343. 'indexes' => array(
  344. 'phenotype_idx1' => array(
  345. '0' => 'cvalue_id',
  346. ),
  347. 'phenotype_idx2' => array(
  348. '0' => 'observable_id',
  349. ),
  350. 'phenotype_idx3' => array(
  351. '0' => 'attr_id',
  352. ),
  353. ),
  354. 'foreign keys' => array(
  355. ),
  356. );
  357. return $description;
  358. }
  359. /**
  360. * Implements hook_organism_schema()
  361. * Purpose: To describe the structure of organism to tripal
  362. * @see tripal_core_chado_insert()
  363. * @see tripal_core_chado_update()
  364. * @see tripal_core_chado_select()
  365. *
  366. * @return
  367. * An array describing the current table
  368. *
  369. * @ingroup tripal_schema_api
  370. *
  371. */
  372. function tripal_core_chado_organism_schema() {
  373. $description = array();
  374. $description = array(
  375. 'table' => 'organism',
  376. // 'description' => 'TODO: please describe this table!',
  377. 'fields' => array(
  378. 'organism_id' => array(
  379. // 'description' => 'TODO: please describe this field!',
  380. 'type' => 'serial',
  381. 'not NULL' => '1',
  382. ),
  383. 'abbreviation' => array(
  384. // 'description' => 'TODO: please describe this field!',
  385. 'type' => 'varchar',
  386. 'length' => '255',
  387. 'not NULL' => '',
  388. ),
  389. 'genus' => array(
  390. // 'description' => 'TODO: please describe this field!',
  391. 'type' => 'varchar',
  392. 'length' => '255',
  393. 'not NULL' => '1',
  394. ),
  395. 'species' => array(
  396. // 'description' => 'TODO: please describe this field!',
  397. 'type' => 'varchar',
  398. 'length' => '255',
  399. 'not NULL' => '1',
  400. ),
  401. 'common_name' => array(
  402. // 'description' => 'TODO: please describe this field!',
  403. 'type' => 'varchar',
  404. 'length' => '255',
  405. 'not NULL' => '',
  406. ),
  407. 'comment' => array(
  408. // 'description' => 'TODO: please describe this field!',
  409. 'type' => 'text',
  410. 'not NULL' => '',
  411. ),
  412. ),
  413. 'primary key' => array(
  414. '0' => 'organism_id',
  415. ),
  416. 'unique keys' => array(
  417. 'organism_c1' => array(
  418. '0' => 'genus',
  419. '1' => 'species',
  420. ),
  421. ),
  422. 'indexes' => array(
  423. ),
  424. 'foreign keys' => array(
  425. ),
  426. );
  427. return $description;
  428. }
  429. /**
  430. * Implements hook_materialized_view_schema()
  431. * Purpose: To describe the structure of materialized_view to tripal
  432. * @see tripal_core_chado_insert()
  433. * @see tripal_core_chado_update()
  434. * @see tripal_core_chado_select()
  435. *
  436. * @return
  437. * An array describing the current table
  438. *
  439. * @ingroup tripal_schema_api
  440. *
  441. */
  442. function tripal_core_chado_materialized_view_schema() {
  443. $description = array();
  444. $description = array(
  445. 'table' => 'materialized_view',
  446. // 'description' => 'TODO: please describe this table!',
  447. 'fields' => array(
  448. 'materialized_view_id' => array(
  449. // 'description' => 'TODO: please describe this field!',
  450. 'type' => 'serial',
  451. 'not NULL' => '1',
  452. ),
  453. 'last_update' => array(
  454. // 'description' => 'TODO: please describe this field!',
  455. 'type' => 'datetime',
  456. 'not NULL' => '',
  457. ),
  458. 'refresh_time' => array(
  459. // 'description' => 'TODO: please describe this field!',
  460. 'type' => 'int',
  461. 'not NULL' => '',
  462. ),
  463. 'name' => array(
  464. // 'description' => 'TODO: please describe this field!',
  465. 'type' => 'varchar',
  466. 'length' => '64',
  467. 'not NULL' => '',
  468. ),
  469. 'mv_schema' => array(
  470. // 'description' => 'TODO: please describe this field!',
  471. 'type' => 'varchar',
  472. 'length' => '64',
  473. 'not NULL' => '',
  474. ),
  475. 'mv_table' => array(
  476. // 'description' => 'TODO: please describe this field!',
  477. 'type' => 'varchar',
  478. 'length' => '128',
  479. 'not NULL' => '',
  480. ),
  481. 'mv_specs' => array(
  482. // 'description' => 'TODO: please describe this field!',
  483. 'type' => 'text',
  484. 'not NULL' => '',
  485. ),
  486. 'indexed' => array(
  487. // 'description' => 'TODO: please describe this field!',
  488. 'type' => 'text',
  489. 'not NULL' => '',
  490. ),
  491. 'query' => array(
  492. // 'description' => 'TODO: please describe this field!',
  493. 'type' => 'text',
  494. 'not NULL' => '',
  495. ),
  496. 'special_index' => array(
  497. // 'description' => 'TODO: please describe this field!',
  498. 'type' => 'text',
  499. 'not NULL' => '',
  500. ),
  501. ),
  502. 'primary key' => array(
  503. ),
  504. 'unique keys' => array(
  505. 'name' => array(
  506. '0' => 'name',
  507. ),
  508. ),
  509. 'indexes' => array(
  510. ),
  511. 'foreign keys' => array(
  512. ),
  513. );
  514. return $description;
  515. }
  516. /**
  517. * Implements hook_libraryprop_schema()
  518. * Purpose: To describe the structure of libraryprop to tripal
  519. * @see tripal_core_chado_insert()
  520. * @see tripal_core_chado_update()
  521. * @see 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_schema() {
  530. $description = array();
  531. $description = array(
  532. 'table' => 'libraryprop',
  533. // 'description' => 'TODO: please describe this table!',
  534. 'fields' => array(
  535. 'libraryprop_id' => array(
  536. // 'description' => 'TODO: please describe this field!',
  537. 'type' => 'serial',
  538. 'not NULL' => '1',
  539. ),
  540. 'library_id' => array(
  541. // 'description' => 'TODO: please describe this field!',
  542. 'type' => 'int',
  543. 'not NULL' => '1',
  544. ),
  545. 'type_id' => array(
  546. // 'description' => 'TODO: please describe this field!',
  547. 'type' => 'int',
  548. 'not NULL' => '1',
  549. ),
  550. 'value' => array(
  551. // 'description' => 'TODO: please describe this field!',
  552. 'type' => 'text',
  553. 'not NULL' => '',
  554. ),
  555. 'rank' => array(
  556. // 'description' => 'TODO: please describe this field!',
  557. 'type' => 'int',
  558. 'not NULL' => '1',
  559. 'default' => '0',
  560. ),
  561. ),
  562. 'primary key' => array(
  563. '0' => 'libraryprop_id',
  564. ),
  565. 'unique keys' => array(
  566. 'libraryprop_c1' => array(
  567. '0' => 'library_id',
  568. '1' => 'type_id',
  569. '2' => 'rank',
  570. ),
  571. ),
  572. 'indexes' => array(
  573. 'libraryprop_idx1' => array(
  574. '0' => 'library_id',
  575. ),
  576. 'libraryprop_idx2' => array(
  577. '0' => 'type_id',
  578. ),
  579. ),
  580. 'foreign keys' => array(
  581. ),
  582. );
  583. return $description;
  584. }
  585. /**
  586. * Implements hook_libraryprop_pub_schema()
  587. * Purpose: To describe the structure of libraryprop_pub to tripal
  588. * @see tripal_core_chado_insert()
  589. * @see tripal_core_chado_update()
  590. * @see tripal_core_chado_select()
  591. *
  592. * @return
  593. * An array describing the current table
  594. *
  595. * @ingroup tripal_schema_api
  596. *
  597. */
  598. function tripal_core_chado_libraryprop_pub_schema() {
  599. $description = array();
  600. $description = array(
  601. 'table' => 'libraryprop_pub',
  602. // 'description' => 'TODO: please describe this table!',
  603. 'fields' => array(
  604. 'libraryprop_pub_id' => array(
  605. // 'description' => 'TODO: please describe this field!',
  606. 'type' => 'serial',
  607. 'not NULL' => '1',
  608. ),
  609. 'libraryprop_id' => array(
  610. // 'description' => 'TODO: please describe this field!',
  611. 'type' => 'int',
  612. 'not NULL' => '1',
  613. ),
  614. 'pub_id' => array(
  615. // 'description' => 'TODO: please describe this field!',
  616. 'type' => 'int',
  617. 'not NULL' => '1',
  618. ),
  619. ),
  620. 'primary key' => array(
  621. '0' => 'libraryprop_pub_id',
  622. ),
  623. 'unique keys' => array(
  624. 'libraryprop_pub_c1' => array(
  625. '0' => 'libraryprop_id',
  626. '1' => 'pub_id',
  627. ),
  628. ),
  629. 'indexes' => array(
  630. 'libraryprop_pub_idx1' => array(
  631. '0' => 'libraryprop_id',
  632. ),
  633. 'libraryprop_pub_idx2' => array(
  634. '0' => 'pub_id',
  635. ),
  636. ),
  637. 'foreign keys' => array(
  638. ),
  639. );
  640. return $description;
  641. }
  642. /**
  643. * Implements hook_magedocumentation_schema()
  644. * Purpose: To describe the structure of magedocumentation to tripal
  645. * @see tripal_core_chado_insert()
  646. * @see tripal_core_chado_update()
  647. * @see tripal_core_chado_select()
  648. *
  649. * @return
  650. * An array describing the current table
  651. *
  652. * @ingroup tripal_schema_api
  653. *
  654. */
  655. function tripal_core_chado_magedocumentation_schema() {
  656. $description = array();
  657. $description = array(
  658. 'table' => 'magedocumentation',
  659. // 'description' => 'TODO: please describe this table!',
  660. 'fields' => array(
  661. 'magedocumentation_id' => array(
  662. // 'description' => 'TODO: please describe this field!',
  663. 'type' => 'serial',
  664. 'not NULL' => '1',
  665. ),
  666. 'mageml_id' => array(
  667. // 'description' => 'TODO: please describe this field!',
  668. 'type' => 'int',
  669. 'not NULL' => '1',
  670. ),
  671. 'tableinfo_id' => array(
  672. // 'description' => 'TODO: please describe this field!',
  673. 'type' => 'int',
  674. 'not NULL' => '1',
  675. ),
  676. 'row_id' => array(
  677. // 'description' => 'TODO: please describe this field!',
  678. 'type' => 'int',
  679. 'not NULL' => '1',
  680. ),
  681. 'mageidentifier' => array(
  682. // 'description' => 'TODO: please describe this field!',
  683. 'type' => 'text',
  684. 'not NULL' => '1',
  685. ),
  686. ),
  687. 'primary key' => array(
  688. '0' => 'magedocumentation_id',
  689. ),
  690. 'unique keys' => array(
  691. ),
  692. 'indexes' => array(
  693. 'magedocumentation_idx1' => array(
  694. '0' => 'mageml_id',
  695. ),
  696. 'magedocumentation_idx2' => array(
  697. '0' => 'tableinfo_id',
  698. ),
  699. 'magedocumentation_idx3' => array(
  700. '0' => 'row_id',
  701. ),
  702. ),
  703. 'foreign keys' => array(
  704. ),
  705. );
  706. return $description;
  707. }
  708. /**
  709. * Implements hook_mageml_schema()
  710. * Purpose: To describe the structure of mageml to tripal
  711. * @see tripal_core_chado_insert()
  712. * @see tripal_core_chado_update()
  713. * @see tripal_core_chado_select()
  714. *
  715. * @return
  716. * An array describing the current table
  717. *
  718. * @ingroup tripal_schema_api
  719. *
  720. */
  721. function tripal_core_chado_mageml_schema() {
  722. $description = array();
  723. $description = array(
  724. 'table' => 'mageml',
  725. // 'description' => 'TODO: please describe this table!',
  726. 'fields' => array(
  727. 'mageml_id' => array(
  728. // 'description' => 'TODO: please describe this field!',
  729. 'type' => 'serial',
  730. 'not NULL' => '1',
  731. ),
  732. 'mage_package' => array(
  733. // 'description' => 'TODO: please describe this field!',
  734. 'type' => 'text',
  735. 'not NULL' => '1',
  736. ),
  737. 'mage_ml' => array(
  738. // 'description' => 'TODO: please describe this field!',
  739. 'type' => 'text',
  740. 'not NULL' => '1',
  741. ),
  742. ),
  743. 'primary key' => array(
  744. '0' => 'mageml_id',
  745. ),
  746. 'unique keys' => array(
  747. ),
  748. 'indexes' => array(
  749. ),
  750. 'foreign keys' => array(
  751. ),
  752. );
  753. return $description;
  754. }
  755. /**
  756. * Implements hook_phenotype_comparison_schema()
  757. * Purpose: To describe the structure of phenotype_comparison to tripal
  758. * @see tripal_core_chado_insert()
  759. * @see tripal_core_chado_update()
  760. * @see tripal_core_chado_select()
  761. *
  762. * @return
  763. * An array describing the current table
  764. *
  765. * @ingroup tripal_schema_api
  766. *
  767. */
  768. function tripal_core_chado_phenotype_comparison_schema() {
  769. $description = array();
  770. $description = array(
  771. 'table' => 'phenotype_comparison',
  772. // 'description' => 'TODO: please describe this table!',
  773. 'fields' => array(
  774. 'phenotype_comparison_id' => array(
  775. // 'description' => 'TODO: please describe this field!',
  776. 'type' => 'serial',
  777. 'not NULL' => '1',
  778. ),
  779. 'genotype1_id' => array(
  780. // 'description' => 'TODO: please describe this field!',
  781. 'type' => 'int',
  782. 'not NULL' => '1',
  783. ),
  784. 'environment1_id' => array(
  785. // 'description' => 'TODO: please describe this field!',
  786. 'type' => 'int',
  787. 'not NULL' => '1',
  788. ),
  789. 'genotype2_id' => array(
  790. // 'description' => 'TODO: please describe this field!',
  791. 'type' => 'int',
  792. 'not NULL' => '1',
  793. ),
  794. 'environment2_id' => array(
  795. // 'description' => 'TODO: please describe this field!',
  796. 'type' => 'int',
  797. 'not NULL' => '1',
  798. ),
  799. 'phenotype1_id' => array(
  800. // 'description' => 'TODO: please describe this field!',
  801. 'type' => 'int',
  802. 'not NULL' => '1',
  803. ),
  804. 'phenotype2_id' => array(
  805. // 'description' => 'TODO: please describe this field!',
  806. 'type' => 'int',
  807. 'not NULL' => '',
  808. ),
  809. 'pub_id' => array(
  810. // 'description' => 'TODO: please describe this field!',
  811. 'type' => 'int',
  812. 'not NULL' => '1',
  813. ),
  814. 'organism_id' => array(
  815. // 'description' => 'TODO: please describe this field!',
  816. 'type' => 'int',
  817. 'not NULL' => '1',
  818. ),
  819. ),
  820. 'primary key' => array(
  821. '0' => 'phenotype_comparison_id',
  822. ),
  823. 'unique keys' => array(
  824. 'phenotype_comparison_c1' => array(
  825. '0' => 'genotype1_id',
  826. '1' => 'environment1_id',
  827. '2' => 'genotype2_id',
  828. '3' => 'environment2_id',
  829. '4' => 'phenotype1_id',
  830. '5' => 'pub_id',
  831. ),
  832. ),
  833. 'indexes' => array(
  834. 'phenotype_comparison_idx1' => array(
  835. '0' => 'genotype1_id',
  836. ),
  837. 'phenotype_comparison_idx2' => array(
  838. '0' => 'genotype2_id',
  839. ),
  840. 'phenotype_comparison_idx4' => array(
  841. '0' => 'pub_id',
  842. ),
  843. ),
  844. 'foreign keys' => array(
  845. ),
  846. );
  847. return $description;
  848. }
  849. /**
  850. * Implements hook_phenotype_comparison_cvterm_schema()
  851. * Purpose: To describe the structure of phenotype_comparison_cvterm to tripal
  852. * @see tripal_core_chado_insert()
  853. * @see tripal_core_chado_update()
  854. * @see tripal_core_chado_select()
  855. *
  856. * @return
  857. * An array describing the current table
  858. *
  859. * @ingroup tripal_schema_api
  860. *
  861. */
  862. function tripal_core_chado_phenotype_comparison_cvterm_schema() {
  863. $description = array();
  864. $description = array(
  865. 'table' => 'phenotype_comparison_cvterm',
  866. // 'description' => 'TODO: please describe this table!',
  867. 'fields' => array(
  868. 'phenotype_comparison_cvterm_id' => array(
  869. // 'description' => 'TODO: please describe this field!',
  870. 'type' => 'serial',
  871. 'not NULL' => '1',
  872. ),
  873. 'phenotype_comparison_id' => array(
  874. // 'description' => 'TODO: please describe this field!',
  875. 'type' => 'int',
  876. 'not NULL' => '1',
  877. ),
  878. 'cvterm_id' => array(
  879. // 'description' => 'TODO: please describe this field!',
  880. 'type' => 'int',
  881. 'not NULL' => '1',
  882. ),
  883. 'pub_id' => array(
  884. // 'description' => 'TODO: please describe this field!',
  885. 'type' => 'int',
  886. 'not NULL' => '1',
  887. ),
  888. 'rank' => array(
  889. // 'description' => 'TODO: please describe this field!',
  890. 'type' => 'int',
  891. 'not NULL' => '1',
  892. 'default' => '0',
  893. ),
  894. ),
  895. 'primary key' => array(
  896. '0' => 'phenotype_comparison_cvterm_id',
  897. ),
  898. 'unique keys' => array(
  899. 'phenotype_comparison_cvterm_c1' => array(
  900. '0' => 'phenotype_comparison_id',
  901. '1' => 'cvterm_id',
  902. ),
  903. ),
  904. 'indexes' => array(
  905. 'phenotype_comparison_cvterm_idx1' => array(
  906. '0' => 'phenotype_comparison_id',
  907. ),
  908. 'phenotype_comparison_cvterm_idx2' => array(
  909. '0' => 'cvterm_id',
  910. ),
  911. ),
  912. 'foreign keys' => array(
  913. ),
  914. );
  915. return $description;
  916. }
  917. /**
  918. * Implements hook_phylonode_relationship_schema()
  919. * Purpose: To describe the structure of phylonode_relationship to tripal
  920. * @see tripal_core_chado_insert()
  921. * @see tripal_core_chado_update()
  922. * @see tripal_core_chado_select()
  923. *
  924. * @return
  925. * An array describing the current table
  926. *
  927. * @ingroup tripal_schema_api
  928. *
  929. */
  930. function tripal_core_chado_phylonode_relationship_schema() {
  931. $description = array();
  932. $description = array(
  933. 'table' => 'phylonode_relationship',
  934. // 'description' => 'TODO: please describe this table!',
  935. 'fields' => array(
  936. 'phylonode_relationship_id' => array(
  937. // 'description' => 'TODO: please describe this field!',
  938. 'type' => 'serial',
  939. 'not NULL' => '1',
  940. ),
  941. 'subject_id' => array(
  942. // 'description' => 'TODO: please describe this field!',
  943. 'type' => 'int',
  944. 'not NULL' => '1',
  945. ),
  946. 'object_id' => array(
  947. // 'description' => 'TODO: please describe this field!',
  948. 'type' => 'int',
  949. 'not NULL' => '1',
  950. ),
  951. 'type_id' => array(
  952. // 'description' => 'TODO: please describe this field!',
  953. 'type' => 'int',
  954. 'not NULL' => '1',
  955. ),
  956. 'rank' => array(
  957. // 'description' => 'TODO: please describe this field!',
  958. 'type' => 'int',
  959. 'not NULL' => '',
  960. ),
  961. 'phylotree_id' => array(
  962. // 'description' => 'TODO: please describe this field!',
  963. 'type' => 'int',
  964. 'not NULL' => '1',
  965. ),
  966. ),
  967. 'primary key' => array(
  968. '0' => 'phylonode_relationship_id',
  969. ),
  970. 'unique keys' => array(
  971. 'subject_id' => array(
  972. '0' => 'subject_id',
  973. '1' => 'object_id',
  974. '2' => 'type_id',
  975. ),
  976. ),
  977. 'indexes' => array(
  978. 'phylonode_relationship_idx1' => array(
  979. '0' => 'subject_id',
  980. ),
  981. 'phylonode_relationship_idx2' => array(
  982. '0' => 'object_id',
  983. ),
  984. 'phylonode_relationship_idx3' => array(
  985. '0' => 'type_id',
  986. ),
  987. ),
  988. 'foreign keys' => array(
  989. ),
  990. );
  991. return $description;
  992. }
  993. /**
  994. * Implements hook_phylonodeprop_schema()
  995. * Purpose: To describe the structure of phylonodeprop to tripal
  996. * @see tripal_core_chado_insert()
  997. * @see tripal_core_chado_update()
  998. * @see tripal_core_chado_select()
  999. *
  1000. * @return
  1001. * An array describing the current table
  1002. *
  1003. * @ingroup tripal_schema_api
  1004. *
  1005. */
  1006. function tripal_core_chado_phylonodeprop_schema() {
  1007. $description = array();
  1008. $description = array(
  1009. 'table' => 'phylonodeprop',
  1010. // 'description' => 'TODO: please describe this table!',
  1011. 'fields' => array(
  1012. 'phylonodeprop_id' => array(
  1013. // 'description' => 'TODO: please describe this field!',
  1014. 'type' => 'serial',
  1015. 'not NULL' => '1',
  1016. ),
  1017. 'phylonode_id' => array(
  1018. // 'description' => 'TODO: please describe this field!',
  1019. 'type' => 'int',
  1020. 'not NULL' => '1',
  1021. ),
  1022. 'type_id' => array(
  1023. // 'description' => 'TODO: please describe this field!',
  1024. 'type' => 'int',
  1025. 'not NULL' => '1',
  1026. ),
  1027. 'value' => array(
  1028. // 'description' => 'TODO: please describe this field!',
  1029. 'type' => 'text',
  1030. 'not NULL' => '1',
  1031. 'default' => '',
  1032. ),
  1033. 'rank' => array(
  1034. // 'description' => 'TODO: please describe this field!',
  1035. 'type' => 'int',
  1036. 'not NULL' => '1',
  1037. 'default' => '0',
  1038. ),
  1039. ),
  1040. 'primary key' => array(
  1041. '0' => 'phylonodeprop_id',
  1042. ),
  1043. 'unique keys' => array(
  1044. 'phylonode_id' => array(
  1045. '0' => 'phylonode_id',
  1046. '1' => 'type_id',
  1047. '2' => 'value',
  1048. '3' => 'rank',
  1049. ),
  1050. ),
  1051. 'indexes' => array(
  1052. 'phylonodeprop_idx1' => array(
  1053. '0' => 'phylonode_id',
  1054. ),
  1055. 'phylonodeprop_idx2' => array(
  1056. '0' => 'type_id',
  1057. ),
  1058. ),
  1059. 'foreign keys' => array(
  1060. ),
  1061. );
  1062. return $description;
  1063. }
  1064. /**
  1065. * Implements hook_phylotree_schema()
  1066. * Purpose: To describe the structure of phylotree to tripal
  1067. * @see tripal_core_chado_insert()
  1068. * @see tripal_core_chado_update()
  1069. * @see tripal_core_chado_select()
  1070. *
  1071. * @return
  1072. * An array describing the current table
  1073. *
  1074. * @ingroup tripal_schema_api
  1075. *
  1076. */
  1077. function tripal_core_chado_phylotree_schema() {
  1078. $description = array();
  1079. $description = array(
  1080. 'table' => 'phylotree',
  1081. // 'description' => 'TODO: please describe this table!',
  1082. 'fields' => array(
  1083. 'phylotree_id' => array(
  1084. // 'description' => 'TODO: please describe this field!',
  1085. 'type' => 'serial',
  1086. 'not NULL' => '1',
  1087. ),
  1088. 'dbxref_id' => array(
  1089. // 'description' => 'TODO: please describe this field!',
  1090. 'type' => 'int',
  1091. 'not NULL' => '1',
  1092. ),
  1093. 'name' => array(
  1094. // 'description' => 'TODO: please describe this field!',
  1095. 'type' => 'varchar',
  1096. 'length' => '255',
  1097. 'not NULL' => '',
  1098. ),
  1099. 'type_id' => array(
  1100. // 'description' => 'TODO: please describe this field!',
  1101. 'type' => 'int',
  1102. 'not NULL' => '',
  1103. ),
  1104. 'analysis_id' => array(
  1105. // 'description' => 'TODO: please describe this field!',
  1106. 'type' => 'int',
  1107. 'not NULL' => '',
  1108. ),
  1109. 'comment' => array(
  1110. // 'description' => 'TODO: please describe this field!',
  1111. 'type' => 'text',
  1112. 'not NULL' => '',
  1113. ),
  1114. ),
  1115. 'primary key' => array(
  1116. '0' => 'phylotree_id',
  1117. ),
  1118. 'unique keys' => array(
  1119. ),
  1120. 'indexes' => array(
  1121. 'phylotree_idx1' => array(
  1122. '0' => 'phylotree_id',
  1123. ),
  1124. ),
  1125. 'foreign keys' => array(
  1126. ),
  1127. );
  1128. return $description;
  1129. }
  1130. /**
  1131. * Implements hook_phylotree_pub_schema()
  1132. * Purpose: To describe the structure of phylotree_pub to tripal
  1133. * @see tripal_core_chado_insert()
  1134. * @see tripal_core_chado_update()
  1135. * @see tripal_core_chado_select()
  1136. *
  1137. * @return
  1138. * An array describing the current table
  1139. *
  1140. * @ingroup tripal_schema_api
  1141. *
  1142. */
  1143. function tripal_core_chado_phylotree_pub_schema() {
  1144. $description = array();
  1145. $description = array(
  1146. 'table' => 'phylotree_pub',
  1147. // 'description' => 'TODO: please describe this table!',
  1148. 'fields' => array(
  1149. 'phylotree_pub_id' => array(
  1150. // 'description' => 'TODO: please describe this field!',
  1151. 'type' => 'serial',
  1152. 'not NULL' => '1',
  1153. ),
  1154. 'phylotree_id' => array(
  1155. // 'description' => 'TODO: please describe this field!',
  1156. 'type' => 'int',
  1157. 'not NULL' => '1',
  1158. ),
  1159. 'pub_id' => array(
  1160. // 'description' => 'TODO: please describe this field!',
  1161. 'type' => 'int',
  1162. 'not NULL' => '1',
  1163. ),
  1164. ),
  1165. 'primary key' => array(
  1166. '0' => 'phylotree_pub_id',
  1167. ),
  1168. 'unique keys' => array(
  1169. 'phylotree_id' => array(
  1170. '0' => 'phylotree_id',
  1171. '1' => 'pub_id',
  1172. ),
  1173. ),
  1174. 'indexes' => array(
  1175. 'phylotree_pub_idx1' => array(
  1176. '0' => 'phylotree_id',
  1177. ),
  1178. 'phylotree_pub_idx2' => array(
  1179. '0' => 'pub_id',
  1180. ),
  1181. ),
  1182. 'foreign keys' => array(
  1183. ),
  1184. );
  1185. return $description;
  1186. }
  1187. /**
  1188. * Implements hook_phylonode_pub_schema()
  1189. * Purpose: To describe the structure of phylonode_pub to tripal
  1190. * @see tripal_core_chado_insert()
  1191. * @see tripal_core_chado_update()
  1192. * @see tripal_core_chado_select()
  1193. *
  1194. * @return
  1195. * An array describing the current table
  1196. *
  1197. * @ingroup tripal_schema_api
  1198. *
  1199. */
  1200. function tripal_core_chado_phylonode_pub_schema() {
  1201. $description = array();
  1202. $description = array(
  1203. 'table' => 'phylonode_pub',
  1204. // 'description' => 'TODO: please describe this table!',
  1205. 'fields' => array(
  1206. 'phylonode_pub_id' => array(
  1207. // 'description' => 'TODO: please describe this field!',
  1208. 'type' => 'serial',
  1209. 'not NULL' => '1',
  1210. ),
  1211. 'phylonode_id' => array(
  1212. // 'description' => 'TODO: please describe this field!',
  1213. 'type' => 'int',
  1214. 'not NULL' => '1',
  1215. ),
  1216. 'pub_id' => array(
  1217. // 'description' => 'TODO: please describe this field!',
  1218. 'type' => 'int',
  1219. 'not NULL' => '1',
  1220. ),
  1221. ),
  1222. 'primary key' => array(
  1223. '0' => 'phylonode_pub_id',
  1224. ),
  1225. 'unique keys' => array(
  1226. 'phylonode_id' => array(
  1227. '0' => 'phylonode_id',
  1228. '1' => 'pub_id',
  1229. ),
  1230. ),
  1231. 'indexes' => array(
  1232. 'phylonode_pub_idx1' => array(
  1233. '0' => 'phylonode_id',
  1234. ),
  1235. 'phylonode_pub_idx2' => array(
  1236. '0' => 'pub_id',
  1237. ),
  1238. ),
  1239. 'foreign keys' => array(
  1240. ),
  1241. );
  1242. return $description;
  1243. }
  1244. /**
  1245. * Implements hook_phylonode_organism_schema()
  1246. * Purpose: To describe the structure of phylonode_organism to tripal
  1247. * @see tripal_core_chado_insert()
  1248. * @see tripal_core_chado_update()
  1249. * @see tripal_core_chado_select()
  1250. *
  1251. * @return
  1252. * An array describing the current table
  1253. *
  1254. * @ingroup tripal_schema_api
  1255. *
  1256. */
  1257. function tripal_core_chado_phylonode_organism_schema() {
  1258. $description = array();
  1259. $description = array(
  1260. 'table' => 'phylonode_organism',
  1261. // 'description' => 'TODO: please describe this table!',
  1262. 'fields' => array(
  1263. 'phylonode_organism_id' => array(
  1264. // 'description' => 'TODO: please describe this field!',
  1265. 'type' => 'serial',
  1266. 'not NULL' => '1',
  1267. ),
  1268. 'phylonode_id' => array(
  1269. // 'description' => 'TODO: please describe this field!',
  1270. 'type' => 'int',
  1271. 'not NULL' => '1',
  1272. ),
  1273. 'organism_id' => array(
  1274. // 'description' => 'TODO: please describe this field!',
  1275. 'type' => 'int',
  1276. 'not NULL' => '1',
  1277. ),
  1278. ),
  1279. 'primary key' => array(
  1280. '0' => 'phylonode_organism_id',
  1281. ),
  1282. 'unique keys' => array(
  1283. 'phylonode_id' => array(
  1284. '0' => 'phylonode_id',
  1285. ),
  1286. ),
  1287. 'indexes' => array(
  1288. 'phylonode_organism_idx1' => array(
  1289. '0' => 'phylonode_id',
  1290. ),
  1291. 'phylonode_organism_idx2' => array(
  1292. '0' => 'organism_id',
  1293. ),
  1294. ),
  1295. 'foreign keys' => array(
  1296. ),
  1297. );
  1298. return $description;
  1299. }
  1300. /**
  1301. * Implements hook_phenotype_cvterm_schema()
  1302. * Purpose: To describe the structure of phenotype_cvterm to tripal
  1303. * @see tripal_core_chado_insert()
  1304. * @see tripal_core_chado_update()
  1305. * @see tripal_core_chado_select()
  1306. *
  1307. * @return
  1308. * An array describing the current table
  1309. *
  1310. * @ingroup tripal_schema_api
  1311. *
  1312. */
  1313. function tripal_core_chado_phenotype_cvterm_schema() {
  1314. $description = array();
  1315. $description = array(
  1316. 'table' => 'phenotype_cvterm',
  1317. // 'description' => 'TODO: please describe this table!',
  1318. 'fields' => array(
  1319. 'phenotype_cvterm_id' => array(
  1320. // 'description' => 'TODO: please describe this field!',
  1321. 'type' => 'serial',
  1322. 'not NULL' => '1',
  1323. ),
  1324. 'phenotype_id' => array(
  1325. // 'description' => 'TODO: please describe this field!',
  1326. 'type' => 'int',
  1327. 'not NULL' => '1',
  1328. ),
  1329. 'cvterm_id' => array(
  1330. // 'description' => 'TODO: please describe this field!',
  1331. 'type' => 'int',
  1332. 'not NULL' => '1',
  1333. ),
  1334. 'rank' => array(
  1335. // 'description' => 'TODO: please describe this field!',
  1336. 'type' => 'int',
  1337. 'not NULL' => '1',
  1338. 'default' => '0',
  1339. ),
  1340. ),
  1341. 'primary key' => array(
  1342. '0' => 'phenotype_cvterm_id',
  1343. ),
  1344. 'unique keys' => array(
  1345. 'phenotype_cvterm_c1' => array(
  1346. '0' => 'phenotype_id',
  1347. '1' => 'cvterm_id',
  1348. '2' => 'rank',
  1349. ),
  1350. ),
  1351. 'indexes' => array(
  1352. 'phenotype_cvterm_idx1' => array(
  1353. '0' => 'phenotype_id',
  1354. ),
  1355. 'phenotype_cvterm_idx2' => array(
  1356. '0' => 'cvterm_id',
  1357. ),
  1358. ),
  1359. 'foreign keys' => array(
  1360. ),
  1361. );
  1362. return $description;
  1363. }
  1364. /**
  1365. * Implements hook_phenstatement_schema()
  1366. * Purpose: To describe the structure of phenstatement to tripal
  1367. * @see tripal_core_chado_insert()
  1368. * @see tripal_core_chado_update()
  1369. * @see tripal_core_chado_select()
  1370. *
  1371. * @return
  1372. * An array describing the current table
  1373. *
  1374. * @ingroup tripal_schema_api
  1375. *
  1376. */
  1377. function tripal_core_chado_phenstatement_schema() {
  1378. $description = array();
  1379. $description = array(
  1380. 'table' => 'phenstatement',
  1381. // 'description' => 'TODO: please describe this table!',
  1382. 'fields' => array(
  1383. 'phenstatement_id' => array(
  1384. // 'description' => 'TODO: please describe this field!',
  1385. 'type' => 'serial',
  1386. 'not NULL' => '1',
  1387. ),
  1388. 'genotype_id' => array(
  1389. // 'description' => 'TODO: please describe this field!',
  1390. 'type' => 'int',
  1391. 'not NULL' => '1',
  1392. ),
  1393. 'environment_id' => array(
  1394. // 'description' => 'TODO: please describe this field!',
  1395. 'type' => 'int',
  1396. 'not NULL' => '1',
  1397. ),
  1398. 'phenotype_id' => array(
  1399. // 'description' => 'TODO: please describe this field!',
  1400. 'type' => 'int',
  1401. 'not NULL' => '1',
  1402. ),
  1403. 'type_id' => array(
  1404. // 'description' => 'TODO: please describe this field!',
  1405. 'type' => 'int',
  1406. 'not NULL' => '1',
  1407. ),
  1408. 'pub_id' => array(
  1409. // 'description' => 'TODO: please describe this field!',
  1410. 'type' => 'int',
  1411. 'not NULL' => '1',
  1412. ),
  1413. ),
  1414. 'primary key' => array(
  1415. '0' => 'phenstatement_id',
  1416. ),
  1417. 'unique keys' => array(
  1418. 'phenstatement_c1' => array(
  1419. '0' => 'genotype_id',
  1420. '1' => 'phenotype_id',
  1421. '2' => 'environment_id',
  1422. '3' => 'type_id',
  1423. '4' => 'pub_id',
  1424. ),
  1425. ),
  1426. 'indexes' => array(
  1427. 'phenstatement_idx1' => array(
  1428. '0' => 'genotype_id',
  1429. ),
  1430. 'phenstatement_idx2' => array(
  1431. '0' => 'phenotype_id',
  1432. ),
  1433. ),
  1434. 'foreign keys' => array(
  1435. ),
  1436. );
  1437. return $description;
  1438. }
  1439. /**
  1440. * Implements hook_phylonode_schema()
  1441. * Purpose: To describe the structure of phylonode to tripal
  1442. * @see tripal_core_chado_insert()
  1443. * @see tripal_core_chado_update()
  1444. * @see tripal_core_chado_select()
  1445. *
  1446. * @return
  1447. * An array describing the current table
  1448. *
  1449. * @ingroup tripal_schema_api
  1450. *
  1451. */
  1452. function tripal_core_chado_phylonode_schema() {
  1453. $description = array();
  1454. $description = array(
  1455. 'table' => 'phylonode',
  1456. // 'description' => 'TODO: please describe this table!',
  1457. 'fields' => array(
  1458. 'phylonode_id' => array(
  1459. // 'description' => 'TODO: please describe this field!',
  1460. 'type' => 'serial',
  1461. 'not NULL' => '1',
  1462. ),
  1463. 'phylotree_id' => array(
  1464. // 'description' => 'TODO: please describe this field!',
  1465. 'type' => 'int',
  1466. 'not NULL' => '1',
  1467. ),
  1468. 'parent_phylonode_id' => array(
  1469. // 'description' => 'TODO: please describe this field!',
  1470. 'type' => 'int',
  1471. 'not NULL' => '',
  1472. ),
  1473. 'left_idx' => array(
  1474. // 'description' => 'TODO: please describe this field!',
  1475. 'type' => 'int',
  1476. 'not NULL' => '1',
  1477. ),
  1478. 'right_idx' => array(
  1479. // 'description' => 'TODO: please describe this field!',
  1480. 'type' => 'int',
  1481. 'not NULL' => '1',
  1482. ),
  1483. 'type_id' => array(
  1484. // 'description' => 'TODO: please describe this field!',
  1485. 'type' => 'int',
  1486. 'not NULL' => '',
  1487. ),
  1488. 'feature_id' => array(
  1489. // 'description' => 'TODO: please describe this field!',
  1490. 'type' => 'int',
  1491. 'not NULL' => '',
  1492. ),
  1493. 'label' => array(
  1494. // 'description' => 'TODO: please describe this field!',
  1495. 'type' => 'varchar',
  1496. 'length' => '255',
  1497. 'not NULL' => '',
  1498. ),
  1499. 'distance' => array(
  1500. // 'description' => 'TODO: please describe this field!',
  1501. 'type' => 'float',
  1502. 'size' => 'big',
  1503. 'not NULL' => '',
  1504. ),
  1505. ),
  1506. 'primary key' => array(
  1507. '0' => 'phylonode_id',
  1508. ),
  1509. 'unique keys' => array(
  1510. 'phylotree_id' => array(
  1511. '0' => 'phylotree_id',
  1512. '1' => 'left_idx',
  1513. ),
  1514. 'phylonode_phylotree_id_key1' => array(
  1515. '0' => 'phylotree_id',
  1516. '1' => 'right_idx',
  1517. ),
  1518. ),
  1519. 'indexes' => array(
  1520. ),
  1521. 'foreign keys' => array(
  1522. ),
  1523. );
  1524. return $description;
  1525. }
  1526. /**
  1527. * Implements hook_phylonode_dbxref_schema()
  1528. * Purpose: To describe the structure of phylonode_dbxref to tripal
  1529. * @see tripal_core_chado_insert()
  1530. * @see tripal_core_chado_update()
  1531. * @see tripal_core_chado_select()
  1532. *
  1533. * @return
  1534. * An array describing the current table
  1535. *
  1536. * @ingroup tripal_schema_api
  1537. *
  1538. */
  1539. function tripal_core_chado_phylonode_dbxref_schema() {
  1540. $description = array();
  1541. $description = array(
  1542. 'table' => 'phylonode_dbxref',
  1543. // 'description' => 'TODO: please describe this table!',
  1544. 'fields' => array(
  1545. 'phylonode_dbxref_id' => array(
  1546. // 'description' => 'TODO: please describe this field!',
  1547. 'type' => 'serial',
  1548. 'not NULL' => '1',
  1549. ),
  1550. 'phylonode_id' => array(
  1551. // 'description' => 'TODO: please describe this field!',
  1552. 'type' => 'int',
  1553. 'not NULL' => '1',
  1554. ),
  1555. 'dbxref_id' => array(
  1556. // 'description' => 'TODO: please describe this field!',
  1557. 'type' => 'int',
  1558. 'not NULL' => '1',
  1559. ),
  1560. ),
  1561. 'primary key' => array(
  1562. '0' => 'phylonode_dbxref_id',
  1563. ),
  1564. 'unique keys' => array(
  1565. 'phylonode_id' => array(
  1566. '0' => 'phylonode_id',
  1567. '1' => 'dbxref_id',
  1568. ),
  1569. ),
  1570. 'indexes' => array(
  1571. 'phylonode_dbxref_idx1' => array(
  1572. '0' => 'phylonode_id',
  1573. ),
  1574. 'phylonode_dbxref_idx2' => array(
  1575. '0' => 'dbxref_id',
  1576. ),
  1577. ),
  1578. 'foreign keys' => array(
  1579. ),
  1580. );
  1581. return $description;
  1582. }
  1583. /**
  1584. * Implements hook_library_synonym_schema()
  1585. * Purpose: To describe the structure of library_synonym to tripal
  1586. * @see tripal_core_chado_insert()
  1587. * @see tripal_core_chado_update()
  1588. * @see tripal_core_chado_select()
  1589. *
  1590. * @return
  1591. * An array describing the current table
  1592. *
  1593. * @ingroup tripal_schema_api
  1594. *
  1595. */
  1596. function tripal_core_chado_library_synonym_schema() {
  1597. $description = array();
  1598. $description = array(
  1599. 'table' => 'library_synonym',
  1600. // 'description' => 'TODO: please describe this table!',
  1601. 'fields' => array(
  1602. 'library_synonym_id' => array(
  1603. // 'description' => 'TODO: please describe this field!',
  1604. 'type' => 'serial',
  1605. 'not NULL' => '1',
  1606. ),
  1607. 'synonym_id' => array(
  1608. // 'description' => 'TODO: please describe this field!',
  1609. 'type' => 'int',
  1610. 'not NULL' => '1',
  1611. ),
  1612. 'library_id' => array(
  1613. // 'description' => 'TODO: please describe this field!',
  1614. 'type' => 'int',
  1615. 'not NULL' => '1',
  1616. ),
  1617. 'pub_id' => array(
  1618. // 'description' => 'TODO: please describe this field!',
  1619. 'type' => 'int',
  1620. 'not NULL' => '1',
  1621. ),
  1622. 'is_current' => array(
  1623. // 'description' => 'TODO: please describe this field!',
  1624. 'type' => 'boolean',
  1625. 'not NULL' => '1',
  1626. 'default' => 'ru',
  1627. ),
  1628. 'is_internal' => array(
  1629. // 'description' => 'TODO: please describe this field!',
  1630. 'type' => 'boolean',
  1631. 'not NULL' => '1',
  1632. 'default' => 'als',
  1633. ),
  1634. ),
  1635. 'primary key' => array(
  1636. '0' => 'library_synonym_id',
  1637. ),
  1638. 'unique keys' => array(
  1639. 'library_synonym_c1' => array(
  1640. '0' => 'synonym_id',
  1641. '1' => 'library_id',
  1642. '2' => 'pub_id',
  1643. ),
  1644. ),
  1645. 'indexes' => array(
  1646. 'library_synonym_idx1' => array(
  1647. '0' => 'synonym_id',
  1648. ),
  1649. 'library_synonym_idx2' => array(
  1650. '0' => 'library_id',
  1651. ),
  1652. 'library_synonym_idx3' => array(
  1653. '0' => 'pub_id',
  1654. ),
  1655. ),
  1656. 'foreign keys' => array(
  1657. ),
  1658. );
  1659. return $description;
  1660. }
  1661. /**
  1662. * Implements hook_library_pub_schema()
  1663. * Purpose: To describe the structure of library_pub to tripal
  1664. * @see tripal_core_chado_insert()
  1665. * @see tripal_core_chado_update()
  1666. * @see tripal_core_chado_select()
  1667. *
  1668. * @return
  1669. * An array describing the current table
  1670. *
  1671. * @ingroup tripal_schema_api
  1672. *
  1673. */
  1674. function tripal_core_chado_library_pub_schema() {
  1675. $description = array();
  1676. $description = array(
  1677. 'table' => 'library_pub',
  1678. // 'description' => 'TODO: please describe this table!',
  1679. 'fields' => array(
  1680. 'library_pub_id' => array(
  1681. // 'description' => 'TODO: please describe this field!',
  1682. 'type' => 'serial',
  1683. 'not NULL' => '1',
  1684. ),
  1685. 'library_id' => array(
  1686. // 'description' => 'TODO: please describe this field!',
  1687. 'type' => 'int',
  1688. 'not NULL' => '1',
  1689. ),
  1690. 'pub_id' => array(
  1691. // 'description' => 'TODO: please describe this field!',
  1692. 'type' => 'int',
  1693. 'not NULL' => '1',
  1694. ),
  1695. ),
  1696. 'primary key' => array(
  1697. '0' => 'library_pub_id',
  1698. ),
  1699. 'unique keys' => array(
  1700. 'library_pub_c1' => array(
  1701. '0' => 'library_id',
  1702. '1' => 'pub_id',
  1703. ),
  1704. ),
  1705. 'indexes' => array(
  1706. 'library_pub_idx1' => array(
  1707. '0' => 'library_id',
  1708. ),
  1709. 'library_pub_idx2' => array(
  1710. '0' => 'pub_id',
  1711. ),
  1712. ),
  1713. 'foreign keys' => array(
  1714. ),
  1715. );
  1716. return $description;
  1717. }
  1718. /**
  1719. * Implements hook_featureprop_pub_schema()
  1720. * Purpose: To describe the structure of featureprop_pub to tripal
  1721. * @see tripal_core_chado_insert()
  1722. * @see tripal_core_chado_update()
  1723. * @see tripal_core_chado_select()
  1724. *
  1725. * @return
  1726. * An array describing the current table
  1727. *
  1728. * @ingroup tripal_schema_api
  1729. *
  1730. */
  1731. function tripal_core_chado_featureprop_pub_schema() {
  1732. $description = array();
  1733. $description = array(
  1734. 'table' => 'featureprop_pub',
  1735. // 'description' => 'TODO: please describe this table!',
  1736. 'fields' => array(
  1737. 'featureprop_pub_id' => array(
  1738. // 'description' => 'TODO: please describe this field!',
  1739. 'type' => 'serial',
  1740. 'not NULL' => '1',
  1741. ),
  1742. 'featureprop_id' => array(
  1743. // 'description' => 'TODO: please describe this field!',
  1744. 'type' => 'int',
  1745. 'not NULL' => '1',
  1746. ),
  1747. 'pub_id' => array(
  1748. // 'description' => 'TODO: please describe this field!',
  1749. 'type' => 'int',
  1750. 'not NULL' => '1',
  1751. ),
  1752. ),
  1753. 'primary key' => array(
  1754. '0' => 'featureprop_pub_id',
  1755. ),
  1756. 'unique keys' => array(
  1757. 'featureprop_pub_c1' => array(
  1758. '0' => 'featureprop_id',
  1759. '1' => 'pub_id',
  1760. ),
  1761. ),
  1762. 'indexes' => array(
  1763. 'featureprop_pub_idx1' => array(
  1764. '0' => 'featureprop_id',
  1765. ),
  1766. 'featureprop_pub_idx2' => array(
  1767. '0' => 'pub_id',
  1768. ),
  1769. ),
  1770. 'foreign keys' => array(
  1771. ),
  1772. );
  1773. return $description;
  1774. }
  1775. /**
  1776. * Implements hook_featureprop_schema()
  1777. * Purpose: To describe the structure of featureprop to tripal
  1778. * @see tripal_core_chado_insert()
  1779. * @see tripal_core_chado_update()
  1780. * @see 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_featureprop_schema() {
  1789. $description = array();
  1790. $description = array(
  1791. 'table' => 'featureprop',
  1792. // 'description' => 'TODO: please describe this table!',
  1793. 'fields' => array(
  1794. 'featureprop_id' => array(
  1795. // 'description' => 'TODO: please describe this field!',
  1796. 'type' => 'serial',
  1797. 'not NULL' => '1',
  1798. ),
  1799. 'feature_id' => array(
  1800. // 'description' => 'TODO: please describe this field!',
  1801. 'type' => 'int',
  1802. 'not NULL' => '1',
  1803. ),
  1804. 'type_id' => array(
  1805. // 'description' => 'TODO: please describe this field!',
  1806. 'type' => 'int',
  1807. 'not NULL' => '1',
  1808. ),
  1809. 'value' => array(
  1810. // 'description' => 'TODO: please describe this field!',
  1811. 'type' => 'text',
  1812. 'not NULL' => '',
  1813. ),
  1814. 'rank' => array(
  1815. // 'description' => 'TODO: please describe this field!',
  1816. 'type' => 'int',
  1817. 'not NULL' => '1',
  1818. 'default' => '0',
  1819. ),
  1820. ),
  1821. 'primary key' => array(
  1822. '0' => 'featureprop_id',
  1823. ),
  1824. 'unique keys' => array(
  1825. 'featureprop_c1' => array(
  1826. '0' => 'feature_id',
  1827. '1' => 'type_id',
  1828. '2' => 'rank',
  1829. ),
  1830. ),
  1831. 'indexes' => array(
  1832. 'featureprop_idx1' => array(
  1833. '0' => 'feature_id',
  1834. ),
  1835. 'featureprop_idx2' => array(
  1836. '0' => 'type_id',
  1837. ),
  1838. ),
  1839. 'foreign keys' => array(
  1840. ),
  1841. );
  1842. return $description;
  1843. }
  1844. /**
  1845. * Implements hook_featurerange_schema()
  1846. * Purpose: To describe the structure of featurerange to tripal
  1847. * @see tripal_core_chado_insert()
  1848. * @see tripal_core_chado_update()
  1849. * @see tripal_core_chado_select()
  1850. *
  1851. * @return
  1852. * An array describing the current table
  1853. *
  1854. * @ingroup tripal_schema_api
  1855. *
  1856. */
  1857. function tripal_core_chado_featurerange_schema() {
  1858. $description = array();
  1859. $description = array(
  1860. 'table' => 'featurerange',
  1861. // 'description' => 'TODO: please describe this table!',
  1862. 'fields' => array(
  1863. 'featurerange_id' => array(
  1864. // 'description' => 'TODO: please describe this field!',
  1865. 'type' => 'serial',
  1866. 'not NULL' => '1',
  1867. ),
  1868. 'featuremap_id' => array(
  1869. // 'description' => 'TODO: please describe this field!',
  1870. 'type' => 'int',
  1871. 'not NULL' => '1',
  1872. ),
  1873. 'feature_id' => array(
  1874. // 'description' => 'TODO: please describe this field!',
  1875. 'type' => 'int',
  1876. 'not NULL' => '1',
  1877. ),
  1878. 'leftstartf_id' => array(
  1879. // 'description' => 'TODO: please describe this field!',
  1880. 'type' => 'int',
  1881. 'not NULL' => '1',
  1882. ),
  1883. 'leftendf_id' => array(
  1884. // 'description' => 'TODO: please describe this field!',
  1885. 'type' => 'int',
  1886. 'not NULL' => '',
  1887. ),
  1888. 'rightstartf_id' => array(
  1889. // 'description' => 'TODO: please describe this field!',
  1890. 'type' => 'int',
  1891. 'not NULL' => '',
  1892. ),
  1893. 'rightendf_id' => array(
  1894. // 'description' => 'TODO: please describe this field!',
  1895. 'type' => 'int',
  1896. 'not NULL' => '1',
  1897. ),
  1898. 'rangestr' => array(
  1899. // 'description' => 'TODO: please describe this field!',
  1900. 'type' => 'varchar',
  1901. 'length' => '255',
  1902. 'not NULL' => '',
  1903. ),
  1904. ),
  1905. 'primary key' => array(
  1906. '0' => 'featurerange_id',
  1907. ),
  1908. 'unique keys' => array(
  1909. ),
  1910. 'indexes' => array(
  1911. 'featurerange_idx1' => array(
  1912. '0' => 'featuremap_id',
  1913. ),
  1914. 'featurerange_idx2' => array(
  1915. '0' => 'feature_id',
  1916. ),
  1917. 'featurerange_idx3' => array(
  1918. '0' => 'leftstartf_id',
  1919. ),
  1920. 'featurerange_idx4' => array(
  1921. '0' => 'leftendf_id',
  1922. ),
  1923. 'featurerange_idx5' => array(
  1924. '0' => 'rightstartf_id',
  1925. ),
  1926. 'featurerange_idx6' => array(
  1927. '0' => 'rightendf_id',
  1928. ),
  1929. ),
  1930. 'foreign keys' => array(
  1931. ),
  1932. );
  1933. return $description;
  1934. }
  1935. /**
  1936. * Implements hook_featureset_meets_schema()
  1937. * Purpose: To describe the structure of featureset_meets to tripal
  1938. * @see tripal_core_chado_insert()
  1939. * @see tripal_core_chado_update()
  1940. * @see tripal_core_chado_select()
  1941. *
  1942. * @return
  1943. * An array describing the current table
  1944. *
  1945. * @ingroup tripal_schema_api
  1946. *
  1947. */
  1948. function tripal_core_chado_featureset_meets_schema() {
  1949. $description = array();
  1950. $description = array(
  1951. 'table' => 'featureset_meets',
  1952. // 'description' => 'TODO: please describe this table!',
  1953. 'fields' => array(
  1954. 'subject_id' => array(
  1955. // 'description' => 'TODO: please describe this field!',
  1956. 'type' => 'int',
  1957. 'not NULL' => '',
  1958. ),
  1959. 'object_id' => array(
  1960. // 'description' => 'TODO: please describe this field!',
  1961. 'type' => 'int',
  1962. 'not NULL' => '',
  1963. ),
  1964. ),
  1965. 'primary key' => array(
  1966. ),
  1967. 'unique keys' => array(
  1968. ),
  1969. 'indexes' => array(
  1970. ),
  1971. 'foreign keys' => array(
  1972. ),
  1973. );
  1974. return $description;
  1975. }
  1976. /**
  1977. * Implements hook_fnr_type_schema()
  1978. * Purpose: To describe the structure of fnr_type to tripal
  1979. * @see tripal_core_chado_insert()
  1980. * @see tripal_core_chado_update()
  1981. * @see tripal_core_chado_select()
  1982. *
  1983. * @return
  1984. * An array describing the current table
  1985. *
  1986. * @ingroup tripal_schema_api
  1987. *
  1988. */
  1989. function tripal_core_chado_fnr_type_schema() {
  1990. $description = array();
  1991. $description = array(
  1992. 'table' => 'fnr_type',
  1993. // 'description' => 'TODO: please describe this table!',
  1994. 'fields' => array(
  1995. 'feature_id' => array(
  1996. // 'description' => 'TODO: please describe this field!',
  1997. 'type' => 'int',
  1998. 'not NULL' => '',
  1999. ),
  2000. 'name' => array(
  2001. // 'description' => 'TODO: please describe this field!',
  2002. 'type' => 'varchar',
  2003. 'length' => '255',
  2004. 'not NULL' => '',
  2005. ),
  2006. 'dbxref_id' => array(
  2007. // 'description' => 'TODO: please describe this field!',
  2008. 'type' => 'int',
  2009. 'not NULL' => '',
  2010. ),
  2011. 'type' => array(
  2012. // 'description' => 'TODO: please describe this field!',
  2013. 'type' => 'varchar',
  2014. 'length' => '1024',
  2015. 'not NULL' => '',
  2016. ),
  2017. 'residues' => array(
  2018. // 'description' => 'TODO: please describe this field!',
  2019. 'type' => 'text',
  2020. 'not NULL' => '',
  2021. ),
  2022. 'seqlen' => array(
  2023. // 'description' => 'TODO: please describe this field!',
  2024. 'type' => 'int',
  2025. 'not NULL' => '',
  2026. ),
  2027. 'md5checksum' => array(
  2028. // 'description' => 'TODO: please describe this field!',
  2029. 'type' => 'char',
  2030. 'length' => '32',
  2031. 'not NULL' => '',
  2032. ),
  2033. 'type_id' => array(
  2034. // 'description' => 'TODO: please describe this field!',
  2035. 'type' => 'int',
  2036. 'not NULL' => '',
  2037. ),
  2038. 'timeaccessioned' => array(
  2039. // 'description' => 'TODO: please describe this field!',
  2040. 'type' => 'datetime',
  2041. 'not NULL' => '',
  2042. ),
  2043. 'timelastmodified' => array(
  2044. // 'description' => 'TODO: please describe this field!',
  2045. 'type' => 'datetime',
  2046. 'not NULL' => '',
  2047. ),
  2048. ),
  2049. 'primary key' => array(
  2050. ),
  2051. 'unique keys' => array(
  2052. ),
  2053. 'indexes' => array(
  2054. ),
  2055. 'foreign keys' => array(
  2056. ),
  2057. );
  2058. return $description;
  2059. }
  2060. /**
  2061. * Implements hook_featurepos_schema()
  2062. * Purpose: To describe the structure of featurepos to tripal
  2063. * @see tripal_core_chado_insert()
  2064. * @see tripal_core_chado_update()
  2065. * @see tripal_core_chado_select()
  2066. *
  2067. * @return
  2068. * An array describing the current table
  2069. *
  2070. * @ingroup tripal_schema_api
  2071. *
  2072. */
  2073. function tripal_core_chado_featurepos_schema() {
  2074. $description = array();
  2075. $description = array(
  2076. 'table' => 'featurepos',
  2077. // 'description' => 'TODO: please describe this table!',
  2078. 'fields' => array(
  2079. 'featurepos_id' => array(
  2080. // 'description' => 'TODO: please describe this field!',
  2081. 'type' => 'serial',
  2082. 'not NULL' => '1',
  2083. ),
  2084. 'featuremap_id' => array(
  2085. // 'description' => 'TODO: please describe this field!',
  2086. 'type' => 'serial',
  2087. 'not NULL' => '1',
  2088. ),
  2089. 'feature_id' => array(
  2090. // 'description' => 'TODO: please describe this field!',
  2091. 'type' => 'int',
  2092. 'not NULL' => '1',
  2093. ),
  2094. 'map_feature_id' => array(
  2095. // 'description' => 'TODO: please describe this field!',
  2096. 'type' => 'int',
  2097. 'not NULL' => '1',
  2098. ),
  2099. 'mappos' => array(
  2100. // 'description' => 'TODO: please describe this field!',
  2101. 'type' => 'float',
  2102. 'size' => 'big',
  2103. 'not NULL' => '1',
  2104. ),
  2105. ),
  2106. 'primary key' => array(
  2107. '0' => 'featurepos_id',
  2108. ),
  2109. 'unique keys' => array(
  2110. ),
  2111. 'indexes' => array(
  2112. 'featurepos_idx1' => array(
  2113. '0' => 'featuremap_id',
  2114. ),
  2115. 'featurepos_idx2' => array(
  2116. '0' => 'feature_id',
  2117. ),
  2118. 'featurepos_idx3' => array(
  2119. '0' => 'map_feature_id',
  2120. ),
  2121. ),
  2122. 'foreign keys' => array(
  2123. ),
  2124. );
  2125. return $description;
  2126. }
  2127. /**
  2128. * Implements hook_featuremap_pub_schema()
  2129. * Purpose: To describe the structure of featuremap_pub to tripal
  2130. * @see tripal_core_chado_insert()
  2131. * @see tripal_core_chado_update()
  2132. * @see tripal_core_chado_select()
  2133. *
  2134. * @return
  2135. * An array describing the current table
  2136. *
  2137. * @ingroup tripal_schema_api
  2138. *
  2139. */
  2140. function tripal_core_chado_featuremap_pub_schema() {
  2141. $description = array();
  2142. $description = array(
  2143. 'table' => 'featuremap_pub',
  2144. // 'description' => 'TODO: please describe this table!',
  2145. 'fields' => array(
  2146. 'featuremap_pub_id' => array(
  2147. // 'description' => 'TODO: please describe this field!',
  2148. 'type' => 'serial',
  2149. 'not NULL' => '1',
  2150. ),
  2151. 'featuremap_id' => array(
  2152. // 'description' => 'TODO: please describe this field!',
  2153. 'type' => 'int',
  2154. 'not NULL' => '1',
  2155. ),
  2156. 'pub_id' => array(
  2157. // 'description' => 'TODO: please describe this field!',
  2158. 'type' => 'int',
  2159. 'not NULL' => '1',
  2160. ),
  2161. ),
  2162. 'primary key' => array(
  2163. '0' => 'featuremap_pub_id',
  2164. ),
  2165. 'unique keys' => array(
  2166. ),
  2167. 'indexes' => array(
  2168. 'featuremap_pub_idx1' => array(
  2169. '0' => 'featuremap_id',
  2170. ),
  2171. 'featuremap_pub_idx2' => array(
  2172. '0' => 'pub_id',
  2173. ),
  2174. ),
  2175. 'foreign keys' => array(
  2176. ),
  2177. );
  2178. return $description;
  2179. }
  2180. /**
  2181. * Implements hook_feature_union_schema()
  2182. * Purpose: To describe the structure of feature_union to tripal
  2183. * @see tripal_core_chado_insert()
  2184. * @see tripal_core_chado_update()
  2185. * @see tripal_core_chado_select()
  2186. *
  2187. * @return
  2188. * An array describing the current table
  2189. *
  2190. * @ingroup tripal_schema_api
  2191. *
  2192. */
  2193. function tripal_core_chado_feature_union_schema() {
  2194. $description = array();
  2195. $description = array(
  2196. 'table' => 'feature_union',
  2197. // 'description' => 'TODO: please describe this table!',
  2198. 'fields' => array(
  2199. 'subject_id' => array(
  2200. // 'description' => 'TODO: please describe this field!',
  2201. 'type' => 'int',
  2202. 'not NULL' => '',
  2203. ),
  2204. 'object_id' => array(
  2205. // 'description' => 'TODO: please describe this field!',
  2206. 'type' => 'int',
  2207. 'not NULL' => '',
  2208. ),
  2209. 'srcfeature_id' => array(
  2210. // 'description' => 'TODO: please describe this field!',
  2211. 'type' => 'int',
  2212. 'not NULL' => '',
  2213. ),
  2214. 'subject_strand' => array(
  2215. // 'description' => 'TODO: please describe this field!',
  2216. 'type' => 'int',
  2217. 'size' => 'small',
  2218. 'not NULL' => '',
  2219. ),
  2220. 'object_strand' => array(
  2221. // 'description' => 'TODO: please describe this field!',
  2222. 'type' => 'int',
  2223. 'size' => 'small',
  2224. 'not NULL' => '',
  2225. ),
  2226. 'fmin' => array(
  2227. // 'description' => 'TODO: please describe this field!',
  2228. 'type' => 'int',
  2229. 'not NULL' => '',
  2230. ),
  2231. 'fmax' => array(
  2232. // 'description' => 'TODO: please describe this field!',
  2233. 'type' => 'int',
  2234. 'not NULL' => '',
  2235. ),
  2236. ),
  2237. 'primary key' => array(
  2238. ),
  2239. 'unique keys' => array(
  2240. ),
  2241. 'indexes' => array(
  2242. ),
  2243. 'foreign keys' => array(
  2244. ),
  2245. );
  2246. return $description;
  2247. }
  2248. /**
  2249. * Implements hook_featureloc_schema()
  2250. * Purpose: To describe the structure of featureloc to tripal
  2251. * @see tripal_core_chado_insert()
  2252. * @see tripal_core_chado_update()
  2253. * @see tripal_core_chado_select()
  2254. *
  2255. * @return
  2256. * An array describing the current table
  2257. *
  2258. * @ingroup tripal_schema_api
  2259. *
  2260. */
  2261. function tripal_core_chado_featureloc_schema() {
  2262. $description = array();
  2263. $description = array(
  2264. 'table' => 'featureloc',
  2265. // 'description' => 'TODO: please describe this table!',
  2266. 'fields' => array(
  2267. 'featureloc_id' => array(
  2268. // 'description' => 'TODO: please describe this field!',
  2269. 'type' => 'serial',
  2270. 'not NULL' => '1',
  2271. ),
  2272. 'feature_id' => array(
  2273. // 'description' => 'TODO: please describe this field!',
  2274. 'type' => 'int',
  2275. 'not NULL' => '1',
  2276. ),
  2277. 'srcfeature_id' => array(
  2278. // 'description' => 'TODO: please describe this field!',
  2279. 'type' => 'int',
  2280. 'not NULL' => '',
  2281. ),
  2282. 'fmin' => array(
  2283. // 'description' => 'TODO: please describe this field!',
  2284. 'type' => 'int',
  2285. 'not NULL' => '',
  2286. ),
  2287. 'is_fmin_partial' => array(
  2288. // 'description' => 'TODO: please describe this field!',
  2289. 'type' => 'boolean',
  2290. 'not NULL' => '1',
  2291. 'default' => 'als',
  2292. ),
  2293. 'fmax' => array(
  2294. // 'description' => 'TODO: please describe this field!',
  2295. 'type' => 'int',
  2296. 'not NULL' => '',
  2297. ),
  2298. 'is_fmax_partial' => array(
  2299. // 'description' => 'TODO: please describe this field!',
  2300. 'type' => 'boolean',
  2301. 'not NULL' => '1',
  2302. 'default' => 'als',
  2303. ),
  2304. 'strand' => array(
  2305. // 'description' => 'TODO: please describe this field!',
  2306. 'type' => 'int',
  2307. 'size' => 'small',
  2308. 'not NULL' => '',
  2309. ),
  2310. 'phase' => array(
  2311. // 'description' => 'TODO: please describe this field!',
  2312. 'type' => 'int',
  2313. 'not NULL' => '',
  2314. ),
  2315. 'residue_info' => array(
  2316. // 'description' => 'TODO: please describe this field!',
  2317. 'type' => 'text',
  2318. 'not NULL' => '',
  2319. ),
  2320. 'locgroup' => array(
  2321. // 'description' => 'TODO: please describe this field!',
  2322. 'type' => 'int',
  2323. 'not NULL' => '1',
  2324. 'default' => '0',
  2325. ),
  2326. 'rank' => array(
  2327. // 'description' => 'TODO: please describe this field!',
  2328. 'type' => 'int',
  2329. 'not NULL' => '1',
  2330. 'default' => '0',
  2331. ),
  2332. ),
  2333. 'primary key' => array(
  2334. '0' => 'featureloc_id',
  2335. ),
  2336. 'unique keys' => array(
  2337. 'featureloc_c1' => array(
  2338. '0' => 'feature_id',
  2339. '1' => 'locgroup',
  2340. '2' => 'rank',
  2341. ),
  2342. ),
  2343. 'indexes' => array(
  2344. 'binloc_boxrange' => array(
  2345. '0' => 'fmin',
  2346. ),
  2347. 'binloc_boxrange_src' => array(
  2348. '0' => 'srcfeature_id',
  2349. '1' => 'fmin',
  2350. ),
  2351. 'featureloc_idx1' => array(
  2352. '0' => 'feature_id',
  2353. ),
  2354. 'featureloc_idx2' => array(
  2355. '0' => 'srcfeature_id',
  2356. ),
  2357. 'featureloc_idx3' => array(
  2358. '0' => 'srcfeature_id',
  2359. '1' => 'fmin',
  2360. '2' => 'fmax',
  2361. ),
  2362. ),
  2363. 'foreign keys' => array(
  2364. ),
  2365. );
  2366. return $description;
  2367. }
  2368. /**
  2369. * Implements hook_featureloc_pub_schema()
  2370. * Purpose: To describe the structure of featureloc_pub to tripal
  2371. * @see tripal_core_chado_insert()
  2372. * @see tripal_core_chado_update()
  2373. * @see tripal_core_chado_select()
  2374. *
  2375. * @return
  2376. * An array describing the current table
  2377. *
  2378. * @ingroup tripal_schema_api
  2379. *
  2380. */
  2381. function tripal_core_chado_featureloc_pub_schema() {
  2382. $description = array();
  2383. $description = array(
  2384. 'table' => 'featureloc_pub',
  2385. // 'description' => 'TODO: please describe this table!',
  2386. 'fields' => array(
  2387. 'featureloc_pub_id' => array(
  2388. // 'description' => 'TODO: please describe this field!',
  2389. 'type' => 'serial',
  2390. 'not NULL' => '1',
  2391. ),
  2392. 'featureloc_id' => array(
  2393. // 'description' => 'TODO: please describe this field!',
  2394. 'type' => 'int',
  2395. 'not NULL' => '1',
  2396. ),
  2397. 'pub_id' => array(
  2398. // 'description' => 'TODO: please describe this field!',
  2399. 'type' => 'int',
  2400. 'not NULL' => '1',
  2401. ),
  2402. ),
  2403. 'primary key' => array(
  2404. '0' => 'featureloc_pub_id',
  2405. ),
  2406. 'unique keys' => array(
  2407. 'featureloc_pub_c1' => array(
  2408. '0' => 'featureloc_id',
  2409. '1' => 'pub_id',
  2410. ),
  2411. ),
  2412. 'indexes' => array(
  2413. 'featureloc_pub_idx1' => array(
  2414. '0' => 'featureloc_id',
  2415. ),
  2416. 'featureloc_pub_idx2' => array(
  2417. '0' => 'pub_id',
  2418. ),
  2419. ),
  2420. 'foreign keys' => array(
  2421. ),
  2422. );
  2423. return $description;
  2424. }
  2425. /**
  2426. * Implements hook_featuremap_schema()
  2427. * Purpose: To describe the structure of featuremap to tripal
  2428. * @see tripal_core_chado_insert()
  2429. * @see tripal_core_chado_update()
  2430. * @see tripal_core_chado_select()
  2431. *
  2432. * @return
  2433. * An array describing the current table
  2434. *
  2435. * @ingroup tripal_schema_api
  2436. *
  2437. */
  2438. function tripal_core_chado_featuremap_schema() {
  2439. $description = array();
  2440. $description = array(
  2441. 'table' => 'featuremap',
  2442. // 'description' => 'TODO: please describe this table!',
  2443. 'fields' => array(
  2444. 'featuremap_id' => array(
  2445. // 'description' => 'TODO: please describe this field!',
  2446. 'type' => 'serial',
  2447. 'not NULL' => '1',
  2448. ),
  2449. 'name' => array(
  2450. // 'description' => 'TODO: please describe this field!',
  2451. 'type' => 'varchar',
  2452. 'length' => '255',
  2453. 'not NULL' => '',
  2454. ),
  2455. 'description' => array(
  2456. // 'description' => 'TODO: please describe this field!',
  2457. 'type' => 'text',
  2458. 'not NULL' => '',
  2459. ),
  2460. 'unittype_id' => array(
  2461. // 'description' => 'TODO: please describe this field!',
  2462. 'type' => 'int',
  2463. 'not NULL' => '',
  2464. ),
  2465. ),
  2466. 'primary key' => array(
  2467. '0' => 'featuremap_id',
  2468. ),
  2469. 'unique keys' => array(
  2470. 'featuremap_c1' => array(
  2471. '0' => 'name',
  2472. ),
  2473. ),
  2474. 'indexes' => array(
  2475. ),
  2476. 'foreign keys' => array(
  2477. ),
  2478. );
  2479. return $description;
  2480. }
  2481. /**
  2482. * Implements hook_fp_key_schema()
  2483. * Purpose: To describe the structure of fp_key to tripal
  2484. * @see tripal_core_chado_insert()
  2485. * @see tripal_core_chado_update()
  2486. * @see tripal_core_chado_select()
  2487. *
  2488. * @return
  2489. * An array describing the current table
  2490. *
  2491. * @ingroup tripal_schema_api
  2492. *
  2493. */
  2494. function tripal_core_chado_fp_key_schema() {
  2495. $description = array();
  2496. $description = array(
  2497. 'table' => 'fp_key',
  2498. // 'description' => 'TODO: please describe this table!',
  2499. 'fields' => array(
  2500. 'feature_id' => array(
  2501. // 'description' => 'TODO: please describe this field!',
  2502. 'type' => 'int',
  2503. 'not NULL' => '',
  2504. ),
  2505. 'pkey' => array(
  2506. // 'description' => 'TODO: please describe this field!',
  2507. 'type' => 'varchar',
  2508. 'length' => '1024',
  2509. 'not NULL' => '',
  2510. ),
  2511. 'value' => array(
  2512. // 'description' => 'TODO: please describe this field!',
  2513. 'type' => 'text',
  2514. 'not NULL' => '',
  2515. ),
  2516. ),
  2517. 'primary key' => array(
  2518. ),
  2519. 'unique keys' => array(
  2520. ),
  2521. 'indexes' => array(
  2522. ),
  2523. 'foreign keys' => array(
  2524. ),
  2525. );
  2526. return $description;
  2527. }
  2528. /**
  2529. * Implements hook_genotype_schema()
  2530. * Purpose: To describe the structure of genotype to tripal
  2531. * @see tripal_core_chado_insert()
  2532. * @see tripal_core_chado_update()
  2533. * @see tripal_core_chado_select()
  2534. *
  2535. * @return
  2536. * An array describing the current table
  2537. *
  2538. * @ingroup tripal_schema_api
  2539. *
  2540. */
  2541. function tripal_core_chado_genotype_schema() {
  2542. $description = array();
  2543. $description = array(
  2544. 'table' => 'genotype',
  2545. // 'description' => 'TODO: please describe this table!',
  2546. 'fields' => array(
  2547. 'genotype_id' => array(
  2548. // 'description' => 'TODO: please describe this field!',
  2549. 'type' => 'serial',
  2550. 'not NULL' => '1',
  2551. ),
  2552. 'name' => array(
  2553. // 'description' => 'TODO: please describe this field!',
  2554. 'type' => 'text',
  2555. 'not NULL' => '',
  2556. ),
  2557. 'uniquename' => array(
  2558. // 'description' => 'TODO: please describe this field!',
  2559. 'type' => 'text',
  2560. 'not NULL' => '1',
  2561. ),
  2562. 'description' => array(
  2563. // 'description' => 'TODO: please describe this field!',
  2564. 'type' => 'varchar',
  2565. 'length' => '255',
  2566. 'not NULL' => '',
  2567. ),
  2568. ),
  2569. 'primary key' => array(
  2570. '0' => 'genotype_id',
  2571. ),
  2572. 'unique keys' => array(
  2573. 'genotype_c1' => array(
  2574. '0' => 'uniquename',
  2575. ),
  2576. ),
  2577. 'indexes' => array(
  2578. 'genotype_idx1' => array(
  2579. '0' => 'uniquename',
  2580. ),
  2581. 'genotype_idx2' => array(
  2582. '0' => 'name',
  2583. ),
  2584. ),
  2585. 'foreign keys' => array(
  2586. ),
  2587. );
  2588. return $description;
  2589. }
  2590. /**
  2591. * Implements hook_library_cvterm_schema()
  2592. * Purpose: To describe the structure of library_cvterm to tripal
  2593. * @see tripal_core_chado_insert()
  2594. * @see tripal_core_chado_update()
  2595. * @see tripal_core_chado_select()
  2596. *
  2597. * @return
  2598. * An array describing the current table
  2599. *
  2600. * @ingroup tripal_schema_api
  2601. *
  2602. */
  2603. function tripal_core_chado_library_cvterm_schema() {
  2604. $description = array();
  2605. $description = array(
  2606. 'table' => 'library_cvterm',
  2607. // 'description' => 'TODO: please describe this table!',
  2608. 'fields' => array(
  2609. 'library_cvterm_id' => array(
  2610. // 'description' => 'TODO: please describe this field!',
  2611. 'type' => 'serial',
  2612. 'not NULL' => '1',
  2613. ),
  2614. 'library_id' => array(
  2615. // 'description' => 'TODO: please describe this field!',
  2616. 'type' => 'int',
  2617. 'not NULL' => '1',
  2618. ),
  2619. 'cvterm_id' => array(
  2620. // 'description' => 'TODO: please describe this field!',
  2621. 'type' => 'int',
  2622. 'not NULL' => '1',
  2623. ),
  2624. 'pub_id' => array(
  2625. // 'description' => 'TODO: please describe this field!',
  2626. 'type' => 'int',
  2627. 'not NULL' => '1',
  2628. ),
  2629. ),
  2630. 'primary key' => array(
  2631. '0' => 'library_cvterm_id',
  2632. ),
  2633. 'unique keys' => array(
  2634. 'library_cvterm_c1' => array(
  2635. '0' => 'library_id',
  2636. '1' => 'cvterm_id',
  2637. '2' => 'pub_id',
  2638. ),
  2639. ),
  2640. 'indexes' => array(
  2641. 'library_cvterm_idx1' => array(
  2642. '0' => 'library_id',
  2643. ),
  2644. 'library_cvterm_idx2' => array(
  2645. '0' => 'cvterm_id',
  2646. ),
  2647. 'library_cvterm_idx3' => array(
  2648. '0' => 'pub_id',
  2649. ),
  2650. ),
  2651. 'foreign keys' => array(
  2652. ),
  2653. );
  2654. return $description;
  2655. }
  2656. /**
  2657. * Implements hook_library_dbxref_schema()
  2658. * Purpose: To describe the structure of library_dbxref to tripal
  2659. * @see tripal_core_chado_insert()
  2660. * @see tripal_core_chado_update()
  2661. * @see tripal_core_chado_select()
  2662. *
  2663. * @return
  2664. * An array describing the current table
  2665. *
  2666. * @ingroup tripal_schema_api
  2667. *
  2668. */
  2669. function tripal_core_chado_library_dbxref_schema() {
  2670. $description = array();
  2671. $description = array(
  2672. 'table' => 'library_dbxref',
  2673. // 'description' => 'TODO: please describe this table!',
  2674. 'fields' => array(
  2675. 'library_dbxref_id' => array(
  2676. // 'description' => 'TODO: please describe this field!',
  2677. 'type' => 'serial',
  2678. 'not NULL' => '1',
  2679. ),
  2680. 'library_id' => array(
  2681. // 'description' => 'TODO: please describe this field!',
  2682. 'type' => 'int',
  2683. 'not NULL' => '1',
  2684. ),
  2685. 'dbxref_id' => array(
  2686. // 'description' => 'TODO: please describe this field!',
  2687. 'type' => 'int',
  2688. 'not NULL' => '1',
  2689. ),
  2690. 'is_current' => array(
  2691. // 'description' => 'TODO: please describe this field!',
  2692. 'type' => 'boolean',
  2693. 'not NULL' => '1',
  2694. 'default' => 'ru',
  2695. ),
  2696. ),
  2697. 'primary key' => array(
  2698. '0' => 'library_dbxref_id',
  2699. ),
  2700. 'unique keys' => array(
  2701. 'library_dbxref_c1' => array(
  2702. '0' => 'library_id',
  2703. '1' => 'dbxref_id',
  2704. ),
  2705. ),
  2706. 'indexes' => array(
  2707. 'library_dbxref_idx1' => array(
  2708. '0' => 'library_id',
  2709. ),
  2710. 'library_dbxref_idx2' => array(
  2711. '0' => 'dbxref_id',
  2712. ),
  2713. ),
  2714. 'foreign keys' => array(
  2715. ),
  2716. );
  2717. return $description;
  2718. }
  2719. /**
  2720. * Implements hook_library_feature_schema()
  2721. * Purpose: To describe the structure of library_feature to tripal
  2722. * @see tripal_core_chado_insert()
  2723. * @see tripal_core_chado_update()
  2724. * @see tripal_core_chado_select()
  2725. *
  2726. * @return
  2727. * An array describing the current table
  2728. *
  2729. * @ingroup tripal_schema_api
  2730. *
  2731. */
  2732. function tripal_core_chado_library_feature_schema() {
  2733. $description = array();
  2734. $description = array(
  2735. 'table' => 'library_feature',
  2736. // 'description' => 'TODO: please describe this table!',
  2737. 'fields' => array(
  2738. 'library_feature_id' => array(
  2739. // 'description' => 'TODO: please describe this field!',
  2740. 'type' => 'serial',
  2741. 'not NULL' => '1',
  2742. ),
  2743. 'library_id' => array(
  2744. // 'description' => 'TODO: please describe this field!',
  2745. 'type' => 'int',
  2746. 'not NULL' => '1',
  2747. ),
  2748. 'feature_id' => array(
  2749. // 'description' => 'TODO: please describe this field!',
  2750. 'type' => 'int',
  2751. 'not NULL' => '1',
  2752. ),
  2753. ),
  2754. 'primary key' => array(
  2755. '0' => 'library_feature_id',
  2756. ),
  2757. 'unique keys' => array(
  2758. 'library_feature_c1' => array(
  2759. '0' => 'library_id',
  2760. '1' => 'feature_id',
  2761. ),
  2762. ),
  2763. 'indexes' => array(
  2764. 'library_feature_idx1' => array(
  2765. '0' => 'library_id',
  2766. ),
  2767. 'library_feature_idx2' => array(
  2768. '0' => 'feature_id',
  2769. ),
  2770. ),
  2771. 'foreign keys' => array(
  2772. ),
  2773. );
  2774. return $description;
  2775. }
  2776. /**
  2777. * Implements hook_library_feature_count_schema()
  2778. * Purpose: To describe the structure of library_feature_count to tripal
  2779. * @see tripal_core_chado_insert()
  2780. * @see tripal_core_chado_update()
  2781. * @see tripal_core_chado_select()
  2782. *
  2783. * @return
  2784. * An array describing the current table
  2785. *
  2786. * @ingroup tripal_schema_api
  2787. *
  2788. */
  2789. function tripal_core_chado_library_feature_count_schema() {
  2790. $description = array();
  2791. $description = array(
  2792. 'table' => 'library_feature_count',
  2793. // 'description' => 'TODO: please describe this table!',
  2794. 'fields' => array(
  2795. 'library_id' => array(
  2796. // 'description' => 'TODO: please describe this field!',
  2797. 'type' => 'int',
  2798. 'not NULL' => '',
  2799. ),
  2800. 'name' => array(
  2801. // 'description' => 'TODO: please describe this field!',
  2802. 'type' => 'varchar',
  2803. 'length' => '255',
  2804. 'not NULL' => '',
  2805. ),
  2806. 'num_features' => array(
  2807. // 'description' => 'TODO: please describe this field!',
  2808. 'type' => 'int',
  2809. 'not NULL' => '',
  2810. ),
  2811. 'feature_type' => array(
  2812. // 'description' => 'TODO: please describe this field!',
  2813. 'type' => 'varchar',
  2814. 'length' => '255',
  2815. 'not NULL' => '',
  2816. ),
  2817. ),
  2818. 'primary key' => array(
  2819. ),
  2820. 'unique keys' => array(
  2821. 'library_feature_count_index' => array(
  2822. '0' => 'library_id',
  2823. ),
  2824. ),
  2825. 'indexes' => array(
  2826. ),
  2827. 'foreign keys' => array(
  2828. ),
  2829. );
  2830. return $description;
  2831. }
  2832. /**
  2833. * Implements hook_library_schema()
  2834. * Purpose: To describe the structure of library to tripal
  2835. * @see tripal_core_chado_insert()
  2836. * @see tripal_core_chado_update()
  2837. * @see tripal_core_chado_select()
  2838. *
  2839. * @return
  2840. * An array describing the current table
  2841. *
  2842. * @ingroup tripal_schema_api
  2843. *
  2844. */
  2845. function tripal_core_chado_library_schema() {
  2846. $description = array();
  2847. $description = array(
  2848. 'table' => 'library',
  2849. // 'description' => 'TODO: please describe this table!',
  2850. 'fields' => array(
  2851. 'library_id' => array(
  2852. // 'description' => 'TODO: please describe this field!',
  2853. 'type' => 'serial',
  2854. 'not NULL' => '1',
  2855. ),
  2856. 'organism_id' => array(
  2857. // 'description' => 'TODO: please describe this field!',
  2858. 'type' => 'int',
  2859. 'not NULL' => '1',
  2860. ),
  2861. 'name' => array(
  2862. // 'description' => 'TODO: please describe this field!',
  2863. 'type' => 'varchar',
  2864. 'length' => '255',
  2865. 'not NULL' => '',
  2866. ),
  2867. 'uniquename' => array(
  2868. // 'description' => 'TODO: please describe this field!',
  2869. 'type' => 'text',
  2870. 'not NULL' => '1',
  2871. ),
  2872. 'type_id' => array(
  2873. // 'description' => 'TODO: please describe this field!',
  2874. 'type' => 'int',
  2875. 'not NULL' => '1',
  2876. ),
  2877. 'is_obsolete' => array(
  2878. // 'description' => 'TODO: please describe this field!',
  2879. 'type' => 'int',
  2880. 'not NULL' => '1',
  2881. 'default' => '0',
  2882. ),
  2883. 'timeaccessioned' => array(
  2884. // 'description' => 'TODO: please describe this field!',
  2885. 'type' => 'datetime',
  2886. 'not NULL' => '1',
  2887. 'default' => 'ow(',
  2888. ),
  2889. 'timelastmodified' => array(
  2890. // 'description' => 'TODO: please describe this field!',
  2891. 'type' => 'datetime',
  2892. 'not NULL' => '1',
  2893. 'default' => 'ow(',
  2894. ),
  2895. ),
  2896. 'primary key' => array(
  2897. '0' => 'library_id',
  2898. ),
  2899. 'unique keys' => array(
  2900. 'library_c1' => array(
  2901. '0' => 'organism_id',
  2902. '1' => 'uniquename',
  2903. '2' => 'type_id',
  2904. ),
  2905. ),
  2906. 'indexes' => array(
  2907. 'library_idx1' => array(
  2908. '0' => 'organism_id',
  2909. ),
  2910. 'library_idx2' => array(
  2911. '0' => 'type_id',
  2912. ),
  2913. 'library_idx3' => array(
  2914. '0' => 'uniquename',
  2915. ),
  2916. 'library_name_ind1' => array(
  2917. '0' => 'name',
  2918. ),
  2919. ),
  2920. 'foreign keys' => array(
  2921. ),
  2922. );
  2923. return $description;
  2924. }
  2925. /**
  2926. * Implements hook_intronloc_view_schema()
  2927. * Purpose: To describe the structure of intronloc_view to tripal
  2928. * @see tripal_core_chado_insert()
  2929. * @see tripal_core_chado_update()
  2930. * @see tripal_core_chado_select()
  2931. *
  2932. * @return
  2933. * An array describing the current table
  2934. *
  2935. * @ingroup tripal_schema_api
  2936. *
  2937. */
  2938. function tripal_core_chado_intronloc_view_schema() {
  2939. $description = array();
  2940. $description = array(
  2941. 'table' => 'intronloc_view',
  2942. // 'description' => 'TODO: please describe this table!',
  2943. 'fields' => array(
  2944. 'exon1_id' => array(
  2945. // 'description' => 'TODO: please describe this field!',
  2946. 'type' => 'int',
  2947. 'not NULL' => '',
  2948. ),
  2949. 'exon2_id' => array(
  2950. // 'description' => 'TODO: please describe this field!',
  2951. 'type' => 'int',
  2952. 'not NULL' => '',
  2953. ),
  2954. 'fmin' => array(
  2955. // 'description' => 'TODO: please describe this field!',
  2956. 'type' => 'int',
  2957. 'not NULL' => '',
  2958. ),
  2959. 'fmax' => array(
  2960. // 'description' => 'TODO: please describe this field!',
  2961. 'type' => 'int',
  2962. 'not NULL' => '',
  2963. ),
  2964. 'strand' => array(
  2965. // 'description' => 'TODO: please describe this field!',
  2966. 'type' => 'int',
  2967. 'size' => 'small',
  2968. 'not NULL' => '',
  2969. ),
  2970. 'srcfeature_id' => array(
  2971. // 'description' => 'TODO: please describe this field!',
  2972. 'type' => 'int',
  2973. 'not NULL' => '',
  2974. ),
  2975. ),
  2976. 'primary key' => array(
  2977. ),
  2978. 'unique keys' => array(
  2979. ),
  2980. 'indexes' => array(
  2981. ),
  2982. 'foreign keys' => array(
  2983. ),
  2984. );
  2985. return $description;
  2986. }
  2987. /**
  2988. * Implements hook_gff3atts_schema()
  2989. * Purpose: To describe the structure of gff3atts to tripal
  2990. * @see tripal_core_chado_insert()
  2991. * @see tripal_core_chado_update()
  2992. * @see tripal_core_chado_select()
  2993. *
  2994. * @return
  2995. * An array describing the current table
  2996. *
  2997. * @ingroup tripal_schema_api
  2998. *
  2999. */
  3000. function tripal_core_chado_gff3atts_schema() {
  3001. $description = array();
  3002. $description = array(
  3003. 'table' => 'gff3atts',
  3004. // 'description' => 'TODO: please describe this table!',
  3005. 'fields' => array(
  3006. 'feature_id' => array(
  3007. // 'description' => 'TODO: please describe this field!',
  3008. 'type' => 'int',
  3009. 'not NULL' => '',
  3010. ),
  3011. 'type' => array(
  3012. // 'description' => 'TODO: please describe this field!',
  3013. 'type' => 'text',
  3014. 'not NULL' => '',
  3015. ),
  3016. 'attribute' => array(
  3017. // 'description' => 'TODO: please describe this field!',
  3018. 'type' => 'varchar',
  3019. 'not NULL' => '',
  3020. ),
  3021. ),
  3022. 'primary key' => array(
  3023. ),
  3024. 'unique keys' => array(
  3025. ),
  3026. 'indexes' => array(
  3027. ),
  3028. 'foreign keys' => array(
  3029. ),
  3030. );
  3031. return $description;
  3032. }
  3033. /**
  3034. * Implements hook_gff3view_schema()
  3035. * Purpose: To describe the structure of gff3view to tripal
  3036. * @see tripal_core_chado_insert()
  3037. * @see tripal_core_chado_update()
  3038. * @see tripal_core_chado_select()
  3039. *
  3040. * @return
  3041. * An array describing the current table
  3042. *
  3043. * @ingroup tripal_schema_api
  3044. *
  3045. */
  3046. function tripal_core_chado_gff3view_schema() {
  3047. $description = array();
  3048. $description = array(
  3049. 'table' => 'gff3view',
  3050. // 'description' => 'TODO: please describe this table!',
  3051. 'fields' => array(
  3052. 'feature_id' => array(
  3053. // 'description' => 'TODO: please describe this field!',
  3054. 'type' => 'int',
  3055. 'not NULL' => '',
  3056. ),
  3057. 'ref' => array(
  3058. // 'description' => 'TODO: please describe this field!',
  3059. 'type' => 'varchar',
  3060. 'length' => '255',
  3061. 'not NULL' => '',
  3062. ),
  3063. 'source' => array(
  3064. // 'description' => 'TODO: please describe this field!',
  3065. 'type' => 'varchar',
  3066. 'length' => '255',
  3067. 'not NULL' => '',
  3068. ),
  3069. 'type' => array(
  3070. // 'description' => 'TODO: please describe this field!',
  3071. 'type' => 'varchar',
  3072. 'length' => '1024',
  3073. 'not NULL' => '',
  3074. ),
  3075. 'fstart' => array(
  3076. // 'description' => 'TODO: please describe this field!',
  3077. 'type' => 'int',
  3078. 'not NULL' => '',
  3079. ),
  3080. 'fend' => array(
  3081. // 'description' => 'TODO: please describe this field!',
  3082. 'type' => 'int',
  3083. 'not NULL' => '',
  3084. ),
  3085. 'score' => array(
  3086. // 'description' => 'TODO: please describe this field!',
  3087. 'type' => 'float',
  3088. 'size' => 'big',
  3089. 'not NULL' => '',
  3090. ),
  3091. 'strand' => array(
  3092. // 'description' => 'TODO: please describe this field!',
  3093. 'type' => 'int',
  3094. 'size' => 'small',
  3095. 'not NULL' => '',
  3096. ),
  3097. 'phase' => array(
  3098. // 'description' => 'TODO: please describe this field!',
  3099. 'type' => 'int',
  3100. 'not NULL' => '',
  3101. ),
  3102. 'seqlen' => array(
  3103. // 'description' => 'TODO: please describe this field!',
  3104. 'type' => 'int',
  3105. 'not NULL' => '',
  3106. ),
  3107. 'name' => array(
  3108. // 'description' => 'TODO: please describe this field!',
  3109. 'type' => 'varchar',
  3110. 'length' => '255',
  3111. 'not NULL' => '',
  3112. ),
  3113. 'organism_id' => array(
  3114. // 'description' => 'TODO: please describe this field!',
  3115. 'type' => 'int',
  3116. 'not NULL' => '',
  3117. ),
  3118. ),
  3119. 'primary key' => array(
  3120. ),
  3121. 'unique keys' => array(
  3122. ),
  3123. 'indexes' => array(
  3124. ),
  3125. 'foreign keys' => array(
  3126. ),
  3127. );
  3128. return $description;
  3129. }
  3130. /**
  3131. * Implements hook_gffatts_schema()
  3132. * Purpose: To describe the structure of gffatts to tripal
  3133. * @see tripal_core_chado_insert()
  3134. * @see tripal_core_chado_update()
  3135. * @see tripal_core_chado_select()
  3136. *
  3137. * @return
  3138. * An array describing the current table
  3139. *
  3140. * @ingroup tripal_schema_api
  3141. *
  3142. */
  3143. function tripal_core_chado_gffatts_schema() {
  3144. $description = array();
  3145. $description = array(
  3146. 'table' => 'gffatts',
  3147. // 'description' => 'TODO: please describe this table!',
  3148. 'fields' => array(
  3149. 'feature_id' => array(
  3150. // 'description' => 'TODO: please describe this field!',
  3151. 'type' => 'int',
  3152. 'not NULL' => '',
  3153. ),
  3154. 'type' => array(
  3155. // 'description' => 'TODO: please describe this field!',
  3156. 'type' => 'text',
  3157. 'not NULL' => '',
  3158. ),
  3159. 'attribute' => array(
  3160. // 'description' => 'TODO: please describe this field!',
  3161. 'type' => 'varchar',
  3162. 'not NULL' => '',
  3163. ),
  3164. ),
  3165. 'primary key' => array(
  3166. ),
  3167. 'unique keys' => array(
  3168. ),
  3169. 'indexes' => array(
  3170. ),
  3171. 'foreign keys' => array(
  3172. ),
  3173. );
  3174. return $description;
  3175. }
  3176. /**
  3177. * Implements hook_intron_combined_view_schema()
  3178. * Purpose: To describe the structure of intron_combined_view to tripal
  3179. * @see tripal_core_chado_insert()
  3180. * @see tripal_core_chado_update()
  3181. * @see tripal_core_chado_select()
  3182. *
  3183. * @return
  3184. * An array describing the current table
  3185. *
  3186. * @ingroup tripal_schema_api
  3187. *
  3188. */
  3189. function tripal_core_chado_intron_combined_view_schema() {
  3190. $description = array();
  3191. $description = array(
  3192. 'table' => 'intron_combined_view',
  3193. // 'description' => 'TODO: please describe this table!',
  3194. 'fields' => array(
  3195. 'exon1_id' => array(
  3196. // 'description' => 'TODO: please describe this field!',
  3197. 'type' => 'int',
  3198. 'not NULL' => '',
  3199. ),
  3200. 'exon2_id' => array(
  3201. // 'description' => 'TODO: please describe this field!',
  3202. 'type' => 'int',
  3203. 'not NULL' => '',
  3204. ),
  3205. 'fmin' => array(
  3206. // 'description' => 'TODO: please describe this field!',
  3207. 'type' => 'int',
  3208. 'not NULL' => '',
  3209. ),
  3210. 'fmax' => array(
  3211. // 'description' => 'TODO: please describe this field!',
  3212. 'type' => 'int',
  3213. 'not NULL' => '',
  3214. ),
  3215. 'strand' => array(
  3216. // 'description' => 'TODO: please describe this field!',
  3217. 'type' => 'int',
  3218. 'size' => 'small',
  3219. 'not NULL' => '',
  3220. ),
  3221. 'srcfeature_id' => array(
  3222. // 'description' => 'TODO: please describe this field!',
  3223. 'type' => 'int',
  3224. 'not NULL' => '',
  3225. ),
  3226. 'intron_rank' => array(
  3227. // 'description' => 'TODO: please describe this field!',
  3228. 'type' => 'int',
  3229. 'not NULL' => '',
  3230. ),
  3231. 'transcript_id' => array(
  3232. // 'description' => 'TODO: please describe this field!',
  3233. 'type' => 'int',
  3234. 'not NULL' => '',
  3235. ),
  3236. ),
  3237. 'primary key' => array(
  3238. ),
  3239. 'unique keys' => array(
  3240. ),
  3241. 'indexes' => array(
  3242. ),
  3243. 'foreign keys' => array(
  3244. ),
  3245. );
  3246. return $description;
  3247. }
  3248. /**
  3249. * Implements hook_project_schema()
  3250. * Purpose: To describe the structure of project to tripal
  3251. * @see tripal_core_chado_insert()
  3252. * @see tripal_core_chado_update()
  3253. * @see tripal_core_chado_select()
  3254. *
  3255. * @return
  3256. * An array describing the current table
  3257. *
  3258. * @ingroup tripal_schema_api
  3259. *
  3260. */
  3261. function tripal_core_chado_project_schema() {
  3262. $description = array();
  3263. $description = array(
  3264. 'table' => 'project',
  3265. // 'description' => 'TODO: please describe this table!',
  3266. 'fields' => array(
  3267. 'project_id' => array(
  3268. // 'description' => 'TODO: please describe this field!',
  3269. 'type' => 'serial',
  3270. 'not NULL' => '1',
  3271. ),
  3272. 'name' => array(
  3273. // 'description' => 'TODO: please describe this field!',
  3274. 'type' => 'varchar',
  3275. 'length' => '255',
  3276. 'not NULL' => '1',
  3277. ),
  3278. 'description' => array(
  3279. // 'description' => 'TODO: please describe this field!',
  3280. 'type' => 'varchar',
  3281. 'length' => '255',
  3282. 'not NULL' => '1',
  3283. ),
  3284. ),
  3285. 'primary key' => array(
  3286. '0' => 'project_id',
  3287. ),
  3288. 'unique keys' => array(
  3289. 'project_c1' => array(
  3290. '0' => 'name',
  3291. ),
  3292. ),
  3293. 'indexes' => array(
  3294. ),
  3295. 'foreign keys' => array(
  3296. ),
  3297. );
  3298. return $description;
  3299. }
  3300. /**
  3301. * Implements hook_protein_coding_gene_schema()
  3302. * Purpose: To describe the structure of protein_coding_gene to tripal
  3303. * @see tripal_core_chado_insert()
  3304. * @see tripal_core_chado_update()
  3305. * @see tripal_core_chado_select()
  3306. *
  3307. * @return
  3308. * An array describing the current table
  3309. *
  3310. * @ingroup tripal_schema_api
  3311. *
  3312. */
  3313. function tripal_core_chado_protein_coding_gene_schema() {
  3314. $description = array();
  3315. $description = array(
  3316. 'table' => 'protein_coding_gene',
  3317. // 'description' => 'TODO: please describe this table!',
  3318. 'fields' => array(
  3319. 'feature_id' => array(
  3320. // 'description' => 'TODO: please describe this field!',
  3321. 'type' => 'int',
  3322. 'not NULL' => '',
  3323. ),
  3324. 'dbxref_id' => array(
  3325. // 'description' => 'TODO: please describe this field!',
  3326. 'type' => 'int',
  3327. 'not NULL' => '',
  3328. ),
  3329. 'organism_id' => array(
  3330. // 'description' => 'TODO: please describe this field!',
  3331. 'type' => 'int',
  3332. 'not NULL' => '',
  3333. ),
  3334. 'name' => array(
  3335. // 'description' => 'TODO: please describe this field!',
  3336. 'type' => 'varchar',
  3337. 'length' => '255',
  3338. 'not NULL' => '',
  3339. ),
  3340. 'uniquename' => array(
  3341. // 'description' => 'TODO: please describe this field!',
  3342. 'type' => 'text',
  3343. 'not NULL' => '',
  3344. ),
  3345. 'residues' => array(
  3346. // 'description' => 'TODO: please describe this field!',
  3347. 'type' => 'text',
  3348. 'not NULL' => '',
  3349. ),
  3350. 'seqlen' => array(
  3351. // 'description' => 'TODO: please describe this field!',
  3352. 'type' => 'int',
  3353. 'not NULL' => '',
  3354. ),
  3355. 'md5checksum' => array(
  3356. // 'description' => 'TODO: please describe this field!',
  3357. 'type' => 'char',
  3358. 'length' => '32',
  3359. 'not NULL' => '',
  3360. ),
  3361. 'type_id' => array(
  3362. // 'description' => 'TODO: please describe this field!',
  3363. 'type' => 'int',
  3364. 'not NULL' => '',
  3365. ),
  3366. 'is_analysis' => array(
  3367. // 'description' => 'TODO: please describe this field!',
  3368. 'type' => 'boolean',
  3369. 'not NULL' => '',
  3370. ),
  3371. 'is_obsolete' => array(
  3372. // 'description' => 'TODO: please describe this field!',
  3373. 'type' => 'boolean',
  3374. 'not NULL' => '',
  3375. ),
  3376. 'timeaccessioned' => array(
  3377. // 'description' => 'TODO: please describe this field!',
  3378. 'type' => 'datetime',
  3379. 'not NULL' => '',
  3380. ),
  3381. 'timelastmodified' => array(
  3382. // 'description' => 'TODO: please describe this field!',
  3383. 'type' => 'datetime',
  3384. 'not NULL' => '',
  3385. ),
  3386. ),
  3387. 'primary key' => array(
  3388. ),
  3389. 'unique keys' => array(
  3390. ),
  3391. 'indexes' => array(
  3392. ),
  3393. 'foreign keys' => array(
  3394. ),
  3395. );
  3396. return $description;
  3397. }
  3398. /**
  3399. * Implements hook_studyfactorvalue_schema()
  3400. * Purpose: To describe the structure of studyfactorvalue to tripal
  3401. * @see tripal_core_chado_insert()
  3402. * @see tripal_core_chado_update()
  3403. * @see 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_studyfactorvalue_schema() {
  3412. $description = array();
  3413. $description = array(
  3414. 'table' => 'studyfactorvalue',
  3415. // 'description' => 'TODO: please describe this table!',
  3416. 'fields' => array(
  3417. 'studyfactorvalue_id' => array(
  3418. // 'description' => 'TODO: please describe this field!',
  3419. 'type' => 'serial',
  3420. 'not NULL' => '1',
  3421. ),
  3422. 'studyfactor_id' => array(
  3423. // 'description' => 'TODO: please describe this field!',
  3424. 'type' => 'int',
  3425. 'not NULL' => '1',
  3426. ),
  3427. 'assay_id' => array(
  3428. // 'description' => 'TODO: please describe this field!',
  3429. 'type' => 'int',
  3430. 'not NULL' => '1',
  3431. ),
  3432. 'factorvalue' => array(
  3433. // 'description' => 'TODO: please describe this field!',
  3434. 'type' => 'text',
  3435. 'not NULL' => '',
  3436. ),
  3437. 'name' => array(
  3438. // 'description' => 'TODO: please describe this field!',
  3439. 'type' => 'text',
  3440. 'not NULL' => '',
  3441. ),
  3442. 'rank' => array(
  3443. // 'description' => 'TODO: please describe this field!',
  3444. 'type' => 'int',
  3445. 'not NULL' => '1',
  3446. 'default' => '0',
  3447. ),
  3448. ),
  3449. 'primary key' => array(
  3450. '0' => 'studyfactorvalue_id',
  3451. ),
  3452. 'unique keys' => array(
  3453. ),
  3454. 'indexes' => array(
  3455. 'studyfactorvalue_idx1' => array(
  3456. '0' => 'studyfactor_id',
  3457. ),
  3458. 'studyfactorvalue_idx2' => array(
  3459. '0' => 'assay_id',
  3460. ),
  3461. ),
  3462. 'foreign keys' => array(
  3463. ),
  3464. );
  3465. return $description;
  3466. }
  3467. /**
  3468. * Implements hook_studyfactor_schema()
  3469. * Purpose: To describe the structure of studyfactor to tripal
  3470. * @see tripal_core_chado_insert()
  3471. * @see tripal_core_chado_update()
  3472. * @see tripal_core_chado_select()
  3473. *
  3474. * @return
  3475. * An array describing the current table
  3476. *
  3477. * @ingroup tripal_schema_api
  3478. *
  3479. */
  3480. function tripal_core_chado_studyfactor_schema() {
  3481. $description = array();
  3482. $description = array(
  3483. 'table' => 'studyfactor',
  3484. // 'description' => 'TODO: please describe this table!',
  3485. 'fields' => array(
  3486. 'studyfactor_id' => array(
  3487. // 'description' => 'TODO: please describe this field!',
  3488. 'type' => 'serial',
  3489. 'not NULL' => '1',
  3490. ),
  3491. 'studydesign_id' => array(
  3492. // 'description' => 'TODO: please describe this field!',
  3493. 'type' => 'int',
  3494. 'not NULL' => '1',
  3495. ),
  3496. 'type_id' => array(
  3497. // 'description' => 'TODO: please describe this field!',
  3498. 'type' => 'int',
  3499. 'not NULL' => '',
  3500. ),
  3501. 'name' => array(
  3502. // 'description' => 'TODO: please describe this field!',
  3503. 'type' => 'text',
  3504. 'not NULL' => '1',
  3505. ),
  3506. 'description' => array(
  3507. // 'description' => 'TODO: please describe this field!',
  3508. 'type' => 'text',
  3509. 'not NULL' => '',
  3510. ),
  3511. ),
  3512. 'primary key' => array(
  3513. '0' => 'studyfactor_id',
  3514. ),
  3515. 'unique keys' => array(
  3516. ),
  3517. 'indexes' => array(
  3518. 'studyfactor_idx1' => array(
  3519. '0' => 'studydesign_id',
  3520. ),
  3521. 'studyfactor_idx2' => array(
  3522. '0' => 'type_id',
  3523. ),
  3524. ),
  3525. 'foreign keys' => array(
  3526. ),
  3527. );
  3528. return $description;
  3529. }
  3530. /**
  3531. * Implements hook_studyprop_schema()
  3532. * Purpose: To describe the structure of studyprop to tripal
  3533. * @see tripal_core_chado_insert()
  3534. * @see tripal_core_chado_update()
  3535. * @see 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_schema() {
  3544. $description = array();
  3545. $description = array(
  3546. 'table' => 'studyprop',
  3547. // 'description' => 'TODO: please describe this table!',
  3548. 'fields' => array(
  3549. 'studyprop_id' => array(
  3550. // 'description' => 'TODO: please describe this field!',
  3551. 'type' => 'serial',
  3552. 'not NULL' => '1',
  3553. ),
  3554. 'study_id' => array(
  3555. // 'description' => 'TODO: please describe this field!',
  3556. 'type' => 'int',
  3557. 'not NULL' => '1',
  3558. ),
  3559. 'type_id' => array(
  3560. // 'description' => 'TODO: please describe this field!',
  3561. 'type' => 'int',
  3562. 'not NULL' => '1',
  3563. ),
  3564. 'value' => array(
  3565. // 'description' => 'TODO: please describe this field!',
  3566. 'type' => 'text',
  3567. 'not NULL' => '',
  3568. ),
  3569. 'rank' => array(
  3570. // 'description' => 'TODO: please describe this field!',
  3571. 'type' => 'int',
  3572. 'not NULL' => '1',
  3573. 'default' => '0',
  3574. ),
  3575. ),
  3576. 'primary key' => array(
  3577. '0' => 'studyprop_id',
  3578. ),
  3579. 'unique keys' => array(
  3580. 'study_id' => array(
  3581. '0' => 'study_id',
  3582. '1' => 'type_id',
  3583. '2' => 'rank',
  3584. ),
  3585. ),
  3586. 'indexes' => array(
  3587. 'studyprop_idx1' => array(
  3588. '0' => 'study_id',
  3589. ),
  3590. 'studyprop_idx2' => array(
  3591. '0' => 'type_id',
  3592. ),
  3593. ),
  3594. 'foreign keys' => array(
  3595. ),
  3596. );
  3597. return $description;
  3598. }
  3599. /**
  3600. * Implements hook_studyprop_feature_schema()
  3601. * Purpose: To describe the structure of studyprop_feature to tripal
  3602. * @see tripal_core_chado_insert()
  3603. * @see tripal_core_chado_update()
  3604. * @see tripal_core_chado_select()
  3605. *
  3606. * @return
  3607. * An array describing the current table
  3608. *
  3609. * @ingroup tripal_schema_api
  3610. *
  3611. */
  3612. function tripal_core_chado_studyprop_feature_schema() {
  3613. $description = array();
  3614. $description = array(
  3615. 'table' => 'studyprop_feature',
  3616. // 'description' => 'TODO: please describe this table!',
  3617. 'fields' => array(
  3618. 'studyprop_feature_id' => array(
  3619. // 'description' => 'TODO: please describe this field!',
  3620. 'type' => 'serial',
  3621. 'not NULL' => '1',
  3622. ),
  3623. 'studyprop_id' => array(
  3624. // 'description' => 'TODO: please describe this field!',
  3625. 'type' => 'int',
  3626. 'not NULL' => '1',
  3627. ),
  3628. 'feature_id' => array(
  3629. // 'description' => 'TODO: please describe this field!',
  3630. 'type' => 'int',
  3631. 'not NULL' => '1',
  3632. ),
  3633. 'type_id' => array(
  3634. // 'description' => 'TODO: please describe this field!',
  3635. 'type' => 'int',
  3636. 'not NULL' => '',
  3637. ),
  3638. ),
  3639. 'primary key' => array(
  3640. '0' => 'studyprop_feature_id',
  3641. ),
  3642. 'unique keys' => array(
  3643. 'studyprop_id' => array(
  3644. '0' => 'studyprop_id',
  3645. '1' => 'feature_id',
  3646. ),
  3647. ),
  3648. 'indexes' => array(
  3649. 'studyprop_feature_idx1' => array(
  3650. '0' => 'studyprop_id',
  3651. ),
  3652. 'studyprop_feature_idx2' => array(
  3653. '0' => 'feature_id',
  3654. ),
  3655. ),
  3656. 'foreign keys' => array(
  3657. ),
  3658. );
  3659. return $description;
  3660. }
  3661. /**
  3662. * Implements hook_synonym_schema()
  3663. * Purpose: To describe the structure of synonym to tripal
  3664. * @see tripal_core_chado_insert()
  3665. * @see tripal_core_chado_update()
  3666. * @see tripal_core_chado_select()
  3667. *
  3668. * @return
  3669. * An array describing the current table
  3670. *
  3671. * @ingroup tripal_schema_api
  3672. *
  3673. */
  3674. function tripal_core_chado_synonym_schema() {
  3675. $description = array();
  3676. $description = array(
  3677. 'table' => 'synonym',
  3678. // 'description' => 'TODO: please describe this table!',
  3679. 'fields' => array(
  3680. 'synonym_id' => array(
  3681. // 'description' => 'TODO: please describe this field!',
  3682. 'type' => 'serial',
  3683. 'not NULL' => '1',
  3684. ),
  3685. 'name' => array(
  3686. // 'description' => 'TODO: please describe this field!',
  3687. 'type' => 'varchar',
  3688. 'length' => '255',
  3689. 'not NULL' => '1',
  3690. ),
  3691. 'type_id' => array(
  3692. // 'description' => 'TODO: please describe this field!',
  3693. 'type' => 'int',
  3694. 'not NULL' => '1',
  3695. ),
  3696. 'synonym_sgml' => array(
  3697. // 'description' => 'TODO: please describe this field!',
  3698. 'type' => 'varchar',
  3699. 'length' => '255',
  3700. 'not NULL' => '1',
  3701. ),
  3702. ),
  3703. 'primary key' => array(
  3704. '0' => 'synonym_id',
  3705. ),
  3706. 'unique keys' => array(
  3707. 'synonym_c1' => array(
  3708. '0' => 'name',
  3709. '1' => 'type_id',
  3710. ),
  3711. ),
  3712. 'indexes' => array(
  3713. 'synonym_idx1' => array(
  3714. '0' => 'type_id',
  3715. ),
  3716. ),
  3717. 'foreign keys' => array(
  3718. ),
  3719. );
  3720. return $description;
  3721. }
  3722. /**
  3723. * Implements hook_studydesignprop_schema()
  3724. * Purpose: To describe the structure of studydesignprop to tripal
  3725. * @see tripal_core_chado_insert()
  3726. * @see tripal_core_chado_update()
  3727. * @see 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_studydesignprop_schema() {
  3736. $description = array();
  3737. $description = array(
  3738. 'table' => 'studydesignprop',
  3739. // 'description' => 'TODO: please describe this table!',
  3740. 'fields' => array(
  3741. 'studydesignprop_id' => array(
  3742. // 'description' => 'TODO: please describe this field!',
  3743. 'type' => 'serial',
  3744. 'not NULL' => '1',
  3745. ),
  3746. 'studydesign_id' => array(
  3747. // 'description' => 'TODO: please describe this field!',
  3748. 'type' => 'int',
  3749. 'not NULL' => '1',
  3750. ),
  3751. 'type_id' => array(
  3752. // 'description' => 'TODO: please describe this field!',
  3753. 'type' => 'int',
  3754. 'not NULL' => '1',
  3755. ),
  3756. 'value' => array(
  3757. // 'description' => 'TODO: please describe this field!',
  3758. 'type' => 'text',
  3759. 'not NULL' => '',
  3760. ),
  3761. 'rank' => array(
  3762. // 'description' => 'TODO: please describe this field!',
  3763. 'type' => 'int',
  3764. 'not NULL' => '1',
  3765. 'default' => '0',
  3766. ),
  3767. ),
  3768. 'primary key' => array(
  3769. '0' => 'studydesignprop_id',
  3770. ),
  3771. 'unique keys' => array(
  3772. 'studydesignprop_c1' => array(
  3773. '0' => 'studydesign_id',
  3774. '1' => 'type_id',
  3775. '2' => 'rank',
  3776. ),
  3777. ),
  3778. 'indexes' => array(
  3779. 'studydesignprop_idx1' => array(
  3780. '0' => 'studydesign_id',
  3781. ),
  3782. 'studydesignprop_idx2' => array(
  3783. '0' => 'type_id',
  3784. ),
  3785. ),
  3786. 'foreign keys' => array(
  3787. ),
  3788. );
  3789. return $description;
  3790. }
  3791. /**
  3792. * Implements hook_studydesign_schema()
  3793. * Purpose: To describe the structure of studydesign to tripal
  3794. * @see tripal_core_chado_insert()
  3795. * @see tripal_core_chado_update()
  3796. * @see tripal_core_chado_select()
  3797. *
  3798. * @return
  3799. * An array describing the current table
  3800. *
  3801. * @ingroup tripal_schema_api
  3802. *
  3803. */
  3804. function tripal_core_chado_studydesign_schema() {
  3805. $description = array();
  3806. $description = array(
  3807. 'table' => 'studydesign',
  3808. // 'description' => 'TODO: please describe this table!',
  3809. 'fields' => array(
  3810. 'studydesign_id' => array(
  3811. // 'description' => 'TODO: please describe this field!',
  3812. 'type' => 'serial',
  3813. 'not NULL' => '1',
  3814. ),
  3815. 'study_id' => array(
  3816. // 'description' => 'TODO: please describe this field!',
  3817. 'type' => 'int',
  3818. 'not NULL' => '1',
  3819. ),
  3820. 'description' => array(
  3821. // 'description' => 'TODO: please describe this field!',
  3822. 'type' => 'text',
  3823. 'not NULL' => '',
  3824. ),
  3825. ),
  3826. 'primary key' => array(
  3827. '0' => 'studydesign_id',
  3828. ),
  3829. 'unique keys' => array(
  3830. ),
  3831. 'indexes' => array(
  3832. 'studydesign_idx1' => array(
  3833. '0' => 'study_id',
  3834. ),
  3835. ),
  3836. 'foreign keys' => array(
  3837. ),
  3838. );
  3839. return $description;
  3840. }
  3841. /**
  3842. * Implements hook_stockprop_schema()
  3843. * Purpose: To describe the structure of stockprop to tripal
  3844. * @see tripal_core_chado_insert()
  3845. * @see tripal_core_chado_update()
  3846. * @see 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_schema() {
  3855. $description = array();
  3856. $description = array(
  3857. 'table' => 'stockprop',
  3858. // 'description' => 'TODO: please describe this table!',
  3859. 'fields' => array(
  3860. 'stockprop_id' => array(
  3861. // 'description' => 'TODO: please describe this field!',
  3862. 'type' => 'serial',
  3863. 'not NULL' => '1',
  3864. ),
  3865. 'stock_id' => array(
  3866. // 'description' => 'TODO: please describe this field!',
  3867. 'type' => 'int',
  3868. 'not NULL' => '1',
  3869. ),
  3870. 'type_id' => array(
  3871. // 'description' => 'TODO: please describe this field!',
  3872. 'type' => 'int',
  3873. 'not NULL' => '1',
  3874. ),
  3875. 'value' => array(
  3876. // 'description' => 'TODO: please describe this field!',
  3877. 'type' => 'text',
  3878. 'not NULL' => '',
  3879. ),
  3880. 'rank' => array(
  3881. // 'description' => 'TODO: please describe this field!',
  3882. 'type' => 'int',
  3883. 'not NULL' => '1',
  3884. 'default' => '0',
  3885. ),
  3886. ),
  3887. 'primary key' => array(
  3888. '0' => 'stockprop_id',
  3889. ),
  3890. 'unique keys' => array(
  3891. 'stockprop_c1' => array(
  3892. '0' => 'stock_id',
  3893. '1' => 'type_id',
  3894. '2' => 'rank',
  3895. ),
  3896. ),
  3897. 'indexes' => array(
  3898. 'stockprop_idx1' => array(
  3899. '0' => 'stock_id',
  3900. ),
  3901. 'stockprop_idx2' => array(
  3902. '0' => 'type_id',
  3903. ),
  3904. ),
  3905. 'foreign keys' => array(
  3906. ),
  3907. );
  3908. return $description;
  3909. }
  3910. /**
  3911. * Implements hook_stockprop_pub_schema()
  3912. * Purpose: To describe the structure of stockprop_pub to tripal
  3913. * @see tripal_core_chado_insert()
  3914. * @see tripal_core_chado_update()
  3915. * @see tripal_core_chado_select()
  3916. *
  3917. * @return
  3918. * An array describing the current table
  3919. *
  3920. * @ingroup tripal_schema_api
  3921. *
  3922. */
  3923. function tripal_core_chado_stockprop_pub_schema() {
  3924. $description = array();
  3925. $description = array(
  3926. 'table' => 'stockprop_pub',
  3927. // 'description' => 'TODO: please describe this table!',
  3928. 'fields' => array(
  3929. 'stockprop_pub_id' => array(
  3930. // 'description' => 'TODO: please describe this field!',
  3931. 'type' => 'serial',
  3932. 'not NULL' => '1',
  3933. ),
  3934. 'stockprop_id' => array(
  3935. // 'description' => 'TODO: please describe this field!',
  3936. 'type' => 'int',
  3937. 'not NULL' => '1',
  3938. ),
  3939. 'pub_id' => array(
  3940. // 'description' => 'TODO: please describe this field!',
  3941. 'type' => 'int',
  3942. 'not NULL' => '1',
  3943. ),
  3944. ),
  3945. 'primary key' => array(
  3946. '0' => 'stockprop_pub_id',
  3947. ),
  3948. 'unique keys' => array(
  3949. 'stockprop_pub_c1' => array(
  3950. '0' => 'stockprop_id',
  3951. '1' => 'pub_id',
  3952. ),
  3953. ),
  3954. 'indexes' => array(
  3955. 'stockprop_pub_idx1' => array(
  3956. '0' => 'stockprop_id',
  3957. ),
  3958. 'stockprop_pub_idx2' => array(
  3959. '0' => 'pub_id',
  3960. ),
  3961. ),
  3962. 'foreign keys' => array(
  3963. ),
  3964. );
  3965. return $description;
  3966. }
  3967. /**
  3968. * Implements hook_study_schema()
  3969. * Purpose: To describe the structure of study to tripal
  3970. * @see tripal_core_chado_insert()
  3971. * @see tripal_core_chado_update()
  3972. * @see tripal_core_chado_select()
  3973. *
  3974. * @return
  3975. * An array describing the current table
  3976. *
  3977. * @ingroup tripal_schema_api
  3978. *
  3979. */
  3980. function tripal_core_chado_study_schema() {
  3981. $description = array();
  3982. $description = array(
  3983. 'table' => 'study',
  3984. // 'description' => 'TODO: please describe this table!',
  3985. 'fields' => array(
  3986. 'study_id' => array(
  3987. // 'description' => 'TODO: please describe this field!',
  3988. 'type' => 'serial',
  3989. 'not NULL' => '1',
  3990. ),
  3991. 'contact_id' => array(
  3992. // 'description' => 'TODO: please describe this field!',
  3993. 'type' => 'int',
  3994. 'not NULL' => '1',
  3995. ),
  3996. 'pub_id' => array(
  3997. // 'description' => 'TODO: please describe this field!',
  3998. 'type' => 'int',
  3999. 'not NULL' => '',
  4000. ),
  4001. 'dbxref_id' => array(
  4002. // 'description' => 'TODO: please describe this field!',
  4003. 'type' => 'int',
  4004. 'not NULL' => '',
  4005. ),
  4006. 'name' => array(
  4007. // 'description' => 'TODO: please describe this field!',
  4008. 'type' => 'text',
  4009. 'not NULL' => '1',
  4010. ),
  4011. 'description' => array(
  4012. // 'description' => 'TODO: please describe this field!',
  4013. 'type' => 'text',
  4014. 'not NULL' => '',
  4015. ),
  4016. ),
  4017. 'primary key' => array(
  4018. '0' => 'study_id',
  4019. ),
  4020. 'unique keys' => array(
  4021. 'study_c1' => array(
  4022. '0' => 'name',
  4023. ),
  4024. ),
  4025. 'indexes' => array(
  4026. 'study_idx1' => array(
  4027. '0' => 'contact_id',
  4028. ),
  4029. 'study_idx2' => array(
  4030. '0' => 'pub_id',
  4031. ),
  4032. 'study_idx3' => array(
  4033. '0' => 'dbxref_id',
  4034. ),
  4035. ),
  4036. 'foreign keys' => array(
  4037. ),
  4038. );
  4039. return $description;
  4040. }
  4041. /**
  4042. * Implements hook_study_assay_schema()
  4043. * Purpose: To describe the structure of study_assay to tripal
  4044. * @see tripal_core_chado_insert()
  4045. * @see tripal_core_chado_update()
  4046. * @see tripal_core_chado_select()
  4047. *
  4048. * @return
  4049. * An array describing the current table
  4050. *
  4051. * @ingroup tripal_schema_api
  4052. *
  4053. */
  4054. function tripal_core_chado_study_assay_schema() {
  4055. $description = array();
  4056. $description = array(
  4057. 'table' => 'study_assay',
  4058. // 'description' => 'TODO: please describe this table!',
  4059. 'fields' => array(
  4060. 'study_assay_id' => array(
  4061. // 'description' => 'TODO: please describe this field!',
  4062. 'type' => 'serial',
  4063. 'not NULL' => '1',
  4064. ),
  4065. 'study_id' => array(
  4066. // 'description' => 'TODO: please describe this field!',
  4067. 'type' => 'int',
  4068. 'not NULL' => '1',
  4069. ),
  4070. 'assay_id' => array(
  4071. // 'description' => 'TODO: please describe this field!',
  4072. 'type' => 'int',
  4073. 'not NULL' => '1',
  4074. ),
  4075. ),
  4076. 'primary key' => array(
  4077. '0' => 'study_assay_id',
  4078. ),
  4079. 'unique keys' => array(
  4080. 'study_assay_c1' => array(
  4081. '0' => 'study_id',
  4082. '1' => 'assay_id',
  4083. ),
  4084. ),
  4085. 'indexes' => array(
  4086. 'study_assay_idx1' => array(
  4087. '0' => 'study_id',
  4088. ),
  4089. 'study_assay_idx2' => array(
  4090. '0' => 'assay_id',
  4091. ),
  4092. ),
  4093. 'foreign keys' => array(
  4094. ),
  4095. );
  4096. return $description;
  4097. }
  4098. /**
  4099. * Implements hook_tableinfo_schema()
  4100. * Purpose: To describe the structure of tableinfo to tripal
  4101. * @see tripal_core_chado_insert()
  4102. * @see tripal_core_chado_update()
  4103. * @see tripal_core_chado_select()
  4104. *
  4105. * @return
  4106. * An array describing the current table
  4107. *
  4108. * @ingroup tripal_schema_api
  4109. *
  4110. */
  4111. function tripal_core_chado_tableinfo_schema() {
  4112. $description = array();
  4113. $description = array(
  4114. 'table' => 'tableinfo',
  4115. // 'description' => 'TODO: please describe this table!',
  4116. 'fields' => array(
  4117. 'tableinfo_id' => array(
  4118. // 'description' => 'TODO: please describe this field!',
  4119. 'type' => 'serial',
  4120. 'not NULL' => '1',
  4121. ),
  4122. 'name' => array(
  4123. // 'description' => 'TODO: please describe this field!',
  4124. 'type' => 'varchar',
  4125. 'length' => '30',
  4126. 'not NULL' => '1',
  4127. ),
  4128. 'primary_key_column' => array(
  4129. // 'description' => 'TODO: please describe this field!',
  4130. 'type' => 'varchar',
  4131. 'length' => '30',
  4132. 'not NULL' => '',
  4133. ),
  4134. 'is_view' => array(
  4135. // 'description' => 'TODO: please describe this field!',
  4136. 'type' => 'int',
  4137. 'not NULL' => '1',
  4138. 'default' => '0',
  4139. ),
  4140. 'view_on_table_id' => array(
  4141. // 'description' => 'TODO: please describe this field!',
  4142. 'type' => 'int',
  4143. 'not NULL' => '',
  4144. ),
  4145. 'superclass_table_id' => array(
  4146. // 'description' => 'TODO: please describe this field!',
  4147. 'type' => 'int',
  4148. 'not NULL' => '',
  4149. ),
  4150. 'is_updateable' => array(
  4151. // 'description' => 'TODO: please describe this field!',
  4152. 'type' => 'int',
  4153. 'not NULL' => '1',
  4154. 'default' => '1',
  4155. ),
  4156. 'modification_date' => array(
  4157. // 'description' => 'TODO: please describe this field!',
  4158. 'type' => 'date',
  4159. 'not NULL' => '1',
  4160. 'default' => 'ow(',
  4161. ),
  4162. ),
  4163. 'primary key' => array(
  4164. '0' => 'tableinfo_id',
  4165. ),
  4166. 'unique keys' => array(
  4167. 'tableinfo_c1' => array(
  4168. '0' => 'name',
  4169. ),
  4170. ),
  4171. 'indexes' => array(
  4172. ),
  4173. 'foreign keys' => array(
  4174. ),
  4175. );
  4176. return $description;
  4177. }
  4178. /**
  4179. * Implements hook_treatment_schema()
  4180. * Purpose: To describe the structure of treatment to tripal
  4181. * @see tripal_core_chado_insert()
  4182. * @see tripal_core_chado_update()
  4183. * @see tripal_core_chado_select()
  4184. *
  4185. * @return
  4186. * An array describing the current table
  4187. *
  4188. * @ingroup tripal_schema_api
  4189. *
  4190. */
  4191. function tripal_core_chado_treatment_schema() {
  4192. $description = array();
  4193. $description = array(
  4194. 'table' => 'treatment',
  4195. // 'description' => 'TODO: please describe this table!',
  4196. 'fields' => array(
  4197. 'treatment_id' => array(
  4198. // 'description' => 'TODO: please describe this field!',
  4199. 'type' => 'serial',
  4200. 'not NULL' => '1',
  4201. ),
  4202. 'rank' => array(
  4203. // 'description' => 'TODO: please describe this field!',
  4204. 'type' => 'int',
  4205. 'not NULL' => '1',
  4206. 'default' => '0',
  4207. ),
  4208. 'biomaterial_id' => array(
  4209. // 'description' => 'TODO: please describe this field!',
  4210. 'type' => 'int',
  4211. 'not NULL' => '1',
  4212. ),
  4213. 'type_id' => array(
  4214. // 'description' => 'TODO: please describe this field!',
  4215. 'type' => 'int',
  4216. 'not NULL' => '1',
  4217. ),
  4218. 'protocol_id' => array(
  4219. // 'description' => 'TODO: please describe this field!',
  4220. 'type' => 'int',
  4221. 'not NULL' => '',
  4222. ),
  4223. 'name' => array(
  4224. // 'description' => 'TODO: please describe this field!',
  4225. 'type' => 'text',
  4226. 'not NULL' => '',
  4227. ),
  4228. ),
  4229. 'primary key' => array(
  4230. '0' => 'treatment_id',
  4231. ),
  4232. 'unique keys' => array(
  4233. ),
  4234. 'indexes' => array(
  4235. 'treatment_idx1' => array(
  4236. '0' => 'biomaterial_id',
  4237. ),
  4238. 'treatment_idx2' => array(
  4239. '0' => 'type_id',
  4240. ),
  4241. 'treatment_idx3' => array(
  4242. '0' => 'protocol_id',
  4243. ),
  4244. ),
  4245. 'foreign keys' => array(
  4246. ),
  4247. );
  4248. return $description;
  4249. }
  4250. /**
  4251. * Implements hook_tripal_obo_schema()
  4252. * Purpose: To describe the structure of tripal_obo to tripal
  4253. * @see tripal_core_chado_insert()
  4254. * @see tripal_core_chado_update()
  4255. * @see tripal_core_chado_select()
  4256. *
  4257. * @return
  4258. * An array describing the current table
  4259. *
  4260. * @ingroup tripal_schema_api
  4261. *
  4262. */
  4263. function tripal_core_chado_tripal_obo_schema() {
  4264. $description = array();
  4265. $description = array(
  4266. 'table' => 'tripal_obo',
  4267. // 'description' => 'TODO: please describe this table!',
  4268. 'fields' => array(
  4269. 'cv_id' => array(
  4270. // 'description' => 'TODO: please describe this field!',
  4271. 'type' => 'int',
  4272. 'unsigned' => '1',
  4273. 'not NULL' => '1',
  4274. 'default' => '0',
  4275. ),
  4276. 'file' => array(
  4277. // 'description' => 'TODO: please describe this field!',
  4278. 'type' => 'varchar',
  4279. 'length' => '1024',
  4280. 'not NULL' => '',
  4281. ),
  4282. 'url' => array(
  4283. // 'description' => 'TODO: please describe this field!',
  4284. 'type' => 'varchar',
  4285. 'length' => '1024',
  4286. 'not NULL' => '',
  4287. ),
  4288. ),
  4289. 'primary key' => array(
  4290. '0' => 'cv_id',
  4291. ),
  4292. 'unique keys' => array(
  4293. ),
  4294. 'indexes' => array(
  4295. 'cv_id' => array(
  4296. '0' => 'cv_id',
  4297. ),
  4298. ),
  4299. 'foreign keys' => array(
  4300. ),
  4301. );
  4302. return $description;
  4303. }
  4304. /**
  4305. * Implements hook_tripal_organism_views_common_name_schema()
  4306. * Purpose: To describe the structure of tripal_organism_views_common_name to tripal
  4307. * @see tripal_core_chado_insert()
  4308. * @see tripal_core_chado_update()
  4309. * @see tripal_core_chado_select()
  4310. *
  4311. * @return
  4312. * An array describing the current table
  4313. *
  4314. * @ingroup tripal_schema_api
  4315. *
  4316. */
  4317. function tripal_core_chado_tripal_organism_views_common_name_schema() {
  4318. $description = array();
  4319. $description = array(
  4320. 'table' => 'tripal_organism_views_common_name',
  4321. // 'description' => 'TODO: please describe this table!',
  4322. 'fields' => array(
  4323. 'nid' => array(
  4324. // 'description' => 'TODO: please describe this field!',
  4325. 'type' => 'int',
  4326. 'unsigned' => '1',
  4327. 'not NULL' => '1',
  4328. 'default' => '0',
  4329. ),
  4330. 'common_name' => array(
  4331. // 'description' => 'TODO: please describe this field!',
  4332. 'type' => 'varchar',
  4333. 'length' => '255',
  4334. 'not NULL' => '1',
  4335. 'default' => 'NA',
  4336. ),
  4337. ),
  4338. 'primary key' => array(
  4339. ),
  4340. 'unique keys' => array(
  4341. ),
  4342. 'indexes' => array(
  4343. ),
  4344. 'foreign keys' => array(
  4345. ),
  4346. );
  4347. return $description;
  4348. }
  4349. /**
  4350. * Implements hook_type_feature_count_schema()
  4351. * Purpose: To describe the structure of type_feature_count to tripal
  4352. * @see tripal_core_chado_insert()
  4353. * @see tripal_core_chado_update()
  4354. * @see tripal_core_chado_select()
  4355. *
  4356. * @return
  4357. * An array describing the current table
  4358. *
  4359. * @ingroup tripal_schema_api
  4360. *
  4361. */
  4362. function tripal_core_chado_type_feature_count_schema() {
  4363. $description = array();
  4364. $description = array(
  4365. 'table' => 'type_feature_count',
  4366. // 'description' => 'TODO: please describe this table!',
  4367. 'fields' => array(
  4368. 'type' => array(
  4369. // 'description' => 'TODO: please describe this field!',
  4370. 'type' => 'varchar',
  4371. 'length' => '1024',
  4372. 'not NULL' => '',
  4373. ),
  4374. 'num_features' => array(
  4375. // 'description' => 'TODO: please describe this field!',
  4376. 'type' => 'int',
  4377. 'size' => 'big',
  4378. 'not NULL' => '',
  4379. ),
  4380. ),
  4381. 'primary key' => array(
  4382. ),
  4383. 'unique keys' => array(
  4384. ),
  4385. 'indexes' => array(
  4386. ),
  4387. 'foreign keys' => array(
  4388. ),
  4389. );
  4390. return $description;
  4391. }
  4392. /**
  4393. * Implements hook_stockcollectionprop_schema()
  4394. * Purpose: To describe the structure of stockcollectionprop to tripal
  4395. * @see tripal_core_chado_insert()
  4396. * @see tripal_core_chado_update()
  4397. * @see 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_stockcollectionprop_schema() {
  4406. $description = array();
  4407. $description = array(
  4408. 'table' => 'stockcollectionprop',
  4409. // 'description' => 'TODO: please describe this table!',
  4410. 'fields' => array(
  4411. 'stockcollectionprop_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. 'type_id' => array(
  4422. // 'description' => 'TODO: please describe this field!',
  4423. 'type' => 'int',
  4424. 'not NULL' => '1',
  4425. ),
  4426. 'value' => array(
  4427. // 'description' => 'TODO: please describe this field!',
  4428. 'type' => 'text',
  4429. 'not NULL' => '',
  4430. ),
  4431. 'rank' => array(
  4432. // 'description' => 'TODO: please describe this field!',
  4433. 'type' => 'int',
  4434. 'not NULL' => '1',
  4435. 'default' => '0',
  4436. ),
  4437. ),
  4438. 'primary key' => array(
  4439. '0' => 'stockcollectionprop_id',
  4440. ),
  4441. 'unique keys' => array(
  4442. 'stockcollectionprop_c1' => array(
  4443. '0' => 'stockcollection_id',
  4444. '1' => 'type_id',
  4445. '2' => 'rank',
  4446. ),
  4447. ),
  4448. 'indexes' => array(
  4449. 'stockcollectionprop_idx1' => array(
  4450. '0' => 'stockcollection_id',
  4451. ),
  4452. 'stockcollectionprop_idx2' => array(
  4453. '0' => 'type_id',
  4454. ),
  4455. ),
  4456. 'foreign keys' => array(
  4457. ),
  4458. );
  4459. return $description;
  4460. }
  4461. /**
  4462. * Implements hook_stockcollection_stock_schema()
  4463. * Purpose: To describe the structure of stockcollection_stock to tripal
  4464. * @see tripal_core_chado_insert()
  4465. * @see tripal_core_chado_update()
  4466. * @see tripal_core_chado_select()
  4467. *
  4468. * @return
  4469. * An array describing the current table
  4470. *
  4471. * @ingroup tripal_schema_api
  4472. *
  4473. */
  4474. function tripal_core_chado_stockcollection_stock_schema() {
  4475. $description = array();
  4476. $description = array(
  4477. 'table' => 'stockcollection_stock',
  4478. // 'description' => 'TODO: please describe this table!',
  4479. 'fields' => array(
  4480. 'stockcollection_stock_id' => array(
  4481. // 'description' => 'TODO: please describe this field!',
  4482. 'type' => 'serial',
  4483. 'not NULL' => '1',
  4484. ),
  4485. 'stockcollection_id' => array(
  4486. // 'description' => 'TODO: please describe this field!',
  4487. 'type' => 'int',
  4488. 'not NULL' => '1',
  4489. ),
  4490. 'stock_id' => array(
  4491. // 'description' => 'TODO: please describe this field!',
  4492. 'type' => 'int',
  4493. 'not NULL' => '1',
  4494. ),
  4495. ),
  4496. 'primary key' => array(
  4497. '0' => 'stockcollection_stock_id',
  4498. ),
  4499. 'unique keys' => array(
  4500. 'stockcollection_stock_c1' => array(
  4501. '0' => 'stockcollection_id',
  4502. '1' => 'stock_id',
  4503. ),
  4504. ),
  4505. 'indexes' => array(
  4506. 'stockcollection_stock_idx1' => array(
  4507. '0' => 'stockcollection_id',
  4508. ),
  4509. 'stockcollection_stock_idx2' => array(
  4510. '0' => 'stock_id',
  4511. ),
  4512. ),
  4513. 'foreign keys' => array(
  4514. ),
  4515. );
  4516. return $description;
  4517. }
  4518. /**
  4519. * Implements hook_public_feature_schema()
  4520. * Purpose: To describe the structure of public_feature to tripal
  4521. * @see tripal_core_chado_insert()
  4522. * @see tripal_core_chado_update()
  4523. * @see tripal_core_chado_select()
  4524. *
  4525. * @return
  4526. * An array describing the current table
  4527. *
  4528. * @ingroup tripal_schema_api
  4529. *
  4530. */
  4531. function tripal_core_chado_public_feature_schema() {
  4532. $description = array();
  4533. $description = array(
  4534. 'table' => 'public_feature',
  4535. // 'description' => 'TODO: please describe this table!',
  4536. 'fields' => array(
  4537. 'vid' => array(
  4538. // 'description' => 'TODO: please describe this field!',
  4539. 'type' => 'int',
  4540. 'unsigned' => '1',
  4541. 'not NULL' => '1',
  4542. 'default' => '0',
  4543. ),
  4544. 'nid' => array(
  4545. // 'description' => 'TODO: please describe this field!',
  4546. 'type' => 'int',
  4547. 'unsigned' => '1',
  4548. 'not NULL' => '1',
  4549. 'default' => '0',
  4550. ),
  4551. 'feature_id' => array(
  4552. // 'description' => 'TODO: please describe this field!',
  4553. 'type' => 'int',
  4554. 'not NULL' => '1',
  4555. 'default' => '0',
  4556. ),
  4557. 'sync_date' => array(
  4558. // 'description' => 'TODO: please describe this field!',
  4559. 'type' => 'int',
  4560. 'not NULL' => '',
  4561. ),
  4562. ),
  4563. 'primary key' => array(
  4564. '0' => 'nid',
  4565. ),
  4566. 'unique keys' => array(
  4567. 'nid_vid' => array(
  4568. '0' => 'nid',
  4569. '1' => 'vid',
  4570. ),
  4571. 'vid' => array(
  4572. '0' => 'vid',
  4573. ),
  4574. ),
  4575. 'indexes' => array(
  4576. 'feature_id' => array(
  4577. '0' => 'feature_id',
  4578. ),
  4579. ),
  4580. 'foreign keys' => array(
  4581. ),
  4582. );
  4583. return $description;
  4584. }
  4585. /**
  4586. * Implements hook_public_library_schema()
  4587. * Purpose: To describe the structure of public_library to tripal
  4588. * @see tripal_core_chado_insert()
  4589. * @see tripal_core_chado_update()
  4590. * @see tripal_core_chado_select()
  4591. *
  4592. * @return
  4593. * An array describing the current table
  4594. *
  4595. * @ingroup tripal_schema_api
  4596. *
  4597. */
  4598. function tripal_core_chado_public_library_schema() {
  4599. $description = array();
  4600. $description = array(
  4601. 'table' => 'public_library',
  4602. // 'description' => 'TODO: please describe this table!',
  4603. 'fields' => array(
  4604. 'vid' => array(
  4605. // 'description' => 'TODO: please describe this field!',
  4606. 'type' => 'int',
  4607. 'unsigned' => '1',
  4608. 'not NULL' => '1',
  4609. 'default' => '0',
  4610. ),
  4611. 'nid' => array(
  4612. // 'description' => 'TODO: please describe this field!',
  4613. 'type' => 'int',
  4614. 'unsigned' => '1',
  4615. 'not NULL' => '1',
  4616. 'default' => '0',
  4617. ),
  4618. 'library_id' => array(
  4619. // 'description' => 'TODO: please describe this field!',
  4620. 'type' => 'int',
  4621. 'not NULL' => '1',
  4622. 'default' => '0',
  4623. ),
  4624. ),
  4625. 'primary key' => array(
  4626. '0' => 'nid',
  4627. ),
  4628. 'unique keys' => array(
  4629. 'nid_vid' => array(
  4630. '0' => 'nid',
  4631. '1' => 'vid',
  4632. ),
  4633. 'vid' => array(
  4634. '0' => 'vid',
  4635. ),
  4636. ),
  4637. 'indexes' => array(
  4638. 'library_id' => array(
  4639. '0' => 'library_id',
  4640. ),
  4641. ),
  4642. 'foreign keys' => array(
  4643. ),
  4644. );
  4645. return $description;
  4646. }
  4647. /**
  4648. * Implements hook_public_organism_schema()
  4649. * Purpose: To describe the structure of public_organism to tripal
  4650. * @see tripal_core_chado_insert()
  4651. * @see tripal_core_chado_update()
  4652. * @see tripal_core_chado_select()
  4653. *
  4654. * @return
  4655. * An array describing the current table
  4656. *
  4657. * @ingroup tripal_schema_api
  4658. *
  4659. */
  4660. function tripal_core_chado_public_organism_schema() {
  4661. $description = array();
  4662. $description = array(
  4663. 'table' => 'public_organism',
  4664. // 'description' => 'TODO: please describe this table!',
  4665. 'fields' => array(
  4666. 'vid' => array(
  4667. // 'description' => 'TODO: please describe this field!',
  4668. 'type' => 'int',
  4669. 'unsigned' => '1',
  4670. 'not NULL' => '1',
  4671. 'default' => '0',
  4672. ),
  4673. 'nid' => array(
  4674. // 'description' => 'TODO: please describe this field!',
  4675. 'type' => 'int',
  4676. 'unsigned' => '1',
  4677. 'not NULL' => '1',
  4678. 'default' => '0',
  4679. ),
  4680. 'organism_id' => array(
  4681. // 'description' => 'TODO: please describe this field!',
  4682. 'type' => 'int',
  4683. 'not NULL' => '1',
  4684. 'default' => '0',
  4685. ),
  4686. ),
  4687. 'primary key' => array(
  4688. '0' => 'nid',
  4689. ),
  4690. 'unique keys' => array(
  4691. 'nid_vid' => array(
  4692. '0' => 'nid',
  4693. '1' => 'vid',
  4694. ),
  4695. 'vid' => array(
  4696. '0' => 'vid',
  4697. ),
  4698. ),
  4699. 'indexes' => array(
  4700. 'organism_id' => array(
  4701. '0' => 'organism_id',
  4702. ),
  4703. ),
  4704. 'foreign keys' => array(
  4705. ),
  4706. );
  4707. return $description;
  4708. }
  4709. /**
  4710. * Implements hook_pubprop_schema()
  4711. * Purpose: To describe the structure of pubprop to tripal
  4712. * @see tripal_core_chado_insert()
  4713. * @see tripal_core_chado_update()
  4714. * @see tripal_core_chado_select()
  4715. *
  4716. * @return
  4717. * An array describing the current table
  4718. *
  4719. * @ingroup tripal_schema_api
  4720. *
  4721. */
  4722. function tripal_core_chado_pubprop_schema() {
  4723. $description = array();
  4724. $description = array(
  4725. 'table' => 'pubprop',
  4726. // 'description' => 'TODO: please describe this table!',
  4727. 'fields' => array(
  4728. 'pubprop_id' => array(
  4729. // 'description' => 'TODO: please describe this field!',
  4730. 'type' => 'serial',
  4731. 'not NULL' => '1',
  4732. ),
  4733. 'pub_id' => array(
  4734. // 'description' => 'TODO: please describe this field!',
  4735. 'type' => 'int',
  4736. 'not NULL' => '1',
  4737. ),
  4738. 'type_id' => array(
  4739. // 'description' => 'TODO: please describe this field!',
  4740. 'type' => 'int',
  4741. 'not NULL' => '1',
  4742. ),
  4743. 'value' => array(
  4744. // 'description' => 'TODO: please describe this field!',
  4745. 'type' => 'text',
  4746. 'not NULL' => '1',
  4747. ),
  4748. 'rank' => array(
  4749. // 'description' => 'TODO: please describe this field!',
  4750. 'type' => 'int',
  4751. 'not NULL' => '',
  4752. ),
  4753. ),
  4754. 'primary key' => array(
  4755. '0' => 'pubprop_id',
  4756. ),
  4757. 'unique keys' => array(
  4758. 'pubprop_c1' => array(
  4759. '0' => 'pub_id',
  4760. '1' => 'type_id',
  4761. '2' => 'rank',
  4762. ),
  4763. ),
  4764. 'indexes' => array(
  4765. 'pubprop_idx1' => array(
  4766. '0' => 'pub_id',
  4767. ),
  4768. 'pubprop_idx2' => array(
  4769. '0' => 'type_id',
  4770. ),
  4771. ),
  4772. 'foreign keys' => array(
  4773. ),
  4774. );
  4775. return $description;
  4776. }
  4777. /**
  4778. * Implements hook_pubauthor_schema()
  4779. * Purpose: To describe the structure of pubauthor to tripal
  4780. * @see tripal_core_chado_insert()
  4781. * @see tripal_core_chado_update()
  4782. * @see tripal_core_chado_select()
  4783. *
  4784. * @return
  4785. * An array describing the current table
  4786. *
  4787. * @ingroup tripal_schema_api
  4788. *
  4789. */
  4790. function tripal_core_chado_pubauthor_schema() {
  4791. $description = array();
  4792. $description = array(
  4793. 'table' => 'pubauthor',
  4794. // 'description' => 'TODO: please describe this table!',
  4795. 'fields' => array(
  4796. 'pubauthor_id' => array(
  4797. // 'description' => 'TODO: please describe this field!',
  4798. 'type' => 'serial',
  4799. 'not NULL' => '1',
  4800. ),
  4801. 'pub_id' => array(
  4802. // 'description' => 'TODO: please describe this field!',
  4803. 'type' => 'int',
  4804. 'not NULL' => '1',
  4805. ),
  4806. 'rank' => array(
  4807. // 'description' => 'TODO: please describe this field!',
  4808. 'type' => 'int',
  4809. 'not NULL' => '1',
  4810. ),
  4811. 'editor' => array(
  4812. // 'description' => 'TODO: please describe this field!',
  4813. 'type' => 'boolean',
  4814. 'not NULL' => '',
  4815. 'default' => 'als',
  4816. ),
  4817. 'surname' => array(
  4818. // 'description' => 'TODO: please describe this field!',
  4819. 'type' => 'varchar',
  4820. 'length' => '100',
  4821. 'not NULL' => '1',
  4822. ),
  4823. 'givennames' => array(
  4824. // 'description' => 'TODO: please describe this field!',
  4825. 'type' => 'varchar',
  4826. 'length' => '100',
  4827. 'not NULL' => '',
  4828. ),
  4829. 'suffix' => array(
  4830. // 'description' => 'TODO: please describe this field!',
  4831. 'type' => 'varchar',
  4832. 'length' => '100',
  4833. 'not NULL' => '',
  4834. ),
  4835. ),
  4836. 'primary key' => array(
  4837. '0' => 'pubauthor_id',
  4838. ),
  4839. 'unique keys' => array(
  4840. 'pubauthor_c1' => array(
  4841. '0' => 'pub_id',
  4842. '1' => 'rank',
  4843. ),
  4844. ),
  4845. 'indexes' => array(
  4846. 'pubauthor_idx2' => array(
  4847. '0' => 'pub_id',
  4848. ),
  4849. ),
  4850. 'foreign keys' => array(
  4851. ),
  4852. );
  4853. return $description;
  4854. }
  4855. /**
  4856. * Implements hook_pub_relationship_schema()
  4857. * Purpose: To describe the structure of pub_relationship to tripal
  4858. * @see tripal_core_chado_insert()
  4859. * @see tripal_core_chado_update()
  4860. * @see tripal_core_chado_select()
  4861. *
  4862. * @return
  4863. * An array describing the current table
  4864. *
  4865. * @ingroup tripal_schema_api
  4866. *
  4867. */
  4868. function tripal_core_chado_pub_relationship_schema() {
  4869. $description = array();
  4870. $description = array(
  4871. 'table' => 'pub_relationship',
  4872. // 'description' => 'TODO: please describe this table!',
  4873. 'fields' => array(
  4874. 'pub_relationship_id' => array(
  4875. // 'description' => 'TODO: please describe this field!',
  4876. 'type' => 'serial',
  4877. 'not NULL' => '1',
  4878. ),
  4879. 'subject_id' => array(
  4880. // 'description' => 'TODO: please describe this field!',
  4881. 'type' => 'int',
  4882. 'not NULL' => '1',
  4883. ),
  4884. 'object_id' => array(
  4885. // 'description' => 'TODO: please describe this field!',
  4886. 'type' => 'int',
  4887. 'not NULL' => '1',
  4888. ),
  4889. 'type_id' => array(
  4890. // 'description' => 'TODO: please describe this field!',
  4891. 'type' => 'int',
  4892. 'not NULL' => '1',
  4893. ),
  4894. ),
  4895. 'primary key' => array(
  4896. '0' => 'pub_relationship_id',
  4897. ),
  4898. 'unique keys' => array(
  4899. 'pub_relationship_c1' => array(
  4900. '0' => 'subject_id',
  4901. '1' => 'object_id',
  4902. '2' => 'type_id',
  4903. ),
  4904. ),
  4905. 'indexes' => array(
  4906. 'pub_relationship_idx1' => array(
  4907. '0' => 'subject_id',
  4908. ),
  4909. 'pub_relationship_idx2' => array(
  4910. '0' => 'object_id',
  4911. ),
  4912. 'pub_relationship_idx3' => array(
  4913. '0' => 'type_id',
  4914. ),
  4915. ),
  4916. 'foreign keys' => array(
  4917. ),
  4918. );
  4919. return $description;
  4920. }
  4921. /**
  4922. * Implements hook_protocol_schema()
  4923. * Purpose: To describe the structure of protocol to tripal
  4924. * @see tripal_core_chado_insert()
  4925. * @see tripal_core_chado_update()
  4926. * @see tripal_core_chado_select()
  4927. *
  4928. * @return
  4929. * An array describing the current table
  4930. *
  4931. * @ingroup tripal_schema_api
  4932. *
  4933. */
  4934. function tripal_core_chado_protocol_schema() {
  4935. $description = array();
  4936. $description = array(
  4937. 'table' => 'protocol',
  4938. // 'description' => 'TODO: please describe this table!',
  4939. 'fields' => array(
  4940. 'protocol_id' => array(
  4941. // 'description' => 'TODO: please describe this field!',
  4942. 'type' => 'serial',
  4943. 'not NULL' => '1',
  4944. ),
  4945. 'type_id' => array(
  4946. // 'description' => 'TODO: please describe this field!',
  4947. 'type' => 'int',
  4948. 'not NULL' => '1',
  4949. ),
  4950. 'pub_id' => array(
  4951. // 'description' => 'TODO: please describe this field!',
  4952. 'type' => 'int',
  4953. 'not NULL' => '',
  4954. ),
  4955. 'dbxref_id' => array(
  4956. // 'description' => 'TODO: please describe this field!',
  4957. 'type' => 'int',
  4958. 'not NULL' => '',
  4959. ),
  4960. 'name' => array(
  4961. // 'description' => 'TODO: please describe this field!',
  4962. 'type' => 'text',
  4963. 'not NULL' => '1',
  4964. ),
  4965. 'uri' => array(
  4966. // 'description' => 'TODO: please describe this field!',
  4967. 'type' => 'text',
  4968. 'not NULL' => '',
  4969. ),
  4970. 'protocoldescription' => array(
  4971. // 'description' => 'TODO: please describe this field!',
  4972. 'type' => 'text',
  4973. 'not NULL' => '',
  4974. ),
  4975. 'hardwaredescription' => array(
  4976. // 'description' => 'TODO: please describe this field!',
  4977. 'type' => 'text',
  4978. 'not NULL' => '',
  4979. ),
  4980. 'softwaredescription' => array(
  4981. // 'description' => 'TODO: please describe this field!',
  4982. 'type' => 'text',
  4983. 'not NULL' => '',
  4984. ),
  4985. ),
  4986. 'primary key' => array(
  4987. '0' => 'protocol_id',
  4988. ),
  4989. 'unique keys' => array(
  4990. 'protocol_c1' => array(
  4991. '0' => 'name',
  4992. ),
  4993. ),
  4994. 'indexes' => array(
  4995. 'protocol_idx1' => array(
  4996. '0' => 'type_id',
  4997. ),
  4998. 'protocol_idx2' => array(
  4999. '0' => 'pub_id',
  5000. ),
  5001. 'protocol_idx3' => array(
  5002. '0' => 'dbxref_id',
  5003. ),
  5004. ),
  5005. 'foreign keys' => array(
  5006. ),
  5007. );
  5008. return $description;
  5009. }
  5010. /**
  5011. * Implements hook_protocolparam_schema()
  5012. * Purpose: To describe the structure of protocolparam to tripal
  5013. * @see tripal_core_chado_insert()
  5014. * @see tripal_core_chado_update()
  5015. * @see tripal_core_chado_select()
  5016. *
  5017. * @return
  5018. * An array describing the current table
  5019. *
  5020. * @ingroup tripal_schema_api
  5021. *
  5022. */
  5023. function tripal_core_chado_protocolparam_schema() {
  5024. $description = array();
  5025. $description = array(
  5026. 'table' => 'protocolparam',
  5027. // 'description' => 'TODO: please describe this table!',
  5028. 'fields' => array(
  5029. 'protocolparam_id' => array(
  5030. // 'description' => 'TODO: please describe this field!',
  5031. 'type' => 'serial',
  5032. 'not NULL' => '1',
  5033. ),
  5034. 'protocol_id' => array(
  5035. // 'description' => 'TODO: please describe this field!',
  5036. 'type' => 'int',
  5037. 'not NULL' => '1',
  5038. ),
  5039. 'name' => array(
  5040. // 'description' => 'TODO: please describe this field!',
  5041. 'type' => 'text',
  5042. 'not NULL' => '1',
  5043. ),
  5044. 'datatype_id' => array(
  5045. // 'description' => 'TODO: please describe this field!',
  5046. 'type' => 'int',
  5047. 'not NULL' => '',
  5048. ),
  5049. 'unittype_id' => array(
  5050. // 'description' => 'TODO: please describe this field!',
  5051. 'type' => 'int',
  5052. 'not NULL' => '',
  5053. ),
  5054. 'value' => array(
  5055. // 'description' => 'TODO: please describe this field!',
  5056. 'type' => 'text',
  5057. 'not NULL' => '',
  5058. ),
  5059. 'rank' => array(
  5060. // 'description' => 'TODO: please describe this field!',
  5061. 'type' => 'int',
  5062. 'not NULL' => '1',
  5063. 'default' => '0',
  5064. ),
  5065. ),
  5066. 'primary key' => array(
  5067. '0' => 'protocolparam_id',
  5068. ),
  5069. 'unique keys' => array(
  5070. ),
  5071. 'indexes' => array(
  5072. 'protocolparam_idx1' => array(
  5073. '0' => 'protocol_id',
  5074. ),
  5075. 'protocolparam_idx2' => array(
  5076. '0' => 'datatype_id',
  5077. ),
  5078. 'protocolparam_idx3' => array(
  5079. '0' => 'unittype_id',
  5080. ),
  5081. ),
  5082. 'foreign keys' => array(
  5083. ),
  5084. );
  5085. return $description;
  5086. }
  5087. /**
  5088. * Implements hook_pub_schema()
  5089. * Purpose: To describe the structure of pub to tripal
  5090. * @see tripal_core_chado_insert()
  5091. * @see tripal_core_chado_update()
  5092. * @see tripal_core_chado_select()
  5093. *
  5094. * @return
  5095. * An array describing the current table
  5096. *
  5097. * @ingroup tripal_schema_api
  5098. *
  5099. */
  5100. function tripal_core_chado_pub_schema() {
  5101. $description = array();
  5102. $description = array(
  5103. 'table' => 'pub',
  5104. // 'description' => 'TODO: please describe this table!',
  5105. 'fields' => array(
  5106. 'pub_id' => array(
  5107. // 'description' => 'TODO: please describe this field!',
  5108. 'type' => 'serial',
  5109. 'not NULL' => '1',
  5110. ),
  5111. 'title' => array(
  5112. // 'description' => 'TODO: please describe this field!',
  5113. 'type' => 'text',
  5114. 'not NULL' => '',
  5115. ),
  5116. 'volumetitle' => array(
  5117. // 'description' => 'TODO: please describe this field!',
  5118. 'type' => 'text',
  5119. 'not NULL' => '',
  5120. ),
  5121. 'volume' => array(
  5122. // 'description' => 'TODO: please describe this field!',
  5123. 'type' => 'varchar',
  5124. 'length' => '255',
  5125. 'not NULL' => '',
  5126. ),
  5127. 'series_name' => array(
  5128. // 'description' => 'TODO: please describe this field!',
  5129. 'type' => 'varchar',
  5130. 'length' => '255',
  5131. 'not NULL' => '',
  5132. ),
  5133. 'issue' => array(
  5134. // 'description' => 'TODO: please describe this field!',
  5135. 'type' => 'varchar',
  5136. 'length' => '255',
  5137. 'not NULL' => '',
  5138. ),
  5139. 'pyear' => array(
  5140. // 'description' => 'TODO: please describe this field!',
  5141. 'type' => 'varchar',
  5142. 'length' => '255',
  5143. 'not NULL' => '',
  5144. ),
  5145. 'pages' => array(
  5146. // 'description' => 'TODO: please describe this field!',
  5147. 'type' => 'varchar',
  5148. 'length' => '255',
  5149. 'not NULL' => '',
  5150. ),
  5151. 'miniref' => array(
  5152. // 'description' => 'TODO: please describe this field!',
  5153. 'type' => 'varchar',
  5154. 'length' => '255',
  5155. 'not NULL' => '',
  5156. ),
  5157. 'uniquename' => array(
  5158. // 'description' => 'TODO: please describe this field!',
  5159. 'type' => 'text',
  5160. 'not NULL' => '1',
  5161. ),
  5162. 'type_id' => array(
  5163. // 'description' => 'TODO: please describe this field!',
  5164. 'type' => 'int',
  5165. 'not NULL' => '1',
  5166. ),
  5167. 'is_obsolete' => array(
  5168. // 'description' => 'TODO: please describe this field!',
  5169. 'type' => 'boolean',
  5170. 'not NULL' => '',
  5171. 'default' => 'als',
  5172. ),
  5173. 'publisher' => array(
  5174. // 'description' => 'TODO: please describe this field!',
  5175. 'type' => 'varchar',
  5176. 'length' => '255',
  5177. 'not NULL' => '',
  5178. ),
  5179. 'pubplace' => array(
  5180. // 'description' => 'TODO: please describe this field!',
  5181. 'type' => 'varchar',
  5182. 'length' => '255',
  5183. 'not NULL' => '',
  5184. ),
  5185. ),
  5186. 'primary key' => array(
  5187. '0' => 'pub_id',
  5188. ),
  5189. 'unique keys' => array(
  5190. 'pub_c1' => array(
  5191. '0' => 'uniquename',
  5192. ),
  5193. ),
  5194. 'indexes' => array(
  5195. 'pub_idx1' => array(
  5196. '0' => 'type_id',
  5197. ),
  5198. ),
  5199. 'foreign keys' => array(
  5200. ),
  5201. );
  5202. return $description;
  5203. }
  5204. /**
  5205. * Implements hook_pub_dbxref_schema()
  5206. * Purpose: To describe the structure of pub_dbxref to tripal
  5207. * @see tripal_core_chado_insert()
  5208. * @see tripal_core_chado_update()
  5209. * @see tripal_core_chado_select()
  5210. *
  5211. * @return
  5212. * An array describing the current table
  5213. *
  5214. * @ingroup tripal_schema_api
  5215. *
  5216. */
  5217. function tripal_core_chado_pub_dbxref_schema() {
  5218. $description = array();
  5219. $description = array(
  5220. 'table' => 'pub_dbxref',
  5221. // 'description' => 'TODO: please describe this table!',
  5222. 'fields' => array(
  5223. 'pub_dbxref_id' => array(
  5224. // 'description' => 'TODO: please describe this field!',
  5225. 'type' => 'serial',
  5226. 'not NULL' => '1',
  5227. ),
  5228. 'pub_id' => array(
  5229. // 'description' => 'TODO: please describe this field!',
  5230. 'type' => 'int',
  5231. 'not NULL' => '1',
  5232. ),
  5233. 'dbxref_id' => array(
  5234. // 'description' => 'TODO: please describe this field!',
  5235. 'type' => 'int',
  5236. 'not NULL' => '1',
  5237. ),
  5238. 'is_current' => array(
  5239. // 'description' => 'TODO: please describe this field!',
  5240. 'type' => 'boolean',
  5241. 'not NULL' => '1',
  5242. 'default' => 'ru',
  5243. ),
  5244. ),
  5245. 'primary key' => array(
  5246. '0' => 'pub_dbxref_id',
  5247. ),
  5248. 'unique keys' => array(
  5249. 'pub_dbxref_c1' => array(
  5250. '0' => 'pub_id',
  5251. '1' => 'dbxref_id',
  5252. ),
  5253. ),
  5254. 'indexes' => array(
  5255. 'pub_dbxref_idx1' => array(
  5256. '0' => 'pub_id',
  5257. ),
  5258. 'pub_dbxref_idx2' => array(
  5259. '0' => 'dbxref_id',
  5260. ),
  5261. ),
  5262. 'foreign keys' => array(
  5263. ),
  5264. );
  5265. return $description;
  5266. }
  5267. /**
  5268. * Implements hook_quantification_schema()
  5269. * Purpose: To describe the structure of quantification to tripal
  5270. * @see tripal_core_chado_insert()
  5271. * @see tripal_core_chado_update()
  5272. * @see tripal_core_chado_select()
  5273. *
  5274. * @return
  5275. * An array describing the current table
  5276. *
  5277. * @ingroup tripal_schema_api
  5278. *
  5279. */
  5280. function tripal_core_chado_quantification_schema() {
  5281. $description = array();
  5282. $description = array(
  5283. 'table' => 'quantification',
  5284. // 'description' => 'TODO: please describe this table!',
  5285. 'fields' => array(
  5286. 'quantification_id' => array(
  5287. // 'description' => 'TODO: please describe this field!',
  5288. 'type' => 'serial',
  5289. 'not NULL' => '1',
  5290. ),
  5291. 'acquisition_id' => array(
  5292. // 'description' => 'TODO: please describe this field!',
  5293. 'type' => 'int',
  5294. 'not NULL' => '1',
  5295. ),
  5296. 'operator_id' => array(
  5297. // 'description' => 'TODO: please describe this field!',
  5298. 'type' => 'int',
  5299. 'not NULL' => '',
  5300. ),
  5301. 'protocol_id' => array(
  5302. // 'description' => 'TODO: please describe this field!',
  5303. 'type' => 'int',
  5304. 'not NULL' => '',
  5305. ),
  5306. 'analysis_id' => array(
  5307. // 'description' => 'TODO: please describe this field!',
  5308. 'type' => 'int',
  5309. 'not NULL' => '1',
  5310. ),
  5311. 'quantificationdate' => array(
  5312. // 'description' => 'TODO: please describe this field!',
  5313. 'type' => 'datetime',
  5314. 'not NULL' => '',
  5315. 'default' => 'ow(',
  5316. ),
  5317. 'name' => array(
  5318. // 'description' => 'TODO: please describe this field!',
  5319. 'type' => 'text',
  5320. 'not NULL' => '',
  5321. ),
  5322. 'uri' => array(
  5323. // 'description' => 'TODO: please describe this field!',
  5324. 'type' => 'text',
  5325. 'not NULL' => '',
  5326. ),
  5327. ),
  5328. 'primary key' => array(
  5329. '0' => 'quantification_id',
  5330. ),
  5331. 'unique keys' => array(
  5332. 'quantification_c1' => array(
  5333. '0' => 'name',
  5334. '1' => 'analysis_id',
  5335. ),
  5336. ),
  5337. 'indexes' => array(
  5338. 'quantification_idx1' => array(
  5339. '0' => 'acquisition_id',
  5340. ),
  5341. 'quantification_idx2' => array(
  5342. '0' => 'operator_id',
  5343. ),
  5344. 'quantification_idx3' => array(
  5345. '0' => 'protocol_id',
  5346. ),
  5347. 'quantification_idx4' => array(
  5348. '0' => 'analysis_id',
  5349. ),
  5350. ),
  5351. 'foreign keys' => array(
  5352. ),
  5353. );
  5354. return $description;
  5355. }
  5356. /**
  5357. * Implements hook_quantification_relationship_schema()
  5358. * Purpose: To describe the structure of quantification_relationship to tripal
  5359. * @see tripal_core_chado_insert()
  5360. * @see tripal_core_chado_update()
  5361. * @see tripal_core_chado_select()
  5362. *
  5363. * @return
  5364. * An array describing the current table
  5365. *
  5366. * @ingroup tripal_schema_api
  5367. *
  5368. */
  5369. function tripal_core_chado_quantification_relationship_schema() {
  5370. $description = array();
  5371. $description = array(
  5372. 'table' => 'quantification_relationship',
  5373. // 'description' => 'TODO: please describe this table!',
  5374. 'fields' => array(
  5375. 'quantification_relationship_id' => array(
  5376. // 'description' => 'TODO: please describe this field!',
  5377. 'type' => 'serial',
  5378. 'not NULL' => '1',
  5379. ),
  5380. 'subject_id' => array(
  5381. // 'description' => 'TODO: please describe this field!',
  5382. 'type' => 'int',
  5383. 'not NULL' => '1',
  5384. ),
  5385. 'type_id' => array(
  5386. // 'description' => 'TODO: please describe this field!',
  5387. 'type' => 'int',
  5388. 'not NULL' => '1',
  5389. ),
  5390. 'object_id' => array(
  5391. // 'description' => 'TODO: please describe this field!',
  5392. 'type' => 'int',
  5393. 'not NULL' => '1',
  5394. ),
  5395. ),
  5396. 'primary key' => array(
  5397. '0' => 'quantification_relationship_id',
  5398. ),
  5399. 'unique keys' => array(
  5400. 'quantification_relationship_c1' => array(
  5401. '0' => 'subject_id',
  5402. '1' => 'object_id',
  5403. '2' => 'type_id',
  5404. ),
  5405. ),
  5406. 'indexes' => array(
  5407. 'quantification_relationship_idx1' => array(
  5408. '0' => 'subject_id',
  5409. ),
  5410. 'quantification_relationship_idx2' => array(
  5411. '0' => 'type_id',
  5412. ),
  5413. 'quantification_relationship_idx3' => array(
  5414. '0' => 'object_id',
  5415. ),
  5416. ),
  5417. 'foreign keys' => array(
  5418. ),
  5419. );
  5420. return $description;
  5421. }
  5422. /**
  5423. * Implements hook_stock_pub_schema()
  5424. * Purpose: To describe the structure of stock_pub to tripal
  5425. * @see tripal_core_chado_insert()
  5426. * @see tripal_core_chado_update()
  5427. * @see tripal_core_chado_select()
  5428. *
  5429. * @return
  5430. * An array describing the current table
  5431. *
  5432. * @ingroup tripal_schema_api
  5433. *
  5434. */
  5435. function tripal_core_chado_stock_pub_schema() {
  5436. $description = array();
  5437. $description = array(
  5438. 'table' => 'stock_pub',
  5439. // 'description' => 'TODO: please describe this table!',
  5440. 'fields' => array(
  5441. 'stock_pub_id' => array(
  5442. // 'description' => 'TODO: please describe this field!',
  5443. 'type' => 'serial',
  5444. 'not NULL' => '1',
  5445. ),
  5446. 'stock_id' => array(
  5447. // 'description' => 'TODO: please describe this field!',
  5448. 'type' => 'int',
  5449. 'not NULL' => '1',
  5450. ),
  5451. 'pub_id' => array(
  5452. // 'description' => 'TODO: please describe this field!',
  5453. 'type' => 'int',
  5454. 'not NULL' => '1',
  5455. ),
  5456. ),
  5457. 'primary key' => array(
  5458. '0' => 'stock_pub_id',
  5459. ),
  5460. 'unique keys' => array(
  5461. 'stock_pub_c1' => array(
  5462. '0' => 'stock_id',
  5463. '1' => 'pub_id',
  5464. ),
  5465. ),
  5466. 'indexes' => array(
  5467. 'stock_pub_idx1' => array(
  5468. '0' => 'stock_id',
  5469. ),
  5470. 'stock_pub_idx2' => array(
  5471. '0' => 'pub_id',
  5472. ),
  5473. ),
  5474. 'foreign keys' => array(
  5475. ),
  5476. );
  5477. return $description;
  5478. }
  5479. /**
  5480. * Implements hook_stock_relationship_schema()
  5481. * Purpose: To describe the structure of stock_relationship to tripal
  5482. * @see tripal_core_chado_insert()
  5483. * @see tripal_core_chado_update()
  5484. * @see tripal_core_chado_select()
  5485. *
  5486. * @return
  5487. * An array describing the current table
  5488. *
  5489. * @ingroup tripal_schema_api
  5490. *
  5491. */
  5492. function tripal_core_chado_stock_relationship_schema() {
  5493. $description = array();
  5494. $description = array(
  5495. 'table' => 'stock_relationship',
  5496. // 'description' => 'TODO: please describe this table!',
  5497. 'fields' => array(
  5498. 'stock_relationship_id' => array(
  5499. // 'description' => 'TODO: please describe this field!',
  5500. 'type' => 'serial',
  5501. 'not NULL' => '1',
  5502. ),
  5503. 'subject_id' => array(
  5504. // 'description' => 'TODO: please describe this field!',
  5505. 'type' => 'int',
  5506. 'not NULL' => '1',
  5507. ),
  5508. 'object_id' => array(
  5509. // 'description' => 'TODO: please describe this field!',
  5510. 'type' => 'int',
  5511. 'not NULL' => '1',
  5512. ),
  5513. 'type_id' => array(
  5514. // 'description' => 'TODO: please describe this field!',
  5515. 'type' => 'int',
  5516. 'not NULL' => '1',
  5517. ),
  5518. 'value' => array(
  5519. // 'description' => 'TODO: please describe this field!',
  5520. 'type' => 'text',
  5521. 'not NULL' => '',
  5522. ),
  5523. 'rank' => array(
  5524. // 'description' => 'TODO: please describe this field!',
  5525. 'type' => 'int',
  5526. 'not NULL' => '1',
  5527. 'default' => '0',
  5528. ),
  5529. ),
  5530. 'primary key' => array(
  5531. '0' => 'stock_relationship_id',
  5532. ),
  5533. 'unique keys' => array(
  5534. 'stock_relationship_c1' => array(
  5535. '0' => 'subject_id',
  5536. '1' => 'object_id',
  5537. '2' => 'type_id',
  5538. '3' => 'rank',
  5539. ),
  5540. ),
  5541. 'indexes' => array(
  5542. 'stock_relationship_idx1' => array(
  5543. '0' => 'subject_id',
  5544. ),
  5545. 'stock_relationship_idx2' => array(
  5546. '0' => 'object_id',
  5547. ),
  5548. 'stock_relationship_idx3' => array(
  5549. '0' => 'type_id',
  5550. ),
  5551. ),
  5552. 'foreign keys' => array(
  5553. ),
  5554. );
  5555. return $description;
  5556. }
  5557. /**
  5558. * Implements hook_stock_relationship_pub_schema()
  5559. * Purpose: To describe the structure of stock_relationship_pub to tripal
  5560. * @see tripal_core_chado_insert()
  5561. * @see tripal_core_chado_update()
  5562. * @see tripal_core_chado_select()
  5563. *
  5564. * @return
  5565. * An array describing the current table
  5566. *
  5567. * @ingroup tripal_schema_api
  5568. *
  5569. */
  5570. function tripal_core_chado_stock_relationship_pub_schema() {
  5571. $description = array();
  5572. $description = array(
  5573. 'table' => 'stock_relationship_pub',
  5574. // 'description' => 'TODO: please describe this table!',
  5575. 'fields' => array(
  5576. 'stock_relationship_pub_id' => array(
  5577. // 'description' => 'TODO: please describe this field!',
  5578. 'type' => 'serial',
  5579. 'not NULL' => '1',
  5580. ),
  5581. 'stock_relationship_id' => array(
  5582. // 'description' => 'TODO: please describe this field!',
  5583. 'type' => 'int',
  5584. 'not NULL' => '1',
  5585. ),
  5586. 'pub_id' => array(
  5587. // 'description' => 'TODO: please describe this field!',
  5588. 'type' => 'int',
  5589. 'not NULL' => '1',
  5590. ),
  5591. ),
  5592. 'primary key' => array(
  5593. '0' => 'stock_relationship_pub_id',
  5594. ),
  5595. 'unique keys' => array(
  5596. 'stock_relationship_pub_c1' => array(
  5597. '0' => 'stock_relationship_id',
  5598. '1' => 'pub_id',
  5599. ),
  5600. ),
  5601. 'indexes' => array(
  5602. 'stock_relationship_pub_idx1' => array(
  5603. '0' => 'stock_relationship_id',
  5604. ),
  5605. 'stock_relationship_pub_idx2' => array(
  5606. '0' => 'pub_id',
  5607. ),
  5608. ),
  5609. 'foreign keys' => array(
  5610. ),
  5611. );
  5612. return $description;
  5613. }
  5614. /**
  5615. * Implements hook_stockcollection_schema()
  5616. * Purpose: To describe the structure of stockcollection to tripal
  5617. * @see tripal_core_chado_insert()
  5618. * @see tripal_core_chado_update()
  5619. * @see tripal_core_chado_select()
  5620. *
  5621. * @return
  5622. * An array describing the current table
  5623. *
  5624. * @ingroup tripal_schema_api
  5625. *
  5626. */
  5627. function tripal_core_chado_stockcollection_schema() {
  5628. $description = array();
  5629. $description = array(
  5630. 'table' => 'stockcollection',
  5631. // 'description' => 'TODO: please describe this table!',
  5632. 'fields' => array(
  5633. 'stockcollection_id' => array(
  5634. // 'description' => 'TODO: please describe this field!',
  5635. 'type' => 'serial',
  5636. 'not NULL' => '1',
  5637. ),
  5638. 'type_id' => array(
  5639. // 'description' => 'TODO: please describe this field!',
  5640. 'type' => 'int',
  5641. 'not NULL' => '1',
  5642. ),
  5643. 'contact_id' => array(
  5644. // 'description' => 'TODO: please describe this field!',
  5645. 'type' => 'int',
  5646. 'not NULL' => '',
  5647. ),
  5648. 'name' => array(
  5649. // 'description' => 'TODO: please describe this field!',
  5650. 'type' => 'varchar',
  5651. 'length' => '255',
  5652. 'not NULL' => '',
  5653. ),
  5654. 'uniquename' => array(
  5655. // 'description' => 'TODO: please describe this field!',
  5656. 'type' => 'text',
  5657. 'not NULL' => '1',
  5658. ),
  5659. ),
  5660. 'primary key' => array(
  5661. '0' => 'stockcollection_id',
  5662. ),
  5663. 'unique keys' => array(
  5664. 'stockcollection_c1' => array(
  5665. '0' => 'uniquename',
  5666. '1' => 'type_id',
  5667. ),
  5668. ),
  5669. 'indexes' => array(
  5670. 'stockcollection_idx1' => array(
  5671. '0' => 'contact_id',
  5672. ),
  5673. 'stockcollection_idx2' => array(
  5674. '0' => 'type_id',
  5675. ),
  5676. 'stockcollection_idx3' => array(
  5677. '0' => 'uniquename',
  5678. ),
  5679. 'stockcollection_name_ind1' => array(
  5680. '0' => 'name',
  5681. ),
  5682. ),
  5683. 'foreign keys' => array(
  5684. ),
  5685. );
  5686. return $description;
  5687. }
  5688. /**
  5689. * Implements hook_stock_genotype_schema()
  5690. * Purpose: To describe the structure of stock_genotype to tripal
  5691. * @see tripal_core_chado_insert()
  5692. * @see tripal_core_chado_update()
  5693. * @see tripal_core_chado_select()
  5694. *
  5695. * @return
  5696. * An array describing the current table
  5697. *
  5698. * @ingroup tripal_schema_api
  5699. *
  5700. */
  5701. function tripal_core_chado_stock_genotype_schema() {
  5702. $description = array();
  5703. $description = array(
  5704. 'table' => 'stock_genotype',
  5705. // 'description' => 'TODO: please describe this table!',
  5706. 'fields' => array(
  5707. 'stock_genotype_id' => array(
  5708. // 'description' => 'TODO: please describe this field!',
  5709. 'type' => 'serial',
  5710. 'not NULL' => '1',
  5711. ),
  5712. 'stock_id' => array(
  5713. // 'description' => 'TODO: please describe this field!',
  5714. 'type' => 'int',
  5715. 'not NULL' => '1',
  5716. ),
  5717. 'genotype_id' => array(
  5718. // 'description' => 'TODO: please describe this field!',
  5719. 'type' => 'int',
  5720. 'not NULL' => '1',
  5721. ),
  5722. ),
  5723. 'primary key' => array(
  5724. '0' => 'stock_genotype_id',
  5725. ),
  5726. 'unique keys' => array(
  5727. 'stock_genotype_c1' => array(
  5728. '0' => 'stock_id',
  5729. '1' => 'genotype_id',
  5730. ),
  5731. ),
  5732. 'indexes' => array(
  5733. 'stock_genotype_idx1' => array(
  5734. '0' => 'stock_id',
  5735. ),
  5736. 'stock_genotype_idx2' => array(
  5737. '0' => 'genotype_id',
  5738. ),
  5739. ),
  5740. 'foreign keys' => array(
  5741. ),
  5742. );
  5743. return $description;
  5744. }
  5745. /**
  5746. * Implements hook_stock_dbxref_schema()
  5747. * Purpose: To describe the structure of stock_dbxref to tripal
  5748. * @see tripal_core_chado_insert()
  5749. * @see tripal_core_chado_update()
  5750. * @see tripal_core_chado_select()
  5751. *
  5752. * @return
  5753. * An array describing the current table
  5754. *
  5755. * @ingroup tripal_schema_api
  5756. *
  5757. */
  5758. function tripal_core_chado_stock_dbxref_schema() {
  5759. $description = array();
  5760. $description = array(
  5761. 'table' => 'stock_dbxref',
  5762. // 'description' => 'TODO: please describe this table!',
  5763. 'fields' => array(
  5764. 'stock_dbxref_id' => array(
  5765. // 'description' => 'TODO: please describe this field!',
  5766. 'type' => 'serial',
  5767. 'not NULL' => '1',
  5768. ),
  5769. 'stock_id' => array(
  5770. // 'description' => 'TODO: please describe this field!',
  5771. 'type' => 'int',
  5772. 'not NULL' => '1',
  5773. ),
  5774. 'dbxref_id' => array(
  5775. // 'description' => 'TODO: please describe this field!',
  5776. 'type' => 'int',
  5777. 'not NULL' => '1',
  5778. ),
  5779. 'is_current' => array(
  5780. // 'description' => 'TODO: please describe this field!',
  5781. 'type' => 'boolean',
  5782. 'not NULL' => '1',
  5783. 'default' => 'ru',
  5784. ),
  5785. ),
  5786. 'primary key' => array(
  5787. '0' => 'stock_dbxref_id',
  5788. ),
  5789. 'unique keys' => array(
  5790. 'stock_dbxref_c1' => array(
  5791. '0' => 'stock_id',
  5792. '1' => 'dbxref_id',
  5793. ),
  5794. ),
  5795. 'indexes' => array(
  5796. 'stock_dbxref_idx1' => array(
  5797. '0' => 'stock_id',
  5798. ),
  5799. 'stock_dbxref_idx2' => array(
  5800. '0' => 'dbxref_id',
  5801. ),
  5802. ),
  5803. 'foreign keys' => array(
  5804. ),
  5805. );
  5806. return $description;
  5807. }
  5808. /**
  5809. * Implements hook_quantificationprop_schema()
  5810. * Purpose: To describe the structure of quantificationprop to tripal
  5811. * @see tripal_core_chado_insert()
  5812. * @see tripal_core_chado_update()
  5813. * @see 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_quantificationprop_schema() {
  5822. $description = array();
  5823. $description = array(
  5824. 'table' => 'quantificationprop',
  5825. // 'description' => 'TODO: please describe this table!',
  5826. 'fields' => array(
  5827. 'quantificationprop_id' => array(
  5828. // 'description' => 'TODO: please describe this field!',
  5829. 'type' => 'serial',
  5830. 'not NULL' => '1',
  5831. ),
  5832. 'quantification_id' => array(
  5833. // 'description' => 'TODO: please describe this field!',
  5834. 'type' => 'int',
  5835. 'not NULL' => '1',
  5836. ),
  5837. 'type_id' => array(
  5838. // 'description' => 'TODO: please describe this field!',
  5839. 'type' => 'int',
  5840. 'not NULL' => '1',
  5841. ),
  5842. 'value' => array(
  5843. // 'description' => 'TODO: please describe this field!',
  5844. 'type' => 'text',
  5845. 'not NULL' => '',
  5846. ),
  5847. 'rank' => array(
  5848. // 'description' => 'TODO: please describe this field!',
  5849. 'type' => 'int',
  5850. 'not NULL' => '1',
  5851. 'default' => '0',
  5852. ),
  5853. ),
  5854. 'primary key' => array(
  5855. '0' => 'quantificationprop_id',
  5856. ),
  5857. 'unique keys' => array(
  5858. 'quantificationprop_c1' => array(
  5859. '0' => 'quantification_id',
  5860. '1' => 'type_id',
  5861. '2' => 'rank',
  5862. ),
  5863. ),
  5864. 'indexes' => array(
  5865. 'quantificationprop_idx1' => array(
  5866. '0' => 'quantification_id',
  5867. ),
  5868. 'quantificationprop_idx2' => array(
  5869. '0' => 'type_id',
  5870. ),
  5871. ),
  5872. 'foreign keys' => array(
  5873. ),
  5874. );
  5875. return $description;
  5876. }
  5877. /**
  5878. * Implements hook_stats_paths_to_root_schema()
  5879. * Purpose: To describe the structure of stats_paths_to_root to tripal
  5880. * @see tripal_core_chado_insert()
  5881. * @see tripal_core_chado_update()
  5882. * @see tripal_core_chado_select()
  5883. *
  5884. * @return
  5885. * An array describing the current table
  5886. *
  5887. * @ingroup tripal_schema_api
  5888. *
  5889. */
  5890. function tripal_core_chado_stats_paths_to_root_schema() {
  5891. $description = array();
  5892. $description = array(
  5893. 'table' => 'stats_paths_to_root',
  5894. // 'description' => 'TODO: please describe this table!',
  5895. 'fields' => array(
  5896. 'cvterm_id' => array(
  5897. // 'description' => 'TODO: please describe this field!',
  5898. 'type' => 'int',
  5899. 'not NULL' => '',
  5900. ),
  5901. 'total_paths' => array(
  5902. // 'description' => 'TODO: please describe this field!',
  5903. 'type' => 'int',
  5904. 'size' => 'big',
  5905. 'not NULL' => '',
  5906. ),
  5907. 'avg_distance' => array(
  5908. // 'description' => 'TODO: please describe this field!',
  5909. 'type' => 'numeric',
  5910. 'not NULL' => '',
  5911. 'precision' => '0',
  5912. 'scale' => '0',
  5913. ),
  5914. 'min_distance' => array(
  5915. // 'description' => 'TODO: please describe this field!',
  5916. 'type' => 'int',
  5917. 'not NULL' => '',
  5918. ),
  5919. 'max_distance' => array(
  5920. // 'description' => 'TODO: please describe this field!',
  5921. 'type' => 'int',
  5922. 'not NULL' => '',
  5923. ),
  5924. ),
  5925. 'primary key' => array(
  5926. ),
  5927. 'unique keys' => array(
  5928. ),
  5929. 'indexes' => array(
  5930. ),
  5931. 'foreign keys' => array(
  5932. ),
  5933. );
  5934. return $description;
  5935. }
  5936. /**
  5937. * Implements hook_stock_schema()
  5938. * Purpose: To describe the structure of stock to tripal
  5939. * @see tripal_core_chado_insert()
  5940. * @see tripal_core_chado_update()
  5941. * @see tripal_core_chado_select()
  5942. *
  5943. * @return
  5944. * An array describing the current table
  5945. *
  5946. * @ingroup tripal_schema_api
  5947. *
  5948. */
  5949. function tripal_core_chado_stock_schema() {
  5950. $description = array();
  5951. $description = array(
  5952. 'table' => 'stock',
  5953. // 'description' => 'TODO: please describe this table!',
  5954. 'fields' => array(
  5955. 'stock_id' => array(
  5956. // 'description' => 'TODO: please describe this field!',
  5957. 'type' => 'serial',
  5958. 'not NULL' => '1',
  5959. ),
  5960. 'dbxref_id' => array(
  5961. // 'description' => 'TODO: please describe this field!',
  5962. 'type' => 'int',
  5963. 'not NULL' => '',
  5964. ),
  5965. 'organism_id' => array(
  5966. // 'description' => 'TODO: please describe this field!',
  5967. 'type' => 'int',
  5968. 'not NULL' => '1',
  5969. ),
  5970. 'name' => array(
  5971. // 'description' => 'TODO: please describe this field!',
  5972. 'type' => 'varchar',
  5973. 'length' => '255',
  5974. 'not NULL' => '',
  5975. ),
  5976. 'uniquename' => array(
  5977. // 'description' => 'TODO: please describe this field!',
  5978. 'type' => 'text',
  5979. 'not NULL' => '1',
  5980. ),
  5981. 'description' => array(
  5982. // 'description' => 'TODO: please describe this field!',
  5983. 'type' => 'text',
  5984. 'not NULL' => '',
  5985. ),
  5986. 'type_id' => array(
  5987. // 'description' => 'TODO: please describe this field!',
  5988. 'type' => 'int',
  5989. 'not NULL' => '1',
  5990. ),
  5991. 'is_obsolete' => array(
  5992. // 'description' => 'TODO: please describe this field!',
  5993. 'type' => 'boolean',
  5994. 'not NULL' => '1',
  5995. 'default' => 'als',
  5996. ),
  5997. ),
  5998. 'primary key' => array(
  5999. '0' => 'stock_id',
  6000. ),
  6001. 'unique keys' => array(
  6002. 'stock_c1' => array(
  6003. '0' => 'organism_id',
  6004. '1' => 'uniquename',
  6005. '2' => 'type_id',
  6006. ),
  6007. ),
  6008. 'indexes' => array(
  6009. 'stock_idx1' => array(
  6010. '0' => 'dbxref_id',
  6011. ),
  6012. 'stock_idx2' => array(
  6013. '0' => 'organism_id',
  6014. ),
  6015. 'stock_idx3' => array(
  6016. '0' => 'type_id',
  6017. ),
  6018. 'stock_idx4' => array(
  6019. '0' => 'uniquename',
  6020. ),
  6021. 'stock_name_ind1' => array(
  6022. '0' => 'name',
  6023. ),
  6024. ),
  6025. 'foreign keys' => array(
  6026. ),
  6027. );
  6028. return $description;
  6029. }
  6030. /**
  6031. * Implements hook_stock_cvterm_schema()
  6032. * Purpose: To describe the structure of stock_cvterm to tripal
  6033. * @see tripal_core_chado_insert()
  6034. * @see tripal_core_chado_update()
  6035. * @see tripal_core_chado_select()
  6036. *
  6037. * @return
  6038. * An array describing the current table
  6039. *
  6040. * @ingroup tripal_schema_api
  6041. *
  6042. */
  6043. function tripal_core_chado_stock_cvterm_schema() {
  6044. $description = array();
  6045. $description = array(
  6046. 'table' => 'stock_cvterm',
  6047. // 'description' => 'TODO: please describe this table!',
  6048. 'fields' => array(
  6049. 'stock_cvterm_id' => array(
  6050. // 'description' => 'TODO: please describe this field!',
  6051. 'type' => 'serial',
  6052. 'not NULL' => '1',
  6053. ),
  6054. 'stock_id' => array(
  6055. // 'description' => 'TODO: please describe this field!',
  6056. 'type' => 'int',
  6057. 'not NULL' => '1',
  6058. ),
  6059. 'cvterm_id' => array(
  6060. // 'description' => 'TODO: please describe this field!',
  6061. 'type' => 'int',
  6062. 'not NULL' => '1',
  6063. ),
  6064. 'pub_id' => array(
  6065. // 'description' => 'TODO: please describe this field!',
  6066. 'type' => 'int',
  6067. 'not NULL' => '1',
  6068. ),
  6069. ),
  6070. 'primary key' => array(
  6071. '0' => 'stock_cvterm_id',
  6072. ),
  6073. 'unique keys' => array(
  6074. 'stock_cvterm_c1' => array(
  6075. '0' => 'stock_id',
  6076. '1' => 'cvterm_id',
  6077. '2' => 'pub_id',
  6078. ),
  6079. ),
  6080. 'indexes' => array(
  6081. 'stock_cvterm_idx1' => array(
  6082. '0' => 'stock_id',
  6083. ),
  6084. 'stock_cvterm_idx2' => array(
  6085. '0' => 'cvterm_id',
  6086. ),
  6087. 'stock_cvterm_idx3' => array(
  6088. '0' => 'pub_id',
  6089. ),
  6090. ),
  6091. 'foreign keys' => array(
  6092. ),
  6093. );
  6094. return $description;
  6095. }
  6096. /**
  6097. * Implements hook_feature_synonym_schema()
  6098. * Purpose: To describe the structure of feature_synonym to tripal
  6099. * @see tripal_core_chado_insert()
  6100. * @see tripal_core_chado_update()
  6101. * @see tripal_core_chado_select()
  6102. *
  6103. * @return
  6104. * An array describing the current table
  6105. *
  6106. * @ingroup tripal_schema_api
  6107. *
  6108. */
  6109. function tripal_core_chado_feature_synonym_schema() {
  6110. $description = array();
  6111. $description = array(
  6112. 'table' => 'feature_synonym',
  6113. // 'description' => 'TODO: please describe this table!',
  6114. 'fields' => array(
  6115. 'feature_synonym_id' => array(
  6116. // 'description' => 'TODO: please describe this field!',
  6117. 'type' => 'serial',
  6118. 'not NULL' => '1',
  6119. ),
  6120. 'synonym_id' => array(
  6121. // 'description' => 'TODO: please describe this field!',
  6122. 'type' => 'int',
  6123. 'not NULL' => '1',
  6124. ),
  6125. 'feature_id' => array(
  6126. // 'description' => 'TODO: please describe this field!',
  6127. 'type' => 'int',
  6128. 'not NULL' => '1',
  6129. ),
  6130. 'pub_id' => array(
  6131. // 'description' => 'TODO: please describe this field!',
  6132. 'type' => 'int',
  6133. 'not NULL' => '1',
  6134. ),
  6135. 'is_current' => array(
  6136. // 'description' => 'TODO: please describe this field!',
  6137. 'type' => 'boolean',
  6138. 'not NULL' => '1',
  6139. 'default' => 'als',
  6140. ),
  6141. 'is_internal' => array(
  6142. // 'description' => 'TODO: please describe this field!',
  6143. 'type' => 'boolean',
  6144. 'not NULL' => '1',
  6145. 'default' => 'als',
  6146. ),
  6147. ),
  6148. 'primary key' => array(
  6149. '0' => 'feature_synonym_id',
  6150. ),
  6151. 'unique keys' => array(
  6152. 'feature_synonym_c1' => array(
  6153. '0' => 'synonym_id',
  6154. '1' => 'feature_id',
  6155. '2' => 'pub_id',
  6156. ),
  6157. ),
  6158. 'indexes' => array(
  6159. 'feature_synonym_idx1' => array(
  6160. '0' => 'synonym_id',
  6161. ),
  6162. 'feature_synonym_idx2' => array(
  6163. '0' => 'feature_id',
  6164. ),
  6165. 'feature_synonym_idx3' => array(
  6166. '0' => 'pub_id',
  6167. ),
  6168. ),
  6169. 'foreign keys' => array(
  6170. ),
  6171. );
  6172. return $description;
  6173. }
  6174. /**
  6175. * Implements hook_feature_relationshipprop_pub_schema()
  6176. * Purpose: To describe the structure of feature_relationshipprop_pub to tripal
  6177. * @see tripal_core_chado_insert()
  6178. * @see tripal_core_chado_update()
  6179. * @see tripal_core_chado_select()
  6180. *
  6181. * @return
  6182. * An array describing the current table
  6183. *
  6184. * @ingroup tripal_schema_api
  6185. *
  6186. */
  6187. function tripal_core_chado_feature_relationshipprop_pub_schema() {
  6188. $description = array();
  6189. $description = array(
  6190. 'table' => 'feature_relationshipprop_pub',
  6191. // 'description' => 'TODO: please describe this table!',
  6192. 'fields' => array(
  6193. 'feature_relationshipprop_pub_id' => array(
  6194. // 'description' => 'TODO: please describe this field!',
  6195. 'type' => 'serial',
  6196. 'not NULL' => '1',
  6197. ),
  6198. 'feature_relationshipprop_id' => array(
  6199. // 'description' => 'TODO: please describe this field!',
  6200. 'type' => 'int',
  6201. 'not NULL' => '1',
  6202. ),
  6203. 'pub_id' => array(
  6204. // 'description' => 'TODO: please describe this field!',
  6205. 'type' => 'int',
  6206. 'not NULL' => '1',
  6207. ),
  6208. ),
  6209. 'primary key' => array(
  6210. '0' => 'feature_relationshipprop_pub_id',
  6211. ),
  6212. 'unique keys' => array(
  6213. 'feature_relationshipprop_pub_c1' => array(
  6214. '0' => 'feature_relationshipprop_id',
  6215. '1' => 'pub_id',
  6216. ),
  6217. ),
  6218. 'indexes' => array(
  6219. 'feature_relationshipprop_pub_idx1' => array(
  6220. '0' => 'feature_relationshipprop_id',
  6221. ),
  6222. 'feature_relationshipprop_pub_idx2' => array(
  6223. '0' => 'pub_id',
  6224. ),
  6225. ),
  6226. 'foreign keys' => array(
  6227. ),
  6228. );
  6229. return $description;
  6230. }
  6231. /**
  6232. * Implements hook_cell_line_relationship_schema()
  6233. * Purpose: To describe the structure of cell_line_relationship to tripal
  6234. * @see tripal_core_chado_insert()
  6235. * @see tripal_core_chado_update()
  6236. * @see tripal_core_chado_select()
  6237. *
  6238. * @return
  6239. * An array describing the current table
  6240. *
  6241. * @ingroup tripal_schema_api
  6242. *
  6243. */
  6244. function tripal_core_chado_cell_line_relationship_schema() {
  6245. $description = array();
  6246. $description = array(
  6247. 'table' => 'cell_line_relationship',
  6248. // 'description' => 'TODO: please describe this table!',
  6249. 'fields' => array(
  6250. 'cell_line_relationship_id' => array(
  6251. // 'description' => 'TODO: please describe this field!',
  6252. 'type' => 'serial',
  6253. 'not NULL' => '1',
  6254. ),
  6255. 'subject_id' => array(
  6256. // 'description' => 'TODO: please describe this field!',
  6257. 'type' => 'int',
  6258. 'not NULL' => '1',
  6259. ),
  6260. 'object_id' => array(
  6261. // 'description' => 'TODO: please describe this field!',
  6262. 'type' => 'int',
  6263. 'not NULL' => '1',
  6264. ),
  6265. 'type_id' => array(
  6266. // 'description' => 'TODO: please describe this field!',
  6267. 'type' => 'int',
  6268. 'not NULL' => '1',
  6269. ),
  6270. ),
  6271. 'primary key' => array(
  6272. '0' => 'cell_line_relationship_id',
  6273. ),
  6274. 'unique keys' => array(
  6275. 'cell_line_relationship_c1' => array(
  6276. '0' => 'subject_id',
  6277. '1' => 'object_id',
  6278. '2' => 'type_id',
  6279. ),
  6280. ),
  6281. 'indexes' => array(
  6282. ),
  6283. 'foreign keys' => array(
  6284. ),
  6285. );
  6286. return $description;
  6287. }
  6288. /**
  6289. * Implements hook_cell_line_pub_schema()
  6290. * Purpose: To describe the structure of cell_line_pub to tripal
  6291. * @see tripal_core_chado_insert()
  6292. * @see tripal_core_chado_update()
  6293. * @see tripal_core_chado_select()
  6294. *
  6295. * @return
  6296. * An array describing the current table
  6297. *
  6298. * @ingroup tripal_schema_api
  6299. *
  6300. */
  6301. function tripal_core_chado_cell_line_pub_schema() {
  6302. $description = array();
  6303. $description = array(
  6304. 'table' => 'cell_line_pub',
  6305. // 'description' => 'TODO: please describe this table!',
  6306. 'fields' => array(
  6307. 'cell_line_pub_id' => array(
  6308. // 'description' => 'TODO: please describe this field!',
  6309. 'type' => 'serial',
  6310. 'not NULL' => '1',
  6311. ),
  6312. 'cell_line_id' => array(
  6313. // 'description' => 'TODO: please describe this field!',
  6314. 'type' => 'int',
  6315. 'not NULL' => '1',
  6316. ),
  6317. 'pub_id' => array(
  6318. // 'description' => 'TODO: please describe this field!',
  6319. 'type' => 'int',
  6320. 'not NULL' => '1',
  6321. ),
  6322. ),
  6323. 'primary key' => array(
  6324. '0' => 'cell_line_pub_id',
  6325. ),
  6326. 'unique keys' => array(
  6327. 'cell_line_pub_c1' => array(
  6328. '0' => 'cell_line_id',
  6329. '1' => 'pub_id',
  6330. ),
  6331. ),
  6332. 'indexes' => array(
  6333. ),
  6334. 'foreign keys' => array(
  6335. ),
  6336. );
  6337. return $description;
  6338. }
  6339. /**
  6340. * Implements hook_cell_line_synonym_schema()
  6341. * Purpose: To describe the structure of cell_line_synonym to tripal
  6342. * @see tripal_core_chado_insert()
  6343. * @see tripal_core_chado_update()
  6344. * @see 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_line_synonym_schema() {
  6353. $description = array();
  6354. $description = array(
  6355. 'table' => 'cell_line_synonym',
  6356. // 'description' => 'TODO: please describe this table!',
  6357. 'fields' => array(
  6358. 'cell_line_synonym_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. 'synonym_id' => array(
  6369. // 'description' => 'TODO: please describe this field!',
  6370. 'type' => 'int',
  6371. 'not NULL' => '1',
  6372. ),
  6373. 'pub_id' => array(
  6374. // 'description' => 'TODO: please describe this field!',
  6375. 'type' => 'int',
  6376. 'not NULL' => '1',
  6377. ),
  6378. 'is_current' => array(
  6379. // 'description' => 'TODO: please describe this field!',
  6380. 'type' => 'boolean',
  6381. 'not NULL' => '1',
  6382. 'default' => 'als',
  6383. ),
  6384. 'is_internal' => array(
  6385. // 'description' => 'TODO: please describe this field!',
  6386. 'type' => 'boolean',
  6387. 'not NULL' => '1',
  6388. 'default' => 'als',
  6389. ),
  6390. ),
  6391. 'primary key' => array(
  6392. '0' => 'cell_line_synonym_id',
  6393. ),
  6394. 'unique keys' => array(
  6395. 'cell_line_synonym_c1' => array(
  6396. '0' => 'synonym_id',
  6397. '1' => 'cell_line_id',
  6398. '2' => 'pub_id',
  6399. ),
  6400. ),
  6401. 'indexes' => array(
  6402. ),
  6403. 'foreign keys' => array(
  6404. ),
  6405. );
  6406. return $description;
  6407. }
  6408. /**
  6409. * Implements hook_cell_lineprop_schema()
  6410. * Purpose: To describe the structure of cell_lineprop to tripal
  6411. * @see tripal_core_chado_insert()
  6412. * @see tripal_core_chado_update()
  6413. * @see tripal_core_chado_select()
  6414. *
  6415. * @return
  6416. * An array describing the current table
  6417. *
  6418. * @ingroup tripal_schema_api
  6419. *
  6420. */
  6421. function tripal_core_chado_cell_lineprop_schema() {
  6422. $description = array();
  6423. $description = array(
  6424. 'table' => 'cell_lineprop',
  6425. // 'description' => 'TODO: please describe this table!',
  6426. 'fields' => array(
  6427. 'cell_lineprop_id' => array(
  6428. // 'description' => 'TODO: please describe this field!',
  6429. 'type' => 'serial',
  6430. 'not NULL' => '1',
  6431. ),
  6432. 'cell_line_id' => array(
  6433. // 'description' => 'TODO: please describe this field!',
  6434. 'type' => 'int',
  6435. 'not NULL' => '1',
  6436. ),
  6437. 'type_id' => array(
  6438. // 'description' => 'TODO: please describe this field!',
  6439. 'type' => 'int',
  6440. 'not NULL' => '1',
  6441. ),
  6442. 'value' => array(
  6443. // 'description' => 'TODO: please describe this field!',
  6444. 'type' => 'text',
  6445. 'not NULL' => '',
  6446. ),
  6447. 'rank' => array(
  6448. // 'description' => 'TODO: please describe this field!',
  6449. 'type' => 'int',
  6450. 'not NULL' => '1',
  6451. 'default' => '0',
  6452. ),
  6453. ),
  6454. 'primary key' => array(
  6455. '0' => 'cell_lineprop_id',
  6456. ),
  6457. 'unique keys' => array(
  6458. 'cell_lineprop_c1' => array(
  6459. '0' => 'cell_line_id',
  6460. '1' => 'type_id',
  6461. '2' => 'rank',
  6462. ),
  6463. ),
  6464. 'indexes' => array(
  6465. ),
  6466. 'foreign keys' => array(
  6467. ),
  6468. );
  6469. return $description;
  6470. }
  6471. /**
  6472. * Implements hook_cell_lineprop_pub_schema()
  6473. * Purpose: To describe the structure of cell_lineprop_pub to tripal
  6474. * @see tripal_core_chado_insert()
  6475. * @see tripal_core_chado_update()
  6476. * @see tripal_core_chado_select()
  6477. *
  6478. * @return
  6479. * An array describing the current table
  6480. *
  6481. * @ingroup tripal_schema_api
  6482. *
  6483. */
  6484. function tripal_core_chado_cell_lineprop_pub_schema() {
  6485. $description = array();
  6486. $description = array(
  6487. 'table' => 'cell_lineprop_pub',
  6488. // 'description' => 'TODO: please describe this table!',
  6489. 'fields' => array(
  6490. 'cell_lineprop_pub_id' => array(
  6491. // 'description' => 'TODO: please describe this field!',
  6492. 'type' => 'serial',
  6493. 'not NULL' => '1',
  6494. ),
  6495. 'cell_lineprop_id' => array(
  6496. // 'description' => 'TODO: please describe this field!',
  6497. 'type' => 'int',
  6498. 'not NULL' => '1',
  6499. ),
  6500. 'pub_id' => array(
  6501. // 'description' => 'TODO: please describe this field!',
  6502. 'type' => 'int',
  6503. 'not NULL' => '1',
  6504. ),
  6505. ),
  6506. 'primary key' => array(
  6507. '0' => 'cell_lineprop_pub_id',
  6508. ),
  6509. 'unique keys' => array(
  6510. 'cell_lineprop_pub_c1' => array(
  6511. '0' => 'cell_lineprop_id',
  6512. '1' => 'pub_id',
  6513. ),
  6514. ),
  6515. 'indexes' => array(
  6516. ),
  6517. 'foreign keys' => array(
  6518. ),
  6519. );
  6520. return $description;
  6521. }
  6522. /**
  6523. * Implements hook_cell_line_library_schema()
  6524. * Purpose: To describe the structure of cell_line_library to tripal
  6525. * @see tripal_core_chado_insert()
  6526. * @see tripal_core_chado_update()
  6527. * @see tripal_core_chado_select()
  6528. *
  6529. * @return
  6530. * An array describing the current table
  6531. *
  6532. * @ingroup tripal_schema_api
  6533. *
  6534. */
  6535. function tripal_core_chado_cell_line_library_schema() {
  6536. $description = array();
  6537. $description = array(
  6538. 'table' => 'cell_line_library',
  6539. // 'description' => 'TODO: please describe this table!',
  6540. 'fields' => array(
  6541. 'cell_line_library_id' => array(
  6542. // 'description' => 'TODO: please describe this field!',
  6543. 'type' => 'serial',
  6544. 'not NULL' => '1',
  6545. ),
  6546. 'cell_line_id' => array(
  6547. // 'description' => 'TODO: please describe this field!',
  6548. 'type' => 'int',
  6549. 'not NULL' => '1',
  6550. ),
  6551. 'library_id' => array(
  6552. // 'description' => 'TODO: please describe this field!',
  6553. 'type' => 'int',
  6554. 'not NULL' => '1',
  6555. ),
  6556. 'pub_id' => array(
  6557. // 'description' => 'TODO: please describe this field!',
  6558. 'type' => 'int',
  6559. 'not NULL' => '1',
  6560. ),
  6561. ),
  6562. 'primary key' => array(
  6563. '0' => 'cell_line_library_id',
  6564. ),
  6565. 'unique keys' => array(
  6566. 'cell_line_library_c1' => array(
  6567. '0' => 'cell_line_id',
  6568. '1' => 'library_id',
  6569. '2' => 'pub_id',
  6570. ),
  6571. ),
  6572. 'indexes' => array(
  6573. ),
  6574. 'foreign keys' => array(
  6575. ),
  6576. );
  6577. return $description;
  6578. }
  6579. /**
  6580. * Implements hook_cell_line_feature_schema()
  6581. * Purpose: To describe the structure of cell_line_feature to tripal
  6582. * @see tripal_core_chado_insert()
  6583. * @see tripal_core_chado_update()
  6584. * @see tripal_core_chado_select()
  6585. *
  6586. * @return
  6587. * An array describing the current table
  6588. *
  6589. * @ingroup tripal_schema_api
  6590. *
  6591. */
  6592. function tripal_core_chado_cell_line_feature_schema() {
  6593. $description = array();
  6594. $description = array(
  6595. 'table' => 'cell_line_feature',
  6596. // 'description' => 'TODO: please describe this table!',
  6597. 'fields' => array(
  6598. 'cell_line_feature_id' => array(
  6599. // 'description' => 'TODO: please describe this field!',
  6600. 'type' => 'serial',
  6601. 'not NULL' => '1',
  6602. ),
  6603. 'cell_line_id' => array(
  6604. // 'description' => 'TODO: please describe this field!',
  6605. 'type' => 'int',
  6606. 'not NULL' => '1',
  6607. ),
  6608. 'feature_id' => array(
  6609. // 'description' => 'TODO: please describe this field!',
  6610. 'type' => 'int',
  6611. 'not NULL' => '1',
  6612. ),
  6613. 'pub_id' => array(
  6614. // 'description' => 'TODO: please describe this field!',
  6615. 'type' => 'int',
  6616. 'not NULL' => '1',
  6617. ),
  6618. ),
  6619. 'primary key' => array(
  6620. '0' => 'cell_line_feature_id',
  6621. ),
  6622. 'unique keys' => array(
  6623. 'cell_line_feature_c1' => array(
  6624. '0' => 'cell_line_id',
  6625. '1' => 'feature_id',
  6626. '2' => 'pub_id',
  6627. ),
  6628. ),
  6629. 'indexes' => array(
  6630. ),
  6631. 'foreign keys' => array(
  6632. ),
  6633. );
  6634. return $description;
  6635. }
  6636. /**
  6637. * Implements hook_cell_line_schema()
  6638. * Purpose: To describe the structure of cell_line to tripal
  6639. * @see tripal_core_chado_insert()
  6640. * @see tripal_core_chado_update()
  6641. * @see tripal_core_chado_select()
  6642. *
  6643. * @return
  6644. * An array describing the current table
  6645. *
  6646. * @ingroup tripal_schema_api
  6647. *
  6648. */
  6649. function tripal_core_chado_cell_line_schema() {
  6650. $description = array();
  6651. $description = array(
  6652. 'table' => 'cell_line',
  6653. // 'description' => 'TODO: please describe this table!',
  6654. 'fields' => array(
  6655. 'cell_line_id' => array(
  6656. // 'description' => 'TODO: please describe this field!',
  6657. 'type' => 'serial',
  6658. 'not NULL' => '1',
  6659. ),
  6660. 'name' => array(
  6661. // 'description' => 'TODO: please describe this field!',
  6662. 'type' => 'varchar',
  6663. 'length' => '255',
  6664. 'not NULL' => '',
  6665. ),
  6666. 'uniquename' => array(
  6667. // 'description' => 'TODO: please describe this field!',
  6668. 'type' => 'varchar',
  6669. 'length' => '255',
  6670. 'not NULL' => '1',
  6671. ),
  6672. 'organism_id' => array(
  6673. // 'description' => 'TODO: please describe this field!',
  6674. 'type' => 'int',
  6675. 'not NULL' => '1',
  6676. ),
  6677. 'timeaccessioned' => array(
  6678. // 'description' => 'TODO: please describe this field!',
  6679. 'type' => 'datetime',
  6680. 'not NULL' => '1',
  6681. 'default' => 'ow(',
  6682. ),
  6683. 'timelastmodified' => array(
  6684. // 'description' => 'TODO: please describe this field!',
  6685. 'type' => 'datetime',
  6686. 'not NULL' => '1',
  6687. 'default' => 'ow(',
  6688. ),
  6689. ),
  6690. 'primary key' => array(
  6691. '0' => 'cell_line_id',
  6692. ),
  6693. 'unique keys' => array(
  6694. 'cell_line_c1' => array(
  6695. '0' => 'uniquename',
  6696. '1' => 'organism_id',
  6697. ),
  6698. ),
  6699. 'indexes' => array(
  6700. ),
  6701. 'foreign keys' => array(
  6702. ),
  6703. );
  6704. return $description;
  6705. }
  6706. /**
  6707. * Implements hook_cell_line_cvterm_schema()
  6708. * Purpose: To describe the structure of cell_line_cvterm to tripal
  6709. * @see tripal_core_chado_insert()
  6710. * @see tripal_core_chado_update()
  6711. * @see tripal_core_chado_select()
  6712. *
  6713. * @return
  6714. * An array describing the current table
  6715. *
  6716. * @ingroup tripal_schema_api
  6717. *
  6718. */
  6719. function tripal_core_chado_cell_line_cvterm_schema() {
  6720. $description = array();
  6721. $description = array(
  6722. 'table' => 'cell_line_cvterm',
  6723. // 'description' => 'TODO: please describe this table!',
  6724. 'fields' => array(
  6725. 'cell_line_cvterm_id' => array(
  6726. // 'description' => 'TODO: please describe this field!',
  6727. 'type' => 'serial',
  6728. 'not NULL' => '1',
  6729. ),
  6730. 'cell_line_id' => array(
  6731. // 'description' => 'TODO: please describe this field!',
  6732. 'type' => 'int',
  6733. 'not NULL' => '1',
  6734. ),
  6735. 'cvterm_id' => array(
  6736. // 'description' => 'TODO: please describe this field!',
  6737. 'type' => 'int',
  6738. 'not NULL' => '1',
  6739. ),
  6740. 'pub_id' => array(
  6741. // 'description' => 'TODO: please describe this field!',
  6742. 'type' => 'int',
  6743. 'not NULL' => '1',
  6744. ),
  6745. 'rank' => array(
  6746. // 'description' => 'TODO: please describe this field!',
  6747. 'type' => 'int',
  6748. 'not NULL' => '1',
  6749. 'default' => '0',
  6750. ),
  6751. ),
  6752. 'primary key' => array(
  6753. '0' => 'cell_line_cvterm_id',
  6754. ),
  6755. 'unique keys' => array(
  6756. 'cell_line_cvterm_c1' => array(
  6757. '0' => 'cell_line_id',
  6758. '1' => 'cvterm_id',
  6759. '2' => 'pub_id',
  6760. '3' => 'rank',
  6761. ),
  6762. ),
  6763. 'indexes' => array(
  6764. ),
  6765. 'foreign keys' => array(
  6766. ),
  6767. );
  6768. return $description;
  6769. }
  6770. /**
  6771. * Implements hook_cell_line_cvtermprop_schema()
  6772. * Purpose: To describe the structure of cell_line_cvtermprop to tripal
  6773. * @see tripal_core_chado_insert()
  6774. * @see tripal_core_chado_update()
  6775. * @see tripal_core_chado_select()
  6776. *
  6777. * @return
  6778. * An array describing the current table
  6779. *
  6780. * @ingroup tripal_schema_api
  6781. *
  6782. */
  6783. function tripal_core_chado_cell_line_cvtermprop_schema() {
  6784. $description = array();
  6785. $description = array(
  6786. 'table' => 'cell_line_cvtermprop',
  6787. // 'description' => 'TODO: please describe this table!',
  6788. 'fields' => array(
  6789. 'cell_line_cvtermprop_id' => array(
  6790. // 'description' => 'TODO: please describe this field!',
  6791. 'type' => 'serial',
  6792. 'not NULL' => '1',
  6793. ),
  6794. 'cell_line_cvterm_id' => array(
  6795. // 'description' => 'TODO: please describe this field!',
  6796. 'type' => 'int',
  6797. 'not NULL' => '1',
  6798. ),
  6799. 'type_id' => array(
  6800. // 'description' => 'TODO: please describe this field!',
  6801. 'type' => 'int',
  6802. 'not NULL' => '1',
  6803. ),
  6804. 'value' => array(
  6805. // 'description' => 'TODO: please describe this field!',
  6806. 'type' => 'text',
  6807. 'not NULL' => '',
  6808. ),
  6809. 'rank' => array(
  6810. // 'description' => 'TODO: please describe this field!',
  6811. 'type' => 'int',
  6812. 'not NULL' => '1',
  6813. 'default' => '0',
  6814. ),
  6815. ),
  6816. 'primary key' => array(
  6817. '0' => 'cell_line_cvtermprop_id',
  6818. ),
  6819. 'unique keys' => array(
  6820. 'cell_line_cvtermprop_c1' => array(
  6821. '0' => 'cell_line_cvterm_id',
  6822. '1' => 'type_id',
  6823. '2' => 'rank',
  6824. ),
  6825. ),
  6826. 'indexes' => array(
  6827. ),
  6828. 'foreign keys' => array(
  6829. ),
  6830. );
  6831. return $description;
  6832. }
  6833. /**
  6834. * Implements hook_cell_line_dbxref_schema()
  6835. * Purpose: To describe the structure of cell_line_dbxref to tripal
  6836. * @see tripal_core_chado_insert()
  6837. * @see tripal_core_chado_update()
  6838. * @see tripal_core_chado_select()
  6839. *
  6840. * @return
  6841. * An array describing the current table
  6842. *
  6843. * @ingroup tripal_schema_api
  6844. *
  6845. */
  6846. function tripal_core_chado_cell_line_dbxref_schema() {
  6847. $description = array();
  6848. $description = array(
  6849. 'table' => 'cell_line_dbxref',
  6850. // 'description' => 'TODO: please describe this table!',
  6851. 'fields' => array(
  6852. 'cell_line_dbxref_id' => array(
  6853. // 'description' => 'TODO: please describe this field!',
  6854. 'type' => 'serial',
  6855. 'not NULL' => '1',
  6856. ),
  6857. 'cell_line_id' => array(
  6858. // 'description' => 'TODO: please describe this field!',
  6859. 'type' => 'int',
  6860. 'not NULL' => '1',
  6861. ),
  6862. 'dbxref_id' => array(
  6863. // 'description' => 'TODO: please describe this field!',
  6864. 'type' => 'int',
  6865. 'not NULL' => '1',
  6866. ),
  6867. 'is_current' => array(
  6868. // 'description' => 'TODO: please describe this field!',
  6869. 'type' => 'boolean',
  6870. 'not NULL' => '1',
  6871. 'default' => 'ru',
  6872. ),
  6873. ),
  6874. 'primary key' => array(
  6875. '0' => 'cell_line_dbxref_id',
  6876. ),
  6877. 'unique keys' => array(
  6878. 'cell_line_dbxref_c1' => array(
  6879. '0' => 'cell_line_id',
  6880. '1' => 'dbxref_id',
  6881. ),
  6882. ),
  6883. 'indexes' => array(
  6884. ),
  6885. 'foreign keys' => array(
  6886. ),
  6887. );
  6888. return $description;
  6889. }
  6890. /**
  6891. * Implements hook_channel_schema()
  6892. * Purpose: To describe the structure of channel to tripal
  6893. * @see tripal_core_chado_insert()
  6894. * @see tripal_core_chado_update()
  6895. * @see tripal_core_chado_select()
  6896. *
  6897. * @return
  6898. * An array describing the current table
  6899. *
  6900. * @ingroup tripal_schema_api
  6901. *
  6902. */
  6903. function tripal_core_chado_channel_schema() {
  6904. $description = array();
  6905. $description = array(
  6906. 'table' => 'channel',
  6907. // 'description' => 'TODO: please describe this table!',
  6908. 'fields' => array(
  6909. 'channel_id' => array(
  6910. // 'description' => 'TODO: please describe this field!',
  6911. 'type' => 'serial',
  6912. 'not NULL' => '1',
  6913. ),
  6914. 'name' => array(
  6915. // 'description' => 'TODO: please describe this field!',
  6916. 'type' => 'text',
  6917. 'not NULL' => '1',
  6918. ),
  6919. 'definition' => array(
  6920. // 'description' => 'TODO: please describe this field!',
  6921. 'type' => 'text',
  6922. 'not NULL' => '1',
  6923. ),
  6924. ),
  6925. 'primary key' => array(
  6926. '0' => 'channel_id',
  6927. ),
  6928. 'unique keys' => array(
  6929. 'channel_c1' => array(
  6930. '0' => 'name',
  6931. ),
  6932. ),
  6933. 'indexes' => array(
  6934. ),
  6935. 'foreign keys' => array(
  6936. ),
  6937. );
  6938. return $description;
  6939. }
  6940. /**
  6941. * Implements hook_common_ancestor_cvterm_schema()
  6942. * Purpose: To describe the structure of common_ancestor_cvterm to tripal
  6943. * @see tripal_core_chado_insert()
  6944. * @see tripal_core_chado_update()
  6945. * @see tripal_core_chado_select()
  6946. *
  6947. * @return
  6948. * An array describing the current table
  6949. *
  6950. * @ingroup tripal_schema_api
  6951. *
  6952. */
  6953. function tripal_core_chado_common_ancestor_cvterm_schema() {
  6954. $description = array();
  6955. $description = array(
  6956. 'table' => 'common_ancestor_cvterm',
  6957. // 'description' => 'TODO: please describe this table!',
  6958. 'fields' => array(
  6959. 'cvterm1_id' => array(
  6960. // 'description' => 'TODO: please describe this field!',
  6961. 'type' => 'int',
  6962. 'not NULL' => '',
  6963. ),
  6964. 'cvterm2_id' => array(
  6965. // 'description' => 'TODO: please describe this field!',
  6966. 'type' => 'int',
  6967. 'not NULL' => '',
  6968. ),
  6969. 'ancestor_cvterm_id' => array(
  6970. // 'description' => 'TODO: please describe this field!',
  6971. 'type' => 'int',
  6972. 'not NULL' => '',
  6973. ),
  6974. 'pathdistance1' => array(
  6975. // 'description' => 'TODO: please describe this field!',
  6976. 'type' => 'int',
  6977. 'not NULL' => '',
  6978. ),
  6979. 'pathdistance2' => array(
  6980. // 'description' => 'TODO: please describe this field!',
  6981. 'type' => 'int',
  6982. 'not NULL' => '',
  6983. ),
  6984. 'total_pathdistance' => array(
  6985. // 'description' => 'TODO: please describe this field!',
  6986. 'type' => 'int',
  6987. 'not NULL' => '',
  6988. ),
  6989. ),
  6990. 'primary key' => array(
  6991. ),
  6992. 'unique keys' => array(
  6993. ),
  6994. 'indexes' => array(
  6995. ),
  6996. 'foreign keys' => array(
  6997. ),
  6998. );
  6999. return $description;
  7000. }
  7001. /**
  7002. * Implements hook_cv_cvterm_count_with_obs_schema()
  7003. * Purpose: To describe the structure of cv_cvterm_count_with_obs to tripal
  7004. * @see tripal_core_chado_insert()
  7005. * @see tripal_core_chado_update()
  7006. * @see tripal_core_chado_select()
  7007. *
  7008. * @return
  7009. * An array describing the current table
  7010. *
  7011. * @ingroup tripal_schema_api
  7012. *
  7013. */
  7014. function tripal_core_chado_cv_cvterm_count_with_obs_schema() {
  7015. $description = array();
  7016. $description = array(
  7017. 'table' => 'cv_cvterm_count_with_obs',
  7018. // 'description' => 'TODO: please describe this table!',
  7019. 'fields' => array(
  7020. 'name' => array(
  7021. // 'description' => 'TODO: please describe this field!',
  7022. 'type' => 'varchar',
  7023. 'length' => '255',
  7024. 'not NULL' => '',
  7025. ),
  7026. 'num_terms_incl_obs' => array(
  7027. // 'description' => 'TODO: please describe this field!',
  7028. 'type' => 'int',
  7029. 'size' => 'big',
  7030. 'not NULL' => '',
  7031. ),
  7032. ),
  7033. 'primary key' => array(
  7034. ),
  7035. 'unique keys' => array(
  7036. ),
  7037. 'indexes' => array(
  7038. ),
  7039. 'foreign keys' => array(
  7040. ),
  7041. );
  7042. return $description;
  7043. }
  7044. /**
  7045. * Implements hook_cv_leaf_schema()
  7046. * Purpose: To describe the structure of cv_leaf to tripal
  7047. * @see tripal_core_chado_insert()
  7048. * @see tripal_core_chado_update()
  7049. * @see tripal_core_chado_select()
  7050. *
  7051. * @return
  7052. * An array describing the current table
  7053. *
  7054. * @ingroup tripal_schema_api
  7055. *
  7056. */
  7057. function tripal_core_chado_cv_leaf_schema() {
  7058. $description = array();
  7059. $description = array(
  7060. 'table' => 'cv_leaf',
  7061. // 'description' => 'TODO: please describe this table!',
  7062. 'fields' => array(
  7063. 'cv_id' => array(
  7064. // 'description' => 'TODO: please describe this field!',
  7065. 'type' => 'int',
  7066. 'not NULL' => '',
  7067. ),
  7068. 'cvterm_id' => array(
  7069. // 'description' => 'TODO: please describe this field!',
  7070. 'type' => 'int',
  7071. 'not NULL' => '',
  7072. ),
  7073. ),
  7074. 'primary key' => array(
  7075. ),
  7076. 'unique keys' => array(
  7077. ),
  7078. 'indexes' => array(
  7079. ),
  7080. 'foreign keys' => array(
  7081. ),
  7082. );
  7083. return $description;
  7084. }
  7085. /**
  7086. * Implements hook_cv_link_count_schema()
  7087. * Purpose: To describe the structure of cv_link_count to tripal
  7088. * @see tripal_core_chado_insert()
  7089. * @see tripal_core_chado_update()
  7090. * @see tripal_core_chado_select()
  7091. *
  7092. * @return
  7093. * An array describing the current table
  7094. *
  7095. * @ingroup tripal_schema_api
  7096. *
  7097. */
  7098. function tripal_core_chado_cv_link_count_schema() {
  7099. $description = array();
  7100. $description = array(
  7101. 'table' => 'cv_link_count',
  7102. // 'description' => 'TODO: please describe this table!',
  7103. 'fields' => array(
  7104. 'cv_name' => array(
  7105. // 'description' => 'TODO: please describe this field!',
  7106. 'type' => 'varchar',
  7107. 'length' => '255',
  7108. 'not NULL' => '',
  7109. ),
  7110. 'relation_name' => array(
  7111. // 'description' => 'TODO: please describe this field!',
  7112. 'type' => 'varchar',
  7113. 'length' => '1024',
  7114. 'not NULL' => '',
  7115. ),
  7116. 'relation_cv_name' => array(
  7117. // 'description' => 'TODO: please describe this field!',
  7118. 'type' => 'varchar',
  7119. 'length' => '255',
  7120. 'not NULL' => '',
  7121. ),
  7122. 'num_links' => array(
  7123. // 'description' => 'TODO: please describe this field!',
  7124. 'type' => 'int',
  7125. 'size' => 'big',
  7126. 'not NULL' => '',
  7127. ),
  7128. ),
  7129. 'primary key' => array(
  7130. ),
  7131. 'unique keys' => array(
  7132. ),
  7133. 'indexes' => array(
  7134. ),
  7135. 'foreign keys' => array(
  7136. ),
  7137. );
  7138. return $description;
  7139. }
  7140. /**
  7141. * Implements hook_cv_path_count_schema()
  7142. * Purpose: To describe the structure of cv_path_count to tripal
  7143. * @see tripal_core_chado_insert()
  7144. * @see tripal_core_chado_update()
  7145. * @see tripal_core_chado_select()
  7146. *
  7147. * @return
  7148. * An array describing the current table
  7149. *
  7150. * @ingroup tripal_schema_api
  7151. *
  7152. */
  7153. function tripal_core_chado_cv_path_count_schema() {
  7154. $description = array();
  7155. $description = array(
  7156. 'table' => 'cv_path_count',
  7157. // 'description' => 'TODO: please describe this table!',
  7158. 'fields' => array(
  7159. 'cv_name' => array(
  7160. // 'description' => 'TODO: please describe this field!',
  7161. 'type' => 'varchar',
  7162. 'length' => '255',
  7163. 'not NULL' => '',
  7164. ),
  7165. 'relation_name' => array(
  7166. // 'description' => 'TODO: please describe this field!',
  7167. 'type' => 'varchar',
  7168. 'length' => '1024',
  7169. 'not NULL' => '',
  7170. ),
  7171. 'relation_cv_name' => array(
  7172. // 'description' => 'TODO: please describe this field!',
  7173. 'type' => 'varchar',
  7174. 'length' => '255',
  7175. 'not NULL' => '',
  7176. ),
  7177. 'num_paths' => array(
  7178. // 'description' => 'TODO: please describe this field!',
  7179. 'type' => 'int',
  7180. 'size' => 'big',
  7181. 'not NULL' => '',
  7182. ),
  7183. ),
  7184. 'primary key' => array(
  7185. ),
  7186. 'unique keys' => array(
  7187. ),
  7188. 'indexes' => array(
  7189. ),
  7190. 'foreign keys' => array(
  7191. ),
  7192. );
  7193. return $description;
  7194. }
  7195. /**
  7196. * Implements hook_cv_cvterm_count_schema()
  7197. * Purpose: To describe the structure of cv_cvterm_count to tripal
  7198. * @see tripal_core_chado_insert()
  7199. * @see tripal_core_chado_update()
  7200. * @see tripal_core_chado_select()
  7201. *
  7202. * @return
  7203. * An array describing the current table
  7204. *
  7205. * @ingroup tripal_schema_api
  7206. *
  7207. */
  7208. function tripal_core_chado_cv_cvterm_count_schema() {
  7209. $description = array();
  7210. $description = array(
  7211. 'table' => 'cv_cvterm_count',
  7212. // 'description' => 'TODO: please describe this table!',
  7213. 'fields' => array(
  7214. 'name' => array(
  7215. // 'description' => 'TODO: please describe this field!',
  7216. 'type' => 'varchar',
  7217. 'length' => '255',
  7218. 'not NULL' => '',
  7219. ),
  7220. 'num_terms_excl_obs' => array(
  7221. // 'description' => 'TODO: please describe this field!',
  7222. 'type' => 'int',
  7223. 'size' => 'big',
  7224. 'not NULL' => '',
  7225. ),
  7226. ),
  7227. 'primary key' => array(
  7228. ),
  7229. 'unique keys' => array(
  7230. ),
  7231. 'indexes' => array(
  7232. ),
  7233. 'foreign keys' => array(
  7234. ),
  7235. );
  7236. return $description;
  7237. }
  7238. /**
  7239. * Implements hook_cv_schema()
  7240. * Purpose: To describe the structure of cv to tripal
  7241. * @see tripal_core_chado_insert()
  7242. * @see tripal_core_chado_update()
  7243. * @see tripal_core_chado_select()
  7244. *
  7245. * @return
  7246. * An array describing the current table
  7247. *
  7248. * @ingroup tripal_schema_api
  7249. *
  7250. */
  7251. function tripal_core_chado_cv_schema() {
  7252. $description = array();
  7253. $description = array(
  7254. 'table' => 'cv',
  7255. // 'description' => 'TODO: please describe this table!',
  7256. 'fields' => array(
  7257. 'cv_id' => array(
  7258. // 'description' => 'TODO: please describe this field!',
  7259. 'type' => 'serial',
  7260. 'not NULL' => '1',
  7261. ),
  7262. 'name' => array(
  7263. // 'description' => 'TODO: please describe this field!',
  7264. 'type' => 'varchar',
  7265. 'length' => '255',
  7266. 'not NULL' => '1',
  7267. ),
  7268. 'definition' => array(
  7269. // 'description' => 'TODO: please describe this field!',
  7270. 'type' => 'text',
  7271. 'not NULL' => '',
  7272. ),
  7273. ),
  7274. 'primary key' => array(
  7275. '0' => 'cv_id',
  7276. ),
  7277. 'unique keys' => array(
  7278. 'cv_c1' => array(
  7279. '0' => 'name',
  7280. ),
  7281. ),
  7282. 'indexes' => array(
  7283. ),
  7284. 'foreign keys' => array(
  7285. ),
  7286. );
  7287. return $description;
  7288. }
  7289. /**
  7290. * Implements hook_common_descendant_cvterm_schema()
  7291. * Purpose: To describe the structure of common_descendant_cvterm to tripal
  7292. * @see tripal_core_chado_insert()
  7293. * @see tripal_core_chado_update()
  7294. * @see tripal_core_chado_select()
  7295. *
  7296. * @return
  7297. * An array describing the current table
  7298. *
  7299. * @ingroup tripal_schema_api
  7300. *
  7301. */
  7302. function tripal_core_chado_common_descendant_cvterm_schema() {
  7303. $description = array();
  7304. $description = array(
  7305. 'table' => 'common_descendant_cvterm',
  7306. // 'description' => 'TODO: please describe this table!',
  7307. 'fields' => array(
  7308. 'cvterm1_id' => array(
  7309. // 'description' => 'TODO: please describe this field!',
  7310. 'type' => 'int',
  7311. 'not NULL' => '',
  7312. ),
  7313. 'cvterm2_id' => array(
  7314. // 'description' => 'TODO: please describe this field!',
  7315. 'type' => 'int',
  7316. 'not NULL' => '',
  7317. ),
  7318. 'ancestor_cvterm_id' => array(
  7319. // 'description' => 'TODO: please describe this field!',
  7320. 'type' => 'int',
  7321. 'not NULL' => '',
  7322. ),
  7323. 'pathdistance1' => array(
  7324. // 'description' => 'TODO: please describe this field!',
  7325. 'type' => 'int',
  7326. 'not NULL' => '',
  7327. ),
  7328. 'pathdistance2' => array(
  7329. // 'description' => 'TODO: please describe this field!',
  7330. 'type' => 'int',
  7331. 'not NULL' => '',
  7332. ),
  7333. 'total_pathdistance' => array(
  7334. // 'description' => 'TODO: please describe this field!',
  7335. 'type' => 'int',
  7336. 'not NULL' => '',
  7337. ),
  7338. ),
  7339. 'primary key' => array(
  7340. ),
  7341. 'unique keys' => array(
  7342. ),
  7343. 'indexes' => array(
  7344. ),
  7345. 'foreign keys' => array(
  7346. ),
  7347. );
  7348. return $description;
  7349. }
  7350. /**
  7351. * Implements hook_contact_schema()
  7352. * Purpose: To describe the structure of contact to tripal
  7353. * @see tripal_core_chado_insert()
  7354. * @see tripal_core_chado_update()
  7355. * @see tripal_core_chado_select()
  7356. *
  7357. * @return
  7358. * An array describing the current table
  7359. *
  7360. * @ingroup tripal_schema_api
  7361. *
  7362. */
  7363. function tripal_core_chado_contact_schema() {
  7364. $description = array();
  7365. $description = array(
  7366. 'table' => 'contact',
  7367. // 'description' => 'TODO: please describe this table!',
  7368. 'fields' => array(
  7369. 'contact_id' => array(
  7370. // 'description' => 'TODO: please describe this field!',
  7371. 'type' => 'serial',
  7372. 'not NULL' => '1',
  7373. ),
  7374. 'type_id' => array(
  7375. // 'description' => 'TODO: please describe this field!',
  7376. 'type' => 'int',
  7377. 'not NULL' => '',
  7378. ),
  7379. 'name' => array(
  7380. // 'description' => 'TODO: please describe this field!',
  7381. 'type' => 'varchar',
  7382. 'length' => '255',
  7383. 'not NULL' => '1',
  7384. ),
  7385. 'description' => array(
  7386. // 'description' => 'TODO: please describe this field!',
  7387. 'type' => 'varchar',
  7388. 'length' => '255',
  7389. 'not NULL' => '',
  7390. ),
  7391. ),
  7392. 'primary key' => array(
  7393. '0' => 'contact_id',
  7394. ),
  7395. 'unique keys' => array(
  7396. 'contact_c1' => array(
  7397. '0' => 'name',
  7398. ),
  7399. ),
  7400. 'indexes' => array(
  7401. ),
  7402. 'foreign keys' => array(
  7403. ),
  7404. );
  7405. return $description;
  7406. }
  7407. /**
  7408. * Implements hook_contact_relationship_schema()
  7409. * Purpose: To describe the structure of contact_relationship to tripal
  7410. * @see tripal_core_chado_insert()
  7411. * @see tripal_core_chado_update()
  7412. * @see tripal_core_chado_select()
  7413. *
  7414. * @return
  7415. * An array describing the current table
  7416. *
  7417. * @ingroup tripal_schema_api
  7418. *
  7419. */
  7420. function tripal_core_chado_contact_relationship_schema() {
  7421. $description = array();
  7422. $description = array(
  7423. 'table' => 'contact_relationship',
  7424. // 'description' => 'TODO: please describe this table!',
  7425. 'fields' => array(
  7426. 'contact_relationship_id' => array(
  7427. // 'description' => 'TODO: please describe this field!',
  7428. 'type' => 'serial',
  7429. 'not NULL' => '1',
  7430. ),
  7431. 'type_id' => array(
  7432. // 'description' => 'TODO: please describe this field!',
  7433. 'type' => 'int',
  7434. 'not NULL' => '1',
  7435. ),
  7436. 'subject_id' => array(
  7437. // 'description' => 'TODO: please describe this field!',
  7438. 'type' => 'int',
  7439. 'not NULL' => '1',
  7440. ),
  7441. 'object_id' => array(
  7442. // 'description' => 'TODO: please describe this field!',
  7443. 'type' => 'int',
  7444. 'not NULL' => '1',
  7445. ),
  7446. ),
  7447. 'primary key' => array(
  7448. '0' => 'contact_relationship_id',
  7449. ),
  7450. 'unique keys' => array(
  7451. 'contact_relationship_c1' => array(
  7452. '0' => 'subject_id',
  7453. '1' => 'object_id',
  7454. '2' => 'type_id',
  7455. ),
  7456. ),
  7457. 'indexes' => array(
  7458. 'contact_relationship_idx1' => array(
  7459. '0' => 'type_id',
  7460. ),
  7461. 'contact_relationship_idx2' => array(
  7462. '0' => 'subject_id',
  7463. ),
  7464. 'contact_relationship_idx3' => array(
  7465. '0' => 'object_id',
  7466. ),
  7467. ),
  7468. 'foreign keys' => array(
  7469. ),
  7470. );
  7471. return $description;
  7472. }
  7473. /**
  7474. * Implements hook_control_schema()
  7475. * Purpose: To describe the structure of control to tripal
  7476. * @see tripal_core_chado_insert()
  7477. * @see tripal_core_chado_update()
  7478. * @see tripal_core_chado_select()
  7479. *
  7480. * @return
  7481. * An array describing the current table
  7482. *
  7483. * @ingroup tripal_schema_api
  7484. *
  7485. */
  7486. function tripal_core_chado_control_schema() {
  7487. $description = array();
  7488. $description = array(
  7489. 'table' => 'control',
  7490. // 'description' => 'TODO: please describe this table!',
  7491. 'fields' => array(
  7492. 'control_id' => array(
  7493. // 'description' => 'TODO: please describe this field!',
  7494. 'type' => 'serial',
  7495. 'not NULL' => '1',
  7496. ),
  7497. 'type_id' => array(
  7498. // 'description' => 'TODO: please describe this field!',
  7499. 'type' => 'int',
  7500. 'not NULL' => '1',
  7501. ),
  7502. 'assay_id' => array(
  7503. // 'description' => 'TODO: please describe this field!',
  7504. 'type' => 'int',
  7505. 'not NULL' => '1',
  7506. ),
  7507. 'tableinfo_id' => array(
  7508. // 'description' => 'TODO: please describe this field!',
  7509. 'type' => 'int',
  7510. 'not NULL' => '1',
  7511. ),
  7512. 'row_id' => array(
  7513. // 'description' => 'TODO: please describe this field!',
  7514. 'type' => 'int',
  7515. 'not NULL' => '1',
  7516. ),
  7517. 'name' => array(
  7518. // 'description' => 'TODO: please describe this field!',
  7519. 'type' => 'text',
  7520. 'not NULL' => '',
  7521. ),
  7522. 'value' => array(
  7523. // 'description' => 'TODO: please describe this field!',
  7524. 'type' => 'text',
  7525. 'not NULL' => '',
  7526. ),
  7527. 'rank' => array(
  7528. // 'description' => 'TODO: please describe this field!',
  7529. 'type' => 'int',
  7530. 'not NULL' => '1',
  7531. 'default' => '0',
  7532. ),
  7533. ),
  7534. 'primary key' => array(
  7535. '0' => 'control_id',
  7536. ),
  7537. 'unique keys' => array(
  7538. ),
  7539. 'indexes' => array(
  7540. 'control_idx1' => array(
  7541. '0' => 'type_id',
  7542. ),
  7543. 'control_idx2' => array(
  7544. '0' => 'assay_id',
  7545. ),
  7546. 'control_idx3' => array(
  7547. '0' => 'tableinfo_id',
  7548. ),
  7549. 'control_idx4' => array(
  7550. '0' => 'row_id',
  7551. ),
  7552. ),
  7553. 'foreign keys' => array(
  7554. ),
  7555. );
  7556. return $description;
  7557. }
  7558. /**
  7559. * Implements hook_biomaterialprop_schema()
  7560. * Purpose: To describe the structure of biomaterialprop to tripal
  7561. * @see tripal_core_chado_insert()
  7562. * @see tripal_core_chado_update()
  7563. * @see 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_biomaterialprop_schema() {
  7572. $description = array();
  7573. $description = array(
  7574. 'table' => 'biomaterialprop',
  7575. // 'description' => 'TODO: please describe this table!',
  7576. 'fields' => array(
  7577. 'biomaterialprop_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. 'type_id' => array(
  7588. // 'description' => 'TODO: please describe this field!',
  7589. 'type' => 'int',
  7590. 'not NULL' => '1',
  7591. ),
  7592. 'value' => array(
  7593. // 'description' => 'TODO: please describe this field!',
  7594. 'type' => 'text',
  7595. 'not NULL' => '',
  7596. ),
  7597. 'rank' => array(
  7598. // 'description' => 'TODO: please describe this field!',
  7599. 'type' => 'int',
  7600. 'not NULL' => '1',
  7601. 'default' => '0',
  7602. ),
  7603. ),
  7604. 'primary key' => array(
  7605. '0' => 'biomaterialprop_id',
  7606. ),
  7607. 'unique keys' => array(
  7608. 'biomaterialprop_c1' => array(
  7609. '0' => 'biomaterial_id',
  7610. '1' => 'type_id',
  7611. '2' => 'rank',
  7612. ),
  7613. ),
  7614. 'indexes' => array(
  7615. 'biomaterialprop_idx1' => array(
  7616. '0' => 'biomaterial_id',
  7617. ),
  7618. 'biomaterialprop_idx2' => array(
  7619. '0' => 'type_id',
  7620. ),
  7621. ),
  7622. 'foreign keys' => array(
  7623. ),
  7624. );
  7625. return $description;
  7626. }
  7627. /**
  7628. * Implements hook_biomaterial_treatment_schema()
  7629. * Purpose: To describe the structure of biomaterial_treatment to tripal
  7630. * @see tripal_core_chado_insert()
  7631. * @see tripal_core_chado_update()
  7632. * @see tripal_core_chado_select()
  7633. *
  7634. * @return
  7635. * An array describing the current table
  7636. *
  7637. * @ingroup tripal_schema_api
  7638. *
  7639. */
  7640. function tripal_core_chado_biomaterial_treatment_schema() {
  7641. $description = array();
  7642. $description = array(
  7643. 'table' => 'biomaterial_treatment',
  7644. // 'description' => 'TODO: please describe this table!',
  7645. 'fields' => array(
  7646. 'biomaterial_treatment_id' => array(
  7647. // 'description' => 'TODO: please describe this field!',
  7648. 'type' => 'serial',
  7649. 'not NULL' => '1',
  7650. ),
  7651. 'biomaterial_id' => array(
  7652. // 'description' => 'TODO: please describe this field!',
  7653. 'type' => 'int',
  7654. 'not NULL' => '1',
  7655. ),
  7656. 'treatment_id' => array(
  7657. // 'description' => 'TODO: please describe this field!',
  7658. 'type' => 'int',
  7659. 'not NULL' => '1',
  7660. ),
  7661. 'unittype_id' => array(
  7662. // 'description' => 'TODO: please describe this field!',
  7663. 'type' => 'int',
  7664. 'not NULL' => '',
  7665. ),
  7666. 'value' => array(
  7667. // 'description' => 'TODO: please describe this field!',
  7668. 'type' => 'float',
  7669. 'not NULL' => '',
  7670. ),
  7671. 'rank' => array(
  7672. // 'description' => 'TODO: please describe this field!',
  7673. 'type' => 'int',
  7674. 'not NULL' => '1',
  7675. 'default' => '0',
  7676. ),
  7677. ),
  7678. 'primary key' => array(
  7679. '0' => 'biomaterial_treatment_id',
  7680. ),
  7681. 'unique keys' => array(
  7682. 'biomaterial_treatment_c1' => array(
  7683. '0' => 'biomaterial_id',
  7684. '1' => 'treatment_id',
  7685. ),
  7686. ),
  7687. 'indexes' => array(
  7688. 'biomaterial_treatment_idx1' => array(
  7689. '0' => 'biomaterial_id',
  7690. ),
  7691. 'biomaterial_treatment_idx2' => array(
  7692. '0' => 'treatment_id',
  7693. ),
  7694. 'biomaterial_treatment_idx3' => array(
  7695. '0' => 'unittype_id',
  7696. ),
  7697. ),
  7698. 'foreign keys' => array(
  7699. ),
  7700. );
  7701. return $description;
  7702. }
  7703. /**
  7704. * Implements hook_acquisition_relationship_schema()
  7705. * Purpose: To describe the structure of acquisition_relationship to tripal
  7706. * @see tripal_core_chado_insert()
  7707. * @see tripal_core_chado_update()
  7708. * @see tripal_core_chado_select()
  7709. *
  7710. * @return
  7711. * An array describing the current table
  7712. *
  7713. * @ingroup tripal_schema_api
  7714. *
  7715. */
  7716. function tripal_core_chado_acquisition_relationship_schema() {
  7717. $description = array();
  7718. $description = array(
  7719. 'table' => 'acquisition_relationship',
  7720. // 'description' => 'TODO: please describe this table!',
  7721. 'fields' => array(
  7722. 'acquisition_relationship_id' => array(
  7723. // 'description' => 'TODO: please describe this field!',
  7724. 'type' => 'serial',
  7725. 'not NULL' => '1',
  7726. ),
  7727. 'subject_id' => array(
  7728. // 'description' => 'TODO: please describe this field!',
  7729. 'type' => 'int',
  7730. 'not NULL' => '1',
  7731. ),
  7732. 'type_id' => array(
  7733. // 'description' => 'TODO: please describe this field!',
  7734. 'type' => 'int',
  7735. 'not NULL' => '1',
  7736. ),
  7737. 'object_id' => array(
  7738. // 'description' => 'TODO: please describe this field!',
  7739. 'type' => 'int',
  7740. 'not NULL' => '1',
  7741. ),
  7742. 'value' => array(
  7743. // 'description' => 'TODO: please describe this field!',
  7744. 'type' => 'text',
  7745. 'not NULL' => '',
  7746. ),
  7747. 'rank' => array(
  7748. // 'description' => 'TODO: please describe this field!',
  7749. 'type' => 'int',
  7750. 'not NULL' => '1',
  7751. 'default' => '0',
  7752. ),
  7753. ),
  7754. 'primary key' => array(
  7755. '0' => 'acquisition_relationship_id',
  7756. ),
  7757. 'unique keys' => array(
  7758. 'acquisition_relationship_c1' => array(
  7759. '0' => 'subject_id',
  7760. '1' => 'object_id',
  7761. '2' => 'type_id',
  7762. '3' => 'rank',
  7763. ),
  7764. ),
  7765. 'indexes' => array(
  7766. 'acquisition_relationship_idx1' => array(
  7767. '0' => 'subject_id',
  7768. ),
  7769. 'acquisition_relationship_idx2' => array(
  7770. '0' => 'type_id',
  7771. ),
  7772. 'acquisition_relationship_idx3' => array(
  7773. '0' => 'object_id',
  7774. ),
  7775. ),
  7776. 'foreign keys' => array(
  7777. ),
  7778. );
  7779. return $description;
  7780. }
  7781. /**
  7782. * Implements hook_acquisition_schema()
  7783. * Purpose: To describe the structure of acquisition to tripal
  7784. * @see tripal_core_chado_insert()
  7785. * @see tripal_core_chado_update()
  7786. * @see tripal_core_chado_select()
  7787. *
  7788. * @return
  7789. * An array describing the current table
  7790. *
  7791. * @ingroup tripal_schema_api
  7792. *
  7793. */
  7794. function tripal_core_chado_acquisition_schema() {
  7795. $description = array();
  7796. $description = array(
  7797. 'table' => 'acquisition',
  7798. // 'description' => 'TODO: please describe this table!',
  7799. 'fields' => array(
  7800. 'acquisition_id' => array(
  7801. // 'description' => 'TODO: please describe this field!',
  7802. 'type' => 'serial',
  7803. 'not NULL' => '1',
  7804. ),
  7805. 'assay_id' => array(
  7806. // 'description' => 'TODO: please describe this field!',
  7807. 'type' => 'int',
  7808. 'not NULL' => '1',
  7809. ),
  7810. 'protocol_id' => array(
  7811. // 'description' => 'TODO: please describe this field!',
  7812. 'type' => 'int',
  7813. 'not NULL' => '',
  7814. ),
  7815. 'channel_id' => array(
  7816. // 'description' => 'TODO: please describe this field!',
  7817. 'type' => 'int',
  7818. 'not NULL' => '',
  7819. ),
  7820. 'acquisitiondate' => array(
  7821. // 'description' => 'TODO: please describe this field!',
  7822. 'type' => 'datetime',
  7823. 'not NULL' => '',
  7824. 'default' => 'ow(',
  7825. ),
  7826. 'name' => array(
  7827. // 'description' => 'TODO: please describe this field!',
  7828. 'type' => 'text',
  7829. 'not NULL' => '',
  7830. ),
  7831. 'uri' => array(
  7832. // 'description' => 'TODO: please describe this field!',
  7833. 'type' => 'text',
  7834. 'not NULL' => '',
  7835. ),
  7836. ),
  7837. 'primary key' => array(
  7838. '0' => 'acquisition_id',
  7839. ),
  7840. 'unique keys' => array(
  7841. 'acquisition_c1' => array(
  7842. '0' => 'name',
  7843. ),
  7844. ),
  7845. 'indexes' => array(
  7846. 'acquisition_idx1' => array(
  7847. '0' => 'assay_id',
  7848. ),
  7849. 'acquisition_idx2' => array(
  7850. '0' => 'protocol_id',
  7851. ),
  7852. 'acquisition_idx3' => array(
  7853. '0' => 'channel_id',
  7854. ),
  7855. ),
  7856. 'foreign keys' => array(
  7857. ),
  7858. );
  7859. return $description;
  7860. }
  7861. /**
  7862. * Implements hook_acquisitionprop_schema()
  7863. * Purpose: To describe the structure of acquisitionprop to tripal
  7864. * @see tripal_core_chado_insert()
  7865. * @see tripal_core_chado_update()
  7866. * @see 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_acquisitionprop_schema() {
  7875. $description = array();
  7876. $description = array(
  7877. 'table' => 'acquisitionprop',
  7878. // 'description' => 'TODO: please describe this table!',
  7879. 'fields' => array(
  7880. 'acquisitionprop_id' => array(
  7881. // 'description' => 'TODO: please describe this field!',
  7882. 'type' => 'serial',
  7883. 'not NULL' => '1',
  7884. ),
  7885. 'acquisition_id' => array(
  7886. // 'description' => 'TODO: please describe this field!',
  7887. 'type' => 'int',
  7888. 'not NULL' => '1',
  7889. ),
  7890. 'type_id' => array(
  7891. // 'description' => 'TODO: please describe this field!',
  7892. 'type' => 'int',
  7893. 'not NULL' => '1',
  7894. ),
  7895. 'value' => array(
  7896. // 'description' => 'TODO: please describe this field!',
  7897. 'type' => 'text',
  7898. 'not NULL' => '',
  7899. ),
  7900. 'rank' => array(
  7901. // 'description' => 'TODO: please describe this field!',
  7902. 'type' => 'int',
  7903. 'not NULL' => '1',
  7904. 'default' => '0',
  7905. ),
  7906. ),
  7907. 'primary key' => array(
  7908. '0' => 'acquisitionprop_id',
  7909. ),
  7910. 'unique keys' => array(
  7911. 'acquisitionprop_c1' => array(
  7912. '0' => 'acquisition_id',
  7913. '1' => 'type_id',
  7914. '2' => 'rank',
  7915. ),
  7916. ),
  7917. 'indexes' => array(
  7918. 'acquisitionprop_idx1' => array(
  7919. '0' => 'acquisition_id',
  7920. ),
  7921. 'acquisitionprop_idx2' => array(
  7922. '0' => 'type_id',
  7923. ),
  7924. ),
  7925. 'foreign keys' => array(
  7926. ),
  7927. );
  7928. return $description;
  7929. }
  7930. /**
  7931. * Implements hook_all_feature_names_schema()
  7932. * Purpose: To describe the structure of all_feature_names to tripal
  7933. * @see tripal_core_chado_insert()
  7934. * @see tripal_core_chado_update()
  7935. * @see tripal_core_chado_select()
  7936. *
  7937. * @return
  7938. * An array describing the current table
  7939. *
  7940. * @ingroup tripal_schema_api
  7941. *
  7942. */
  7943. function tripal_core_chado_all_feature_names_schema() {
  7944. $description = array();
  7945. $description = array(
  7946. 'table' => 'all_feature_names',
  7947. // 'description' => 'TODO: please describe this table!',
  7948. 'fields' => array(
  7949. 'feature_id' => array(
  7950. // 'description' => 'TODO: please describe this field!',
  7951. 'type' => 'int',
  7952. 'not NULL' => '',
  7953. ),
  7954. 'name' => array(
  7955. // 'description' => 'TODO: please describe this field!',
  7956. 'type' => 'varchar',
  7957. 'length' => '255',
  7958. 'not NULL' => '',
  7959. ),
  7960. 'organism_id' => array(
  7961. // 'description' => 'TODO: please describe this field!',
  7962. 'type' => 'int',
  7963. 'not NULL' => '',
  7964. ),
  7965. ),
  7966. 'primary key' => array(
  7967. ),
  7968. 'unique keys' => array(
  7969. ),
  7970. 'indexes' => array(
  7971. ),
  7972. 'foreign keys' => array(
  7973. ),
  7974. );
  7975. return $description;
  7976. }
  7977. /**
  7978. * Implements hook_analysis_schema()
  7979. * Purpose: To describe the structure of analysis to tripal
  7980. * @see tripal_core_chado_insert()
  7981. * @see tripal_core_chado_update()
  7982. * @see tripal_core_chado_select()
  7983. *
  7984. * @return
  7985. * An array describing the current table
  7986. *
  7987. * @ingroup tripal_schema_api
  7988. *
  7989. */
  7990. function tripal_core_chado_analysis_schema() {
  7991. $description = array();
  7992. $description = array(
  7993. 'table' => 'analysis',
  7994. // 'description' => 'TODO: please describe this table!',
  7995. 'fields' => array(
  7996. 'analysis_id' => array(
  7997. // 'description' => 'TODO: please describe this field!',
  7998. 'type' => 'serial',
  7999. 'not NULL' => '1',
  8000. ),
  8001. 'name' => array(
  8002. // 'description' => 'TODO: please describe this field!',
  8003. 'type' => 'varchar',
  8004. 'length' => '255',
  8005. 'not NULL' => '',
  8006. ),
  8007. 'description' => array(
  8008. // 'description' => 'TODO: please describe this field!',
  8009. 'type' => 'text',
  8010. 'not NULL' => '',
  8011. ),
  8012. 'program' => array(
  8013. // 'description' => 'TODO: please describe this field!',
  8014. 'type' => 'varchar',
  8015. 'length' => '255',
  8016. 'not NULL' => '1',
  8017. ),
  8018. 'programversion' => array(
  8019. // 'description' => 'TODO: please describe this field!',
  8020. 'type' => 'varchar',
  8021. 'length' => '255',
  8022. 'not NULL' => '1',
  8023. ),
  8024. 'algorithm' => array(
  8025. // 'description' => 'TODO: please describe this field!',
  8026. 'type' => 'varchar',
  8027. 'length' => '255',
  8028. 'not NULL' => '',
  8029. ),
  8030. 'sourcename' => array(
  8031. // 'description' => 'TODO: please describe this field!',
  8032. 'type' => 'varchar',
  8033. 'length' => '255',
  8034. 'not NULL' => '',
  8035. ),
  8036. 'sourceversion' => array(
  8037. // 'description' => 'TODO: please describe this field!',
  8038. 'type' => 'varchar',
  8039. 'length' => '255',
  8040. 'not NULL' => '',
  8041. ),
  8042. 'sourceuri' => array(
  8043. // 'description' => 'TODO: please describe this field!',
  8044. 'type' => 'text',
  8045. 'not NULL' => '',
  8046. ),
  8047. 'timeexecuted' => array(
  8048. // 'description' => 'TODO: please describe this field!',
  8049. 'type' => 'datetime',
  8050. 'not NULL' => '1',
  8051. 'default' => 'ow(',
  8052. ),
  8053. ),
  8054. 'primary key' => array(
  8055. '0' => 'analysis_id',
  8056. ),
  8057. 'unique keys' => array(
  8058. 'analysis_c1' => array(
  8059. '0' => 'program',
  8060. '1' => 'programversion',
  8061. '2' => 'sourcename',
  8062. ),
  8063. ),
  8064. 'indexes' => array(
  8065. ),
  8066. 'foreign keys' => array(
  8067. ),
  8068. );
  8069. return $description;
  8070. }
  8071. /**
  8072. * Implements hook_analysisfeature_schema()
  8073. * Purpose: To describe the structure of analysisfeature to tripal
  8074. * @see tripal_core_chado_insert()
  8075. * @see tripal_core_chado_update()
  8076. * @see tripal_core_chado_select()
  8077. *
  8078. * @return
  8079. * An array describing the current table
  8080. *
  8081. * @ingroup tripal_schema_api
  8082. *
  8083. */
  8084. function tripal_core_chado_analysisfeature_schema() {
  8085. $description = array();
  8086. $description = array(
  8087. 'table' => 'analysisfeature',
  8088. // 'description' => 'TODO: please describe this table!',
  8089. 'fields' => array(
  8090. 'analysisfeature_id' => array(
  8091. // 'description' => 'TODO: please describe this field!',
  8092. 'type' => 'serial',
  8093. 'not NULL' => '1',
  8094. ),
  8095. 'feature_id' => array(
  8096. // 'description' => 'TODO: please describe this field!',
  8097. 'type' => 'int',
  8098. 'not NULL' => '1',
  8099. ),
  8100. 'analysis_id' => array(
  8101. // 'description' => 'TODO: please describe this field!',
  8102. 'type' => 'int',
  8103. 'not NULL' => '1',
  8104. ),
  8105. 'rawscore' => array(
  8106. // 'description' => 'TODO: please describe this field!',
  8107. 'type' => 'float',
  8108. 'size' => 'big',
  8109. 'not NULL' => '',
  8110. ),
  8111. 'normscore' => array(
  8112. // 'description' => 'TODO: please describe this field!',
  8113. 'type' => 'float',
  8114. 'size' => 'big',
  8115. 'not NULL' => '',
  8116. ),
  8117. 'significance' => array(
  8118. // 'description' => 'TODO: please describe this field!',
  8119. 'type' => 'float',
  8120. 'size' => 'big',
  8121. 'not NULL' => '',
  8122. ),
  8123. 'identity' => array(
  8124. // 'description' => 'TODO: please describe this field!',
  8125. 'type' => 'float',
  8126. 'size' => 'big',
  8127. 'not NULL' => '',
  8128. ),
  8129. ),
  8130. 'primary key' => array(
  8131. '0' => 'analysisfeature_id',
  8132. ),
  8133. 'unique keys' => array(
  8134. 'analysisfeature_c1' => array(
  8135. '0' => 'feature_id',
  8136. '1' => 'analysis_id',
  8137. ),
  8138. ),
  8139. 'indexes' => array(
  8140. 'analysisfeature_idx1' => array(
  8141. '0' => 'feature_id',
  8142. ),
  8143. 'analysisfeature_idx2' => array(
  8144. '0' => 'analysis_id',
  8145. ),
  8146. ),
  8147. 'foreign keys' => array(
  8148. ),
  8149. );
  8150. return $description;
  8151. }
  8152. /**
  8153. * Implements hook_analysisfeatureprop_schema()
  8154. * Purpose: To describe the structure of analysisfeatureprop to tripal
  8155. * @see tripal_core_chado_insert()
  8156. * @see tripal_core_chado_update()
  8157. * @see tripal_core_chado_select()
  8158. *
  8159. * @return
  8160. * An array describing the current table
  8161. *
  8162. * @ingroup tripal_schema_api
  8163. *
  8164. */
  8165. function tripal_core_chado_analysisfeatureprop_schema() {
  8166. $description = array();
  8167. $description = array(
  8168. 'table' => 'analysisfeatureprop',
  8169. // 'description' => 'TODO: please describe this table!',
  8170. 'fields' => array(
  8171. 'analysisfeatureprop_id' => array(
  8172. // 'description' => 'TODO: please describe this field!',
  8173. 'type' => 'serial',
  8174. 'not NULL' => '1',
  8175. ),
  8176. 'analysisfeature_id' => array(
  8177. // 'description' => 'TODO: please describe this field!',
  8178. 'type' => 'int',
  8179. 'not NULL' => '1',
  8180. ),
  8181. 'type_id' => array(
  8182. // 'description' => 'TODO: please describe this field!',
  8183. 'type' => 'int',
  8184. 'not NULL' => '1',
  8185. ),
  8186. 'value' => array(
  8187. // 'description' => 'TODO: please describe this field!',
  8188. 'type' => 'text',
  8189. 'not NULL' => '',
  8190. ),
  8191. 'rank' => array(
  8192. // 'description' => 'TODO: please describe this field!',
  8193. 'type' => 'int',
  8194. 'not NULL' => '1',
  8195. ),
  8196. ),
  8197. 'primary key' => array(
  8198. '0' => 'analysisfeatureprop_id',
  8199. ),
  8200. 'unique keys' => array(
  8201. 'analysisfeature_id_type_id_rank' => array(
  8202. '0' => 'analysisfeature_id',
  8203. '1' => 'type_id',
  8204. '2' => 'rank',
  8205. ),
  8206. ),
  8207. 'indexes' => array(
  8208. ),
  8209. 'foreign keys' => array(
  8210. ),
  8211. );
  8212. return $description;
  8213. }
  8214. /**
  8215. * Implements hook_assayprop_schema()
  8216. * Purpose: To describe the structure of assayprop to tripal
  8217. * @see tripal_core_chado_insert()
  8218. * @see tripal_core_chado_update()
  8219. * @see 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_assayprop_schema() {
  8228. $description = array();
  8229. $description = array(
  8230. 'table' => 'assayprop',
  8231. // 'description' => 'TODO: please describe this table!',
  8232. 'fields' => array(
  8233. 'assayprop_id' => array(
  8234. // 'description' => 'TODO: please describe this field!',
  8235. 'type' => 'serial',
  8236. 'not NULL' => '1',
  8237. ),
  8238. 'assay_id' => array(
  8239. // 'description' => 'TODO: please describe this field!',
  8240. 'type' => 'int',
  8241. 'not NULL' => '1',
  8242. ),
  8243. 'type_id' => array(
  8244. // 'description' => 'TODO: please describe this field!',
  8245. 'type' => 'int',
  8246. 'not NULL' => '1',
  8247. ),
  8248. 'value' => array(
  8249. // 'description' => 'TODO: please describe this field!',
  8250. 'type' => 'text',
  8251. 'not NULL' => '',
  8252. ),
  8253. 'rank' => array(
  8254. // 'description' => 'TODO: please describe this field!',
  8255. 'type' => 'int',
  8256. 'not NULL' => '1',
  8257. 'default' => '0',
  8258. ),
  8259. ),
  8260. 'primary key' => array(
  8261. '0' => 'assayprop_id',
  8262. ),
  8263. 'unique keys' => array(
  8264. 'assayprop_c1' => array(
  8265. '0' => 'assay_id',
  8266. '1' => 'type_id',
  8267. '2' => 'rank',
  8268. ),
  8269. ),
  8270. 'indexes' => array(
  8271. 'assayprop_idx1' => array(
  8272. '0' => 'assay_id',
  8273. ),
  8274. 'assayprop_idx2' => array(
  8275. '0' => 'type_id',
  8276. ),
  8277. ),
  8278. 'foreign keys' => array(
  8279. ),
  8280. );
  8281. return $description;
  8282. }
  8283. /**
  8284. * Implements hook_biomaterial_schema()
  8285. * Purpose: To describe the structure of biomaterial to tripal
  8286. * @see tripal_core_chado_insert()
  8287. * @see tripal_core_chado_update()
  8288. * @see tripal_core_chado_select()
  8289. *
  8290. * @return
  8291. * An array describing the current table
  8292. *
  8293. * @ingroup tripal_schema_api
  8294. *
  8295. */
  8296. function tripal_core_chado_biomaterial_schema() {
  8297. $description = array();
  8298. $description = array(
  8299. 'table' => 'biomaterial',
  8300. // 'description' => 'TODO: please describe this table!',
  8301. 'fields' => array(
  8302. 'biomaterial_id' => array(
  8303. // 'description' => 'TODO: please describe this field!',
  8304. 'type' => 'serial',
  8305. 'not NULL' => '1',
  8306. ),
  8307. 'taxon_id' => array(
  8308. // 'description' => 'TODO: please describe this field!',
  8309. 'type' => 'int',
  8310. 'not NULL' => '',
  8311. ),
  8312. 'biosourceprovider_id' => array(
  8313. // 'description' => 'TODO: please describe this field!',
  8314. 'type' => 'int',
  8315. 'not NULL' => '',
  8316. ),
  8317. 'dbxref_id' => array(
  8318. // 'description' => 'TODO: please describe this field!',
  8319. 'type' => 'int',
  8320. 'not NULL' => '',
  8321. ),
  8322. 'name' => array(
  8323. // 'description' => 'TODO: please describe this field!',
  8324. 'type' => 'text',
  8325. 'not NULL' => '',
  8326. ),
  8327. 'description' => array(
  8328. // 'description' => 'TODO: please describe this field!',
  8329. 'type' => 'text',
  8330. 'not NULL' => '',
  8331. ),
  8332. ),
  8333. 'primary key' => array(
  8334. '0' => 'biomaterial_id',
  8335. ),
  8336. 'unique keys' => array(
  8337. 'biomaterial_c1' => array(
  8338. '0' => 'name',
  8339. ),
  8340. ),
  8341. 'indexes' => array(
  8342. 'biomaterial_idx1' => array(
  8343. '0' => 'taxon_id',
  8344. ),
  8345. 'biomaterial_idx2' => array(
  8346. '0' => 'biosourceprovider_id',
  8347. ),
  8348. 'biomaterial_idx3' => array(
  8349. '0' => 'dbxref_id',
  8350. ),
  8351. ),
  8352. 'foreign keys' => array(
  8353. ),
  8354. );
  8355. return $description;
  8356. }
  8357. /**
  8358. * Implements hook_biomaterial_dbxref_schema()
  8359. * Purpose: To describe the structure of biomaterial_dbxref to tripal
  8360. * @see tripal_core_chado_insert()
  8361. * @see tripal_core_chado_update()
  8362. * @see tripal_core_chado_select()
  8363. *
  8364. * @return
  8365. * An array describing the current table
  8366. *
  8367. * @ingroup tripal_schema_api
  8368. *
  8369. */
  8370. function tripal_core_chado_biomaterial_dbxref_schema() {
  8371. $description = array();
  8372. $description = array(
  8373. 'table' => 'biomaterial_dbxref',
  8374. // 'description' => 'TODO: please describe this table!',
  8375. 'fields' => array(
  8376. 'biomaterial_dbxref_id' => array(
  8377. // 'description' => 'TODO: please describe this field!',
  8378. 'type' => 'serial',
  8379. 'not NULL' => '1',
  8380. ),
  8381. 'biomaterial_id' => array(
  8382. // 'description' => 'TODO: please describe this field!',
  8383. 'type' => 'int',
  8384. 'not NULL' => '1',
  8385. ),
  8386. 'dbxref_id' => array(
  8387. // 'description' => 'TODO: please describe this field!',
  8388. 'type' => 'int',
  8389. 'not NULL' => '1',
  8390. ),
  8391. ),
  8392. 'primary key' => array(
  8393. '0' => 'biomaterial_dbxref_id',
  8394. ),
  8395. 'unique keys' => array(
  8396. 'biomaterial_dbxref_c1' => array(
  8397. '0' => 'biomaterial_id',
  8398. '1' => 'dbxref_id',
  8399. ),
  8400. ),
  8401. 'indexes' => array(
  8402. 'biomaterial_dbxref_idx1' => array(
  8403. '0' => 'biomaterial_id',
  8404. ),
  8405. 'biomaterial_dbxref_idx2' => array(
  8406. '0' => 'dbxref_id',
  8407. ),
  8408. ),
  8409. 'foreign keys' => array(
  8410. ),
  8411. );
  8412. return $description;
  8413. }
  8414. /**
  8415. * Implements hook_biomaterial_relationship_schema()
  8416. * Purpose: To describe the structure of biomaterial_relationship to tripal
  8417. * @see tripal_core_chado_insert()
  8418. * @see tripal_core_chado_update()
  8419. * @see tripal_core_chado_select()
  8420. *
  8421. * @return
  8422. * An array describing the current table
  8423. *
  8424. * @ingroup tripal_schema_api
  8425. *
  8426. */
  8427. function tripal_core_chado_biomaterial_relationship_schema() {
  8428. $description = array();
  8429. $description = array(
  8430. 'table' => 'biomaterial_relationship',
  8431. // 'description' => 'TODO: please describe this table!',
  8432. 'fields' => array(
  8433. 'biomaterial_relationship_id' => array(
  8434. // 'description' => 'TODO: please describe this field!',
  8435. 'type' => 'serial',
  8436. 'not NULL' => '1',
  8437. ),
  8438. 'subject_id' => array(
  8439. // 'description' => 'TODO: please describe this field!',
  8440. 'type' => 'int',
  8441. 'not NULL' => '1',
  8442. ),
  8443. 'type_id' => array(
  8444. // 'description' => 'TODO: please describe this field!',
  8445. 'type' => 'int',
  8446. 'not NULL' => '1',
  8447. ),
  8448. 'object_id' => array(
  8449. // 'description' => 'TODO: please describe this field!',
  8450. 'type' => 'int',
  8451. 'not NULL' => '1',
  8452. ),
  8453. ),
  8454. 'primary key' => array(
  8455. '0' => 'biomaterial_relationship_id',
  8456. ),
  8457. 'unique keys' => array(
  8458. 'biomaterial_relationship_c1' => array(
  8459. '0' => 'subject_id',
  8460. '1' => 'object_id',
  8461. '2' => 'type_id',
  8462. ),
  8463. ),
  8464. 'indexes' => array(
  8465. 'biomaterial_relationship_idx1' => array(
  8466. '0' => 'subject_id',
  8467. ),
  8468. 'biomaterial_relationship_idx2' => array(
  8469. '0' => 'object_id',
  8470. ),
  8471. 'biomaterial_relationship_idx3' => array(
  8472. '0' => 'type_id',
  8473. ),
  8474. ),
  8475. 'foreign keys' => array(
  8476. ),
  8477. );
  8478. return $description;
  8479. }
  8480. /**
  8481. * Implements hook_assay_project_schema()
  8482. * Purpose: To describe the structure of assay_project to tripal
  8483. * @see tripal_core_chado_insert()
  8484. * @see tripal_core_chado_update()
  8485. * @see tripal_core_chado_select()
  8486. *
  8487. * @return
  8488. * An array describing the current table
  8489. *
  8490. * @ingroup tripal_schema_api
  8491. *
  8492. */
  8493. function tripal_core_chado_assay_project_schema() {
  8494. $description = array();
  8495. $description = array(
  8496. 'table' => 'assay_project',
  8497. // 'description' => 'TODO: please describe this table!',
  8498. 'fields' => array(
  8499. 'assay_project_id' => array(
  8500. // 'description' => 'TODO: please describe this field!',
  8501. 'type' => 'serial',
  8502. 'not NULL' => '1',
  8503. ),
  8504. 'assay_id' => array(
  8505. // 'description' => 'TODO: please describe this field!',
  8506. 'type' => 'int',
  8507. 'not NULL' => '1',
  8508. ),
  8509. 'project_id' => array(
  8510. // 'description' => 'TODO: please describe this field!',
  8511. 'type' => 'int',
  8512. 'not NULL' => '1',
  8513. ),
  8514. ),
  8515. 'primary key' => array(
  8516. '0' => 'assay_project_id',
  8517. ),
  8518. 'unique keys' => array(
  8519. 'assay_project_c1' => array(
  8520. '0' => 'assay_id',
  8521. '1' => 'project_id',
  8522. ),
  8523. ),
  8524. 'indexes' => array(
  8525. 'assay_project_idx1' => array(
  8526. '0' => 'assay_id',
  8527. ),
  8528. 'assay_project_idx2' => array(
  8529. '0' => 'project_id',
  8530. ),
  8531. ),
  8532. 'foreign keys' => array(
  8533. ),
  8534. );
  8535. return $description;
  8536. }
  8537. /**
  8538. * Implements hook_assay_biomaterial_schema()
  8539. * Purpose: To describe the structure of assay_biomaterial to tripal
  8540. * @see tripal_core_chado_insert()
  8541. * @see tripal_core_chado_update()
  8542. * @see tripal_core_chado_select()
  8543. *
  8544. * @return
  8545. * An array describing the current table
  8546. *
  8547. * @ingroup tripal_schema_api
  8548. *
  8549. */
  8550. function tripal_core_chado_assay_biomaterial_schema() {
  8551. $description = array();
  8552. $description = array(
  8553. 'table' => 'assay_biomaterial',
  8554. // 'description' => 'TODO: please describe this table!',
  8555. 'fields' => array(
  8556. 'assay_biomaterial_id' => array(
  8557. // 'description' => 'TODO: please describe this field!',
  8558. 'type' => 'serial',
  8559. 'not NULL' => '1',
  8560. ),
  8561. 'assay_id' => array(
  8562. // 'description' => 'TODO: please describe this field!',
  8563. 'type' => 'int',
  8564. 'not NULL' => '1',
  8565. ),
  8566. 'biomaterial_id' => array(
  8567. // 'description' => 'TODO: please describe this field!',
  8568. 'type' => 'int',
  8569. 'not NULL' => '1',
  8570. ),
  8571. 'channel_id' => array(
  8572. // 'description' => 'TODO: please describe this field!',
  8573. 'type' => 'int',
  8574. 'not NULL' => '',
  8575. ),
  8576. 'rank' => array(
  8577. // 'description' => 'TODO: please describe this field!',
  8578. 'type' => 'int',
  8579. 'not NULL' => '1',
  8580. 'default' => '0',
  8581. ),
  8582. ),
  8583. 'primary key' => array(
  8584. '0' => 'assay_biomaterial_id',
  8585. ),
  8586. 'unique keys' => array(
  8587. 'assay_biomaterial_c1' => array(
  8588. '0' => 'assay_id',
  8589. '1' => 'biomaterial_id',
  8590. '2' => 'channel_id',
  8591. '3' => 'rank',
  8592. ),
  8593. ),
  8594. 'indexes' => array(
  8595. 'assay_biomaterial_idx1' => array(
  8596. '0' => 'assay_id',
  8597. ),
  8598. 'assay_biomaterial_idx2' => array(
  8599. '0' => 'biomaterial_id',
  8600. ),
  8601. 'assay_biomaterial_idx3' => array(
  8602. '0' => 'channel_id',
  8603. ),
  8604. ),
  8605. 'foreign keys' => array(
  8606. ),
  8607. );
  8608. return $description;
  8609. }
  8610. /**
  8611. * Implements hook_analysisprop_schema()
  8612. * Purpose: To describe the structure of analysisprop to tripal
  8613. * @see tripal_core_chado_insert()
  8614. * @see tripal_core_chado_update()
  8615. * @see 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_analysisprop_schema() {
  8624. $description = array();
  8625. $description = array(
  8626. 'table' => 'analysisprop',
  8627. // 'description' => 'TODO: please describe this table!',
  8628. 'fields' => array(
  8629. 'analysisprop_id' => array(
  8630. // 'description' => 'TODO: please describe this field!',
  8631. 'type' => 'serial',
  8632. 'not NULL' => '1',
  8633. ),
  8634. 'analysis_id' => array(
  8635. // 'description' => 'TODO: please describe this field!',
  8636. 'type' => 'int',
  8637. 'not NULL' => '1',
  8638. ),
  8639. 'type_id' => array(
  8640. // 'description' => 'TODO: please describe this field!',
  8641. 'type' => 'int',
  8642. 'not NULL' => '1',
  8643. ),
  8644. 'value' => array(
  8645. // 'description' => 'TODO: please describe this field!',
  8646. 'type' => 'text',
  8647. 'not NULL' => '',
  8648. ),
  8649. ),
  8650. 'primary key' => array(
  8651. '0' => 'analysisprop_id',
  8652. ),
  8653. 'unique keys' => array(
  8654. 'analysisprop_c1' => array(
  8655. '0' => 'analysis_id',
  8656. '1' => 'type_id',
  8657. ),
  8658. ),
  8659. 'indexes' => array(
  8660. 'analysisprop_idx1' => array(
  8661. '0' => 'analysis_id',
  8662. ),
  8663. 'analysisprop_idx2' => array(
  8664. '0' => 'type_id',
  8665. ),
  8666. ),
  8667. 'foreign keys' => array(
  8668. ),
  8669. );
  8670. return $description;
  8671. }
  8672. /**
  8673. * Implements hook_arraydesign_schema()
  8674. * Purpose: To describe the structure of arraydesign to tripal
  8675. * @see tripal_core_chado_insert()
  8676. * @see tripal_core_chado_update()
  8677. * @see tripal_core_chado_select()
  8678. *
  8679. * @return
  8680. * An array describing the current table
  8681. *
  8682. * @ingroup tripal_schema_api
  8683. *
  8684. */
  8685. function tripal_core_chado_arraydesign_schema() {
  8686. $description = array();
  8687. $description = array(
  8688. 'table' => 'arraydesign',
  8689. // 'description' => 'TODO: please describe this table!',
  8690. 'fields' => array(
  8691. 'arraydesign_id' => array(
  8692. // 'description' => 'TODO: please describe this field!',
  8693. 'type' => 'serial',
  8694. 'not NULL' => '1',
  8695. ),
  8696. 'manufacturer_id' => array(
  8697. // 'description' => 'TODO: please describe this field!',
  8698. 'type' => 'int',
  8699. 'not NULL' => '1',
  8700. ),
  8701. 'platformtype_id' => array(
  8702. // 'description' => 'TODO: please describe this field!',
  8703. 'type' => 'int',
  8704. 'not NULL' => '1',
  8705. ),
  8706. 'substratetype_id' => array(
  8707. // 'description' => 'TODO: please describe this field!',
  8708. 'type' => 'int',
  8709. 'not NULL' => '',
  8710. ),
  8711. 'protocol_id' => array(
  8712. // 'description' => 'TODO: please describe this field!',
  8713. 'type' => 'int',
  8714. 'not NULL' => '',
  8715. ),
  8716. 'dbxref_id' => array(
  8717. // 'description' => 'TODO: please describe this field!',
  8718. 'type' => 'int',
  8719. 'not NULL' => '',
  8720. ),
  8721. 'name' => array(
  8722. // 'description' => 'TODO: please describe this field!',
  8723. 'type' => 'text',
  8724. 'not NULL' => '1',
  8725. ),
  8726. 'version' => array(
  8727. // 'description' => 'TODO: please describe this field!',
  8728. 'type' => 'text',
  8729. 'not NULL' => '',
  8730. ),
  8731. 'description' => array(
  8732. // 'description' => 'TODO: please describe this field!',
  8733. 'type' => 'text',
  8734. 'not NULL' => '',
  8735. ),
  8736. 'array_dimensions' => array(
  8737. // 'description' => 'TODO: please describe this field!',
  8738. 'type' => 'text',
  8739. 'not NULL' => '',
  8740. ),
  8741. 'element_dimensions' => array(
  8742. // 'description' => 'TODO: please describe this field!',
  8743. 'type' => 'text',
  8744. 'not NULL' => '',
  8745. ),
  8746. 'num_of_elements' => array(
  8747. // 'description' => 'TODO: please describe this field!',
  8748. 'type' => 'int',
  8749. 'not NULL' => '',
  8750. ),
  8751. 'num_array_columns' => array(
  8752. // 'description' => 'TODO: please describe this field!',
  8753. 'type' => 'int',
  8754. 'not NULL' => '',
  8755. ),
  8756. 'num_array_rows' => array(
  8757. // 'description' => 'TODO: please describe this field!',
  8758. 'type' => 'int',
  8759. 'not NULL' => '',
  8760. ),
  8761. 'num_grid_columns' => array(
  8762. // 'description' => 'TODO: please describe this field!',
  8763. 'type' => 'int',
  8764. 'not NULL' => '',
  8765. ),
  8766. 'num_grid_rows' => array(
  8767. // 'description' => 'TODO: please describe this field!',
  8768. 'type' => 'int',
  8769. 'not NULL' => '',
  8770. ),
  8771. 'num_sub_columns' => array(
  8772. // 'description' => 'TODO: please describe this field!',
  8773. 'type' => 'int',
  8774. 'not NULL' => '',
  8775. ),
  8776. 'num_sub_rows' => array(
  8777. // 'description' => 'TODO: please describe this field!',
  8778. 'type' => 'int',
  8779. 'not NULL' => '',
  8780. ),
  8781. ),
  8782. 'primary key' => array(
  8783. '0' => 'arraydesign_id',
  8784. ),
  8785. 'unique keys' => array(
  8786. 'arraydesign_c1' => array(
  8787. '0' => 'name',
  8788. ),
  8789. ),
  8790. 'indexes' => array(
  8791. 'arraydesign_idx1' => array(
  8792. '0' => 'manufacturer_id',
  8793. ),
  8794. 'arraydesign_idx2' => array(
  8795. '0' => 'platformtype_id',
  8796. ),
  8797. 'arraydesign_idx3' => array(
  8798. '0' => 'substratetype_id',
  8799. ),
  8800. 'arraydesign_idx4' => array(
  8801. '0' => 'protocol_id',
  8802. ),
  8803. 'arraydesign_idx5' => array(
  8804. '0' => 'dbxref_id',
  8805. ),
  8806. ),
  8807. 'foreign keys' => array(
  8808. ),
  8809. );
  8810. return $description;
  8811. }
  8812. /**
  8813. * Implements hook_arraydesignprop_schema()
  8814. * Purpose: To describe the structure of arraydesignprop to tripal
  8815. * @see tripal_core_chado_insert()
  8816. * @see tripal_core_chado_update()
  8817. * @see tripal_core_chado_select()
  8818. *
  8819. * @return
  8820. * An array describing the current table
  8821. *
  8822. * @ingroup tripal_schema_api
  8823. *
  8824. */
  8825. function tripal_core_chado_arraydesignprop_schema() {
  8826. $description = array();
  8827. $description = array(
  8828. 'table' => 'arraydesignprop',
  8829. // 'description' => 'TODO: please describe this table!',
  8830. 'fields' => array(
  8831. 'arraydesignprop_id' => array(
  8832. // 'description' => 'TODO: please describe this field!',
  8833. 'type' => 'serial',
  8834. 'not NULL' => '1',
  8835. ),
  8836. 'arraydesign_id' => array(
  8837. // 'description' => 'TODO: please describe this field!',
  8838. 'type' => 'int',
  8839. 'not NULL' => '1',
  8840. ),
  8841. 'type_id' => array(
  8842. // 'description' => 'TODO: please describe this field!',
  8843. 'type' => 'int',
  8844. 'not NULL' => '1',
  8845. ),
  8846. 'value' => array(
  8847. // 'description' => 'TODO: please describe this field!',
  8848. 'type' => 'text',
  8849. 'not NULL' => '',
  8850. ),
  8851. 'rank' => array(
  8852. // 'description' => 'TODO: please describe this field!',
  8853. 'type' => 'int',
  8854. 'not NULL' => '1',
  8855. 'default' => '0',
  8856. ),
  8857. ),
  8858. 'primary key' => array(
  8859. '0' => 'arraydesignprop_id',
  8860. ),
  8861. 'unique keys' => array(
  8862. 'arraydesignprop_c1' => array(
  8863. '0' => 'arraydesign_id',
  8864. '1' => 'type_id',
  8865. '2' => 'rank',
  8866. ),
  8867. ),
  8868. 'indexes' => array(
  8869. 'arraydesignprop_idx1' => array(
  8870. '0' => 'arraydesign_id',
  8871. ),
  8872. 'arraydesignprop_idx2' => array(
  8873. '0' => 'type_id',
  8874. ),
  8875. ),
  8876. 'foreign keys' => array(
  8877. ),
  8878. );
  8879. return $description;
  8880. }
  8881. /**
  8882. * Implements hook_assay_schema()
  8883. * Purpose: To describe the structure of assay to tripal
  8884. * @see tripal_core_chado_insert()
  8885. * @see tripal_core_chado_update()
  8886. * @see tripal_core_chado_select()
  8887. *
  8888. * @return
  8889. * An array describing the current table
  8890. *
  8891. * @ingroup tripal_schema_api
  8892. *
  8893. */
  8894. function tripal_core_chado_assay_schema() {
  8895. $description = array();
  8896. $description = array(
  8897. 'table' => 'assay',
  8898. // 'description' => 'TODO: please describe this table!',
  8899. 'fields' => array(
  8900. 'assay_id' => array(
  8901. // 'description' => 'TODO: please describe this field!',
  8902. 'type' => 'serial',
  8903. 'not NULL' => '1',
  8904. ),
  8905. 'arraydesign_id' => array(
  8906. // 'description' => 'TODO: please describe this field!',
  8907. 'type' => 'int',
  8908. 'not NULL' => '1',
  8909. ),
  8910. 'protocol_id' => array(
  8911. // 'description' => 'TODO: please describe this field!',
  8912. 'type' => 'int',
  8913. 'not NULL' => '',
  8914. ),
  8915. 'assaydate' => array(
  8916. // 'description' => 'TODO: please describe this field!',
  8917. 'type' => 'datetime',
  8918. 'not NULL' => '',
  8919. 'default' => 'ow(',
  8920. ),
  8921. 'arrayidentifier' => array(
  8922. // 'description' => 'TODO: please describe this field!',
  8923. 'type' => 'text',
  8924. 'not NULL' => '',
  8925. ),
  8926. 'arraybatchidentifier' => array(
  8927. // 'description' => 'TODO: please describe this field!',
  8928. 'type' => 'text',
  8929. 'not NULL' => '',
  8930. ),
  8931. 'operator_id' => array(
  8932. // 'description' => 'TODO: please describe this field!',
  8933. 'type' => 'int',
  8934. 'not NULL' => '1',
  8935. ),
  8936. 'dbxref_id' => array(
  8937. // 'description' => 'TODO: please describe this field!',
  8938. 'type' => 'int',
  8939. 'not NULL' => '',
  8940. ),
  8941. 'name' => array(
  8942. // 'description' => 'TODO: please describe this field!',
  8943. 'type' => 'text',
  8944. 'not NULL' => '',
  8945. ),
  8946. 'description' => array(
  8947. // 'description' => 'TODO: please describe this field!',
  8948. 'type' => 'text',
  8949. 'not NULL' => '',
  8950. ),
  8951. ),
  8952. 'primary key' => array(
  8953. '0' => 'assay_id',
  8954. ),
  8955. 'unique keys' => array(
  8956. 'assay_c1' => array(
  8957. '0' => 'name',
  8958. ),
  8959. ),
  8960. 'indexes' => array(
  8961. 'assay_idx1' => array(
  8962. '0' => 'arraydesign_id',
  8963. ),
  8964. 'assay_idx2' => array(
  8965. '0' => 'protocol_id',
  8966. ),
  8967. 'assay_idx3' => array(
  8968. '0' => 'operator_id',
  8969. ),
  8970. 'assay_idx4' => array(
  8971. '0' => 'dbxref_id',
  8972. ),
  8973. ),
  8974. 'foreign keys' => array(
  8975. ),
  8976. );
  8977. return $description;
  8978. }
  8979. /**
  8980. * Implements hook_cv_root_schema()
  8981. * Purpose: To describe the structure of cv_root to tripal
  8982. * @see tripal_core_chado_insert()
  8983. * @see tripal_core_chado_update()
  8984. * @see tripal_core_chado_select()
  8985. *
  8986. * @return
  8987. * An array describing the current table
  8988. *
  8989. * @ingroup tripal_schema_api
  8990. *
  8991. */
  8992. function tripal_core_chado_cv_root_schema() {
  8993. $description = array();
  8994. $description = array(
  8995. 'table' => 'cv_root',
  8996. // 'description' => 'TODO: please describe this table!',
  8997. 'fields' => array(
  8998. 'cv_id' => array(
  8999. // 'description' => 'TODO: please describe this field!',
  9000. 'type' => 'int',
  9001. 'not NULL' => '',
  9002. ),
  9003. 'root_cvterm_id' => array(
  9004. // 'description' => 'TODO: please describe this field!',
  9005. 'type' => 'int',
  9006. 'not NULL' => '',
  9007. ),
  9008. ),
  9009. 'primary key' => array(
  9010. ),
  9011. 'unique keys' => array(
  9012. ),
  9013. 'indexes' => array(
  9014. ),
  9015. 'foreign keys' => array(
  9016. ),
  9017. );
  9018. return $description;
  9019. }
  9020. /**
  9021. * Implements hook_cvterm_schema()
  9022. * Purpose: To describe the structure of cvterm to tripal
  9023. * @see tripal_core_chado_insert()
  9024. * @see tripal_core_chado_update()
  9025. * @see tripal_core_chado_select()
  9026. *
  9027. * @return
  9028. * An array describing the current table
  9029. *
  9030. * @ingroup tripal_schema_api
  9031. *
  9032. */
  9033. function tripal_core_chado_cvterm_schema() {
  9034. $description = array();
  9035. $description = array(
  9036. 'table' => 'cvterm',
  9037. // 'description' => 'TODO: please describe this table!',
  9038. 'fields' => array(
  9039. 'cvterm_id' => array(
  9040. // 'description' => 'TODO: please describe this field!',
  9041. 'type' => 'serial',
  9042. 'not NULL' => '1',
  9043. ),
  9044. 'cv_id' => array(
  9045. // 'description' => 'TODO: please describe this field!',
  9046. 'type' => 'int',
  9047. 'not NULL' => '1',
  9048. ),
  9049. 'name' => array(
  9050. // 'description' => 'TODO: please describe this field!',
  9051. 'type' => 'varchar',
  9052. 'length' => '1024',
  9053. 'not NULL' => '1',
  9054. ),
  9055. 'definition' => array(
  9056. // 'description' => 'TODO: please describe this field!',
  9057. 'type' => 'text',
  9058. 'not NULL' => '',
  9059. ),
  9060. 'dbxref_id' => array(
  9061. // 'description' => 'TODO: please describe this field!',
  9062. 'type' => 'int',
  9063. 'not NULL' => '1',
  9064. ),
  9065. 'is_obsolete' => array(
  9066. // 'description' => 'TODO: please describe this field!',
  9067. 'type' => 'int',
  9068. 'not NULL' => '1',
  9069. 'default' => '0',
  9070. ),
  9071. 'is_relationshiptype' => array(
  9072. // 'description' => 'TODO: please describe this field!',
  9073. 'type' => 'int',
  9074. 'not NULL' => '1',
  9075. 'default' => '0',
  9076. ),
  9077. ),
  9078. 'primary key' => array(
  9079. '0' => 'cvterm_id',
  9080. ),
  9081. 'unique keys' => array(
  9082. 'cvterm_c1' => array(
  9083. '0' => 'name',
  9084. '1' => 'cv_id',
  9085. '2' => 'is_obsolete',
  9086. ),
  9087. 'cvterm_c2' => array(
  9088. '0' => 'dbxref_id',
  9089. ),
  9090. ),
  9091. 'indexes' => array(
  9092. 'cvterm_idx1' => array(
  9093. '0' => 'cv_id',
  9094. ),
  9095. 'cvterm_idx2' => array(
  9096. '0' => 'name',
  9097. ),
  9098. 'cvterm_idx3' => array(
  9099. '0' => 'dbxref_id',
  9100. ),
  9101. ),
  9102. 'foreign keys' => array(
  9103. ),
  9104. );
  9105. return $description;
  9106. }
  9107. /**
  9108. * Implements hook_feature_dbxref_schema()
  9109. * Purpose: To describe the structure of feature_dbxref to tripal
  9110. * @see tripal_core_chado_insert()
  9111. * @see tripal_core_chado_update()
  9112. * @see tripal_core_chado_select()
  9113. *
  9114. * @return
  9115. * An array describing the current table
  9116. *
  9117. * @ingroup tripal_schema_api
  9118. *
  9119. */
  9120. function tripal_core_chado_feature_dbxref_schema() {
  9121. $description = array();
  9122. $description = array(
  9123. 'table' => 'feature_dbxref',
  9124. // 'description' => 'TODO: please describe this table!',
  9125. 'fields' => array(
  9126. 'feature_dbxref_id' => array(
  9127. // 'description' => 'TODO: please describe this field!',
  9128. 'type' => 'serial',
  9129. 'not NULL' => '1',
  9130. ),
  9131. 'feature_id' => array(
  9132. // 'description' => 'TODO: please describe this field!',
  9133. 'type' => 'int',
  9134. 'not NULL' => '1',
  9135. ),
  9136. 'dbxref_id' => array(
  9137. // 'description' => 'TODO: please describe this field!',
  9138. 'type' => 'int',
  9139. 'not NULL' => '1',
  9140. ),
  9141. 'is_current' => array(
  9142. // 'description' => 'TODO: please describe this field!',
  9143. 'type' => 'boolean',
  9144. 'not NULL' => '1',
  9145. 'default' => 'ru',
  9146. ),
  9147. ),
  9148. 'primary key' => array(
  9149. '0' => 'feature_dbxref_id',
  9150. ),
  9151. 'unique keys' => array(
  9152. 'feature_dbxref_c1' => array(
  9153. '0' => 'feature_id',
  9154. '1' => 'dbxref_id',
  9155. ),
  9156. ),
  9157. 'indexes' => array(
  9158. 'feature_dbxref_idx1' => array(
  9159. '0' => 'feature_id',
  9160. ),
  9161. 'feature_dbxref_idx2' => array(
  9162. '0' => 'dbxref_id',
  9163. ),
  9164. ),
  9165. 'foreign keys' => array(
  9166. ),
  9167. );
  9168. return $description;
  9169. }
  9170. /**
  9171. * Implements hook_feature_cvtermprop_schema()
  9172. * Purpose: To describe the structure of feature_cvtermprop to tripal
  9173. * @see tripal_core_chado_insert()
  9174. * @see tripal_core_chado_update()
  9175. * @see tripal_core_chado_select()
  9176. *
  9177. * @return
  9178. * An array describing the current table
  9179. *
  9180. * @ingroup tripal_schema_api
  9181. *
  9182. */
  9183. function tripal_core_chado_feature_cvtermprop_schema() {
  9184. $description = array();
  9185. $description = array(
  9186. 'table' => 'feature_cvtermprop',
  9187. // 'description' => 'TODO: please describe this table!',
  9188. 'fields' => array(
  9189. 'feature_cvtermprop_id' => array(
  9190. // 'description' => 'TODO: please describe this field!',
  9191. 'type' => 'serial',
  9192. 'not NULL' => '1',
  9193. ),
  9194. 'feature_cvterm_id' => array(
  9195. // 'description' => 'TODO: please describe this field!',
  9196. 'type' => 'int',
  9197. 'not NULL' => '1',
  9198. ),
  9199. 'type_id' => array(
  9200. // 'description' => 'TODO: please describe this field!',
  9201. 'type' => 'int',
  9202. 'not NULL' => '1',
  9203. ),
  9204. 'value' => array(
  9205. // 'description' => 'TODO: please describe this field!',
  9206. 'type' => 'text',
  9207. 'not NULL' => '',
  9208. ),
  9209. 'rank' => array(
  9210. // 'description' => 'TODO: please describe this field!',
  9211. 'type' => 'int',
  9212. 'not NULL' => '1',
  9213. 'default' => '0',
  9214. ),
  9215. ),
  9216. 'primary key' => array(
  9217. '0' => 'feature_cvtermprop_id',
  9218. ),
  9219. 'unique keys' => array(
  9220. 'feature_cvtermprop_c1' => array(
  9221. '0' => 'feature_cvterm_id',
  9222. '1' => 'type_id',
  9223. '2' => 'rank',
  9224. ),
  9225. ),
  9226. 'indexes' => array(
  9227. 'feature_cvtermprop_idx1' => array(
  9228. '0' => 'feature_cvterm_id',
  9229. ),
  9230. 'feature_cvtermprop_idx2' => array(
  9231. '0' => 'type_id',
  9232. ),
  9233. ),
  9234. 'foreign keys' => array(
  9235. ),
  9236. );
  9237. return $description;
  9238. }
  9239. /**
  9240. * Implements hook_feature_difference_schema()
  9241. * Purpose: To describe the structure of feature_difference to tripal
  9242. * @see tripal_core_chado_insert()
  9243. * @see tripal_core_chado_update()
  9244. * @see 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_difference_schema() {
  9253. $description = array();
  9254. $description = array(
  9255. 'table' => 'feature_difference',
  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. 'srcfeature_id' => array(
  9269. // 'description' => 'TODO: please describe this field!',
  9270. 'type' => 'int',
  9271. 'size' => 'small',
  9272. 'not NULL' => '',
  9273. ),
  9274. 'fmin' => array(
  9275. // 'description' => 'TODO: please describe this field!',
  9276. 'type' => 'int',
  9277. 'not NULL' => '',
  9278. ),
  9279. 'fmax' => array(
  9280. // 'description' => 'TODO: please describe this field!',
  9281. 'type' => 'int',
  9282. 'not NULL' => '',
  9283. ),
  9284. 'strand' => array(
  9285. // 'description' => 'TODO: please describe this field!',
  9286. 'type' => 'int',
  9287. 'not NULL' => '',
  9288. ),
  9289. ),
  9290. 'primary key' => array(
  9291. ),
  9292. 'unique keys' => array(
  9293. ),
  9294. 'indexes' => array(
  9295. ),
  9296. 'foreign keys' => array(
  9297. ),
  9298. );
  9299. return $description;
  9300. }
  9301. /**
  9302. * Implements hook_feature_disjoint_schema()
  9303. * Purpose: To describe the structure of feature_disjoint to tripal
  9304. * @see tripal_core_chado_insert()
  9305. * @see tripal_core_chado_update()
  9306. * @see tripal_core_chado_select()
  9307. *
  9308. * @return
  9309. * An array describing the current table
  9310. *
  9311. * @ingroup tripal_schema_api
  9312. *
  9313. */
  9314. function tripal_core_chado_feature_disjoint_schema() {
  9315. $description = array();
  9316. $description = array(
  9317. 'table' => 'feature_disjoint',
  9318. // 'description' => 'TODO: please describe this table!',
  9319. 'fields' => array(
  9320. 'subject_id' => array(
  9321. // 'description' => 'TODO: please describe this field!',
  9322. 'type' => 'int',
  9323. 'not NULL' => '',
  9324. ),
  9325. 'object_id' => array(
  9326. // 'description' => 'TODO: please describe this field!',
  9327. 'type' => 'int',
  9328. 'not NULL' => '',
  9329. ),
  9330. ),
  9331. 'primary key' => array(
  9332. ),
  9333. 'unique keys' => array(
  9334. ),
  9335. 'indexes' => array(
  9336. ),
  9337. 'foreign keys' => array(
  9338. ),
  9339. );
  9340. return $description;
  9341. }
  9342. /**
  9343. * Implements hook_feature_distance_schema()
  9344. * Purpose: To describe the structure of feature_distance to tripal
  9345. * @see tripal_core_chado_insert()
  9346. * @see tripal_core_chado_update()
  9347. * @see tripal_core_chado_select()
  9348. *
  9349. * @return
  9350. * An array describing the current table
  9351. *
  9352. * @ingroup tripal_schema_api
  9353. *
  9354. */
  9355. function tripal_core_chado_feature_distance_schema() {
  9356. $description = array();
  9357. $description = array(
  9358. 'table' => 'feature_distance',
  9359. // 'description' => 'TODO: please describe this table!',
  9360. 'fields' => array(
  9361. 'subject_id' => array(
  9362. // 'description' => 'TODO: please describe this field!',
  9363. 'type' => 'int',
  9364. 'not NULL' => '',
  9365. ),
  9366. 'object_id' => array(
  9367. // 'description' => 'TODO: please describe this field!',
  9368. 'type' => 'int',
  9369. 'not NULL' => '',
  9370. ),
  9371. 'srcfeature_id' => array(
  9372. // 'description' => 'TODO: please describe this field!',
  9373. 'type' => 'int',
  9374. 'not NULL' => '',
  9375. ),
  9376. 'subject_strand' => array(
  9377. // 'description' => 'TODO: please describe this field!',
  9378. 'type' => 'int',
  9379. 'size' => 'small',
  9380. 'not NULL' => '',
  9381. ),
  9382. 'object_strand' => array(
  9383. // 'description' => 'TODO: please describe this field!',
  9384. 'type' => 'int',
  9385. 'size' => 'small',
  9386. 'not NULL' => '',
  9387. ),
  9388. 'distance' => array(
  9389. // 'description' => 'TODO: please describe this field!',
  9390. 'type' => 'int',
  9391. 'not NULL' => '',
  9392. ),
  9393. ),
  9394. 'primary key' => array(
  9395. ),
  9396. 'unique keys' => array(
  9397. ),
  9398. 'indexes' => array(
  9399. ),
  9400. 'foreign keys' => array(
  9401. ),
  9402. );
  9403. return $description;
  9404. }
  9405. /**
  9406. * Implements hook_feature_cvterm_pub_schema()
  9407. * Purpose: To describe the structure of feature_cvterm_pub to tripal
  9408. * @see tripal_core_chado_insert()
  9409. * @see tripal_core_chado_update()
  9410. * @see tripal_core_chado_select()
  9411. *
  9412. * @return
  9413. * An array describing the current table
  9414. *
  9415. * @ingroup tripal_schema_api
  9416. *
  9417. */
  9418. function tripal_core_chado_feature_cvterm_pub_schema() {
  9419. $description = array();
  9420. $description = array(
  9421. 'table' => 'feature_cvterm_pub',
  9422. // 'description' => 'TODO: please describe this table!',
  9423. 'fields' => array(
  9424. 'feature_cvterm_pub_id' => array(
  9425. // 'description' => 'TODO: please describe this field!',
  9426. 'type' => 'serial',
  9427. 'not NULL' => '1',
  9428. ),
  9429. 'feature_cvterm_id' => array(
  9430. // 'description' => 'TODO: please describe this field!',
  9431. 'type' => 'int',
  9432. 'not NULL' => '1',
  9433. ),
  9434. 'pub_id' => array(
  9435. // 'description' => 'TODO: please describe this field!',
  9436. 'type' => 'int',
  9437. 'not NULL' => '1',
  9438. ),
  9439. ),
  9440. 'primary key' => array(
  9441. '0' => 'feature_cvterm_pub_id',
  9442. ),
  9443. 'unique keys' => array(
  9444. 'feature_cvterm_pub_c1' => array(
  9445. '0' => 'feature_cvterm_id',
  9446. '1' => 'pub_id',
  9447. ),
  9448. ),
  9449. 'indexes' => array(
  9450. 'feature_cvterm_pub_idx1' => array(
  9451. '0' => 'feature_cvterm_id',
  9452. ),
  9453. 'feature_cvterm_pub_idx2' => array(
  9454. '0' => 'pub_id',
  9455. ),
  9456. ),
  9457. 'foreign keys' => array(
  9458. ),
  9459. );
  9460. return $description;
  9461. }
  9462. /**
  9463. * Implements hook_feature_cvterm_dbxref_schema()
  9464. * Purpose: To describe the structure of feature_cvterm_dbxref to tripal
  9465. * @see tripal_core_chado_insert()
  9466. * @see tripal_core_chado_update()
  9467. * @see tripal_core_chado_select()
  9468. *
  9469. * @return
  9470. * An array describing the current table
  9471. *
  9472. * @ingroup tripal_schema_api
  9473. *
  9474. */
  9475. function tripal_core_chado_feature_cvterm_dbxref_schema() {
  9476. $description = array();
  9477. $description = array(
  9478. 'table' => 'feature_cvterm_dbxref',
  9479. // 'description' => 'TODO: please describe this table!',
  9480. 'fields' => array(
  9481. 'feature_cvterm_dbxref_id' => array(
  9482. // 'description' => 'TODO: please describe this field!',
  9483. 'type' => 'serial',
  9484. 'not NULL' => '1',
  9485. ),
  9486. 'feature_cvterm_id' => array(
  9487. // 'description' => 'TODO: please describe this field!',
  9488. 'type' => 'int',
  9489. 'not NULL' => '1',
  9490. ),
  9491. 'dbxref_id' => array(
  9492. // 'description' => 'TODO: please describe this field!',
  9493. 'type' => 'int',
  9494. 'not NULL' => '1',
  9495. ),
  9496. ),
  9497. 'primary key' => array(
  9498. '0' => 'feature_cvterm_dbxref_id',
  9499. ),
  9500. 'unique keys' => array(
  9501. 'feature_cvterm_dbxref_c1' => array(
  9502. '0' => 'feature_cvterm_id',
  9503. '1' => 'dbxref_id',
  9504. ),
  9505. ),
  9506. 'indexes' => array(
  9507. 'feature_cvterm_dbxref_idx1' => array(
  9508. '0' => 'feature_cvterm_id',
  9509. ),
  9510. 'feature_cvterm_dbxref_idx2' => array(
  9511. '0' => 'dbxref_id',
  9512. ),
  9513. ),
  9514. 'foreign keys' => array(
  9515. ),
  9516. );
  9517. return $description;
  9518. }
  9519. /**
  9520. * Implements hook_f_type_schema()
  9521. * Purpose: To describe the structure of f_type to tripal
  9522. * @see tripal_core_chado_insert()
  9523. * @see tripal_core_chado_update()
  9524. * @see tripal_core_chado_select()
  9525. *
  9526. * @return
  9527. * An array describing the current table
  9528. *
  9529. * @ingroup tripal_schema_api
  9530. *
  9531. */
  9532. function tripal_core_chado_f_type_schema() {
  9533. $description = array();
  9534. $description = array(
  9535. 'table' => 'f_type',
  9536. // 'description' => 'TODO: please describe this table!',
  9537. 'fields' => array(
  9538. 'feature_id' => array(
  9539. // 'description' => 'TODO: please describe this field!',
  9540. 'type' => 'int',
  9541. 'not NULL' => '',
  9542. ),
  9543. 'name' => array(
  9544. // 'description' => 'TODO: please describe this field!',
  9545. 'type' => 'varchar',
  9546. 'length' => '255',
  9547. 'not NULL' => '',
  9548. ),
  9549. 'dbxref_id' => array(
  9550. // 'description' => 'TODO: please describe this field!',
  9551. 'type' => 'int',
  9552. 'not NULL' => '',
  9553. ),
  9554. 'type' => array(
  9555. // 'description' => 'TODO: please describe this field!',
  9556. 'type' => 'varchar',
  9557. 'length' => '1024',
  9558. 'not NULL' => '',
  9559. ),
  9560. 'residues' => array(
  9561. // 'description' => 'TODO: please describe this field!',
  9562. 'type' => 'text',
  9563. 'not NULL' => '',
  9564. ),
  9565. 'seqlen' => array(
  9566. // 'description' => 'TODO: please describe this field!',
  9567. 'type' => 'int',
  9568. 'not NULL' => '',
  9569. ),
  9570. 'md5checksum' => array(
  9571. // 'description' => 'TODO: please describe this field!',
  9572. 'type' => 'char',
  9573. 'length' => '32',
  9574. 'not NULL' => '',
  9575. ),
  9576. 'type_id' => array(
  9577. // 'description' => 'TODO: please describe this field!',
  9578. 'type' => 'int',
  9579. 'not NULL' => '',
  9580. ),
  9581. 'timeaccessioned' => array(
  9582. // 'description' => 'TODO: please describe this field!',
  9583. 'type' => 'datetime',
  9584. 'not NULL' => '',
  9585. ),
  9586. 'timelastmodified' => array(
  9587. // 'description' => 'TODO: please describe this field!',
  9588. 'type' => 'datetime',
  9589. 'not NULL' => '',
  9590. ),
  9591. ),
  9592. 'primary key' => array(
  9593. ),
  9594. 'unique keys' => array(
  9595. ),
  9596. 'indexes' => array(
  9597. ),
  9598. 'foreign keys' => array(
  9599. ),
  9600. );
  9601. return $description;
  9602. }
  9603. /**
  9604. * Implements hook_feature_schema()
  9605. * Purpose: To describe the structure of feature to tripal
  9606. * @see tripal_core_chado_insert()
  9607. * @see tripal_core_chado_update()
  9608. * @see tripal_core_chado_select()
  9609. *
  9610. * @return
  9611. * An array describing the current table
  9612. *
  9613. * @ingroup tripal_schema_api
  9614. *
  9615. */
  9616. function tripal_core_chado_feature_schema() {
  9617. $description = array();
  9618. $description = array(
  9619. 'table' => 'feature',
  9620. // 'description' => 'TODO: please describe this table!',
  9621. 'fields' => array(
  9622. 'feature_id' => array(
  9623. // 'description' => 'TODO: please describe this field!',
  9624. 'type' => 'serial',
  9625. 'not NULL' => '1',
  9626. ),
  9627. 'dbxref_id' => array(
  9628. // 'description' => 'TODO: please describe this field!',
  9629. 'type' => 'int',
  9630. 'not NULL' => '',
  9631. ),
  9632. 'organism_id' => array(
  9633. // 'description' => 'TODO: please describe this field!',
  9634. 'type' => 'int',
  9635. 'not NULL' => '1',
  9636. ),
  9637. 'name' => array(
  9638. // 'description' => 'TODO: please describe this field!',
  9639. 'type' => 'varchar',
  9640. 'length' => '255',
  9641. 'not NULL' => '',
  9642. ),
  9643. 'uniquename' => array(
  9644. // 'description' => 'TODO: please describe this field!',
  9645. 'type' => 'text',
  9646. 'not NULL' => '1',
  9647. ),
  9648. 'residues' => array(
  9649. // 'description' => 'TODO: please describe this field!',
  9650. 'type' => 'text',
  9651. 'not NULL' => '',
  9652. ),
  9653. 'seqlen' => array(
  9654. // 'description' => 'TODO: please describe this field!',
  9655. 'type' => 'int',
  9656. 'not NULL' => '',
  9657. ),
  9658. 'md5checksum' => array(
  9659. // 'description' => 'TODO: please describe this field!',
  9660. 'type' => 'char',
  9661. 'length' => '32',
  9662. 'not NULL' => '',
  9663. ),
  9664. 'type_id' => array(
  9665. // 'description' => 'TODO: please describe this field!',
  9666. 'type' => 'int',
  9667. 'not NULL' => '1',
  9668. ),
  9669. 'is_analysis' => array(
  9670. // 'description' => 'TODO: please describe this field!',
  9671. 'type' => 'boolean',
  9672. 'not NULL' => '1',
  9673. 'default' => 'als',
  9674. ),
  9675. 'is_obsolete' => array(
  9676. // 'description' => 'TODO: please describe this field!',
  9677. 'type' => 'boolean',
  9678. 'not NULL' => '1',
  9679. 'default' => 'als',
  9680. ),
  9681. 'timeaccessioned' => array(
  9682. // 'description' => 'TODO: please describe this field!',
  9683. 'type' => 'datetime',
  9684. 'not NULL' => '1',
  9685. 'default' => 'ow(',
  9686. ),
  9687. 'timelastmodified' => array(
  9688. // 'description' => 'TODO: please describe this field!',
  9689. 'type' => 'datetime',
  9690. 'not NULL' => '1',
  9691. 'default' => 'ow(',
  9692. ),
  9693. ),
  9694. 'primary key' => array(
  9695. '0' => 'feature_id',
  9696. ),
  9697. 'unique keys' => array(
  9698. 'feature_c1' => array(
  9699. '0' => 'organism_id',
  9700. '1' => 'uniquename',
  9701. '2' => 'type_id',
  9702. ),
  9703. ),
  9704. 'indexes' => array(
  9705. 'feature_idx1' => array(
  9706. '0' => 'dbxref_id',
  9707. ),
  9708. 'feature_idx2' => array(
  9709. '0' => 'organism_id',
  9710. ),
  9711. 'feature_idx3' => array(
  9712. '0' => 'type_id',
  9713. ),
  9714. 'feature_idx4' => array(
  9715. '0' => 'uniquename',
  9716. ),
  9717. 'feature_name_ind1' => array(
  9718. '0' => 'name',
  9719. ),
  9720. ),
  9721. 'foreign keys' => array(
  9722. ),
  9723. );
  9724. return $description;
  9725. }
  9726. /**
  9727. * Implements hook_feature_contains_schema()
  9728. * Purpose: To describe the structure of feature_contains to tripal
  9729. * @see tripal_core_chado_insert()
  9730. * @see tripal_core_chado_update()
  9731. * @see tripal_core_chado_select()
  9732. *
  9733. * @return
  9734. * An array describing the current table
  9735. *
  9736. * @ingroup tripal_schema_api
  9737. *
  9738. */
  9739. function tripal_core_chado_feature_contains_schema() {
  9740. $description = array();
  9741. $description = array(
  9742. 'table' => 'feature_contains',
  9743. // 'description' => 'TODO: please describe this table!',
  9744. 'fields' => array(
  9745. 'subject_id' => array(
  9746. // 'description' => 'TODO: please describe this field!',
  9747. 'type' => 'int',
  9748. 'not NULL' => '',
  9749. ),
  9750. 'object_id' => array(
  9751. // 'description' => 'TODO: please describe this field!',
  9752. 'type' => 'int',
  9753. 'not NULL' => '',
  9754. ),
  9755. ),
  9756. 'primary key' => array(
  9757. ),
  9758. 'unique keys' => array(
  9759. ),
  9760. 'indexes' => array(
  9761. ),
  9762. 'foreign keys' => array(
  9763. ),
  9764. );
  9765. return $description;
  9766. }
  9767. /**
  9768. * Implements hook_feature_cvterm_schema()
  9769. * Purpose: To describe the structure of feature_cvterm to tripal
  9770. * @see tripal_core_chado_insert()
  9771. * @see tripal_core_chado_update()
  9772. * @see tripal_core_chado_select()
  9773. *
  9774. * @return
  9775. * An array describing the current table
  9776. *
  9777. * @ingroup tripal_schema_api
  9778. *
  9779. */
  9780. function tripal_core_chado_feature_cvterm_schema() {
  9781. $description = array();
  9782. $description = array(
  9783. 'table' => 'feature_cvterm',
  9784. // 'description' => 'TODO: please describe this table!',
  9785. 'fields' => array(
  9786. 'feature_cvterm_id' => array(
  9787. // 'description' => 'TODO: please describe this field!',
  9788. 'type' => 'serial',
  9789. 'not NULL' => '1',
  9790. ),
  9791. 'feature_id' => array(
  9792. // 'description' => 'TODO: please describe this field!',
  9793. 'type' => 'int',
  9794. 'not NULL' => '1',
  9795. ),
  9796. 'cvterm_id' => array(
  9797. // 'description' => 'TODO: please describe this field!',
  9798. 'type' => 'int',
  9799. 'not NULL' => '1',
  9800. ),
  9801. 'pub_id' => array(
  9802. // 'description' => 'TODO: please describe this field!',
  9803. 'type' => 'int',
  9804. 'not NULL' => '1',
  9805. ),
  9806. 'is_not' => array(
  9807. // 'description' => 'TODO: please describe this field!',
  9808. 'type' => 'boolean',
  9809. 'not NULL' => '1',
  9810. 'default' => 'als',
  9811. ),
  9812. 'rank' => array(
  9813. // 'description' => 'TODO: please describe this field!',
  9814. 'type' => 'int',
  9815. 'not NULL' => '1',
  9816. 'default' => '0',
  9817. ),
  9818. ),
  9819. 'primary key' => array(
  9820. '0' => 'feature_cvterm_id',
  9821. ),
  9822. 'unique keys' => array(
  9823. 'feature_cvterm_c1' => array(
  9824. '0' => 'feature_id',
  9825. '1' => 'cvterm_id',
  9826. '2' => 'pub_id',
  9827. '3' => 'rank',
  9828. ),
  9829. ),
  9830. 'indexes' => array(
  9831. 'feature_cvterm_idx1' => array(
  9832. '0' => 'feature_id',
  9833. ),
  9834. 'feature_cvterm_idx2' => array(
  9835. '0' => 'cvterm_id',
  9836. ),
  9837. 'feature_cvterm_idx3' => array(
  9838. '0' => 'pub_id',
  9839. ),
  9840. ),
  9841. 'foreign keys' => array(
  9842. ),
  9843. );
  9844. return $description;
  9845. }
  9846. /**
  9847. * Implements hook_feature_expression_schema()
  9848. * Purpose: To describe the structure of feature_expression to tripal
  9849. * @see tripal_core_chado_insert()
  9850. * @see tripal_core_chado_update()
  9851. * @see tripal_core_chado_select()
  9852. *
  9853. * @return
  9854. * An array describing the current table
  9855. *
  9856. * @ingroup tripal_schema_api
  9857. *
  9858. */
  9859. function tripal_core_chado_feature_expression_schema() {
  9860. $description = array();
  9861. $description = array(
  9862. 'table' => 'feature_expression',
  9863. // 'description' => 'TODO: please describe this table!',
  9864. 'fields' => array(
  9865. 'feature_expression_id' => array(
  9866. // 'description' => 'TODO: please describe this field!',
  9867. 'type' => 'serial',
  9868. 'not NULL' => '1',
  9869. ),
  9870. 'expression_id' => array(
  9871. // 'description' => 'TODO: please describe this field!',
  9872. 'type' => 'int',
  9873. 'not NULL' => '1',
  9874. ),
  9875. 'feature_id' => array(
  9876. // 'description' => 'TODO: please describe this field!',
  9877. 'type' => 'int',
  9878. 'not NULL' => '1',
  9879. ),
  9880. 'pub_id' => array(
  9881. // 'description' => 'TODO: please describe this field!',
  9882. 'type' => 'int',
  9883. 'not NULL' => '1',
  9884. ),
  9885. ),
  9886. 'primary key' => array(
  9887. '0' => 'feature_expression_id',
  9888. ),
  9889. 'unique keys' => array(
  9890. 'feature_expression_c1' => array(
  9891. '0' => 'expression_id',
  9892. '1' => 'feature_id',
  9893. '2' => 'pub_id',
  9894. ),
  9895. ),
  9896. 'indexes' => array(
  9897. 'feature_expression_idx1' => array(
  9898. '0' => 'expression_id',
  9899. ),
  9900. 'feature_expression_idx2' => array(
  9901. '0' => 'feature_id',
  9902. ),
  9903. 'feature_expression_idx3' => array(
  9904. '0' => 'pub_id',
  9905. ),
  9906. ),
  9907. 'foreign keys' => array(
  9908. ),
  9909. );
  9910. return $description;
  9911. }
  9912. /**
  9913. * Implements hook_feature_expressionprop_schema()
  9914. * Purpose: To describe the structure of feature_expressionprop to tripal
  9915. * @see tripal_core_chado_insert()
  9916. * @see tripal_core_chado_update()
  9917. * @see tripal_core_chado_select()
  9918. *
  9919. * @return
  9920. * An array describing the current table
  9921. *
  9922. * @ingroup tripal_schema_api
  9923. *
  9924. */
  9925. function tripal_core_chado_feature_expressionprop_schema() {
  9926. $description = array();
  9927. $description = array(
  9928. 'table' => 'feature_expressionprop',
  9929. // 'description' => 'TODO: please describe this table!',
  9930. 'fields' => array(
  9931. 'feature_expressionprop_id' => array(
  9932. // 'description' => 'TODO: please describe this field!',
  9933. 'type' => 'serial',
  9934. 'not NULL' => '1',
  9935. ),
  9936. 'feature_expression_id' => array(
  9937. // 'description' => 'TODO: please describe this field!',
  9938. 'type' => 'int',
  9939. 'not NULL' => '1',
  9940. ),
  9941. 'type_id' => array(
  9942. // 'description' => 'TODO: please describe this field!',
  9943. 'type' => 'int',
  9944. 'not NULL' => '1',
  9945. ),
  9946. 'value' => array(
  9947. // 'description' => 'TODO: please describe this field!',
  9948. 'type' => 'text',
  9949. 'not NULL' => '',
  9950. ),
  9951. 'rank' => array(
  9952. // 'description' => 'TODO: please describe this field!',
  9953. 'type' => 'int',
  9954. 'not NULL' => '1',
  9955. 'default' => '0',
  9956. ),
  9957. ),
  9958. 'primary key' => array(
  9959. '0' => 'feature_expressionprop_id',
  9960. ),
  9961. 'unique keys' => array(
  9962. 'feature_expressionprop_c1' => array(
  9963. '0' => 'feature_expression_id',
  9964. '1' => 'type_id',
  9965. '2' => 'rank',
  9966. ),
  9967. ),
  9968. 'indexes' => array(
  9969. 'feature_expressionprop_idx1' => array(
  9970. '0' => 'feature_expression_id',
  9971. ),
  9972. 'feature_expressionprop_idx2' => array(
  9973. '0' => 'type_id',
  9974. ),
  9975. ),
  9976. 'foreign keys' => array(
  9977. ),
  9978. );
  9979. return $description;
  9980. }
  9981. /**
  9982. * Implements hook_feature_pubprop_schema()
  9983. * Purpose: To describe the structure of feature_pubprop to tripal
  9984. * @see tripal_core_chado_insert()
  9985. * @see tripal_core_chado_update()
  9986. * @see tripal_core_chado_select()
  9987. *
  9988. * @return
  9989. * An array describing the current table
  9990. *
  9991. * @ingroup tripal_schema_api
  9992. *
  9993. */
  9994. function tripal_core_chado_feature_pubprop_schema() {
  9995. $description = array();
  9996. $description = array(
  9997. 'table' => 'feature_pubprop',
  9998. // 'description' => 'TODO: please describe this table!',
  9999. 'fields' => array(
  10000. 'feature_pubprop_id' => array(
  10001. // 'description' => 'TODO: please describe this field!',
  10002. 'type' => 'serial',
  10003. 'not NULL' => '1',
  10004. ),
  10005. 'feature_pub_id' => array(
  10006. // 'description' => 'TODO: please describe this field!',
  10007. 'type' => 'int',
  10008. 'not NULL' => '1',
  10009. ),
  10010. 'type_id' => array(
  10011. // 'description' => 'TODO: please describe this field!',
  10012. 'type' => 'int',
  10013. 'not NULL' => '1',
  10014. ),
  10015. 'value' => array(
  10016. // 'description' => 'TODO: please describe this field!',
  10017. 'type' => 'text',
  10018. 'not NULL' => '',
  10019. ),
  10020. 'rank' => array(
  10021. // 'description' => 'TODO: please describe this field!',
  10022. 'type' => 'int',
  10023. 'not NULL' => '1',
  10024. 'default' => '0',
  10025. ),
  10026. ),
  10027. 'primary key' => array(
  10028. '0' => 'feature_pubprop_id',
  10029. ),
  10030. 'unique keys' => array(
  10031. 'feature_pubprop_c1' => array(
  10032. '0' => 'feature_pub_id',
  10033. '1' => 'type_id',
  10034. '2' => 'rank',
  10035. ),
  10036. ),
  10037. 'indexes' => array(
  10038. 'feature_pubprop_idx1' => array(
  10039. '0' => 'feature_pub_id',
  10040. ),
  10041. ),
  10042. 'foreign keys' => array(
  10043. ),
  10044. );
  10045. return $description;
  10046. }
  10047. /**
  10048. * Implements hook_feature_relationship_schema()
  10049. * Purpose: To describe the structure of feature_relationship to tripal
  10050. * @see tripal_core_chado_insert()
  10051. * @see tripal_core_chado_update()
  10052. * @see tripal_core_chado_select()
  10053. *
  10054. * @return
  10055. * An array describing the current table
  10056. *
  10057. * @ingroup tripal_schema_api
  10058. *
  10059. */
  10060. function tripal_core_chado_feature_relationship_schema() {
  10061. $description = array();
  10062. $description = array(
  10063. 'table' => 'feature_relationship',
  10064. // 'description' => 'TODO: please describe this table!',
  10065. 'fields' => array(
  10066. 'feature_relationship_id' => array(
  10067. // 'description' => 'TODO: please describe this field!',
  10068. 'type' => 'serial',
  10069. 'not NULL' => '1',
  10070. ),
  10071. 'subject_id' => array(
  10072. // 'description' => 'TODO: please describe this field!',
  10073. 'type' => 'int',
  10074. 'not NULL' => '1',
  10075. ),
  10076. 'object_id' => array(
  10077. // 'description' => 'TODO: please describe this field!',
  10078. 'type' => 'int',
  10079. 'not NULL' => '1',
  10080. ),
  10081. 'type_id' => array(
  10082. // 'description' => 'TODO: please describe this field!',
  10083. 'type' => 'int',
  10084. 'not NULL' => '1',
  10085. ),
  10086. 'value' => array(
  10087. // 'description' => 'TODO: please describe this field!',
  10088. 'type' => 'text',
  10089. 'not NULL' => '',
  10090. ),
  10091. 'rank' => array(
  10092. // 'description' => 'TODO: please describe this field!',
  10093. 'type' => 'int',
  10094. 'not NULL' => '1',
  10095. 'default' => '0',
  10096. ),
  10097. ),
  10098. 'primary key' => array(
  10099. '0' => 'feature_relationship_id',
  10100. ),
  10101. 'unique keys' => array(
  10102. 'feature_relationship_c1' => array(
  10103. '0' => 'subject_id',
  10104. '1' => 'object_id',
  10105. '2' => 'type_id',
  10106. '3' => 'rank',
  10107. ),
  10108. ),
  10109. 'indexes' => array(
  10110. 'feature_relationship_idx1' => array(
  10111. '0' => 'subject_id',
  10112. ),
  10113. 'feature_relationship_idx2' => array(
  10114. '0' => 'object_id',
  10115. ),
  10116. 'feature_relationship_idx3' => array(
  10117. '0' => 'type_id',
  10118. ),
  10119. ),
  10120. 'foreign keys' => array(
  10121. ),
  10122. );
  10123. return $description;
  10124. }
  10125. /**
  10126. * Implements hook_feature_relationship_pub_schema()
  10127. * Purpose: To describe the structure of feature_relationship_pub to tripal
  10128. * @see tripal_core_chado_insert()
  10129. * @see tripal_core_chado_update()
  10130. * @see tripal_core_chado_select()
  10131. *
  10132. * @return
  10133. * An array describing the current table
  10134. *
  10135. * @ingroup tripal_schema_api
  10136. *
  10137. */
  10138. function tripal_core_chado_feature_relationship_pub_schema() {
  10139. $description = array();
  10140. $description = array(
  10141. 'table' => 'feature_relationship_pub',
  10142. // 'description' => 'TODO: please describe this table!',
  10143. 'fields' => array(
  10144. 'feature_relationship_pub_id' => array(
  10145. // 'description' => 'TODO: please describe this field!',
  10146. 'type' => 'serial',
  10147. 'not NULL' => '1',
  10148. ),
  10149. 'feature_relationship_id' => array(
  10150. // 'description' => 'TODO: please describe this field!',
  10151. 'type' => 'int',
  10152. 'not NULL' => '1',
  10153. ),
  10154. 'pub_id' => array(
  10155. // 'description' => 'TODO: please describe this field!',
  10156. 'type' => 'int',
  10157. 'not NULL' => '1',
  10158. ),
  10159. ),
  10160. 'primary key' => array(
  10161. '0' => 'feature_relationship_pub_id',
  10162. ),
  10163. 'unique keys' => array(
  10164. 'feature_relationship_pub_c1' => array(
  10165. '0' => 'feature_relationship_id',
  10166. '1' => 'pub_id',
  10167. ),
  10168. ),
  10169. 'indexes' => array(
  10170. 'feature_relationship_pub_idx1' => array(
  10171. '0' => 'feature_relationship_id',
  10172. ),
  10173. 'feature_relationship_pub_idx2' => array(
  10174. '0' => 'pub_id',
  10175. ),
  10176. ),
  10177. 'foreign keys' => array(
  10178. ),
  10179. );
  10180. return $description;
  10181. }
  10182. /**
  10183. * Implements hook_feature_relationshipprop_schema()
  10184. * Purpose: To describe the structure of feature_relationshipprop to tripal
  10185. * @see tripal_core_chado_insert()
  10186. * @see tripal_core_chado_update()
  10187. * @see tripal_core_chado_select()
  10188. *
  10189. * @return
  10190. * An array describing the current table
  10191. *
  10192. * @ingroup tripal_schema_api
  10193. *
  10194. */
  10195. function tripal_core_chado_feature_relationshipprop_schema() {
  10196. $description = array();
  10197. $description = array(
  10198. 'table' => 'feature_relationshipprop',
  10199. // 'description' => 'TODO: please describe this table!',
  10200. 'fields' => array(
  10201. 'feature_relationshipprop_id' => array(
  10202. // 'description' => 'TODO: please describe this field!',
  10203. 'type' => 'serial',
  10204. 'not NULL' => '1',
  10205. ),
  10206. 'feature_relationship_id' => array(
  10207. // 'description' => 'TODO: please describe this field!',
  10208. 'type' => 'int',
  10209. 'not NULL' => '1',
  10210. ),
  10211. 'type_id' => array(
  10212. // 'description' => 'TODO: please describe this field!',
  10213. 'type' => 'int',
  10214. 'not NULL' => '1',
  10215. ),
  10216. 'value' => array(
  10217. // 'description' => 'TODO: please describe this field!',
  10218. 'type' => 'text',
  10219. 'not NULL' => '',
  10220. ),
  10221. 'rank' => array(
  10222. // 'description' => 'TODO: please describe this field!',
  10223. 'type' => 'int',
  10224. 'not NULL' => '1',
  10225. 'default' => '0',
  10226. ),
  10227. ),
  10228. 'primary key' => array(
  10229. '0' => 'feature_relationshipprop_id',
  10230. ),
  10231. 'unique keys' => array(
  10232. 'feature_relationshipprop_c1' => array(
  10233. '0' => 'feature_relationship_id',
  10234. '1' => 'type_id',
  10235. '2' => 'rank',
  10236. ),
  10237. ),
  10238. 'indexes' => array(
  10239. 'feature_relationshipprop_idx1' => array(
  10240. '0' => 'feature_relationship_id',
  10241. ),
  10242. 'feature_relationshipprop_idx2' => array(
  10243. '0' => 'type_id',
  10244. ),
  10245. ),
  10246. 'foreign keys' => array(
  10247. ),
  10248. );
  10249. return $description;
  10250. }
  10251. /**
  10252. * Implements hook_feature_pub_schema()
  10253. * Purpose: To describe the structure of feature_pub to tripal
  10254. * @see tripal_core_chado_insert()
  10255. * @see tripal_core_chado_update()
  10256. * @see tripal_core_chado_select()
  10257. *
  10258. * @return
  10259. * An array describing the current table
  10260. *
  10261. * @ingroup tripal_schema_api
  10262. *
  10263. */
  10264. function tripal_core_chado_feature_pub_schema() {
  10265. $description = array();
  10266. $description = array(
  10267. 'table' => 'feature_pub',
  10268. // 'description' => 'TODO: please describe this table!',
  10269. 'fields' => array(
  10270. 'feature_pub_id' => array(
  10271. // 'description' => 'TODO: please describe this field!',
  10272. 'type' => 'serial',
  10273. 'not NULL' => '1',
  10274. ),
  10275. 'feature_id' => array(
  10276. // 'description' => 'TODO: please describe this field!',
  10277. 'type' => 'int',
  10278. 'not NULL' => '1',
  10279. ),
  10280. 'pub_id' => array(
  10281. // 'description' => 'TODO: please describe this field!',
  10282. 'type' => 'int',
  10283. 'not NULL' => '1',
  10284. ),
  10285. ),
  10286. 'primary key' => array(
  10287. '0' => 'feature_pub_id',
  10288. ),
  10289. 'unique keys' => array(
  10290. 'feature_pub_c1' => array(
  10291. '0' => 'feature_id',
  10292. '1' => 'pub_id',
  10293. ),
  10294. ),
  10295. 'indexes' => array(
  10296. 'feature_pub_idx1' => array(
  10297. '0' => 'feature_id',
  10298. ),
  10299. 'feature_pub_idx2' => array(
  10300. '0' => 'pub_id',
  10301. ),
  10302. ),
  10303. 'foreign keys' => array(
  10304. ),
  10305. );
  10306. return $description;
  10307. }
  10308. /**
  10309. * Implements hook_feature_phenotype_schema()
  10310. * Purpose: To describe the structure of feature_phenotype to tripal
  10311. * @see tripal_core_chado_insert()
  10312. * @see tripal_core_chado_update()
  10313. * @see tripal_core_chado_select()
  10314. *
  10315. * @return
  10316. * An array describing the current table
  10317. *
  10318. * @ingroup tripal_schema_api
  10319. *
  10320. */
  10321. function tripal_core_chado_feature_phenotype_schema() {
  10322. $description = array();
  10323. $description = array(
  10324. 'table' => 'feature_phenotype',
  10325. // 'description' => 'TODO: please describe this table!',
  10326. 'fields' => array(
  10327. 'feature_phenotype_id' => array(
  10328. // 'description' => 'TODO: please describe this field!',
  10329. 'type' => 'serial',
  10330. 'not NULL' => '1',
  10331. ),
  10332. 'feature_id' => array(
  10333. // 'description' => 'TODO: please describe this field!',
  10334. 'type' => 'int',
  10335. 'not NULL' => '1',
  10336. ),
  10337. 'phenotype_id' => array(
  10338. // 'description' => 'TODO: please describe this field!',
  10339. 'type' => 'int',
  10340. 'not NULL' => '1',
  10341. ),
  10342. ),
  10343. 'primary key' => array(
  10344. '0' => 'feature_phenotype_id',
  10345. ),
  10346. 'unique keys' => array(
  10347. 'feature_phenotype_c1' => array(
  10348. '0' => 'feature_id',
  10349. '1' => 'phenotype_id',
  10350. ),
  10351. ),
  10352. 'indexes' => array(
  10353. 'feature_phenotype_idx1' => array(
  10354. '0' => 'feature_id',
  10355. ),
  10356. 'feature_phenotype_idx2' => array(
  10357. '0' => 'phenotype_id',
  10358. ),
  10359. ),
  10360. 'foreign keys' => array(
  10361. ),
  10362. );
  10363. return $description;
  10364. }
  10365. /**
  10366. * Implements hook_feature_genotype_schema()
  10367. * Purpose: To describe the structure of feature_genotype to tripal
  10368. * @see tripal_core_chado_insert()
  10369. * @see tripal_core_chado_update()
  10370. * @see tripal_core_chado_select()
  10371. *
  10372. * @return
  10373. * An array describing the current table
  10374. *
  10375. * @ingroup tripal_schema_api
  10376. *
  10377. */
  10378. function tripal_core_chado_feature_genotype_schema() {
  10379. $description = array();
  10380. $description = array(
  10381. 'table' => 'feature_genotype',
  10382. // 'description' => 'TODO: please describe this table!',
  10383. 'fields' => array(
  10384. 'feature_genotype_id' => array(
  10385. // 'description' => 'TODO: please describe this field!',
  10386. 'type' => 'serial',
  10387. 'not NULL' => '1',
  10388. ),
  10389. 'feature_id' => array(
  10390. // 'description' => 'TODO: please describe this field!',
  10391. 'type' => 'int',
  10392. 'not NULL' => '1',
  10393. ),
  10394. 'genotype_id' => array(
  10395. // 'description' => 'TODO: please describe this field!',
  10396. 'type' => 'int',
  10397. 'not NULL' => '1',
  10398. ),
  10399. 'chromosome_id' => array(
  10400. // 'description' => 'TODO: please describe this field!',
  10401. 'type' => 'int',
  10402. 'not NULL' => '',
  10403. ),
  10404. 'rank' => array(
  10405. // 'description' => 'TODO: please describe this field!',
  10406. 'type' => 'int',
  10407. 'not NULL' => '1',
  10408. ),
  10409. 'cgroup' => array(
  10410. // 'description' => 'TODO: please describe this field!',
  10411. 'type' => 'int',
  10412. 'not NULL' => '1',
  10413. ),
  10414. 'cvterm_id' => array(
  10415. // 'description' => 'TODO: please describe this field!',
  10416. 'type' => 'int',
  10417. 'not NULL' => '1',
  10418. ),
  10419. ),
  10420. 'primary key' => array(
  10421. '0' => 'feature_genotype_id',
  10422. ),
  10423. 'unique keys' => array(
  10424. 'feature_genotype_c1' => array(
  10425. '0' => 'feature_id',
  10426. '1' => 'genotype_id',
  10427. '2' => 'cvterm_id',
  10428. '3' => 'chromosome_id',
  10429. '4' => 'rank',
  10430. '5' => 'cgroup',
  10431. ),
  10432. ),
  10433. 'indexes' => array(
  10434. 'feature_genotype_idx1' => array(
  10435. '0' => 'feature_id',
  10436. ),
  10437. 'feature_genotype_idx2' => array(
  10438. '0' => 'genotype_id',
  10439. ),
  10440. ),
  10441. 'foreign keys' => array(
  10442. ),
  10443. );
  10444. return $description;
  10445. }
  10446. /**
  10447. * Implements hook_feature_intersection_schema()
  10448. * Purpose: To describe the structure of feature_intersection to tripal
  10449. * @see tripal_core_chado_insert()
  10450. * @see tripal_core_chado_update()
  10451. * @see tripal_core_chado_select()
  10452. *
  10453. * @return
  10454. * An array describing the current table
  10455. *
  10456. * @ingroup tripal_schema_api
  10457. *
  10458. */
  10459. function tripal_core_chado_feature_intersection_schema() {
  10460. $description = array();
  10461. $description = array(
  10462. 'table' => 'feature_intersection',
  10463. // 'description' => 'TODO: please describe this table!',
  10464. 'fields' => array(
  10465. 'subject_id' => array(
  10466. // 'description' => 'TODO: please describe this field!',
  10467. 'type' => 'int',
  10468. 'not NULL' => '',
  10469. ),
  10470. 'object_id' => array(
  10471. // 'description' => 'TODO: please describe this field!',
  10472. 'type' => 'int',
  10473. 'not NULL' => '',
  10474. ),
  10475. 'srcfeature_id' => array(
  10476. // 'description' => 'TODO: please describe this field!',
  10477. 'type' => 'int',
  10478. 'not NULL' => '',
  10479. ),
  10480. 'subject_strand' => array(
  10481. // 'description' => 'TODO: please describe this field!',
  10482. 'type' => 'int',
  10483. 'size' => 'small',
  10484. 'not NULL' => '',
  10485. ),
  10486. 'object_strand' => array(
  10487. // 'description' => 'TODO: please describe this field!',
  10488. 'type' => 'int',
  10489. 'size' => 'small',
  10490. 'not NULL' => '',
  10491. ),
  10492. 'fmin' => array(
  10493. // 'description' => 'TODO: please describe this field!',
  10494. 'type' => 'int',
  10495. 'not NULL' => '',
  10496. ),
  10497. 'fmax' => array(
  10498. // 'description' => 'TODO: please describe this field!',
  10499. 'type' => 'int',
  10500. 'not NULL' => '',
  10501. ),
  10502. ),
  10503. 'primary key' => array(
  10504. ),
  10505. 'unique keys' => array(
  10506. ),
  10507. 'indexes' => array(
  10508. ),
  10509. 'foreign keys' => array(
  10510. ),
  10511. );
  10512. return $description;
  10513. }
  10514. /**
  10515. * Implements hook_feature_meets_schema()
  10516. * Purpose: To describe the structure of feature_meets to tripal
  10517. * @see tripal_core_chado_insert()
  10518. * @see tripal_core_chado_update()
  10519. * @see tripal_core_chado_select()
  10520. *
  10521. * @return
  10522. * An array describing the current table
  10523. *
  10524. * @ingroup tripal_schema_api
  10525. *
  10526. */
  10527. function tripal_core_chado_feature_meets_schema() {
  10528. $description = array();
  10529. $description = array(
  10530. 'table' => 'feature_meets',
  10531. // 'description' => 'TODO: please describe this table!',
  10532. 'fields' => array(
  10533. 'subject_id' => array(
  10534. // 'description' => 'TODO: please describe this field!',
  10535. 'type' => 'int',
  10536. 'not NULL' => '',
  10537. ),
  10538. 'object_id' => array(
  10539. // 'description' => 'TODO: please describe this field!',
  10540. 'type' => 'int',
  10541. 'not NULL' => '',
  10542. ),
  10543. ),
  10544. 'primary key' => array(
  10545. ),
  10546. 'unique keys' => array(
  10547. ),
  10548. 'indexes' => array(
  10549. ),
  10550. 'foreign keys' => array(
  10551. ),
  10552. );
  10553. return $description;
  10554. }
  10555. /**
  10556. * Implements hook_feature_meets_on_same_strand_schema()
  10557. * Purpose: To describe the structure of feature_meets_on_same_strand to tripal
  10558. * @see tripal_core_chado_insert()
  10559. * @see tripal_core_chado_update()
  10560. * @see tripal_core_chado_select()
  10561. *
  10562. * @return
  10563. * An array describing the current table
  10564. *
  10565. * @ingroup tripal_schema_api
  10566. *
  10567. */
  10568. function tripal_core_chado_feature_meets_on_same_strand_schema() {
  10569. $description = array();
  10570. $description = array(
  10571. 'table' => 'feature_meets_on_same_strand',
  10572. // 'description' => 'TODO: please describe this table!',
  10573. 'fields' => array(
  10574. 'subject_id' => array(
  10575. // 'description' => 'TODO: please describe this field!',
  10576. 'type' => 'int',
  10577. 'not NULL' => '',
  10578. ),
  10579. 'object_id' => array(
  10580. // 'description' => 'TODO: please describe this field!',
  10581. 'type' => 'int',
  10582. 'not NULL' => '',
  10583. ),
  10584. ),
  10585. 'primary key' => array(
  10586. ),
  10587. 'unique keys' => array(
  10588. ),
  10589. 'indexes' => array(
  10590. ),
  10591. 'foreign keys' => array(
  10592. ),
  10593. );
  10594. return $description;
  10595. }
  10596. /**
  10597. * Implements hook_f_loc_schema()
  10598. * Purpose: To describe the structure of f_loc to tripal
  10599. * @see tripal_core_chado_insert()
  10600. * @see tripal_core_chado_update()
  10601. * @see tripal_core_chado_select()
  10602. *
  10603. * @return
  10604. * An array describing the current table
  10605. *
  10606. * @ingroup tripal_schema_api
  10607. *
  10608. */
  10609. function tripal_core_chado_f_loc_schema() {
  10610. $description = array();
  10611. $description = array(
  10612. 'table' => 'f_loc',
  10613. // 'description' => 'TODO: please describe this table!',
  10614. 'fields' => array(
  10615. 'feature_id' => array(
  10616. // 'description' => 'TODO: please describe this field!',
  10617. 'type' => 'int',
  10618. 'not NULL' => '',
  10619. ),
  10620. 'name' => array(
  10621. // 'description' => 'TODO: please describe this field!',
  10622. 'type' => 'varchar',
  10623. 'length' => '255',
  10624. 'not NULL' => '',
  10625. ),
  10626. 'dbxref_id' => array(
  10627. // 'description' => 'TODO: please describe this field!',
  10628. 'type' => 'int',
  10629. 'not NULL' => '',
  10630. ),
  10631. 'nbeg' => array(
  10632. // 'description' => 'TODO: please describe this field!',
  10633. 'type' => 'int',
  10634. 'not NULL' => '',
  10635. ),
  10636. 'nend' => array(
  10637. // 'description' => 'TODO: please describe this field!',
  10638. 'type' => 'int',
  10639. 'not NULL' => '',
  10640. ),
  10641. 'strand' => array(
  10642. // 'description' => 'TODO: please describe this field!',
  10643. 'type' => 'int',
  10644. 'size' => 'small',
  10645. 'not NULL' => '',
  10646. ),
  10647. ),
  10648. 'primary key' => array(
  10649. ),
  10650. 'unique keys' => array(
  10651. ),
  10652. 'indexes' => array(
  10653. ),
  10654. 'foreign keys' => array(
  10655. ),
  10656. );
  10657. return $description;
  10658. }
  10659. /**
  10660. * Implements hook_expressionprop_schema()
  10661. * Purpose: To describe the structure of expressionprop to tripal
  10662. * @see tripal_core_chado_insert()
  10663. * @see tripal_core_chado_update()
  10664. * @see tripal_core_chado_select()
  10665. *
  10666. * @return
  10667. * An array describing the current table
  10668. *
  10669. * @ingroup tripal_schema_api
  10670. *
  10671. */
  10672. function tripal_core_chado_expressionprop_schema() {
  10673. $description = array();
  10674. $description = array(
  10675. 'table' => 'expressionprop',
  10676. // 'description' => 'TODO: please describe this table!',
  10677. 'fields' => array(
  10678. 'expressionprop_id' => array(
  10679. // 'description' => 'TODO: please describe this field!',
  10680. 'type' => 'serial',
  10681. 'not NULL' => '1',
  10682. ),
  10683. 'expression_id' => array(
  10684. // 'description' => 'TODO: please describe this field!',
  10685. 'type' => 'int',
  10686. 'not NULL' => '1',
  10687. ),
  10688. 'type_id' => array(
  10689. // 'description' => 'TODO: please describe this field!',
  10690. 'type' => 'int',
  10691. 'not NULL' => '1',
  10692. ),
  10693. 'value' => array(
  10694. // 'description' => 'TODO: please describe this field!',
  10695. 'type' => 'text',
  10696. 'not NULL' => '',
  10697. ),
  10698. 'rank' => array(
  10699. // 'description' => 'TODO: please describe this field!',
  10700. 'type' => 'int',
  10701. 'not NULL' => '1',
  10702. 'default' => '0',
  10703. ),
  10704. ),
  10705. 'primary key' => array(
  10706. '0' => 'expressionprop_id',
  10707. ),
  10708. 'unique keys' => array(
  10709. 'expressionprop_c1' => array(
  10710. '0' => 'expression_id',
  10711. '1' => 'type_id',
  10712. '2' => 'rank',
  10713. ),
  10714. ),
  10715. 'indexes' => array(
  10716. 'expressionprop_idx1' => array(
  10717. '0' => 'expression_id',
  10718. ),
  10719. 'expressionprop_idx2' => array(
  10720. '0' => 'type_id',
  10721. ),
  10722. ),
  10723. 'foreign keys' => array(
  10724. ),
  10725. );
  10726. return $description;
  10727. }
  10728. /**
  10729. * Implements hook_db_dbxref_count_schema()
  10730. * Purpose: To describe the structure of db_dbxref_count to tripal
  10731. * @see tripal_core_chado_insert()
  10732. * @see tripal_core_chado_update()
  10733. * @see tripal_core_chado_select()
  10734. *
  10735. * @return
  10736. * An array describing the current table
  10737. *
  10738. * @ingroup tripal_schema_api
  10739. *
  10740. */
  10741. function tripal_core_chado_db_dbxref_count_schema() {
  10742. $description = array();
  10743. $description = array(
  10744. 'table' => 'db_dbxref_count',
  10745. // 'description' => 'TODO: please describe this table!',
  10746. 'fields' => array(
  10747. 'name' => array(
  10748. // 'description' => 'TODO: please describe this field!',
  10749. 'type' => 'varchar',
  10750. 'length' => '255',
  10751. 'not NULL' => '',
  10752. ),
  10753. 'num_dbxrefs' => array(
  10754. // 'description' => 'TODO: please describe this field!',
  10755. 'type' => 'int',
  10756. 'size' => 'big',
  10757. 'not NULL' => '',
  10758. ),
  10759. ),
  10760. 'primary key' => array(
  10761. ),
  10762. 'unique keys' => array(
  10763. ),
  10764. 'indexes' => array(
  10765. ),
  10766. 'foreign keys' => array(
  10767. ),
  10768. );
  10769. return $description;
  10770. }
  10771. /**
  10772. * Implements hook_dbxref_schema()
  10773. * Purpose: To describe the structure of dbxref to tripal
  10774. * @see tripal_core_chado_insert()
  10775. * @see tripal_core_chado_update()
  10776. * @see tripal_core_chado_select()
  10777. *
  10778. * @return
  10779. * An array describing the current table
  10780. *
  10781. * @ingroup tripal_schema_api
  10782. *
  10783. */
  10784. function tripal_core_chado_dbxref_schema() {
  10785. $description = array();
  10786. $description = array(
  10787. 'table' => 'dbxref',
  10788. // 'description' => 'TODO: please describe this table!',
  10789. 'fields' => array(
  10790. 'dbxref_id' => array(
  10791. // 'description' => 'TODO: please describe this field!',
  10792. 'type' => 'serial',
  10793. 'not NULL' => '1',
  10794. ),
  10795. 'db_id' => array(
  10796. // 'description' => 'TODO: please describe this field!',
  10797. 'type' => 'int',
  10798. 'not NULL' => '1',
  10799. ),
  10800. 'accession' => array(
  10801. // 'description' => 'TODO: please describe this field!',
  10802. 'type' => 'varchar',
  10803. 'length' => '255',
  10804. 'not NULL' => '1',
  10805. ),
  10806. 'version' => array(
  10807. // 'description' => 'TODO: please describe this field!',
  10808. 'type' => 'varchar',
  10809. 'length' => '255',
  10810. 'not NULL' => '1',
  10811. 'default' => '',
  10812. ),
  10813. 'description' => array(
  10814. // 'description' => 'TODO: please describe this field!',
  10815. 'type' => 'text',
  10816. 'not NULL' => '',
  10817. ),
  10818. ),
  10819. 'primary key' => array(
  10820. '0' => 'dbxref_id',
  10821. ),
  10822. 'unique keys' => array(
  10823. 'dbxref_c1' => array(
  10824. '0' => 'db_id',
  10825. '1' => 'accession',
  10826. '2' => 'version',
  10827. ),
  10828. ),
  10829. 'indexes' => array(
  10830. 'dbxref_idx1' => array(
  10831. '0' => 'db_id',
  10832. ),
  10833. 'dbxref_idx2' => array(
  10834. '0' => 'accession',
  10835. ),
  10836. 'dbxref_idx3' => array(
  10837. '0' => 'version',
  10838. ),
  10839. ),
  10840. 'foreign keys' => array(
  10841. ),
  10842. );
  10843. return $description;
  10844. }
  10845. /**
  10846. * Implements hook_dbxrefprop_schema()
  10847. * Purpose: To describe the structure of dbxrefprop to tripal
  10848. * @see tripal_core_chado_insert()
  10849. * @see tripal_core_chado_update()
  10850. * @see tripal_core_chado_select()
  10851. *
  10852. * @return
  10853. * An array describing the current table
  10854. *
  10855. * @ingroup tripal_schema_api
  10856. *
  10857. */
  10858. function tripal_core_chado_dbxrefprop_schema() {
  10859. $description = array();
  10860. $description = array(
  10861. 'table' => 'dbxrefprop',
  10862. // 'description' => 'TODO: please describe this table!',
  10863. 'fields' => array(
  10864. 'dbxrefprop_id' => array(
  10865. // 'description' => 'TODO: please describe this field!',
  10866. 'type' => 'serial',
  10867. 'not NULL' => '1',
  10868. ),
  10869. 'dbxref_id' => array(
  10870. // 'description' => 'TODO: please describe this field!',
  10871. 'type' => 'int',
  10872. 'not NULL' => '1',
  10873. ),
  10874. 'type_id' => array(
  10875. // 'description' => 'TODO: please describe this field!',
  10876. 'type' => 'int',
  10877. 'not NULL' => '1',
  10878. ),
  10879. 'value' => array(
  10880. // 'description' => 'TODO: please describe this field!',
  10881. 'type' => 'text',
  10882. 'not NULL' => '1',
  10883. 'default' => '',
  10884. ),
  10885. 'rank' => array(
  10886. // 'description' => 'TODO: please describe this field!',
  10887. 'type' => 'int',
  10888. 'not NULL' => '1',
  10889. 'default' => '0',
  10890. ),
  10891. ),
  10892. 'primary key' => array(
  10893. '0' => 'dbxrefprop_id',
  10894. ),
  10895. 'unique keys' => array(
  10896. 'dbxrefprop_c1' => array(
  10897. '0' => 'dbxref_id',
  10898. '1' => 'type_id',
  10899. '2' => 'rank',
  10900. ),
  10901. ),
  10902. 'indexes' => array(
  10903. 'dbxrefprop_idx1' => array(
  10904. '0' => 'dbxref_id',
  10905. ),
  10906. 'dbxrefprop_idx2' => array(
  10907. '0' => 'type_id',
  10908. ),
  10909. ),
  10910. 'foreign keys' => array(
  10911. ),
  10912. );
  10913. return $description;
  10914. }
  10915. /**
  10916. * Implements hook_dfeatureloc_schema()
  10917. * Purpose: To describe the structure of dfeatureloc to tripal
  10918. * @see tripal_core_chado_insert()
  10919. * @see tripal_core_chado_update()
  10920. * @see tripal_core_chado_select()
  10921. *
  10922. * @return
  10923. * An array describing the current table
  10924. *
  10925. * @ingroup tripal_schema_api
  10926. *
  10927. */
  10928. function tripal_core_chado_dfeatureloc_schema() {
  10929. $description = array();
  10930. $description = array(
  10931. 'table' => 'dfeatureloc',
  10932. // 'description' => 'TODO: please describe this table!',
  10933. 'fields' => array(
  10934. 'featureloc_id' => array(
  10935. // 'description' => 'TODO: please describe this field!',
  10936. 'type' => 'int',
  10937. 'not NULL' => '',
  10938. ),
  10939. 'feature_id' => array(
  10940. // 'description' => 'TODO: please describe this field!',
  10941. 'type' => 'int',
  10942. 'not NULL' => '',
  10943. ),
  10944. 'srcfeature_id' => array(
  10945. // 'description' => 'TODO: please describe this field!',
  10946. 'type' => 'int',
  10947. 'not NULL' => '',
  10948. ),
  10949. 'nbeg' => array(
  10950. // 'description' => 'TODO: please describe this field!',
  10951. 'type' => 'int',
  10952. 'not NULL' => '',
  10953. ),
  10954. 'is_nbeg_partial' => array(
  10955. // 'description' => 'TODO: please describe this field!',
  10956. 'type' => 'boolean',
  10957. 'not NULL' => '',
  10958. ),
  10959. 'nend' => array(
  10960. // 'description' => 'TODO: please describe this field!',
  10961. 'type' => 'int',
  10962. 'not NULL' => '',
  10963. ),
  10964. 'is_nend_partial' => array(
  10965. // 'description' => 'TODO: please describe this field!',
  10966. 'type' => 'boolean',
  10967. 'not NULL' => '',
  10968. ),
  10969. 'strand' => array(
  10970. // 'description' => 'TODO: please describe this field!',
  10971. 'type' => 'int',
  10972. 'size' => 'small',
  10973. 'not NULL' => '',
  10974. ),
  10975. 'phase' => array(
  10976. // 'description' => 'TODO: please describe this field!',
  10977. 'type' => 'int',
  10978. 'not NULL' => '',
  10979. ),
  10980. 'residue_info' => array(
  10981. // 'description' => 'TODO: please describe this field!',
  10982. 'type' => 'text',
  10983. 'not NULL' => '',
  10984. ),
  10985. 'locgroup' => array(
  10986. // 'description' => 'TODO: please describe this field!',
  10987. 'type' => 'int',
  10988. 'not NULL' => '',
  10989. ),
  10990. 'rank' => array(
  10991. // 'description' => 'TODO: please describe this field!',
  10992. 'type' => 'int',
  10993. 'not NULL' => '',
  10994. ),
  10995. ),
  10996. 'primary key' => array(
  10997. ),
  10998. 'unique keys' => array(
  10999. ),
  11000. 'indexes' => array(
  11001. ),
  11002. 'foreign keys' => array(
  11003. ),
  11004. );
  11005. return $description;
  11006. }
  11007. /**
  11008. * Implements hook_db_schema()
  11009. * Purpose: To describe the structure of db to tripal
  11010. * @see tripal_core_chado_insert()
  11011. * @see tripal_core_chado_update()
  11012. * @see tripal_core_chado_select()
  11013. *
  11014. * @return
  11015. * An array describing the current table
  11016. *
  11017. * @ingroup tripal_schema_api
  11018. *
  11019. */
  11020. function tripal_core_chado_db_schema() {
  11021. $description = array();
  11022. $description = array(
  11023. 'table' => 'db',
  11024. // 'description' => 'TODO: please describe this table!',
  11025. 'fields' => array(
  11026. 'db_id' => array(
  11027. // 'description' => 'TODO: please describe this field!',
  11028. 'type' => 'serial',
  11029. 'not NULL' => '1',
  11030. ),
  11031. 'name' => array(
  11032. // 'description' => 'TODO: please describe this field!',
  11033. 'type' => 'varchar',
  11034. 'length' => '255',
  11035. 'not NULL' => '1',
  11036. ),
  11037. 'description' => array(
  11038. // 'description' => 'TODO: please describe this field!',
  11039. 'type' => 'varchar',
  11040. 'length' => '255',
  11041. 'not NULL' => '',
  11042. ),
  11043. 'urlprefix' => array(
  11044. // 'description' => 'TODO: please describe this field!',
  11045. 'type' => 'varchar',
  11046. 'length' => '255',
  11047. 'not NULL' => '',
  11048. ),
  11049. 'url' => array(
  11050. // 'description' => 'TODO: please describe this field!',
  11051. 'type' => 'varchar',
  11052. 'length' => '255',
  11053. 'not NULL' => '',
  11054. ),
  11055. ),
  11056. 'primary key' => array(
  11057. '0' => 'db_id',
  11058. ),
  11059. 'unique keys' => array(
  11060. 'db_c1' => array(
  11061. '0' => 'name',
  11062. ),
  11063. ),
  11064. 'indexes' => array(
  11065. ),
  11066. 'foreign keys' => array(
  11067. ),
  11068. );
  11069. return $description;
  11070. }
  11071. /**
  11072. * Implements hook_cvtermsynonym_schema()
  11073. * Purpose: To describe the structure of cvtermsynonym to tripal
  11074. * @see tripal_core_chado_insert()
  11075. * @see tripal_core_chado_update()
  11076. * @see tripal_core_chado_select()
  11077. *
  11078. * @return
  11079. * An array describing the current table
  11080. *
  11081. * @ingroup tripal_schema_api
  11082. *
  11083. */
  11084. function tripal_core_chado_cvtermsynonym_schema() {
  11085. $description = array();
  11086. $description = array(
  11087. 'table' => 'cvtermsynonym',
  11088. // 'description' => 'TODO: please describe this table!',
  11089. 'fields' => array(
  11090. 'cvtermsynonym_id' => array(
  11091. // 'description' => 'TODO: please describe this field!',
  11092. 'type' => 'serial',
  11093. 'not NULL' => '1',
  11094. ),
  11095. 'cvterm_id' => array(
  11096. // 'description' => 'TODO: please describe this field!',
  11097. 'type' => 'int',
  11098. 'not NULL' => '1',
  11099. ),
  11100. 'synonym' => array(
  11101. // 'description' => 'TODO: please describe this field!',
  11102. 'type' => 'varchar',
  11103. 'length' => '1024',
  11104. 'not NULL' => '1',
  11105. ),
  11106. 'type_id' => array(
  11107. // 'description' => 'TODO: please describe this field!',
  11108. 'type' => 'int',
  11109. 'not NULL' => '',
  11110. ),
  11111. ),
  11112. 'primary key' => array(
  11113. '0' => 'cvtermsynonym_id',
  11114. ),
  11115. 'unique keys' => array(
  11116. 'cvtermsynonym_c1' => array(
  11117. '0' => 'cvterm_id',
  11118. '1' => 'synonym',
  11119. ),
  11120. ),
  11121. 'indexes' => array(
  11122. 'cvtermsynonym_idx1' => array(
  11123. '0' => 'cvterm_id',
  11124. ),
  11125. ),
  11126. 'foreign keys' => array(
  11127. ),
  11128. );
  11129. return $description;
  11130. }
  11131. /**
  11132. * Implements hook_cvterm_dbxref_schema()
  11133. * Purpose: To describe the structure of cvterm_dbxref to tripal
  11134. * @see tripal_core_chado_insert()
  11135. * @see tripal_core_chado_update()
  11136. * @see tripal_core_chado_select()
  11137. *
  11138. * @return
  11139. * An array describing the current table
  11140. *
  11141. * @ingroup tripal_schema_api
  11142. *
  11143. */
  11144. function tripal_core_chado_cvterm_dbxref_schema() {
  11145. $description = array();
  11146. $description = array(
  11147. 'table' => 'cvterm_dbxref',
  11148. // 'description' => 'TODO: please describe this table!',
  11149. 'fields' => array(
  11150. 'cvterm_dbxref_id' => array(
  11151. // 'description' => 'TODO: please describe this field!',
  11152. 'type' => 'serial',
  11153. 'not NULL' => '1',
  11154. ),
  11155. 'cvterm_id' => array(
  11156. // 'description' => 'TODO: please describe this field!',
  11157. 'type' => 'int',
  11158. 'not NULL' => '1',
  11159. ),
  11160. 'dbxref_id' => array(
  11161. // 'description' => 'TODO: please describe this field!',
  11162. 'type' => 'int',
  11163. 'not NULL' => '1',
  11164. ),
  11165. 'is_for_definition' => array(
  11166. // 'description' => 'TODO: please describe this field!',
  11167. 'type' => 'int',
  11168. 'not NULL' => '1',
  11169. 'default' => '0',
  11170. ),
  11171. ),
  11172. 'primary key' => array(
  11173. '0' => 'cvterm_dbxref_id',
  11174. ),
  11175. 'unique keys' => array(
  11176. 'cvterm_dbxref_c1' => array(
  11177. '0' => 'cvterm_id',
  11178. '1' => 'dbxref_id',
  11179. ),
  11180. ),
  11181. 'indexes' => array(
  11182. 'cvterm_dbxref_idx1' => array(
  11183. '0' => 'cvterm_id',
  11184. ),
  11185. 'cvterm_dbxref_idx2' => array(
  11186. '0' => 'dbxref_id',
  11187. ),
  11188. ),
  11189. 'foreign keys' => array(
  11190. ),
  11191. );
  11192. return $description;
  11193. }
  11194. /**
  11195. * Implements hook_cvterm_relationship_schema()
  11196. * Purpose: To describe the structure of cvterm_relationship to tripal
  11197. * @see tripal_core_chado_insert()
  11198. * @see tripal_core_chado_update()
  11199. * @see tripal_core_chado_select()
  11200. *
  11201. * @return
  11202. * An array describing the current table
  11203. *
  11204. * @ingroup tripal_schema_api
  11205. *
  11206. */
  11207. function tripal_core_chado_cvterm_relationship_schema() {
  11208. $description = array();
  11209. $description = array(
  11210. 'table' => 'cvterm_relationship',
  11211. // 'description' => 'TODO: please describe this table!',
  11212. 'fields' => array(
  11213. 'cvterm_relationship_id' => array(
  11214. // 'description' => 'TODO: please describe this field!',
  11215. 'type' => 'serial',
  11216. 'not NULL' => '1',
  11217. ),
  11218. 'type_id' => array(
  11219. // 'description' => 'TODO: please describe this field!',
  11220. 'type' => 'int',
  11221. 'not NULL' => '1',
  11222. ),
  11223. 'subject_id' => array(
  11224. // 'description' => 'TODO: please describe this field!',
  11225. 'type' => 'int',
  11226. 'not NULL' => '1',
  11227. ),
  11228. 'object_id' => array(
  11229. // 'description' => 'TODO: please describe this field!',
  11230. 'type' => 'int',
  11231. 'not NULL' => '1',
  11232. ),
  11233. ),
  11234. 'primary key' => array(
  11235. '0' => 'cvterm_relationship_id',
  11236. ),
  11237. 'unique keys' => array(
  11238. 'cvterm_relationship_c1' => array(
  11239. '0' => 'subject_id',
  11240. '1' => 'object_id',
  11241. '2' => 'type_id',
  11242. ),
  11243. ),
  11244. 'indexes' => array(
  11245. 'cvterm_relationship_idx1' => array(
  11246. '0' => 'type_id',
  11247. ),
  11248. 'cvterm_relationship_idx2' => array(
  11249. '0' => 'subject_id',
  11250. ),
  11251. 'cvterm_relationship_idx3' => array(
  11252. '0' => 'object_id',
  11253. ),
  11254. ),
  11255. 'foreign keys' => array(
  11256. ),
  11257. );
  11258. return $description;
  11259. }
  11260. /**
  11261. * Implements hook_cvtermpath_schema()
  11262. * Purpose: To describe the structure of cvtermpath to tripal
  11263. * @see tripal_core_chado_insert()
  11264. * @see tripal_core_chado_update()
  11265. * @see tripal_core_chado_select()
  11266. *
  11267. * @return
  11268. * An array describing the current table
  11269. *
  11270. * @ingroup tripal_schema_api
  11271. *
  11272. */
  11273. function tripal_core_chado_cvtermpath_schema() {
  11274. $description = array();
  11275. $description = array(
  11276. 'table' => 'cvtermpath',
  11277. // 'description' => 'TODO: please describe this table!',
  11278. 'fields' => array(
  11279. 'cvtermpath_id' => array(
  11280. // 'description' => 'TODO: please describe this field!',
  11281. 'type' => 'serial',
  11282. 'not NULL' => '1',
  11283. ),
  11284. 'type_id' => array(
  11285. // 'description' => 'TODO: please describe this field!',
  11286. 'type' => 'int',
  11287. 'not NULL' => '',
  11288. ),
  11289. 'subject_id' => array(
  11290. // 'description' => 'TODO: please describe this field!',
  11291. 'type' => 'int',
  11292. 'not NULL' => '1',
  11293. ),
  11294. 'object_id' => array(
  11295. // 'description' => 'TODO: please describe this field!',
  11296. 'type' => 'int',
  11297. 'not NULL' => '1',
  11298. ),
  11299. 'cv_id' => array(
  11300. // 'description' => 'TODO: please describe this field!',
  11301. 'type' => 'int',
  11302. 'not NULL' => '1',
  11303. ),
  11304. 'pathdistance' => array(
  11305. // 'description' => 'TODO: please describe this field!',
  11306. 'type' => 'int',
  11307. 'not NULL' => '',
  11308. ),
  11309. ),
  11310. 'primary key' => array(
  11311. '0' => 'cvtermpath_id',
  11312. ),
  11313. 'unique keys' => array(
  11314. 'cvtermpath_c1' => array(
  11315. '0' => 'subject_id',
  11316. '1' => 'object_id',
  11317. '2' => 'type_id',
  11318. '3' => 'pathdistance',
  11319. ),
  11320. ),
  11321. 'indexes' => array(
  11322. 'cvtermpath_idx1' => array(
  11323. '0' => 'type_id',
  11324. ),
  11325. 'cvtermpath_idx2' => array(
  11326. '0' => 'subject_id',
  11327. ),
  11328. 'cvtermpath_idx3' => array(
  11329. '0' => 'object_id',
  11330. ),
  11331. 'cvtermpath_idx4' => array(
  11332. '0' => 'cv_id',
  11333. ),
  11334. ),
  11335. 'foreign keys' => array(
  11336. ),
  11337. );
  11338. return $description;
  11339. }
  11340. /**
  11341. * Implements hook_cvtermprop_schema()
  11342. * Purpose: To describe the structure of cvtermprop to tripal
  11343. * @see tripal_core_chado_insert()
  11344. * @see tripal_core_chado_update()
  11345. * @see tripal_core_chado_select()
  11346. *
  11347. * @return
  11348. * An array describing the current table
  11349. *
  11350. * @ingroup tripal_schema_api
  11351. *
  11352. */
  11353. function tripal_core_chado_cvtermprop_schema() {
  11354. $description = array();
  11355. $description = array(
  11356. 'table' => 'cvtermprop',
  11357. // 'description' => 'TODO: please describe this table!',
  11358. 'fields' => array(
  11359. 'cvtermprop_id' => array(
  11360. // 'description' => 'TODO: please describe this field!',
  11361. 'type' => 'serial',
  11362. 'not NULL' => '1',
  11363. ),
  11364. 'cvterm_id' => array(
  11365. // 'description' => 'TODO: please describe this field!',
  11366. 'type' => 'int',
  11367. 'not NULL' => '1',
  11368. ),
  11369. 'type_id' => array(
  11370. // 'description' => 'TODO: please describe this field!',
  11371. 'type' => 'int',
  11372. 'not NULL' => '1',
  11373. ),
  11374. 'value' => array(
  11375. // 'description' => 'TODO: please describe this field!',
  11376. 'type' => 'text',
  11377. 'not NULL' => '1',
  11378. 'default' => '',
  11379. ),
  11380. 'rank' => array(
  11381. // 'description' => 'TODO: please describe this field!',
  11382. 'type' => 'int',
  11383. 'not NULL' => '1',
  11384. 'default' => '0',
  11385. ),
  11386. ),
  11387. 'primary key' => array(
  11388. '0' => 'cvtermprop_id',
  11389. ),
  11390. 'unique keys' => array(
  11391. 'cvterm_id' => array(
  11392. '0' => 'cvterm_id',
  11393. '1' => 'type_id',
  11394. '2' => 'value',
  11395. '3' => 'rank',
  11396. ),
  11397. ),
  11398. 'indexes' => array(
  11399. 'cvtermprop_idx1' => array(
  11400. '0' => 'cvterm_id',
  11401. ),
  11402. 'cvtermprop_idx2' => array(
  11403. '0' => 'type_id',
  11404. ),
  11405. ),
  11406. 'foreign keys' => array(
  11407. ),
  11408. );
  11409. return $description;
  11410. }
  11411. /**
  11412. * Implements hook_eimage_schema()
  11413. * Purpose: To describe the structure of eimage to tripal
  11414. * @see tripal_core_chado_insert()
  11415. * @see tripal_core_chado_update()
  11416. * @see tripal_core_chado_select()
  11417. *
  11418. * @return
  11419. * An array describing the current table
  11420. *
  11421. * @ingroup tripal_schema_api
  11422. *
  11423. */
  11424. function tripal_core_chado_eimage_schema() {
  11425. $description = array();
  11426. $description = array(
  11427. 'table' => 'eimage',
  11428. // 'description' => 'TODO: please describe this table!',
  11429. 'fields' => array(
  11430. 'eimage_id' => array(
  11431. // 'description' => 'TODO: please describe this field!',
  11432. 'type' => 'serial',
  11433. 'not NULL' => '1',
  11434. ),
  11435. 'eimage_data' => array(
  11436. // 'description' => 'TODO: please describe this field!',
  11437. 'type' => 'text',
  11438. 'not NULL' => '',
  11439. ),
  11440. 'eimage_type' => array(
  11441. // 'description' => 'TODO: please describe this field!',
  11442. 'type' => 'varchar',
  11443. 'length' => '255',
  11444. 'not NULL' => '1',
  11445. ),
  11446. 'image_uri' => array(
  11447. // 'description' => 'TODO: please describe this field!',
  11448. 'type' => 'varchar',
  11449. 'length' => '255',
  11450. 'not NULL' => '',
  11451. ),
  11452. ),
  11453. 'primary key' => array(
  11454. '0' => 'eimage_id',
  11455. ),
  11456. 'unique keys' => array(
  11457. ),
  11458. 'indexes' => array(
  11459. ),
  11460. 'foreign keys' => array(
  11461. ),
  11462. );
  11463. return $description;
  11464. }
  11465. /**
  11466. * Implements hook_element_schema()
  11467. * Purpose: To describe the structure of element to tripal
  11468. * @see tripal_core_chado_insert()
  11469. * @see tripal_core_chado_update()
  11470. * @see tripal_core_chado_select()
  11471. *
  11472. * @return
  11473. * An array describing the current table
  11474. *
  11475. * @ingroup tripal_schema_api
  11476. *
  11477. */
  11478. function tripal_core_chado_element_schema() {
  11479. $description = array();
  11480. $description = array(
  11481. 'table' => 'element',
  11482. // 'description' => 'TODO: please describe this table!',
  11483. 'fields' => array(
  11484. 'element_id' => array(
  11485. // 'description' => 'TODO: please describe this field!',
  11486. 'type' => 'serial',
  11487. 'not NULL' => '1',
  11488. ),
  11489. 'feature_id' => array(
  11490. // 'description' => 'TODO: please describe this field!',
  11491. 'type' => 'int',
  11492. 'not NULL' => '',
  11493. ),
  11494. 'arraydesign_id' => array(
  11495. // 'description' => 'TODO: please describe this field!',
  11496. 'type' => 'int',
  11497. 'not NULL' => '1',
  11498. ),
  11499. 'type_id' => array(
  11500. // 'description' => 'TODO: please describe this field!',
  11501. 'type' => 'int',
  11502. 'not NULL' => '',
  11503. ),
  11504. 'dbxref_id' => array(
  11505. // 'description' => 'TODO: please describe this field!',
  11506. 'type' => 'int',
  11507. 'not NULL' => '',
  11508. ),
  11509. ),
  11510. 'primary key' => array(
  11511. '0' => 'element_id',
  11512. ),
  11513. 'unique keys' => array(
  11514. 'element_c1' => array(
  11515. '0' => 'feature_id',
  11516. '1' => 'arraydesign_id',
  11517. ),
  11518. ),
  11519. 'indexes' => array(
  11520. 'element_idx1' => array(
  11521. '0' => 'feature_id',
  11522. ),
  11523. 'element_idx2' => array(
  11524. '0' => 'arraydesign_id',
  11525. ),
  11526. 'element_idx3' => array(
  11527. '0' => 'type_id',
  11528. ),
  11529. 'element_idx4' => array(
  11530. '0' => 'dbxref_id',
  11531. ),
  11532. ),
  11533. 'foreign keys' => array(
  11534. ),
  11535. );
  11536. return $description;
  11537. }
  11538. /**
  11539. * Implements hook_expression_cvterm_schema()
  11540. * Purpose: To describe the structure of expression_cvterm to tripal
  11541. * @see tripal_core_chado_insert()
  11542. * @see tripal_core_chado_update()
  11543. * @see tripal_core_chado_select()
  11544. *
  11545. * @return
  11546. * An array describing the current table
  11547. *
  11548. * @ingroup tripal_schema_api
  11549. *
  11550. */
  11551. function tripal_core_chado_expression_cvterm_schema() {
  11552. $description = array();
  11553. $description = array(
  11554. 'table' => 'expression_cvterm',
  11555. // 'description' => 'TODO: please describe this table!',
  11556. 'fields' => array(
  11557. 'expression_cvterm_id' => array(
  11558. // 'description' => 'TODO: please describe this field!',
  11559. 'type' => 'serial',
  11560. 'not NULL' => '1',
  11561. ),
  11562. 'expression_id' => array(
  11563. // 'description' => 'TODO: please describe this field!',
  11564. 'type' => 'int',
  11565. 'not NULL' => '1',
  11566. ),
  11567. 'cvterm_id' => array(
  11568. // 'description' => 'TODO: please describe this field!',
  11569. 'type' => 'int',
  11570. 'not NULL' => '1',
  11571. ),
  11572. 'rank' => array(
  11573. // 'description' => 'TODO: please describe this field!',
  11574. 'type' => 'int',
  11575. 'not NULL' => '1',
  11576. 'default' => '0',
  11577. ),
  11578. 'cvterm_type_id' => array(
  11579. // 'description' => 'TODO: please describe this field!',
  11580. 'type' => 'int',
  11581. 'not NULL' => '1',
  11582. ),
  11583. ),
  11584. 'primary key' => array(
  11585. '0' => 'expression_cvterm_id',
  11586. ),
  11587. 'unique keys' => array(
  11588. 'expression_cvterm_c1' => array(
  11589. '0' => 'expression_id',
  11590. '1' => 'cvterm_id',
  11591. '2' => 'cvterm_type_id',
  11592. ),
  11593. ),
  11594. 'indexes' => array(
  11595. 'expression_cvterm_idx1' => array(
  11596. '0' => 'expression_id',
  11597. ),
  11598. 'expression_cvterm_idx2' => array(
  11599. '0' => 'cvterm_id',
  11600. ),
  11601. 'expression_cvterm_idx3' => array(
  11602. '0' => 'cvterm_type_id',
  11603. ),
  11604. ),
  11605. 'foreign keys' => array(
  11606. ),
  11607. );
  11608. return $description;
  11609. }
  11610. /**
  11611. * Implements hook_expression_cvtermprop_schema()
  11612. * Purpose: To describe the structure of expression_cvtermprop to tripal
  11613. * @see tripal_core_chado_insert()
  11614. * @see tripal_core_chado_update()
  11615. * @see tripal_core_chado_select()
  11616. *
  11617. * @return
  11618. * An array describing the current table
  11619. *
  11620. * @ingroup tripal_schema_api
  11621. *
  11622. */
  11623. function tripal_core_chado_expression_cvtermprop_schema() {
  11624. $description = array();
  11625. $description = array(
  11626. 'table' => 'expression_cvtermprop',
  11627. // 'description' => 'TODO: please describe this table!',
  11628. 'fields' => array(
  11629. 'expression_cvtermprop_id' => array(
  11630. // 'description' => 'TODO: please describe this field!',
  11631. 'type' => 'serial',
  11632. 'not NULL' => '1',
  11633. ),
  11634. 'expression_cvterm_id' => array(
  11635. // 'description' => 'TODO: please describe this field!',
  11636. 'type' => 'int',
  11637. 'not NULL' => '1',
  11638. ),
  11639. 'type_id' => array(
  11640. // 'description' => 'TODO: please describe this field!',
  11641. 'type' => 'int',
  11642. 'not NULL' => '1',
  11643. ),
  11644. 'value' => array(
  11645. // 'description' => 'TODO: please describe this field!',
  11646. 'type' => 'text',
  11647. 'not NULL' => '',
  11648. ),
  11649. 'rank' => array(
  11650. // 'description' => 'TODO: please describe this field!',
  11651. 'type' => 'int',
  11652. 'not NULL' => '1',
  11653. 'default' => '0',
  11654. ),
  11655. ),
  11656. 'primary key' => array(
  11657. '0' => 'expression_cvtermprop_id',
  11658. ),
  11659. 'unique keys' => array(
  11660. 'expression_cvtermprop_c1' => array(
  11661. '0' => 'expression_cvterm_id',
  11662. '1' => 'type_id',
  11663. '2' => 'rank',
  11664. ),
  11665. ),
  11666. 'indexes' => array(
  11667. 'expression_cvtermprop_idx1' => array(
  11668. '0' => 'expression_cvterm_id',
  11669. ),
  11670. 'expression_cvtermprop_idx2' => array(
  11671. '0' => 'type_id',
  11672. ),
  11673. ),
  11674. 'foreign keys' => array(
  11675. ),
  11676. );
  11677. return $description;
  11678. }
  11679. /**
  11680. * Implements hook_expression_image_schema()
  11681. * Purpose: To describe the structure of expression_image to tripal
  11682. * @see tripal_core_chado_insert()
  11683. * @see tripal_core_chado_update()
  11684. * @see tripal_core_chado_select()
  11685. *
  11686. * @return
  11687. * An array describing the current table
  11688. *
  11689. * @ingroup tripal_schema_api
  11690. *
  11691. */
  11692. function tripal_core_chado_expression_image_schema() {
  11693. $description = array();
  11694. $description = array(
  11695. 'table' => 'expression_image',
  11696. // 'description' => 'TODO: please describe this table!',
  11697. 'fields' => array(
  11698. 'expression_image_id' => array(
  11699. // 'description' => 'TODO: please describe this field!',
  11700. 'type' => 'serial',
  11701. 'not NULL' => '1',
  11702. ),
  11703. 'expression_id' => array(
  11704. // 'description' => 'TODO: please describe this field!',
  11705. 'type' => 'int',
  11706. 'not NULL' => '1',
  11707. ),
  11708. 'eimage_id' => array(
  11709. // 'description' => 'TODO: please describe this field!',
  11710. 'type' => 'int',
  11711. 'not NULL' => '1',
  11712. ),
  11713. ),
  11714. 'primary key' => array(
  11715. '0' => 'expression_image_id',
  11716. ),
  11717. 'unique keys' => array(
  11718. 'expression_image_c1' => array(
  11719. '0' => 'expression_id',
  11720. '1' => 'eimage_id',
  11721. ),
  11722. ),
  11723. 'indexes' => array(
  11724. 'expression_image_idx1' => array(
  11725. '0' => 'expression_id',
  11726. ),
  11727. 'expression_image_idx2' => array(
  11728. '0' => 'eimage_id',
  11729. ),
  11730. ),
  11731. 'foreign keys' => array(
  11732. ),
  11733. );
  11734. return $description;
  11735. }
  11736. /**
  11737. * Implements hook_expression_pub_schema()
  11738. * Purpose: To describe the structure of expression_pub to tripal
  11739. * @see tripal_core_chado_insert()
  11740. * @see tripal_core_chado_update()
  11741. * @see tripal_core_chado_select()
  11742. *
  11743. * @return
  11744. * An array describing the current table
  11745. *
  11746. * @ingroup tripal_schema_api
  11747. *
  11748. */
  11749. function tripal_core_chado_expression_pub_schema() {
  11750. $description = array();
  11751. $description = array(
  11752. 'table' => 'expression_pub',
  11753. // 'description' => 'TODO: please describe this table!',
  11754. 'fields' => array(
  11755. 'expression_pub_id' => array(
  11756. // 'description' => 'TODO: please describe this field!',
  11757. 'type' => 'serial',
  11758. 'not NULL' => '1',
  11759. ),
  11760. 'expression_id' => array(
  11761. // 'description' => 'TODO: please describe this field!',
  11762. 'type' => 'int',
  11763. 'not NULL' => '1',
  11764. ),
  11765. 'pub_id' => array(
  11766. // 'description' => 'TODO: please describe this field!',
  11767. 'type' => 'int',
  11768. 'not NULL' => '1',
  11769. ),
  11770. ),
  11771. 'primary key' => array(
  11772. '0' => 'expression_pub_id',
  11773. ),
  11774. 'unique keys' => array(
  11775. 'expression_pub_c1' => array(
  11776. '0' => 'expression_id',
  11777. '1' => 'pub_id',
  11778. ),
  11779. ),
  11780. 'indexes' => array(
  11781. 'expression_pub_idx1' => array(
  11782. '0' => 'expression_id',
  11783. ),
  11784. 'expression_pub_idx2' => array(
  11785. '0' => 'pub_id',
  11786. ),
  11787. ),
  11788. 'foreign keys' => array(
  11789. ),
  11790. );
  11791. return $description;
  11792. }
  11793. /**
  11794. * Implements hook_expression_schema()
  11795. * Purpose: To describe the structure of expression to tripal
  11796. * @see tripal_core_chado_insert()
  11797. * @see tripal_core_chado_update()
  11798. * @see tripal_core_chado_select()
  11799. *
  11800. * @return
  11801. * An array describing the current table
  11802. *
  11803. * @ingroup tripal_schema_api
  11804. *
  11805. */
  11806. function tripal_core_chado_expression_schema() {
  11807. $description = array();
  11808. $description = array(
  11809. 'table' => 'expression',
  11810. // 'description' => 'TODO: please describe this table!',
  11811. 'fields' => array(
  11812. 'expression_id' => array(
  11813. // 'description' => 'TODO: please describe this field!',
  11814. 'type' => 'serial',
  11815. 'not NULL' => '1',
  11816. ),
  11817. 'uniquename' => array(
  11818. // 'description' => 'TODO: please describe this field!',
  11819. 'type' => 'text',
  11820. 'not NULL' => '1',
  11821. ),
  11822. 'md5checksum' => array(
  11823. // 'description' => 'TODO: please describe this field!',
  11824. 'type' => 'char',
  11825. 'length' => '32',
  11826. 'not NULL' => '',
  11827. ),
  11828. 'description' => array(
  11829. // 'description' => 'TODO: please describe this field!',
  11830. 'type' => 'text',
  11831. 'not NULL' => '',
  11832. ),
  11833. ),
  11834. 'primary key' => array(
  11835. '0' => 'expression_id',
  11836. ),
  11837. 'unique keys' => array(
  11838. 'expression_c1' => array(
  11839. '0' => 'uniquename',
  11840. ),
  11841. ),
  11842. 'indexes' => array(
  11843. ),
  11844. 'foreign keys' => array(
  11845. ),
  11846. );
  11847. return $description;
  11848. }
  11849. /**
  11850. * Implements hook_environment_cvterm_schema()
  11851. * Purpose: To describe the structure of environment_cvterm to tripal
  11852. * @see tripal_core_chado_insert()
  11853. * @see tripal_core_chado_update()
  11854. * @see tripal_core_chado_select()
  11855. *
  11856. * @return
  11857. * An array describing the current table
  11858. *
  11859. * @ingroup tripal_schema_api
  11860. *
  11861. */
  11862. function tripal_core_chado_environment_cvterm_schema() {
  11863. $description = array();
  11864. $description = array(
  11865. 'table' => 'environment_cvterm',
  11866. // 'description' => 'TODO: please describe this table!',
  11867. 'fields' => array(
  11868. 'environment_cvterm_id' => array(
  11869. // 'description' => 'TODO: please describe this field!',
  11870. 'type' => 'serial',
  11871. 'not NULL' => '1',
  11872. ),
  11873. 'environment_id' => array(
  11874. // 'description' => 'TODO: please describe this field!',
  11875. 'type' => 'int',
  11876. 'not NULL' => '1',
  11877. ),
  11878. 'cvterm_id' => array(
  11879. // 'description' => 'TODO: please describe this field!',
  11880. 'type' => 'int',
  11881. 'not NULL' => '1',
  11882. ),
  11883. ),
  11884. 'primary key' => array(
  11885. '0' => 'environment_cvterm_id',
  11886. ),
  11887. 'unique keys' => array(
  11888. 'environment_cvterm_c1' => array(
  11889. '0' => 'environment_id',
  11890. '1' => 'cvterm_id',
  11891. ),
  11892. ),
  11893. 'indexes' => array(
  11894. 'environment_cvterm_idx1' => array(
  11895. '0' => 'environment_id',
  11896. ),
  11897. 'environment_cvterm_idx2' => array(
  11898. '0' => 'cvterm_id',
  11899. ),
  11900. ),
  11901. 'foreign keys' => array(
  11902. ),
  11903. );
  11904. return $description;
  11905. }
  11906. /**
  11907. * Implements hook_element_relationship_schema()
  11908. * Purpose: To describe the structure of element_relationship to tripal
  11909. * @see tripal_core_chado_insert()
  11910. * @see tripal_core_chado_update()
  11911. * @see tripal_core_chado_select()
  11912. *
  11913. * @return
  11914. * An array describing the current table
  11915. *
  11916. * @ingroup tripal_schema_api
  11917. *
  11918. */
  11919. function tripal_core_chado_element_relationship_schema() {
  11920. $description = array();
  11921. $description = array(
  11922. 'table' => 'element_relationship',
  11923. // 'description' => 'TODO: please describe this table!',
  11924. 'fields' => array(
  11925. 'element_relationship_id' => array(
  11926. // 'description' => 'TODO: please describe this field!',
  11927. 'type' => 'serial',
  11928. 'not NULL' => '1',
  11929. ),
  11930. 'subject_id' => array(
  11931. // 'description' => 'TODO: please describe this field!',
  11932. 'type' => 'int',
  11933. 'not NULL' => '1',
  11934. ),
  11935. 'type_id' => array(
  11936. // 'description' => 'TODO: please describe this field!',
  11937. 'type' => 'int',
  11938. 'not NULL' => '1',
  11939. ),
  11940. 'object_id' => array(
  11941. // 'description' => 'TODO: please describe this field!',
  11942. 'type' => 'int',
  11943. 'not NULL' => '1',
  11944. ),
  11945. 'value' => array(
  11946. // 'description' => 'TODO: please describe this field!',
  11947. 'type' => 'text',
  11948. 'not NULL' => '',
  11949. ),
  11950. 'rank' => array(
  11951. // 'description' => 'TODO: please describe this field!',
  11952. 'type' => 'int',
  11953. 'not NULL' => '1',
  11954. 'default' => '0',
  11955. ),
  11956. ),
  11957. 'primary key' => array(
  11958. '0' => 'element_relationship_id',
  11959. ),
  11960. 'unique keys' => array(
  11961. 'element_relationship_c1' => array(
  11962. '0' => 'subject_id',
  11963. '1' => 'object_id',
  11964. '2' => 'type_id',
  11965. '3' => 'rank',
  11966. ),
  11967. ),
  11968. 'indexes' => array(
  11969. 'element_relationship_idx1' => array(
  11970. '0' => 'subject_id',
  11971. ),
  11972. 'element_relationship_idx2' => array(
  11973. '0' => 'type_id',
  11974. ),
  11975. 'element_relationship_idx3' => array(
  11976. '0' => 'object_id',
  11977. ),
  11978. 'element_relationship_idx4' => array(
  11979. '0' => 'value',
  11980. ),
  11981. ),
  11982. 'foreign keys' => array(
  11983. ),
  11984. );
  11985. return $description;
  11986. }
  11987. /**
  11988. * Implements hook_elementresult_schema()
  11989. * Purpose: To describe the structure of elementresult to tripal
  11990. * @see tripal_core_chado_insert()
  11991. * @see tripal_core_chado_update()
  11992. * @see tripal_core_chado_select()
  11993. *
  11994. * @return
  11995. * An array describing the current table
  11996. *
  11997. * @ingroup tripal_schema_api
  11998. *
  11999. */
  12000. function tripal_core_chado_elementresult_schema() {
  12001. $description = array();
  12002. $description = array(
  12003. 'table' => 'elementresult',
  12004. // 'description' => 'TODO: please describe this table!',
  12005. 'fields' => array(
  12006. 'elementresult_id' => array(
  12007. // 'description' => 'TODO: please describe this field!',
  12008. 'type' => 'serial',
  12009. 'not NULL' => '1',
  12010. ),
  12011. 'element_id' => array(
  12012. // 'description' => 'TODO: please describe this field!',
  12013. 'type' => 'int',
  12014. 'not NULL' => '1',
  12015. ),
  12016. 'quantification_id' => array(
  12017. // 'description' => 'TODO: please describe this field!',
  12018. 'type' => 'int',
  12019. 'not NULL' => '1',
  12020. ),
  12021. 'signal' => array(
  12022. // 'description' => 'TODO: please describe this field!',
  12023. 'type' => 'float',
  12024. 'size' => 'big',
  12025. 'not NULL' => '1',
  12026. ),
  12027. ),
  12028. 'primary key' => array(
  12029. '0' => 'elementresult_id',
  12030. ),
  12031. 'unique keys' => array(
  12032. 'elementresult_c1' => array(
  12033. '0' => 'element_id',
  12034. '1' => 'quantification_id',
  12035. ),
  12036. ),
  12037. 'indexes' => array(
  12038. 'elementresult_idx1' => array(
  12039. '0' => 'element_id',
  12040. ),
  12041. 'elementresult_idx2' => array(
  12042. '0' => 'quantification_id',
  12043. ),
  12044. 'elementresult_idx3' => array(
  12045. '0' => 'signal',
  12046. ),
  12047. ),
  12048. 'foreign keys' => array(
  12049. ),
  12050. );
  12051. return $description;
  12052. }
  12053. /**
  12054. * Implements hook_elementresult_relationship_schema()
  12055. * Purpose: To describe the structure of elementresult_relationship to tripal
  12056. * @see tripal_core_chado_insert()
  12057. * @see tripal_core_chado_update()
  12058. * @see tripal_core_chado_select()
  12059. *
  12060. * @return
  12061. * An array describing the current table
  12062. *
  12063. * @ingroup tripal_schema_api
  12064. *
  12065. */
  12066. function tripal_core_chado_elementresult_relationship_schema() {
  12067. $description = array();
  12068. $description = array(
  12069. 'table' => 'elementresult_relationship',
  12070. // 'description' => 'TODO: please describe this table!',
  12071. 'fields' => array(
  12072. 'elementresult_relationship_id' => array(
  12073. // 'description' => 'TODO: please describe this field!',
  12074. 'type' => 'serial',
  12075. 'not NULL' => '1',
  12076. ),
  12077. 'subject_id' => array(
  12078. // 'description' => 'TODO: please describe this field!',
  12079. 'type' => 'int',
  12080. 'not NULL' => '1',
  12081. ),
  12082. 'type_id' => array(
  12083. // 'description' => 'TODO: please describe this field!',
  12084. 'type' => 'int',
  12085. 'not NULL' => '1',
  12086. ),
  12087. 'object_id' => array(
  12088. // 'description' => 'TODO: please describe this field!',
  12089. 'type' => 'int',
  12090. 'not NULL' => '1',
  12091. ),
  12092. 'value' => array(
  12093. // 'description' => 'TODO: please describe this field!',
  12094. 'type' => 'text',
  12095. 'not NULL' => '',
  12096. ),
  12097. 'rank' => array(
  12098. // 'description' => 'TODO: please describe this field!',
  12099. 'type' => 'int',
  12100. 'not NULL' => '1',
  12101. 'default' => '0',
  12102. ),
  12103. ),
  12104. 'primary key' => array(
  12105. '0' => 'elementresult_relationship_id',
  12106. ),
  12107. 'unique keys' => array(
  12108. 'elementresult_relationship_c1' => array(
  12109. '0' => 'subject_id',
  12110. '1' => 'object_id',
  12111. '2' => 'type_id',
  12112. '3' => 'rank',
  12113. ),
  12114. ),
  12115. 'indexes' => array(
  12116. 'elementresult_relationship_idx1' => array(
  12117. '0' => 'subject_id',
  12118. ),
  12119. 'elementresult_relationship_idx2' => array(
  12120. '0' => 'type_id',
  12121. ),
  12122. 'elementresult_relationship_idx3' => array(
  12123. '0' => 'object_id',
  12124. ),
  12125. 'elementresult_relationship_idx4' => array(
  12126. '0' => 'value',
  12127. ),
  12128. ),
  12129. 'foreign keys' => array(
  12130. ),
  12131. );
  12132. return $description;
  12133. }
  12134. /**
  12135. * Implements hook_environment_schema()
  12136. * Purpose: To describe the structure of environment to tripal
  12137. * @see tripal_core_chado_insert()
  12138. * @see tripal_core_chado_update()
  12139. * @see tripal_core_chado_select()
  12140. *
  12141. * @return
  12142. * An array describing the current table
  12143. *
  12144. * @ingroup tripal_schema_api
  12145. *
  12146. */
  12147. function tripal_core_chado_environment_schema() {
  12148. $description = array();
  12149. $description = array(
  12150. 'table' => 'environment',
  12151. // 'description' => 'TODO: please describe this table!',
  12152. 'fields' => array(
  12153. 'environment_id' => array(
  12154. // 'description' => 'TODO: please describe this field!',
  12155. 'type' => 'serial',
  12156. 'not NULL' => '1',
  12157. ),
  12158. 'uniquename' => array(
  12159. // 'description' => 'TODO: please describe this field!',
  12160. 'type' => 'text',
  12161. 'not NULL' => '1',
  12162. ),
  12163. 'description' => array(
  12164. // 'description' => 'TODO: please describe this field!',
  12165. 'type' => 'text',
  12166. 'not NULL' => '',
  12167. ),
  12168. ),
  12169. 'primary key' => array(
  12170. '0' => 'environment_id',
  12171. ),
  12172. 'unique keys' => array(
  12173. 'environment_c1' => array(
  12174. '0' => 'uniquename',
  12175. ),
  12176. ),
  12177. 'indexes' => array(
  12178. 'environment_idx1' => array(
  12179. '0' => 'uniquename',
  12180. ),
  12181. ),
  12182. 'foreign keys' => array(
  12183. ),
  12184. );
  12185. return $description;
  12186. }