tripal_chado.schema_v1.11.api.inc 248 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874
  1. <?php
  2. /**
  3. * @file
  4. * Describes the chado tables in version 1.11
  5. */
  6. /**
  7. * @defgroup tripal_schema_v1_11_api Chado v1.11 Schema
  8. * @ingroup tripal_chado_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 (FK) relationships, which are needed to
  15. * for Tripal Views, they have been added to the schema defintitions below.
  16. *
  17. * The functions provided in this documentation should not be called as is, but if you need
  18. * the Drupal-style array definition for any table, use the following function
  19. * call:
  20. *
  21. * $table_desc = chado_get_schema($table)
  22. *
  23. * where the variable $table contains the name of the table you want to
  24. * retireve. The chado_get_schema function determines the appropriate version of
  25. * Chado and uses the Drupal hook infrastructure to call the appropriate
  26. * hook function to retrieve the table schema.
  27. *
  28. * If you need to augment these schema definitions within your own module, you need to
  29. * implement the hook_chado_schema_v1_11_[table name]() hook where [table name] is the
  30. * name of the chado table whose schema definition you want to augment.
  31. * @}
  32. */
  33. /**
  34. * Implements hook_chado_schema_v1_11_acquisition()
  35. * Purpose: To describe the structure of 'acquisition' to tripal
  36. * @see chado_insert_record()
  37. * @see chado_update_record()
  38. * @see chado_select_record()
  39. *
  40. * @return
  41. * An array describing the 'acquisition' table
  42. *
  43. * @ingroup tripal_chado_v1.11_schema_api
  44. *
  45. */
  46. function tripal_chado_chado_schema_v1_11_acquisition() {
  47. $description = array(
  48. 'table' => 'acquisition',
  49. 'fields' => array(
  50. 'acquisition_id' => array(
  51. 'type' => 'serial',
  52. 'not NULL' => '1',
  53. ),
  54. 'assay_id' => array(
  55. 'type' => 'int',
  56. 'not NULL' => '1',
  57. ),
  58. 'protocol_id' => array(
  59. 'type' => 'int',
  60. 'not NULL' => '',
  61. ),
  62. 'channel_id' => array(
  63. 'type' => 'int',
  64. 'not NULL' => '',
  65. ),
  66. 'acquisitiondate' => array(
  67. 'type' => 'datetime',
  68. 'not NULL' => '',
  69. 'default' => 'ow(',
  70. ),
  71. 'name' => array(
  72. 'type' => 'text',
  73. 'not NULL' => '',
  74. ),
  75. 'uri' => array(
  76. 'type' => 'text',
  77. 'not NULL' => '',
  78. ),
  79. ),
  80. 'primary key' => array(
  81. 0 => 'acquisition_id',
  82. ),
  83. 'unique keys' => array(
  84. 'acquisition_c1' => array(
  85. 0 => 'name',
  86. ),
  87. ),
  88. 'indexes' => array(
  89. 'acquisition_idx1' => array(
  90. 0 => 'assay_id',
  91. ),
  92. 'acquisition_idx2' => array(
  93. 0 => 'protocol_id',
  94. ),
  95. 'acquisition_idx3' => array(
  96. 0 => 'channel_id',
  97. ),
  98. ),
  99. 'foreign keys' => array(
  100. 'protocol' => array(
  101. 'table' => 'protocol',
  102. 'columns' => array(
  103. 'protocol_id' => 'protocol_id',
  104. ),
  105. ),
  106. 'channel' => array(
  107. 'table' => 'channel',
  108. 'columns' => array(
  109. 'channel_id' => 'channel_id',
  110. ),
  111. ),
  112. 'assay' => array(
  113. 'table' => 'assay',
  114. 'columns' => array(
  115. 'assay_id' => 'assay_id',
  116. ),
  117. ),
  118. ),
  119. );
  120. return $description;
  121. }
  122. /**
  123. * Implements hook_chado_schema_v1_11_acquisition_relationship()
  124. * Purpose: To describe the structure of 'acquisition_relationship' to tripal
  125. * @see chado_insert_record()
  126. * @see chado_update_record()
  127. * @see chado_select_record()
  128. *
  129. * @return
  130. * An array describing the 'acquisition_relationship' table
  131. *
  132. * @ingroup tripal_chado_v1.11_schema_api
  133. *
  134. */
  135. function tripal_chado_chado_schema_v1_11_acquisition_relationship() {
  136. $description = array(
  137. 'table' => 'acquisition_relationship',
  138. 'fields' => array(
  139. 'acquisition_relationship_id' => array(
  140. 'type' => 'serial',
  141. 'not NULL' => '1',
  142. ),
  143. 'subject_id' => array(
  144. 'type' => 'int',
  145. 'not NULL' => '1',
  146. ),
  147. 'type_id' => array(
  148. 'type' => 'int',
  149. 'not NULL' => '1',
  150. ),
  151. 'object_id' => array(
  152. 'type' => 'int',
  153. 'not NULL' => '1',
  154. ),
  155. 'value' => array(
  156. 'type' => 'text',
  157. 'not NULL' => '',
  158. ),
  159. 'rank' => array(
  160. 'type' => 'int',
  161. 'not NULL' => '1',
  162. 'default' => '0',
  163. ),
  164. ),
  165. 'primary key' => array(
  166. 0 => 'acquisition_relationship_id',
  167. ),
  168. 'unique keys' => array(
  169. 'acquisition_relationship_c1' => array(
  170. 0 => 'subject_id',
  171. 1 => 'object_id',
  172. 2 => 'type_id',
  173. 3 => 'rank',
  174. ),
  175. ),
  176. 'indexes' => array(
  177. 'acquisition_relationship_idx1' => array(
  178. 0 => 'subject_id',
  179. ),
  180. 'acquisition_relationship_idx2' => array(
  181. 0 => 'type_id',
  182. ),
  183. 'acquisition_relationship_idx3' => array(
  184. 0 => 'object_id',
  185. ),
  186. ),
  187. 'foreign keys' => array(
  188. 'cvterm' => array(
  189. 'table' => 'cvterm',
  190. 'columns' => array(
  191. 'type_id' => 'cvterm_id',
  192. ),
  193. ),
  194. 'acquisition' => array(
  195. 'table' => 'acquisition',
  196. 'columns' => array(
  197. 'subject_id' => 'acquisition_id',
  198. 'object_id' => 'acquisition_id',
  199. ),
  200. ),
  201. ),
  202. );
  203. return $description;
  204. }
  205. /**
  206. * Implements hook_chado_schema_v1_11_acquisitionprop()
  207. * Purpose: To describe the structure of 'acquisitionprop' to tripal
  208. * @see chado_insert_record()
  209. * @see chado_update_record()
  210. * @see chado_select_record()
  211. *
  212. * @return
  213. * An array describing the 'acquisitionprop' table
  214. *
  215. * @ingroup tripal_chado_v1.11_schema_api
  216. *
  217. */
  218. function tripal_chado_chado_schema_v1_11_acquisitionprop() {
  219. $description = array(
  220. 'table' => 'acquisitionprop',
  221. 'fields' => array(
  222. 'acquisitionprop_id' => array(
  223. 'type' => 'serial',
  224. 'not NULL' => '1',
  225. ),
  226. 'acquisition_id' => array(
  227. 'type' => 'int',
  228. 'not NULL' => '1',
  229. ),
  230. 'type_id' => array(
  231. 'type' => 'int',
  232. 'not NULL' => '1',
  233. ),
  234. 'value' => array(
  235. 'type' => 'text',
  236. 'not NULL' => '',
  237. ),
  238. 'rank' => array(
  239. 'type' => 'int',
  240. 'not NULL' => '1',
  241. 'default' => '0',
  242. ),
  243. ),
  244. 'primary key' => array(
  245. 0 => 'acquisitionprop_id',
  246. ),
  247. 'unique keys' => array(
  248. 'acquisitionprop_c1' => array(
  249. 0 => 'acquisition_id',
  250. 1 => 'type_id',
  251. 2 => 'rank',
  252. ),
  253. ),
  254. 'indexes' => array(
  255. 'acquisitionprop_idx1' => array(
  256. 0 => 'acquisition_id',
  257. ),
  258. 'acquisitionprop_idx2' => array(
  259. 0 => 'type_id',
  260. ),
  261. ),
  262. 'foreign keys' => array(
  263. 'cvterm' => array(
  264. 'table' => 'cvterm',
  265. 'columns' => array(
  266. 'type_id' => 'cvterm_id',
  267. ),
  268. ),
  269. 'acquisition' => array(
  270. 'table' => 'acquisition',
  271. 'columns' => array(
  272. 'acquisition_id' => 'acquisition_id',
  273. ),
  274. ),
  275. ),
  276. );
  277. return $description;
  278. }
  279. /**
  280. * Implements hook_chado_schema_v1_11_analysis()
  281. * Purpose: To describe the structure of 'analysis' to tripal
  282. * @see chado_insert_record()
  283. * @see chado_update_record()
  284. * @see chado_select_record()
  285. *
  286. * @return
  287. * An array describing the 'analysis' table
  288. *
  289. * @ingroup tripal_chado_v1.11_schema_api
  290. *
  291. */
  292. function tripal_chado_chado_schema_v1_11_analysis() {
  293. $description = array(
  294. 'referring_tables' => array(
  295. 0 => 'analysisfeature',
  296. 1 => 'analysisprop',
  297. 2 => 'phylotree',
  298. 3 => 'quantification',
  299. ),
  300. 'table' => 'analysis',
  301. 'fields' => array(
  302. 'analysis_id' => array(
  303. 'type' => 'serial',
  304. 'not NULL' => '1',
  305. ),
  306. 'name' => array(
  307. 'type' => 'varchar',
  308. 'length' => '255',
  309. 'not NULL' => '',
  310. ),
  311. 'description' => array(
  312. 'type' => 'text',
  313. 'not NULL' => '',
  314. ),
  315. 'program' => array(
  316. 'type' => 'varchar',
  317. 'length' => '255',
  318. 'not NULL' => '1',
  319. ),
  320. 'programversion' => array(
  321. 'type' => 'varchar',
  322. 'length' => '255',
  323. 'not NULL' => '1',
  324. ),
  325. 'algorithm' => array(
  326. 'type' => 'varchar',
  327. 'length' => '255',
  328. 'not NULL' => '',
  329. ),
  330. 'sourcename' => array(
  331. 'type' => 'varchar',
  332. 'length' => '255',
  333. 'not NULL' => '',
  334. ),
  335. 'sourceversion' => array(
  336. 'type' => 'varchar',
  337. 'length' => '255',
  338. 'not NULL' => '',
  339. ),
  340. 'sourceuri' => array(
  341. 'type' => 'text',
  342. 'not NULL' => '',
  343. ),
  344. 'timeexecuted' => array(
  345. 'type' => 'datetime',
  346. 'not NULL' => '1',
  347. 'default' => 'ow(',
  348. ),
  349. ),
  350. 'primary key' => array(
  351. 0 => 'analysis_id',
  352. ),
  353. 'unique keys' => array(
  354. 'analysis_c1' => array(
  355. 0 => 'program',
  356. 1 => 'programversion',
  357. 2 => 'sourcename',
  358. ),
  359. ),
  360. 'indexes' => array(
  361. ),
  362. 'foreign keys' => array(
  363. ),
  364. );
  365. return $description;
  366. }
  367. /**
  368. * Implements hook_chado_schema_v1_11_analysisprop()
  369. *
  370. * Purpose: To describe the structure of 'analysisprop' to tripal. This table doesn't
  371. * exist in Chado v1.1 (it does in v1.2), so we need to describe it here
  372. *
  373. * @see chado_insert_record()
  374. * @see chado_update_record()
  375. * @see chado_select_record()
  376. *
  377. * @return
  378. * An array describing the 'analysisprop' table
  379. *
  380. * @ingroup tripal_chado_v1.11_schema_api
  381. *
  382. */
  383. function tripal_chado_chado_schema_v1_11_analysisprop() {
  384. $description = array(
  385. 'table' => 'analysisprop',
  386. 'fields' => array(
  387. 'analysisprop_id' => array(
  388. 'type' => 'serial',
  389. 'not NULL' => '1',
  390. ),
  391. 'analysis_id' => array(
  392. 'type' => 'int',
  393. 'not NULL' => '1',
  394. ),
  395. 'type_id' => array(
  396. 'type' => 'int',
  397. 'not NULL' => '1',
  398. ),
  399. 'value' => array(
  400. 'type' => 'text',
  401. 'not NULL' => '',
  402. ),
  403. ),
  404. 'primary key' => array(
  405. 0 => 'analysisprop_id',
  406. ),
  407. 'unique keys' => array(
  408. 'analysisprop_c1' => array(
  409. 0 => 'analysis_id',
  410. 1 => 'type_id',
  411. ),
  412. ),
  413. 'indexes' => array(
  414. 'analysisprop_idx1' => array(
  415. 0 => 'analysis_id',
  416. ),
  417. 'analysisprop_idx2' => array(
  418. 0 => 'type_id',
  419. ),
  420. ),
  421. 'foreign keys' => array(
  422. 'cvterm' => array(
  423. 'table' => 'cvterm',
  424. 'columns' => array(
  425. 'type_id' => 'cvterm_id',
  426. ),
  427. ),
  428. 'analysis' => array(
  429. 'table' => 'analysis',
  430. 'columns' => array(
  431. 'analysis_id' => 'analysis_id',
  432. ),
  433. ),
  434. ),
  435. );
  436. return $description;
  437. }
  438. /**
  439. * Implements hook_chado_schema_v1_11_analysisfeature()
  440. * Purpose: To describe the structure of 'analysisfeature' to tripal
  441. * @see chado_insert_record()
  442. * @see chado_update_record()
  443. * @see chado_select_record()
  444. *
  445. * @return
  446. * An array describing the 'analysisfeature' table
  447. *
  448. * @ingroup tripal_chado_v1.11_schema_api
  449. *
  450. */
  451. function tripal_chado_chado_schema_v1_11_analysisfeature() {
  452. $description = array(
  453. 'table' => 'analysisfeature',
  454. 'fields' => array(
  455. 'analysisfeature_id' => array(
  456. 'type' => 'serial',
  457. 'not NULL' => '1',
  458. ),
  459. 'feature_id' => array(
  460. 'type' => 'int',
  461. 'not NULL' => '1',
  462. ),
  463. 'analysis_id' => array(
  464. 'type' => 'int',
  465. 'not NULL' => '1',
  466. ),
  467. 'rawscore' => array(
  468. 'type' => 'float',
  469. 'size' => 'big',
  470. 'not NULL' => '',
  471. ),
  472. 'normscore' => array(
  473. 'type' => 'float',
  474. 'size' => 'big',
  475. 'not NULL' => '',
  476. ),
  477. 'significance' => array(
  478. 'type' => 'float',
  479. 'size' => 'big',
  480. 'not NULL' => '',
  481. ),
  482. 'identity' => array(
  483. 'type' => 'float',
  484. 'size' => 'big',
  485. 'not NULL' => '',
  486. ),
  487. ),
  488. 'primary key' => array(
  489. 0 => 'analysisfeature_id',
  490. ),
  491. 'unique keys' => array(
  492. 'analysisfeature_c1' => array(
  493. 0 => 'feature_id',
  494. 1 => 'analysis_id',
  495. ),
  496. ),
  497. 'indexes' => array(
  498. 'analysisfeature_idx1' => array(
  499. 0 => 'feature_id',
  500. ),
  501. 'analysisfeature_idx2' => array(
  502. 0 => 'analysis_id',
  503. ),
  504. ),
  505. 'foreign keys' => array(
  506. 'feature' => array(
  507. 'table' => 'feature',
  508. 'columns' => array(
  509. 'feature_id' => 'feature_id',
  510. ),
  511. ),
  512. 'analysis' => array(
  513. 'table' => 'analysis',
  514. 'columns' => array(
  515. 'analysis_id' => 'analysis_id',
  516. ),
  517. ),
  518. ),
  519. );
  520. return $description;
  521. }
  522. /**
  523. * Implements hook_chado_schema_v1_11_arraydesign()
  524. * Purpose: To describe the structure of 'arraydesign' to tripal
  525. * @see chado_insert_record()
  526. * @see chado_update_record()
  527. * @see chado_select_record()
  528. *
  529. * @return
  530. * An array describing the 'arraydesign' table
  531. *
  532. * @ingroup tripal_chado_v1.11_schema_api
  533. *
  534. */
  535. function tripal_chado_chado_schema_v1_11_arraydesign() {
  536. $description = array(
  537. 'table' => 'arraydesign',
  538. 'fields' => array(
  539. 'arraydesign_id' => array(
  540. 'type' => 'serial',
  541. 'not NULL' => '1',
  542. ),
  543. 'manufacturer_id' => array(
  544. 'type' => 'int',
  545. 'not NULL' => '1',
  546. ),
  547. 'platformtype_id' => array(
  548. 'type' => 'int',
  549. 'not NULL' => '1',
  550. ),
  551. 'substratetype_id' => array(
  552. 'type' => 'int',
  553. 'not NULL' => '',
  554. ),
  555. 'protocol_id' => array(
  556. 'type' => 'int',
  557. 'not NULL' => '',
  558. ),
  559. 'dbxref_id' => array(
  560. 'type' => 'int',
  561. 'not NULL' => '',
  562. ),
  563. 'name' => array(
  564. 'type' => 'text',
  565. 'not NULL' => '1',
  566. ),
  567. 'version' => array(
  568. 'type' => 'text',
  569. 'not NULL' => '',
  570. ),
  571. 'description' => array(
  572. 'type' => 'text',
  573. 'not NULL' => '',
  574. ),
  575. 'array_dimensions' => array(
  576. 'type' => 'text',
  577. 'not NULL' => '',
  578. ),
  579. 'element_dimensions' => array(
  580. 'type' => 'text',
  581. 'not NULL' => '',
  582. ),
  583. 'num_of_elements' => array(
  584. 'type' => 'int',
  585. 'not NULL' => '',
  586. ),
  587. 'num_array_columns' => array(
  588. 'type' => 'int',
  589. 'not NULL' => '',
  590. ),
  591. 'num_array_rows' => array(
  592. 'type' => 'int',
  593. 'not NULL' => '',
  594. ),
  595. 'num_grid_columns' => array(
  596. 'type' => 'int',
  597. 'not NULL' => '',
  598. ),
  599. 'num_grid_rows' => array(
  600. 'type' => 'int',
  601. 'not NULL' => '',
  602. ),
  603. 'num_sub_columns' => array(
  604. 'type' => 'int',
  605. 'not NULL' => '',
  606. ),
  607. 'num_sub_rows' => array(
  608. 'type' => 'int',
  609. 'not NULL' => '',
  610. ),
  611. ),
  612. 'primary key' => array(
  613. 0 => 'arraydesign_id',
  614. ),
  615. 'unique keys' => array(
  616. 'arraydesign_c1' => array(
  617. 0 => 'name',
  618. ),
  619. ),
  620. 'indexes' => array(
  621. 'arraydesign_idx1' => array(
  622. 0 => 'manufacturer_id',
  623. ),
  624. 'arraydesign_idx2' => array(
  625. 0 => 'platformtype_id',
  626. ),
  627. 'arraydesign_idx3' => array(
  628. 0 => 'substratetype_id',
  629. ),
  630. 'arraydesign_idx4' => array(
  631. 0 => 'protocol_id',
  632. ),
  633. 'arraydesign_idx5' => array(
  634. 0 => 'dbxref_id',
  635. ),
  636. ),
  637. 'foreign keys' => array(
  638. 'dbxref' => array(
  639. 'table' => 'dbxref',
  640. 'columns' => array(
  641. 'dbxref_id' => 'dbxref_id',
  642. ),
  643. ),
  644. 'cvterm' => array(
  645. 'table' => 'cvterm',
  646. 'columns' => array(
  647. 'platformtype_id' => 'cvterm_id',
  648. 'substratetype_id' => 'cvterm_id',
  649. ),
  650. ),
  651. 'contact' => array(
  652. 'table' => 'contact',
  653. 'columns' => array(
  654. 'manufacturer_id' => 'contact_id',
  655. ),
  656. ),
  657. 'protocol' => array(
  658. 'table' => 'protocol',
  659. 'columns' => array(
  660. 'protocol_id' => 'protocol_id',
  661. ),
  662. ),
  663. ),
  664. );
  665. return $description;
  666. }
  667. /**
  668. * Implements hook_chado_schema_v1_11_arraydesignprop()
  669. * Purpose: To describe the structure of 'arraydesignprop' to tripal
  670. * @see chado_insert_record()
  671. * @see chado_update_record()
  672. * @see chado_select_record()
  673. *
  674. * @return
  675. * An array describing the 'arraydesignprop' table
  676. *
  677. * @ingroup tripal_chado_v1.11_schema_api
  678. *
  679. */
  680. function tripal_chado_chado_schema_v1_11_arraydesignprop() {
  681. $description = array(
  682. 'table' => 'arraydesignprop',
  683. 'fields' => array(
  684. 'arraydesignprop_id' => array(
  685. 'type' => 'serial',
  686. 'not NULL' => '1',
  687. ),
  688. 'arraydesign_id' => array(
  689. 'type' => 'int',
  690. 'not NULL' => '1',
  691. ),
  692. 'type_id' => array(
  693. 'type' => 'int',
  694. 'not NULL' => '1',
  695. ),
  696. 'value' => array(
  697. 'type' => 'text',
  698. 'not NULL' => '',
  699. ),
  700. 'rank' => array(
  701. 'type' => 'int',
  702. 'not NULL' => '1',
  703. 'default' => '0',
  704. ),
  705. ),
  706. 'primary key' => array(
  707. 0 => 'arraydesignprop_id',
  708. ),
  709. 'unique keys' => array(
  710. 'arraydesignprop_c1' => array(
  711. 0 => 'arraydesign_id',
  712. 1 => 'type_id',
  713. 2 => 'rank',
  714. ),
  715. ),
  716. 'indexes' => array(
  717. 'arraydesignprop_idx1' => array(
  718. 0 => 'arraydesign_id',
  719. ),
  720. 'arraydesignprop_idx2' => array(
  721. 0 => 'type_id',
  722. ),
  723. ),
  724. 'foreign keys' => array(
  725. 'cvterm' => array(
  726. 'table' => 'cvterm',
  727. 'columns' => array(
  728. 'type_id' => 'cvterm_id',
  729. ),
  730. ),
  731. 'arraydesign' => array(
  732. 'table' => 'arraydesign',
  733. 'columns' => array(
  734. 'arraydesign_id' => 'arraydesign_id',
  735. ),
  736. ),
  737. ),
  738. );
  739. return $description;
  740. }
  741. /**
  742. * Implements hook_chado_schema_v1_11_assay()
  743. * Purpose: To describe the structure of 'assay' to tripal
  744. * @see chado_insert_record()
  745. * @see chado_update_record()
  746. * @see chado_select_record()
  747. *
  748. * @return
  749. * An array describing the 'assay' table
  750. *
  751. * @ingroup tripal_chado_v1.11_schema_api
  752. *
  753. */
  754. function tripal_chado_chado_schema_v1_11_assay() {
  755. $description = array(
  756. 'table' => 'assay',
  757. 'fields' => array(
  758. 'assay_id' => array(
  759. 'type' => 'serial',
  760. 'not NULL' => '1',
  761. ),
  762. 'arraydesign_id' => array(
  763. 'type' => 'int',
  764. 'not NULL' => '1',
  765. ),
  766. 'protocol_id' => array(
  767. 'type' => 'int',
  768. 'not NULL' => '',
  769. ),
  770. 'assaydate' => array(
  771. 'type' => 'datetime',
  772. 'not NULL' => '',
  773. 'default' => 'ow(',
  774. ),
  775. 'arrayidentifier' => array(
  776. 'type' => 'text',
  777. 'not NULL' => '',
  778. ),
  779. 'arraybatchidentifier' => array(
  780. 'type' => 'text',
  781. 'not NULL' => '',
  782. ),
  783. 'operator_id' => array(
  784. 'type' => 'int',
  785. 'not NULL' => '1',
  786. ),
  787. 'dbxref_id' => array(
  788. 'type' => 'int',
  789. 'not NULL' => '',
  790. ),
  791. 'name' => array(
  792. 'type' => 'text',
  793. 'not NULL' => '',
  794. ),
  795. 'description' => array(
  796. 'type' => 'text',
  797. 'not NULL' => '',
  798. ),
  799. ),
  800. 'primary key' => array(
  801. 0 => 'assay_id',
  802. ),
  803. 'unique keys' => array(
  804. 'assay_c1' => array(
  805. 0 => 'name',
  806. ),
  807. ),
  808. 'indexes' => array(
  809. 'assay_idx1' => array(
  810. 0 => 'arraydesign_id',
  811. ),
  812. 'assay_idx2' => array(
  813. 0 => 'protocol_id',
  814. ),
  815. 'assay_idx3' => array(
  816. 0 => 'operator_id',
  817. ),
  818. 'assay_idx4' => array(
  819. 0 => 'dbxref_id',
  820. ),
  821. ),
  822. 'foreign keys' => array(
  823. 'dbxref' => array(
  824. 'table' => 'dbxref',
  825. 'columns' => array(
  826. 'dbxref_id' => 'dbxref_id',
  827. ),
  828. ),
  829. 'contact' => array(
  830. 'table' => 'contact',
  831. 'columns' => array(
  832. 'operator_id' => 'contact_id',
  833. ),
  834. ),
  835. 'protocol' => array(
  836. 'table' => 'protocol',
  837. 'columns' => array(
  838. 'protocol_id' => 'protocol_id',
  839. ),
  840. ),
  841. 'arraydesign' => array(
  842. 'table' => 'arraydesign',
  843. 'columns' => array(
  844. 'arraydesign_id' => 'arraydesign_id',
  845. ),
  846. ),
  847. ),
  848. );
  849. return $description;
  850. }
  851. /**
  852. * Implements hook_chado_schema_v1_11_assay_biomaterial()
  853. * Purpose: To describe the structure of 'assay_biomaterial' to tripal
  854. * @see chado_insert_record()
  855. * @see chado_update_record()
  856. * @see chado_select_record()
  857. *
  858. * @return
  859. * An array describing the 'assay_biomaterial' table
  860. *
  861. * @ingroup tripal_chado_v1.11_schema_api
  862. *
  863. */
  864. function tripal_chado_chado_schema_v1_11_assay_biomaterial() {
  865. $description = array(
  866. 'table' => 'assay_biomaterial',
  867. 'fields' => array(
  868. 'assay_biomaterial_id' => array(
  869. 'type' => 'serial',
  870. 'not NULL' => '1',
  871. ),
  872. 'assay_id' => array(
  873. 'type' => 'int',
  874. 'not NULL' => '1',
  875. ),
  876. 'biomaterial_id' => array(
  877. 'type' => 'int',
  878. 'not NULL' => '1',
  879. ),
  880. 'channel_id' => array(
  881. 'type' => 'int',
  882. 'not NULL' => '',
  883. ),
  884. 'rank' => array(
  885. 'type' => 'int',
  886. 'not NULL' => '1',
  887. 'default' => '0',
  888. ),
  889. ),
  890. 'primary key' => array(
  891. 0 => 'assay_biomaterial_id',
  892. ),
  893. 'unique keys' => array(
  894. 'assay_biomaterial_c1' => array(
  895. 0 => 'assay_id',
  896. 1 => 'biomaterial_id',
  897. 2 => 'channel_id',
  898. 3 => 'rank',
  899. ),
  900. ),
  901. 'indexes' => array(
  902. 'assay_biomaterial_idx1' => array(
  903. 0 => 'assay_id',
  904. ),
  905. 'assay_biomaterial_idx2' => array(
  906. 0 => 'biomaterial_id',
  907. ),
  908. 'assay_biomaterial_idx3' => array(
  909. 0 => 'channel_id',
  910. ),
  911. ),
  912. 'foreign keys' => array(
  913. 'channel' => array(
  914. 'table' => 'channel',
  915. 'columns' => array(
  916. 'channel_id' => 'channel_id',
  917. ),
  918. ),
  919. 'assay' => array(
  920. 'table' => 'assay',
  921. 'columns' => array(
  922. 'assay_id' => 'assay_id',
  923. ),
  924. ),
  925. 'biomaterial' => array(
  926. 'table' => 'biomaterial',
  927. 'columns' => array(
  928. 'biomaterial_id' => 'biomaterial_id',
  929. ),
  930. ),
  931. ),
  932. );
  933. return $description;
  934. }
  935. /**
  936. * Implements hook_chado_schema_v1_11_assay_project()
  937. * Purpose: To describe the structure of 'assay_project' to tripal
  938. * @see chado_insert_record()
  939. * @see chado_update_record()
  940. * @see chado_select_record()
  941. *
  942. * @return
  943. * An array describing the 'assay_project' table
  944. *
  945. * @ingroup tripal_chado_v1.11_schema_api
  946. *
  947. */
  948. function tripal_chado_chado_schema_v1_11_assay_project() {
  949. $description = array(
  950. 'table' => 'assay_project',
  951. 'fields' => array(
  952. 'assay_project_id' => array(
  953. 'type' => 'serial',
  954. 'not NULL' => '1',
  955. ),
  956. 'assay_id' => array(
  957. 'type' => 'int',
  958. 'not NULL' => '1',
  959. ),
  960. 'project_id' => array(
  961. 'type' => 'int',
  962. 'not NULL' => '1',
  963. ),
  964. ),
  965. 'primary key' => array(
  966. 0 => 'assay_project_id',
  967. ),
  968. 'unique keys' => array(
  969. 'assay_project_c1' => array(
  970. 0 => 'assay_id',
  971. 1 => 'project_id',
  972. ),
  973. ),
  974. 'indexes' => array(
  975. 'assay_project_idx1' => array(
  976. 0 => 'assay_id',
  977. ),
  978. 'assay_project_idx2' => array(
  979. 0 => 'project_id',
  980. ),
  981. ),
  982. 'foreign keys' => array(
  983. 'project' => array(
  984. 'table' => 'project',
  985. 'columns' => array(
  986. 'project_id' => 'project_id',
  987. ),
  988. ),
  989. 'assay' => array(
  990. 'table' => 'assay',
  991. 'columns' => array(
  992. 'assay_id' => 'assay_id',
  993. ),
  994. ),
  995. ),
  996. );
  997. return $description;
  998. }
  999. /**
  1000. * Implements hook_chado_schema_v1_11_assayprop()
  1001. * Purpose: To describe the structure of 'assayprop' to tripal
  1002. * @see chado_insert_record()
  1003. * @see chado_update_record()
  1004. * @see chado_select_record()
  1005. *
  1006. * @return
  1007. * An array describing the 'assayprop' table
  1008. *
  1009. * @ingroup tripal_chado_v1.11_schema_api
  1010. *
  1011. */
  1012. function tripal_chado_chado_schema_v1_11_assayprop() {
  1013. $description = array(
  1014. 'table' => 'assayprop',
  1015. 'fields' => array(
  1016. 'assayprop_id' => array(
  1017. 'type' => 'serial',
  1018. 'not NULL' => '1',
  1019. ),
  1020. 'assay_id' => array(
  1021. 'type' => 'int',
  1022. 'not NULL' => '1',
  1023. ),
  1024. 'type_id' => array(
  1025. 'type' => 'int',
  1026. 'not NULL' => '1',
  1027. ),
  1028. 'value' => array(
  1029. 'type' => 'text',
  1030. 'not NULL' => '',
  1031. ),
  1032. 'rank' => array(
  1033. 'type' => 'int',
  1034. 'not NULL' => '1',
  1035. 'default' => '0',
  1036. ),
  1037. ),
  1038. 'primary key' => array(
  1039. 0 => 'assayprop_id',
  1040. ),
  1041. 'unique keys' => array(
  1042. 'assayprop_c1' => array(
  1043. 0 => 'assay_id',
  1044. 1 => 'type_id',
  1045. 2 => 'rank',
  1046. ),
  1047. ),
  1048. 'indexes' => array(
  1049. 'assayprop_idx1' => array(
  1050. 0 => 'assay_id',
  1051. ),
  1052. 'assayprop_idx2' => array(
  1053. 0 => 'type_id',
  1054. ),
  1055. ),
  1056. 'foreign keys' => array(
  1057. 'cvterm' => array(
  1058. 'table' => 'cvterm',
  1059. 'columns' => array(
  1060. 'type_id' => 'cvterm_id',
  1061. ),
  1062. ),
  1063. 'assay' => array(
  1064. 'table' => 'assay',
  1065. 'columns' => array(
  1066. 'assay_id' => 'assay_id',
  1067. ),
  1068. ),
  1069. ),
  1070. );
  1071. return $description;
  1072. }
  1073. /**
  1074. * Implements hook_chado_schema_v1_11_biomaterial()
  1075. * Purpose: To describe the structure of 'biomaterial' to tripal
  1076. * @see chado_insert_record()
  1077. * @see chado_update_record()
  1078. * @see chado_select_record()
  1079. *
  1080. * @return
  1081. * An array describing the 'biomaterial' table
  1082. *
  1083. * @ingroup tripal_chado_v1.11_schema_api
  1084. *
  1085. */
  1086. function tripal_chado_chado_schema_v1_11_biomaterial() {
  1087. $description = array(
  1088. 'table' => 'biomaterial',
  1089. 'fields' => array(
  1090. 'biomaterial_id' => array(
  1091. 'type' => 'serial',
  1092. 'not NULL' => '1',
  1093. ),
  1094. 'taxon_id' => array(
  1095. 'type' => 'int',
  1096. 'not NULL' => '',
  1097. ),
  1098. 'biosourceprovider_id' => array(
  1099. 'type' => 'int',
  1100. 'not NULL' => '',
  1101. ),
  1102. 'dbxref_id' => array(
  1103. 'type' => 'int',
  1104. 'not NULL' => '',
  1105. ),
  1106. 'name' => array(
  1107. 'type' => 'text',
  1108. 'not NULL' => '',
  1109. ),
  1110. 'description' => array(
  1111. 'type' => 'text',
  1112. 'not NULL' => '',
  1113. ),
  1114. ),
  1115. 'primary key' => array(
  1116. 0 => 'biomaterial_id',
  1117. ),
  1118. 'unique keys' => array(
  1119. 'biomaterial_c1' => array(
  1120. 0 => 'name',
  1121. ),
  1122. ),
  1123. 'indexes' => array(
  1124. 'biomaterial_idx1' => array(
  1125. 0 => 'taxon_id',
  1126. ),
  1127. 'biomaterial_idx2' => array(
  1128. 0 => 'biosourceprovider_id',
  1129. ),
  1130. 'biomaterial_idx3' => array(
  1131. 0 => 'dbxref_id',
  1132. ),
  1133. ),
  1134. 'foreign keys' => array(
  1135. 'dbxref' => array(
  1136. 'table' => 'dbxref',
  1137. 'columns' => array(
  1138. 'dbxref_id' => 'dbxref_id',
  1139. ),
  1140. ),
  1141. 'organism' => array(
  1142. 'table' => 'organism',
  1143. 'columns' => array(
  1144. 'taxon_id' => 'organism_id',
  1145. ),
  1146. ),
  1147. 'contact' => array(
  1148. 'table' => 'contact',
  1149. 'columns' => array(
  1150. 'biosourceprovider_id' => 'contact_id',
  1151. ),
  1152. ),
  1153. ),
  1154. );
  1155. return $description;
  1156. }
  1157. /**
  1158. * Implements hook_chado_schema_v1_11_biomaterial_dbxref()
  1159. * Purpose: To describe the structure of 'biomaterial_dbxref' to tripal
  1160. * @see chado_insert_record()
  1161. * @see chado_update_record()
  1162. * @see chado_select_record()
  1163. *
  1164. * @return
  1165. * An array describing the 'biomaterial_dbxref' table
  1166. *
  1167. * @ingroup tripal_chado_v1.11_schema_api
  1168. *
  1169. */
  1170. function tripal_chado_chado_schema_v1_11_biomaterial_dbxref() {
  1171. $description = array(
  1172. 'table' => 'biomaterial_dbxref',
  1173. 'fields' => array(
  1174. 'biomaterial_dbxref_id' => array(
  1175. 'type' => 'serial',
  1176. 'not NULL' => '1',
  1177. ),
  1178. 'biomaterial_id' => array(
  1179. 'type' => 'int',
  1180. 'not NULL' => '1',
  1181. ),
  1182. 'dbxref_id' => array(
  1183. 'type' => 'int',
  1184. 'not NULL' => '1',
  1185. ),
  1186. ),
  1187. 'primary key' => array(
  1188. 0 => 'biomaterial_dbxref_id',
  1189. ),
  1190. 'unique keys' => array(
  1191. 'biomaterial_dbxref_c1' => array(
  1192. 0 => 'biomaterial_id',
  1193. 1 => 'dbxref_id',
  1194. ),
  1195. ),
  1196. 'indexes' => array(
  1197. 'biomaterial_dbxref_idx1' => array(
  1198. 0 => 'biomaterial_id',
  1199. ),
  1200. 'biomaterial_dbxref_idx2' => array(
  1201. 0 => 'dbxref_id',
  1202. ),
  1203. ),
  1204. 'foreign keys' => array(
  1205. 'dbxref' => array(
  1206. 'table' => 'dbxref',
  1207. 'columns' => array(
  1208. 'dbxref_id' => 'dbxref_id',
  1209. ),
  1210. ),
  1211. 'biomaterial' => array(
  1212. 'table' => 'biomaterial',
  1213. 'columns' => array(
  1214. 'biomaterial_id' => 'biomaterial_id',
  1215. ),
  1216. ),
  1217. ),
  1218. );
  1219. return $description;
  1220. }
  1221. /**
  1222. * Implements hook_chado_schema_v1_11_biomaterial_relationship()
  1223. * Purpose: To describe the structure of 'biomaterial_relationship' to tripal
  1224. * @see chado_insert_record()
  1225. * @see chado_update_record()
  1226. * @see chado_select_record()
  1227. *
  1228. * @return
  1229. * An array describing the 'biomaterial_relationship' table
  1230. *
  1231. * @ingroup tripal_chado_v1.11_schema_api
  1232. *
  1233. */
  1234. function tripal_chado_chado_schema_v1_11_biomaterial_relationship() {
  1235. $description = array(
  1236. 'table' => 'biomaterial_relationship',
  1237. 'fields' => array(
  1238. 'biomaterial_relationship_id' => array(
  1239. 'type' => 'serial',
  1240. 'not NULL' => '1',
  1241. ),
  1242. 'subject_id' => array(
  1243. 'type' => 'int',
  1244. 'not NULL' => '1',
  1245. ),
  1246. 'type_id' => array(
  1247. 'type' => 'int',
  1248. 'not NULL' => '1',
  1249. ),
  1250. 'object_id' => array(
  1251. 'type' => 'int',
  1252. 'not NULL' => '1',
  1253. ),
  1254. ),
  1255. 'primary key' => array(
  1256. 0 => 'biomaterial_relationship_id',
  1257. ),
  1258. 'unique keys' => array(
  1259. 'biomaterial_relationship_c1' => array(
  1260. 0 => 'subject_id',
  1261. 1 => 'object_id',
  1262. 2 => 'type_id',
  1263. ),
  1264. ),
  1265. 'indexes' => array(
  1266. 'biomaterial_relationship_idx1' => array(
  1267. 0 => 'subject_id',
  1268. ),
  1269. 'biomaterial_relationship_idx2' => array(
  1270. 0 => 'object_id',
  1271. ),
  1272. 'biomaterial_relationship_idx3' => array(
  1273. 0 => 'type_id',
  1274. ),
  1275. ),
  1276. 'foreign keys' => array(
  1277. 'cvterm' => array(
  1278. 'table' => 'cvterm',
  1279. 'columns' => array(
  1280. 'type_id' => 'cvterm_id',
  1281. ),
  1282. ),
  1283. 'biomaterial' => array(
  1284. 'table' => 'biomaterial',
  1285. 'columns' => array(
  1286. 'subject_id' => 'biomaterial_id',
  1287. 'object_id' => 'biomaterial_id',
  1288. ),
  1289. ),
  1290. ),
  1291. );
  1292. return $description;
  1293. }
  1294. /**
  1295. * Implements hook_chado_schema_v1_11_biomaterial_treatment()
  1296. * Purpose: To describe the structure of 'biomaterial_treatment' to tripal
  1297. * @see chado_insert_record()
  1298. * @see chado_update_record()
  1299. * @see chado_select_record()
  1300. *
  1301. * @return
  1302. * An array describing the 'biomaterial_treatment' table
  1303. *
  1304. * @ingroup tripal_chado_v1.11_schema_api
  1305. *
  1306. */
  1307. function tripal_chado_chado_schema_v1_11_biomaterial_treatment() {
  1308. $description = array(
  1309. 'table' => 'biomaterial_treatment',
  1310. 'fields' => array(
  1311. 'biomaterial_treatment_id' => array(
  1312. 'type' => 'serial',
  1313. 'not NULL' => '1',
  1314. ),
  1315. 'biomaterial_id' => array(
  1316. 'type' => 'int',
  1317. 'not NULL' => '1',
  1318. ),
  1319. 'treatment_id' => array(
  1320. 'type' => 'int',
  1321. 'not NULL' => '1',
  1322. ),
  1323. 'unittype_id' => array(
  1324. 'type' => 'int',
  1325. 'not NULL' => '',
  1326. ),
  1327. 'value' => array(
  1328. 'type' => 'float',
  1329. 'not NULL' => '',
  1330. ),
  1331. 'rank' => array(
  1332. 'type' => 'int',
  1333. 'not NULL' => '1',
  1334. 'default' => '0',
  1335. ),
  1336. ),
  1337. 'primary key' => array(
  1338. 0 => 'biomaterial_treatment_id',
  1339. ),
  1340. 'unique keys' => array(
  1341. 'biomaterial_treatment_c1' => array(
  1342. 0 => 'biomaterial_id',
  1343. 1 => 'treatment_id',
  1344. ),
  1345. ),
  1346. 'indexes' => array(
  1347. 'biomaterial_treatment_idx1' => array(
  1348. 0 => 'biomaterial_id',
  1349. ),
  1350. 'biomaterial_treatment_idx2' => array(
  1351. 0 => 'treatment_id',
  1352. ),
  1353. 'biomaterial_treatment_idx3' => array(
  1354. 0 => 'unittype_id',
  1355. ),
  1356. ),
  1357. 'foreign keys' => array(
  1358. 'cvterm' => array(
  1359. 'table' => 'cvterm',
  1360. 'columns' => array(
  1361. 'unittype_id' => 'cvterm_id',
  1362. ),
  1363. ),
  1364. 'biomaterial' => array(
  1365. 'table' => 'biomaterial',
  1366. 'columns' => array(
  1367. 'biomaterial_id' => 'biomaterial_id',
  1368. ),
  1369. ),
  1370. 'treatment' => array(
  1371. 'table' => 'treatment',
  1372. 'columns' => array(
  1373. 'treatment_id' => 'treatment_id',
  1374. ),
  1375. ),
  1376. ),
  1377. );
  1378. return $description;
  1379. }
  1380. /**
  1381. * Implements hook_chado_schema_v1_11_biomaterialprop()
  1382. * Purpose: To describe the structure of 'biomaterialprop' to tripal
  1383. * @see chado_insert_record()
  1384. * @see chado_update_record()
  1385. * @see chado_select_record()
  1386. *
  1387. * @return
  1388. * An array describing the 'biomaterialprop' table
  1389. *
  1390. * @ingroup tripal_chado_v1.11_schema_api
  1391. *
  1392. */
  1393. function tripal_chado_chado_schema_v1_11_biomaterialprop() {
  1394. $description = array(
  1395. 'table' => 'biomaterialprop',
  1396. 'fields' => array(
  1397. 'biomaterialprop_id' => array(
  1398. 'type' => 'serial',
  1399. 'not NULL' => '1',
  1400. ),
  1401. 'biomaterial_id' => array(
  1402. 'type' => 'int',
  1403. 'not NULL' => '1',
  1404. ),
  1405. 'type_id' => array(
  1406. 'type' => 'int',
  1407. 'not NULL' => '1',
  1408. ),
  1409. 'value' => array(
  1410. 'type' => 'text',
  1411. 'not NULL' => '',
  1412. ),
  1413. 'rank' => array(
  1414. 'type' => 'int',
  1415. 'not NULL' => '1',
  1416. 'default' => '0',
  1417. ),
  1418. ),
  1419. 'primary key' => array(
  1420. 0 => 'biomaterialprop_id',
  1421. ),
  1422. 'unique keys' => array(
  1423. 'biomaterialprop_c1' => array(
  1424. 0 => 'biomaterial_id',
  1425. 1 => 'type_id',
  1426. 2 => 'rank',
  1427. ),
  1428. ),
  1429. 'indexes' => array(
  1430. 'biomaterialprop_idx1' => array(
  1431. 0 => 'biomaterial_id',
  1432. ),
  1433. 'biomaterialprop_idx2' => array(
  1434. 0 => 'type_id',
  1435. ),
  1436. ),
  1437. 'foreign keys' => array(
  1438. 'cvterm' => array(
  1439. 'table' => 'cvterm',
  1440. 'columns' => array(
  1441. 'type_id' => 'cvterm_id',
  1442. ),
  1443. ),
  1444. 'biomaterial' => array(
  1445. 'table' => 'biomaterial',
  1446. 'columns' => array(
  1447. 'biomaterial_id' => 'biomaterial_id',
  1448. ),
  1449. ),
  1450. ),
  1451. );
  1452. return $description;
  1453. }
  1454. /**
  1455. * Implements hook_chado_schema_v1_11_cell_line()
  1456. * Purpose: To describe the structure of 'cell_line' to tripal
  1457. * @see chado_insert_record()
  1458. * @see chado_update_record()
  1459. * @see chado_select_record()
  1460. *
  1461. * @return
  1462. * An array describing the 'cell_line' table
  1463. *
  1464. * @ingroup tripal_chado_v1.11_schema_api
  1465. *
  1466. */
  1467. function tripal_chado_chado_schema_v1_11_cell_line() {
  1468. $description = array(
  1469. 'table' => 'cell_line',
  1470. 'fields' => array(
  1471. 'cell_line_id' => array(
  1472. 'type' => 'serial',
  1473. 'not NULL' => '1',
  1474. ),
  1475. 'name' => array(
  1476. 'type' => 'varchar',
  1477. 'length' => '255',
  1478. 'not NULL' => '',
  1479. ),
  1480. 'uniquename' => array(
  1481. 'type' => 'varchar',
  1482. 'length' => '255',
  1483. 'not NULL' => '1',
  1484. ),
  1485. 'organism_id' => array(
  1486. 'type' => 'int',
  1487. 'not NULL' => '1',
  1488. ),
  1489. 'timeaccessioned' => array(
  1490. 'type' => 'datetime',
  1491. 'not NULL' => '1',
  1492. 'default' => 'ow(',
  1493. ),
  1494. 'timelastmodified' => array(
  1495. 'type' => 'datetime',
  1496. 'not NULL' => '1',
  1497. 'default' => 'ow(',
  1498. ),
  1499. ),
  1500. 'primary key' => array(
  1501. 0 => 'cell_line_id',
  1502. ),
  1503. 'unique keys' => array(
  1504. 'cell_line_c1' => array(
  1505. 0 => 'uniquename',
  1506. 1 => 'organism_id',
  1507. ),
  1508. ),
  1509. 'indexes' => array(
  1510. ),
  1511. 'foreign keys' => array(
  1512. 'organism' => array(
  1513. 'table' => 'organism',
  1514. 'columns' => array(
  1515. 'organism_id' => 'organism_id',
  1516. ),
  1517. ),
  1518. ),
  1519. );
  1520. return $description;
  1521. }
  1522. /**
  1523. * Implements hook_chado_schema_v1_11_cell_line_cvterm()
  1524. * Purpose: To describe the structure of 'cell_line_cvterm' to tripal
  1525. * @see chado_insert_record()
  1526. * @see chado_update_record()
  1527. * @see chado_select_record()
  1528. *
  1529. * @return
  1530. * An array describing the 'cell_line_cvterm' table
  1531. *
  1532. * @ingroup tripal_chado_v1.11_schema_api
  1533. *
  1534. */
  1535. function tripal_chado_chado_schema_v1_11_cell_line_cvterm() {
  1536. $description = array(
  1537. 'table' => 'cell_line_cvterm',
  1538. 'fields' => array(
  1539. 'cell_line_cvterm_id' => array(
  1540. 'type' => 'serial',
  1541. 'not NULL' => '1',
  1542. ),
  1543. 'cell_line_id' => array(
  1544. 'type' => 'int',
  1545. 'not NULL' => '1',
  1546. ),
  1547. 'cvterm_id' => array(
  1548. 'type' => 'int',
  1549. 'not NULL' => '1',
  1550. ),
  1551. 'pub_id' => array(
  1552. 'type' => 'int',
  1553. 'not NULL' => '1',
  1554. ),
  1555. 'rank' => array(
  1556. 'type' => 'int',
  1557. 'not NULL' => '1',
  1558. 'default' => '0',
  1559. ),
  1560. ),
  1561. 'primary key' => array(
  1562. 0 => 'cell_line_cvterm_id',
  1563. ),
  1564. 'unique keys' => array(
  1565. 'cell_line_cvterm_c1' => array(
  1566. 0 => 'cell_line_id',
  1567. 1 => 'cvterm_id',
  1568. 2 => 'pub_id',
  1569. 3 => 'rank',
  1570. ),
  1571. ),
  1572. 'indexes' => array(
  1573. ),
  1574. 'foreign keys' => array(
  1575. 'cvterm' => array(
  1576. 'table' => 'cvterm',
  1577. 'columns' => array(
  1578. 'cvterm_id' => 'cvterm_id',
  1579. ),
  1580. ),
  1581. 'pub' => array(
  1582. 'table' => 'pub',
  1583. 'columns' => array(
  1584. 'pub_id' => 'pub_id',
  1585. ),
  1586. ),
  1587. 'cell_line' => array(
  1588. 'table' => 'cell_line',
  1589. 'columns' => array(
  1590. 'cell_line_id' => 'cell_line_id',
  1591. ),
  1592. ),
  1593. ),
  1594. );
  1595. return $description;
  1596. }
  1597. /**
  1598. * Implements hook_chado_schema_v1_11_cell_line_cvtermprop()
  1599. * Purpose: To describe the structure of 'cell_line_cvtermprop' to tripal
  1600. * @see chado_insert_record()
  1601. * @see chado_update_record()
  1602. * @see chado_select_record()
  1603. *
  1604. * @return
  1605. * An array describing the 'cell_line_cvtermprop' table
  1606. *
  1607. * @ingroup tripal_chado_v1.11_schema_api
  1608. *
  1609. */
  1610. function tripal_chado_chado_schema_v1_11_cell_line_cvtermprop() {
  1611. $description = array(
  1612. 'table' => 'cell_line_cvtermprop',
  1613. 'fields' => array(
  1614. 'cell_line_cvtermprop_id' => array(
  1615. 'type' => 'serial',
  1616. 'not NULL' => '1',
  1617. ),
  1618. 'cell_line_cvterm_id' => array(
  1619. 'type' => 'int',
  1620. 'not NULL' => '1',
  1621. ),
  1622. 'type_id' => array(
  1623. 'type' => 'int',
  1624. 'not NULL' => '1',
  1625. ),
  1626. 'value' => array(
  1627. 'type' => 'text',
  1628. 'not NULL' => '',
  1629. ),
  1630. 'rank' => array(
  1631. 'type' => 'int',
  1632. 'not NULL' => '1',
  1633. 'default' => '0',
  1634. ),
  1635. ),
  1636. 'primary key' => array(
  1637. 0 => 'cell_line_cvtermprop_id',
  1638. ),
  1639. 'unique keys' => array(
  1640. 'cell_line_cvtermprop_c1' => array(
  1641. 0 => 'cell_line_cvterm_id',
  1642. 1 => 'type_id',
  1643. 2 => 'rank',
  1644. ),
  1645. ),
  1646. 'indexes' => array(
  1647. ),
  1648. 'foreign keys' => array(
  1649. 'cvterm' => array(
  1650. 'table' => 'cvterm',
  1651. 'columns' => array(
  1652. 'type_id' => 'cvterm_id',
  1653. ),
  1654. ),
  1655. 'cell_line_cvterm' => array(
  1656. 'table' => 'cell_line_cvterm',
  1657. 'columns' => array(
  1658. 'cell_line_cvterm_id' => 'cell_line_cvterm_id',
  1659. ),
  1660. ),
  1661. ),
  1662. );
  1663. return $description;
  1664. }
  1665. /**
  1666. * Implements hook_chado_schema_v1_11_cell_line_dbxref()
  1667. * Purpose: To describe the structure of 'cell_line_dbxref' to tripal
  1668. * @see chado_insert_record()
  1669. * @see chado_update_record()
  1670. * @see chado_select_record()
  1671. *
  1672. * @return
  1673. * An array describing the 'cell_line_dbxref' table
  1674. *
  1675. * @ingroup tripal_chado_v1.11_schema_api
  1676. *
  1677. */
  1678. function tripal_chado_chado_schema_v1_11_cell_line_dbxref() {
  1679. $description = array(
  1680. 'table' => 'cell_line_dbxref',
  1681. 'fields' => array(
  1682. 'cell_line_dbxref_id' => array(
  1683. 'type' => 'serial',
  1684. 'not NULL' => '1',
  1685. ),
  1686. 'cell_line_id' => array(
  1687. 'type' => 'int',
  1688. 'not NULL' => '1',
  1689. ),
  1690. 'dbxref_id' => array(
  1691. 'type' => 'int',
  1692. 'not NULL' => '1',
  1693. ),
  1694. 'is_current' => array(
  1695. 'type' => 'boolean',
  1696. 'not NULL' => '1',
  1697. 'default' => 'true',
  1698. ),
  1699. ),
  1700. 'primary key' => array(
  1701. 0 => 'cell_line_dbxref_id',
  1702. ),
  1703. 'unique keys' => array(
  1704. 'cell_line_dbxref_c1' => array(
  1705. 0 => 'cell_line_id',
  1706. 1 => 'dbxref_id',
  1707. ),
  1708. ),
  1709. 'indexes' => array(
  1710. ),
  1711. 'foreign keys' => array(
  1712. 'dbxref' => array(
  1713. 'table' => 'dbxref',
  1714. 'columns' => array(
  1715. 'dbxref_id' => 'dbxref_id',
  1716. ),
  1717. ),
  1718. 'cell_line' => array(
  1719. 'table' => 'cell_line',
  1720. 'columns' => array(
  1721. 'cell_line_id' => 'cell_line_id',
  1722. ),
  1723. ),
  1724. ),
  1725. );
  1726. return $description;
  1727. }
  1728. /**
  1729. * Implements hook_chado_schema_v1_11_cell_line_feature()
  1730. * Purpose: To describe the structure of 'cell_line_feature' to tripal
  1731. * @see chado_insert_record()
  1732. * @see chado_update_record()
  1733. * @see chado_select_record()
  1734. *
  1735. * @return
  1736. * An array describing the 'cell_line_feature' table
  1737. *
  1738. * @ingroup tripal_chado_v1.11_schema_api
  1739. *
  1740. */
  1741. function tripal_chado_chado_schema_v1_11_cell_line_feature() {
  1742. $description = array(
  1743. 'table' => 'cell_line_feature',
  1744. 'fields' => array(
  1745. 'cell_line_feature_id' => array(
  1746. 'type' => 'serial',
  1747. 'not NULL' => '1',
  1748. ),
  1749. 'cell_line_id' => array(
  1750. 'type' => 'int',
  1751. 'not NULL' => '1',
  1752. ),
  1753. 'feature_id' => array(
  1754. 'type' => 'int',
  1755. 'not NULL' => '1',
  1756. ),
  1757. 'pub_id' => array(
  1758. 'type' => 'int',
  1759. 'not NULL' => '1',
  1760. ),
  1761. ),
  1762. 'primary key' => array(
  1763. 0 => 'cell_line_feature_id',
  1764. ),
  1765. 'unique keys' => array(
  1766. 'cell_line_feature_c1' => array(
  1767. 0 => 'cell_line_id',
  1768. 1 => 'feature_id',
  1769. 2 => 'pub_id',
  1770. ),
  1771. ),
  1772. 'indexes' => array(
  1773. ),
  1774. 'foreign keys' => array(
  1775. 'pub' => array(
  1776. 'table' => 'pub',
  1777. 'columns' => array(
  1778. 'pub_id' => 'pub_id',
  1779. ),
  1780. ),
  1781. 'feature' => array(
  1782. 'table' => 'feature',
  1783. 'columns' => array(
  1784. 'feature_id' => 'feature_id',
  1785. ),
  1786. ),
  1787. 'cell_line' => array(
  1788. 'table' => 'cell_line',
  1789. 'columns' => array(
  1790. 'cell_line_id' => 'cell_line_id',
  1791. ),
  1792. ),
  1793. ),
  1794. );
  1795. return $description;
  1796. }
  1797. /**
  1798. * Implements hook_chado_schema_v1_11_cell_line_library()
  1799. * Purpose: To describe the structure of 'cell_line_library' to tripal
  1800. * @see chado_insert_record()
  1801. * @see chado_update_record()
  1802. * @see chado_select_record()
  1803. *
  1804. * @return
  1805. * An array describing the 'cell_line_library' table
  1806. *
  1807. * @ingroup tripal_chado_v1.11_schema_api
  1808. *
  1809. */
  1810. function tripal_chado_chado_schema_v1_11_cell_line_library() {
  1811. $description = array(
  1812. 'table' => 'cell_line_library',
  1813. 'fields' => array(
  1814. 'cell_line_library_id' => array(
  1815. 'type' => 'serial',
  1816. 'not NULL' => '1',
  1817. ),
  1818. 'cell_line_id' => array(
  1819. 'type' => 'int',
  1820. 'not NULL' => '1',
  1821. ),
  1822. 'library_id' => array(
  1823. 'type' => 'int',
  1824. 'not NULL' => '1',
  1825. ),
  1826. 'pub_id' => array(
  1827. 'type' => 'int',
  1828. 'not NULL' => '1',
  1829. ),
  1830. ),
  1831. 'primary key' => array(
  1832. 0 => 'cell_line_library_id',
  1833. ),
  1834. 'unique keys' => array(
  1835. 'cell_line_library_c1' => array(
  1836. 0 => 'cell_line_id',
  1837. 1 => 'library_id',
  1838. 2 => 'pub_id',
  1839. ),
  1840. ),
  1841. 'indexes' => array(
  1842. ),
  1843. 'foreign keys' => array(
  1844. 'pub' => array(
  1845. 'table' => 'pub',
  1846. 'columns' => array(
  1847. 'pub_id' => 'pub_id',
  1848. ),
  1849. ),
  1850. 'library' => array(
  1851. 'table' => 'library',
  1852. 'columns' => array(
  1853. 'library_id' => 'library_id',
  1854. ),
  1855. ),
  1856. 'cell_line' => array(
  1857. 'table' => 'cell_line',
  1858. 'columns' => array(
  1859. 'cell_line_id' => 'cell_line_id',
  1860. ),
  1861. ),
  1862. ),
  1863. );
  1864. return $description;
  1865. }
  1866. /**
  1867. * Implements hook_chado_schema_v1_11_cell_line_pub()
  1868. * Purpose: To describe the structure of 'cell_line_pub' to tripal
  1869. * @see chado_insert_record()
  1870. * @see chado_update_record()
  1871. * @see chado_select_record()
  1872. *
  1873. * @return
  1874. * An array describing the 'cell_line_pub' table
  1875. *
  1876. * @ingroup tripal_chado_v1.11_schema_api
  1877. *
  1878. */
  1879. function tripal_chado_chado_schema_v1_11_cell_line_pub() {
  1880. $description = array(
  1881. 'table' => 'cell_line_pub',
  1882. 'fields' => array(
  1883. 'cell_line_pub_id' => array(
  1884. 'type' => 'serial',
  1885. 'not NULL' => '1',
  1886. ),
  1887. 'cell_line_id' => array(
  1888. 'type' => 'int',
  1889. 'not NULL' => '1',
  1890. ),
  1891. 'pub_id' => array(
  1892. 'type' => 'int',
  1893. 'not NULL' => '1',
  1894. ),
  1895. ),
  1896. 'primary key' => array(
  1897. 0 => 'cell_line_pub_id',
  1898. ),
  1899. 'unique keys' => array(
  1900. 'cell_line_pub_c1' => array(
  1901. 0 => 'cell_line_id',
  1902. 1 => 'pub_id',
  1903. ),
  1904. ),
  1905. 'indexes' => array(
  1906. ),
  1907. 'foreign keys' => array(
  1908. 'pub' => array(
  1909. 'table' => 'pub',
  1910. 'columns' => array(
  1911. 'pub_id' => 'pub_id',
  1912. ),
  1913. ),
  1914. 'cell_line' => array(
  1915. 'table' => 'cell_line',
  1916. 'columns' => array(
  1917. 'cell_line_id' => 'cell_line_id',
  1918. ),
  1919. ),
  1920. ),
  1921. );
  1922. return $description;
  1923. }
  1924. /**
  1925. * Implements hook_chado_schema_v1_11_cell_line_relationship()
  1926. * Purpose: To describe the structure of 'cell_line_relationship' to tripal
  1927. * @see chado_insert_record()
  1928. * @see chado_update_record()
  1929. * @see chado_select_record()
  1930. *
  1931. * @return
  1932. * An array describing the 'cell_line_relationship' table
  1933. *
  1934. * @ingroup tripal_chado_v1.11_schema_api
  1935. *
  1936. */
  1937. function tripal_chado_chado_schema_v1_11_cell_line_relationship() {
  1938. $description = array(
  1939. 'table' => 'cell_line_relationship',
  1940. 'fields' => array(
  1941. 'cell_line_relationship_id' => array(
  1942. 'type' => 'serial',
  1943. 'not NULL' => '1',
  1944. ),
  1945. 'subject_id' => array(
  1946. 'type' => 'int',
  1947. 'not NULL' => '1',
  1948. ),
  1949. 'object_id' => array(
  1950. 'type' => 'int',
  1951. 'not NULL' => '1',
  1952. ),
  1953. 'type_id' => array(
  1954. 'type' => 'int',
  1955. 'not NULL' => '1',
  1956. ),
  1957. ),
  1958. 'primary key' => array(
  1959. 0 => 'cell_line_relationship_id',
  1960. ),
  1961. 'unique keys' => array(
  1962. 'cell_line_relationship_c1' => array(
  1963. 0 => 'subject_id',
  1964. 1 => 'object_id',
  1965. 2 => 'type_id',
  1966. ),
  1967. ),
  1968. 'indexes' => array(
  1969. ),
  1970. 'foreign keys' => array(
  1971. 'cvterm' => array(
  1972. 'table' => 'cvterm',
  1973. 'columns' => array(
  1974. 'type_id' => 'cvterm_id',
  1975. ),
  1976. ),
  1977. 'cell_line' => array(
  1978. 'table' => 'cell_line',
  1979. 'columns' => array(
  1980. 'subject_id' => 'cell_line_id',
  1981. 'object_id' => 'cell_line_id',
  1982. ),
  1983. ),
  1984. ),
  1985. );
  1986. return $description;
  1987. }
  1988. /**
  1989. * Implements hook_chado_schema_v1_11_cell_line_synonym()
  1990. * Purpose: To describe the structure of 'cell_line_synonym' to tripal
  1991. * @see chado_insert_record()
  1992. * @see chado_update_record()
  1993. * @see chado_select_record()
  1994. *
  1995. * @return
  1996. * An array describing the 'cell_line_synonym' table
  1997. *
  1998. * @ingroup tripal_chado_v1.11_schema_api
  1999. *
  2000. */
  2001. function tripal_chado_chado_schema_v1_11_cell_line_synonym() {
  2002. $description = array(
  2003. 'table' => 'cell_line_synonym',
  2004. 'fields' => array(
  2005. 'cell_line_synonym_id' => array(
  2006. 'type' => 'serial',
  2007. 'not NULL' => '1',
  2008. ),
  2009. 'cell_line_id' => array(
  2010. 'type' => 'int',
  2011. 'not NULL' => '1',
  2012. ),
  2013. 'synonym_id' => array(
  2014. 'type' => 'int',
  2015. 'not NULL' => '1',
  2016. ),
  2017. 'pub_id' => array(
  2018. 'type' => 'int',
  2019. 'not NULL' => '1',
  2020. ),
  2021. 'is_current' => array(
  2022. 'type' => 'boolean',
  2023. 'not NULL' => '1',
  2024. 'default' => 'false',
  2025. ),
  2026. 'is_internal' => array(
  2027. 'type' => 'boolean',
  2028. 'not NULL' => '1',
  2029. 'default' => 'false',
  2030. ),
  2031. ),
  2032. 'primary key' => array(
  2033. 0 => 'cell_line_synonym_id',
  2034. ),
  2035. 'unique keys' => array(
  2036. 'cell_line_synonym_c1' => array(
  2037. 0 => 'synonym_id',
  2038. 1 => 'cell_line_id',
  2039. 2 => 'pub_id',
  2040. ),
  2041. ),
  2042. 'indexes' => array(
  2043. ),
  2044. 'foreign keys' => array(
  2045. 'pub' => array(
  2046. 'table' => 'pub',
  2047. 'columns' => array(
  2048. 'pub_id' => 'pub_id',
  2049. ),
  2050. ),
  2051. 'synonym' => array(
  2052. 'table' => 'synonym',
  2053. 'columns' => array(
  2054. 'synonym_id' => 'synonym_id',
  2055. ),
  2056. ),
  2057. 'cell_line' => array(
  2058. 'table' => 'cell_line',
  2059. 'columns' => array(
  2060. 'cell_line_id' => 'cell_line_id',
  2061. ),
  2062. ),
  2063. ),
  2064. );
  2065. return $description;
  2066. }
  2067. /**
  2068. * Implements hook_chado_schema_v1_11_cell_lineprop()
  2069. * Purpose: To describe the structure of 'cell_lineprop' to tripal
  2070. * @see chado_insert_record()
  2071. * @see chado_update_record()
  2072. * @see chado_select_record()
  2073. *
  2074. * @return
  2075. * An array describing the 'cell_lineprop' table
  2076. *
  2077. * @ingroup tripal_chado_v1.11_schema_api
  2078. *
  2079. */
  2080. function tripal_chado_chado_schema_v1_11_cell_lineprop() {
  2081. $description = array(
  2082. 'table' => 'cell_lineprop',
  2083. 'fields' => array(
  2084. 'cell_lineprop_id' => array(
  2085. 'type' => 'serial',
  2086. 'not NULL' => '1',
  2087. ),
  2088. 'cell_line_id' => array(
  2089. 'type' => 'int',
  2090. 'not NULL' => '1',
  2091. ),
  2092. 'type_id' => array(
  2093. 'type' => 'int',
  2094. 'not NULL' => '1',
  2095. ),
  2096. 'value' => array(
  2097. 'type' => 'text',
  2098. 'not NULL' => '',
  2099. ),
  2100. 'rank' => array(
  2101. 'type' => 'int',
  2102. 'not NULL' => '1',
  2103. 'default' => '0',
  2104. ),
  2105. ),
  2106. 'primary key' => array(
  2107. 0 => 'cell_lineprop_id',
  2108. ),
  2109. 'unique keys' => array(
  2110. 'cell_lineprop_c1' => array(
  2111. 0 => 'cell_line_id',
  2112. 1 => 'type_id',
  2113. 2 => 'rank',
  2114. ),
  2115. ),
  2116. 'indexes' => array(
  2117. ),
  2118. 'foreign keys' => array(
  2119. 'cvterm' => array(
  2120. 'table' => 'cvterm',
  2121. 'columns' => array(
  2122. 'type_id' => 'cvterm_id',
  2123. ),
  2124. ),
  2125. 'cell_line' => array(
  2126. 'table' => 'cell_line',
  2127. 'columns' => array(
  2128. 'cell_line_id' => 'cell_line_id',
  2129. ),
  2130. ),
  2131. ),
  2132. );
  2133. return $description;
  2134. }
  2135. /**
  2136. * Implements hook_chado_schema_v1_11_cell_lineprop_pub()
  2137. * Purpose: To describe the structure of 'cell_lineprop_pub' to tripal
  2138. * @see chado_insert_record()
  2139. * @see chado_update_record()
  2140. * @see chado_select_record()
  2141. *
  2142. * @return
  2143. * An array describing the 'cell_lineprop_pub' table
  2144. *
  2145. * @ingroup tripal_chado_v1.11_schema_api
  2146. *
  2147. */
  2148. function tripal_chado_chado_schema_v1_11_cell_lineprop_pub() {
  2149. $description = array(
  2150. 'table' => 'cell_lineprop_pub',
  2151. 'fields' => array(
  2152. 'cell_lineprop_pub_id' => array(
  2153. 'type' => 'serial',
  2154. 'not NULL' => '1',
  2155. ),
  2156. 'cell_lineprop_id' => array(
  2157. 'type' => 'int',
  2158. 'not NULL' => '1',
  2159. ),
  2160. 'pub_id' => array(
  2161. 'type' => 'int',
  2162. 'not NULL' => '1',
  2163. ),
  2164. ),
  2165. 'primary key' => array(
  2166. 0 => 'cell_lineprop_pub_id',
  2167. ),
  2168. 'unique keys' => array(
  2169. 'cell_lineprop_pub_c1' => array(
  2170. 0 => 'cell_lineprop_id',
  2171. 1 => 'pub_id',
  2172. ),
  2173. ),
  2174. 'indexes' => array(
  2175. ),
  2176. 'foreign keys' => array(
  2177. 'pub' => array(
  2178. 'table' => 'pub',
  2179. 'columns' => array(
  2180. 'pub_id' => 'pub_id',
  2181. ),
  2182. ),
  2183. 'cell_lineprop' => array(
  2184. 'table' => 'cell_lineprop',
  2185. 'columns' => array(
  2186. 'cell_lineprop_id' => 'cell_lineprop_id',
  2187. ),
  2188. ),
  2189. ),
  2190. );
  2191. return $description;
  2192. }
  2193. /**
  2194. * Implements hook_chado_schema_v1_11_channel()
  2195. * Purpose: To describe the structure of 'channel' to tripal
  2196. * @see chado_insert_record()
  2197. * @see chado_update_record()
  2198. * @see chado_select_record()
  2199. *
  2200. * @return
  2201. * An array describing the 'channel' table
  2202. *
  2203. * @ingroup tripal_chado_v1.11_schema_api
  2204. *
  2205. */
  2206. function tripal_chado_chado_schema_v1_11_channel() {
  2207. $description = array(
  2208. 'table' => 'channel',
  2209. 'fields' => array(
  2210. 'channel_id' => array(
  2211. 'type' => 'serial',
  2212. 'not NULL' => '1',
  2213. ),
  2214. 'name' => array(
  2215. 'type' => 'text',
  2216. 'not NULL' => '1',
  2217. ),
  2218. 'definition' => array(
  2219. 'type' => 'text',
  2220. 'not NULL' => '1',
  2221. ),
  2222. ),
  2223. 'primary key' => array(
  2224. 0 => 'channel_id',
  2225. ),
  2226. 'unique keys' => array(
  2227. 'channel_c1' => array(
  2228. 0 => 'name',
  2229. ),
  2230. ),
  2231. 'indexes' => array(
  2232. ),
  2233. 'foreign keys' => array(
  2234. ),
  2235. );
  2236. return $description;
  2237. }
  2238. /**
  2239. * Implements hook_chado_schema_v1_11_contact()
  2240. * Purpose: To describe the structure of 'contact' to tripal
  2241. * @see chado_insert_record()
  2242. * @see chado_update_record()
  2243. * @see chado_select_record()
  2244. *
  2245. * @return
  2246. * An array describing the 'contact' table
  2247. *
  2248. * @ingroup tripal_chado_v1.11_schema_api
  2249. *
  2250. */
  2251. function tripal_chado_chado_schema_v1_11_contact() {
  2252. $description = array(
  2253. 'table' => 'contact',
  2254. 'fields' => array(
  2255. 'contact_id' => array(
  2256. 'type' => 'serial',
  2257. 'not NULL' => '1',
  2258. ),
  2259. 'type_id' => array(
  2260. 'type' => 'int',
  2261. 'not NULL' => '',
  2262. ),
  2263. 'name' => array(
  2264. 'type' => 'varchar',
  2265. 'length' => '255',
  2266. 'not NULL' => '1',
  2267. ),
  2268. 'description' => array(
  2269. 'type' => 'varchar',
  2270. 'length' => '255',
  2271. 'not NULL' => '',
  2272. ),
  2273. ),
  2274. 'primary key' => array(
  2275. 0 => 'contact_id',
  2276. ),
  2277. 'unique keys' => array(
  2278. 'contact_c1' => array(
  2279. 0 => 'name',
  2280. ),
  2281. ),
  2282. 'indexes' => array(
  2283. ),
  2284. 'foreign keys' => array(
  2285. 'cvterm' => array(
  2286. 'table' => 'cvterm',
  2287. 'columns' => array(
  2288. 'type_id' => 'cvterm_id',
  2289. ),
  2290. ),
  2291. ),
  2292. );
  2293. return $description;
  2294. }
  2295. /**
  2296. * Implements hook_chado_schema_v1_11_contact_relationship()
  2297. * Purpose: To describe the structure of 'contact_relationship' to tripal
  2298. * @see chado_insert_record()
  2299. * @see chado_update_record()
  2300. * @see chado_select_record()
  2301. *
  2302. * @return
  2303. * An array describing the 'contact_relationship' table
  2304. *
  2305. * @ingroup tripal_chado_v1.11_schema_api
  2306. *
  2307. */
  2308. function tripal_chado_chado_schema_v1_11_contact_relationship() {
  2309. $description = array(
  2310. 'table' => 'contact_relationship',
  2311. 'fields' => array(
  2312. 'contact_relationship_id' => array(
  2313. 'type' => 'serial',
  2314. 'not NULL' => '1',
  2315. ),
  2316. 'type_id' => array(
  2317. 'type' => 'int',
  2318. 'not NULL' => '1',
  2319. ),
  2320. 'subject_id' => array(
  2321. 'type' => 'int',
  2322. 'not NULL' => '1',
  2323. ),
  2324. 'object_id' => array(
  2325. 'type' => 'int',
  2326. 'not NULL' => '1',
  2327. ),
  2328. ),
  2329. 'primary key' => array(
  2330. 0 => 'contact_relationship_id',
  2331. ),
  2332. 'unique keys' => array(
  2333. 'contact_relationship_c1' => array(
  2334. 0 => 'subject_id',
  2335. 1 => 'object_id',
  2336. 2 => 'type_id',
  2337. ),
  2338. ),
  2339. 'indexes' => array(
  2340. 'contact_relationship_idx1' => array(
  2341. 0 => 'type_id',
  2342. ),
  2343. 'contact_relationship_idx2' => array(
  2344. 0 => 'subject_id',
  2345. ),
  2346. 'contact_relationship_idx3' => array(
  2347. 0 => 'object_id',
  2348. ),
  2349. ),
  2350. 'foreign keys' => array(
  2351. 'cvterm' => array(
  2352. 'table' => 'cvterm',
  2353. 'columns' => array(
  2354. 'type_id' => 'cvterm_id',
  2355. ),
  2356. ),
  2357. 'contact' => array(
  2358. 'table' => 'contact',
  2359. 'columns' => array(
  2360. 'subject_id' => 'contact_id',
  2361. 'object_id' => 'contact_id',
  2362. ),
  2363. ),
  2364. ),
  2365. );
  2366. return $description;
  2367. }
  2368. /**
  2369. * Implements hook_chado_schema_v1_11_control()
  2370. * Purpose: To describe the structure of 'control' to tripal
  2371. * @see chado_insert_record()
  2372. * @see chado_update_record()
  2373. * @see chado_select_record()
  2374. *
  2375. * @return
  2376. * An array describing the 'control' table
  2377. *
  2378. * @ingroup tripal_chado_v1.11_schema_api
  2379. *
  2380. */
  2381. function tripal_chado_chado_schema_v1_11_control() {
  2382. $description = array(
  2383. 'table' => 'control',
  2384. 'fields' => array(
  2385. 'control_id' => array(
  2386. 'type' => 'serial',
  2387. 'not NULL' => '1',
  2388. ),
  2389. 'type_id' => array(
  2390. 'type' => 'int',
  2391. 'not NULL' => '1',
  2392. ),
  2393. 'assay_id' => array(
  2394. 'type' => 'int',
  2395. 'not NULL' => '1',
  2396. ),
  2397. 'tableinfo_id' => array(
  2398. 'type' => 'int',
  2399. 'not NULL' => '1',
  2400. ),
  2401. 'row_id' => array(
  2402. 'type' => 'int',
  2403. 'not NULL' => '1',
  2404. ),
  2405. 'name' => array(
  2406. 'type' => 'text',
  2407. 'not NULL' => '',
  2408. ),
  2409. 'value' => array(
  2410. 'type' => 'text',
  2411. 'not NULL' => '',
  2412. ),
  2413. 'rank' => array(
  2414. 'type' => 'int',
  2415. 'not NULL' => '1',
  2416. 'default' => '0',
  2417. ),
  2418. ),
  2419. 'primary key' => array(
  2420. 0 => 'control_id',
  2421. ),
  2422. 'unique keys' => array(
  2423. ),
  2424. 'indexes' => array(
  2425. 'control_idx1' => array(
  2426. 0 => 'type_id',
  2427. ),
  2428. 'control_idx2' => array(
  2429. 0 => 'assay_id',
  2430. ),
  2431. 'control_idx3' => array(
  2432. 0 => 'tableinfo_id',
  2433. ),
  2434. 'control_idx4' => array(
  2435. 0 => 'row_id',
  2436. ),
  2437. ),
  2438. 'foreign keys' => array(
  2439. 'tableinfo' => array(
  2440. 'table' => 'tableinfo',
  2441. 'columns' => array(
  2442. 'tableinfo_id' => 'tableinfo_id',
  2443. ),
  2444. ),
  2445. 'cvterm' => array(
  2446. 'table' => 'cvterm',
  2447. 'columns' => array(
  2448. 'type_id' => 'cvterm_id',
  2449. ),
  2450. ),
  2451. 'assay' => array(
  2452. 'table' => 'assay',
  2453. 'columns' => array(
  2454. 'assay_id' => 'assay_id',
  2455. ),
  2456. ),
  2457. ),
  2458. );
  2459. return $description;
  2460. }
  2461. /**
  2462. * Implements hook_chado_schema_v1_11_cv()
  2463. * Purpose: To describe the structure of 'cv' to tripal
  2464. * @see chado_insert_record()
  2465. * @see chado_update_record()
  2466. * @see chado_select_record()
  2467. *
  2468. * @return
  2469. * An array describing the 'cv' table
  2470. *
  2471. * @ingroup tripal_chado_v1.11_schema_api
  2472. *
  2473. */
  2474. function tripal_chado_chado_schema_v1_11_cv() {
  2475. $description = array(
  2476. 'table' => 'cv',
  2477. 'fields' => array(
  2478. 'cv_id' => array(
  2479. 'type' => 'serial',
  2480. 'not NULL' => '1',
  2481. ),
  2482. 'name' => array(
  2483. 'type' => 'varchar',
  2484. 'length' => '255',
  2485. 'not NULL' => '1',
  2486. ),
  2487. 'definition' => array(
  2488. 'type' => 'text',
  2489. 'not NULL' => '',
  2490. ),
  2491. ),
  2492. 'primary key' => array(
  2493. 0 => 'cv_id',
  2494. ),
  2495. 'unique keys' => array(
  2496. 'cv_c1' => array(
  2497. 0 => 'name',
  2498. ),
  2499. ),
  2500. 'indexes' => array(
  2501. ),
  2502. 'foreign keys' => array(
  2503. ),
  2504. );
  2505. return $description;
  2506. }
  2507. /**
  2508. * Implements hook_chado_schema_v1_11_cvterm()
  2509. * Purpose: To describe the structure of 'cvterm' to tripal
  2510. * @see chado_insert_record()
  2511. * @see chado_update_record()
  2512. * @see chado_select_record()
  2513. *
  2514. * @return
  2515. * An array describing the 'cvterm' table
  2516. *
  2517. * @ingroup tripal_chado_v1.11_schema_api
  2518. *
  2519. */
  2520. function tripal_chado_chado_schema_v1_11_cvterm() {
  2521. $description = array(
  2522. 'table' => 'cvterm',
  2523. 'fields' => array(
  2524. 'cvterm_id' => array(
  2525. 'type' => 'serial',
  2526. 'not NULL' => '1',
  2527. ),
  2528. 'cv_id' => array(
  2529. 'type' => 'int',
  2530. 'not NULL' => '1',
  2531. ),
  2532. 'name' => array(
  2533. 'type' => 'varchar',
  2534. 'length' => '1024',
  2535. 'not NULL' => '1',
  2536. ),
  2537. 'definition' => array(
  2538. 'type' => 'text',
  2539. 'not NULL' => '',
  2540. ),
  2541. 'dbxref_id' => array(
  2542. 'type' => 'int',
  2543. 'not NULL' => '1',
  2544. ),
  2545. 'is_obsolete' => array(
  2546. 'type' => 'int',
  2547. 'not NULL' => '1',
  2548. 'default' => '0',
  2549. ),
  2550. 'is_relationshiptype' => array(
  2551. 'type' => 'int',
  2552. 'not NULL' => '1',
  2553. 'default' => '0',
  2554. ),
  2555. ),
  2556. 'primary key' => array(
  2557. 0 => 'cvterm_id',
  2558. ),
  2559. 'unique keys' => array(
  2560. 'cvterm_c1' => array(
  2561. 0 => 'name',
  2562. 1 => 'cv_id',
  2563. 2 => 'is_obsolete',
  2564. ),
  2565. 'cvterm_c2' => array(
  2566. 0 => 'dbxref_id',
  2567. ),
  2568. ),
  2569. 'indexes' => array(
  2570. 'cvterm_idx1' => array(
  2571. 0 => 'cv_id',
  2572. ),
  2573. 'cvterm_idx2' => array(
  2574. 0 => 'name',
  2575. ),
  2576. 'cvterm_idx3' => array(
  2577. 0 => 'dbxref_id',
  2578. ),
  2579. ),
  2580. 'foreign keys' => array(
  2581. 'dbxref' => array(
  2582. 'table' => 'dbxref',
  2583. 'columns' => array(
  2584. 'dbxref_id' => 'dbxref_id',
  2585. ),
  2586. ),
  2587. 'cv' => array(
  2588. 'table' => 'cv',
  2589. 'columns' => array(
  2590. 'cv_id' => 'cv_id',
  2591. ),
  2592. ),
  2593. ),
  2594. );
  2595. return $description;
  2596. }
  2597. /**
  2598. * Implements hook_chado_schema_v1_11_cvterm_dbxref()
  2599. * Purpose: To describe the structure of 'cvterm_dbxref' to tripal
  2600. * @see chado_insert_record()
  2601. * @see chado_update_record()
  2602. * @see chado_select_record()
  2603. *
  2604. * @return
  2605. * An array describing the 'cvterm_dbxref' table
  2606. *
  2607. * @ingroup tripal_chado_v1.11_schema_api
  2608. *
  2609. */
  2610. function tripal_chado_chado_schema_v1_11_cvterm_dbxref() {
  2611. $description = array(
  2612. 'table' => 'cvterm_dbxref',
  2613. 'fields' => array(
  2614. 'cvterm_dbxref_id' => array(
  2615. 'type' => 'serial',
  2616. 'not NULL' => '1',
  2617. ),
  2618. 'cvterm_id' => array(
  2619. 'type' => 'int',
  2620. 'not NULL' => '1',
  2621. ),
  2622. 'dbxref_id' => array(
  2623. 'type' => 'int',
  2624. 'not NULL' => '1',
  2625. ),
  2626. 'is_for_definition' => array(
  2627. 'type' => 'int',
  2628. 'not NULL' => '1',
  2629. 'default' => '0',
  2630. ),
  2631. ),
  2632. 'primary key' => array(
  2633. 0 => 'cvterm_dbxref_id',
  2634. ),
  2635. 'unique keys' => array(
  2636. 'cvterm_dbxref_c1' => array(
  2637. 0 => 'cvterm_id',
  2638. 1 => 'dbxref_id',
  2639. ),
  2640. ),
  2641. 'indexes' => array(
  2642. 'cvterm_dbxref_idx1' => array(
  2643. 0 => 'cvterm_id',
  2644. ),
  2645. 'cvterm_dbxref_idx2' => array(
  2646. 0 => 'dbxref_id',
  2647. ),
  2648. ),
  2649. 'foreign keys' => array(
  2650. 'dbxref' => array(
  2651. 'table' => 'dbxref',
  2652. 'columns' => array(
  2653. 'dbxref_id' => 'dbxref_id',
  2654. ),
  2655. ),
  2656. 'cvterm' => array(
  2657. 'table' => 'cvterm',
  2658. 'columns' => array(
  2659. 'cvterm_id' => 'cvterm_id',
  2660. ),
  2661. ),
  2662. ),
  2663. );
  2664. return $description;
  2665. }
  2666. /**
  2667. * Implements hook_chado_schema_v1_11_cvterm_relationship()
  2668. * Purpose: To describe the structure of 'cvterm_relationship' to tripal
  2669. * @see chado_insert_record()
  2670. * @see chado_update_record()
  2671. * @see chado_select_record()
  2672. *
  2673. * @return
  2674. * An array describing the 'cvterm_relationship' table
  2675. *
  2676. * @ingroup tripal_chado_v1.11_schema_api
  2677. *
  2678. */
  2679. function tripal_chado_chado_schema_v1_11_cvterm_relationship() {
  2680. $description = array(
  2681. 'table' => 'cvterm_relationship',
  2682. 'fields' => array(
  2683. 'cvterm_relationship_id' => array(
  2684. 'type' => 'serial',
  2685. 'not NULL' => '1',
  2686. ),
  2687. 'type_id' => array(
  2688. 'type' => 'int',
  2689. 'not NULL' => '1',
  2690. ),
  2691. 'subject_id' => array(
  2692. 'type' => 'int',
  2693. 'not NULL' => '1',
  2694. ),
  2695. 'object_id' => array(
  2696. 'type' => 'int',
  2697. 'not NULL' => '1',
  2698. ),
  2699. ),
  2700. 'primary key' => array(
  2701. 0 => 'cvterm_relationship_id',
  2702. ),
  2703. 'unique keys' => array(
  2704. 'cvterm_relationship_c1' => array(
  2705. 0 => 'subject_id',
  2706. 1 => 'object_id',
  2707. 2 => 'type_id',
  2708. ),
  2709. ),
  2710. 'indexes' => array(
  2711. 'cvterm_relationship_idx1' => array(
  2712. 0 => 'type_id',
  2713. ),
  2714. 'cvterm_relationship_idx2' => array(
  2715. 0 => 'subject_id',
  2716. ),
  2717. 'cvterm_relationship_idx3' => array(
  2718. 0 => 'object_id',
  2719. ),
  2720. ),
  2721. 'foreign keys' => array(
  2722. 'cvterm' => array(
  2723. 'table' => 'cvterm',
  2724. 'columns' => array(
  2725. 'type_id' => 'cvterm_id',
  2726. 'subject_id' => 'cvterm_id',
  2727. 'object_id' => 'cvterm_id',
  2728. ),
  2729. ),
  2730. ),
  2731. );
  2732. return $description;
  2733. }
  2734. /**
  2735. * Implements hook_chado_schema_v1_11_cvtermpath()
  2736. * Purpose: To describe the structure of 'cvtermpath' to tripal
  2737. * @see chado_insert_record()
  2738. * @see chado_update_record()
  2739. * @see chado_select_record()
  2740. *
  2741. * @return
  2742. * An array describing the 'cvtermpath' table
  2743. *
  2744. * @ingroup tripal_chado_v1.11_schema_api
  2745. *
  2746. */
  2747. function tripal_chado_chado_schema_v1_11_cvtermpath() {
  2748. $description = array(
  2749. 'table' => 'cvtermpath',
  2750. 'fields' => array(
  2751. 'cvtermpath_id' => array(
  2752. 'type' => 'serial',
  2753. 'not NULL' => '1',
  2754. ),
  2755. 'type_id' => array(
  2756. 'type' => 'int',
  2757. 'not NULL' => '',
  2758. ),
  2759. 'subject_id' => array(
  2760. 'type' => 'int',
  2761. 'not NULL' => '1',
  2762. ),
  2763. 'object_id' => array(
  2764. 'type' => 'int',
  2765. 'not NULL' => '1',
  2766. ),
  2767. 'cv_id' => array(
  2768. 'type' => 'int',
  2769. 'not NULL' => '1',
  2770. ),
  2771. 'pathdistance' => array(
  2772. 'type' => 'int',
  2773. 'not NULL' => '',
  2774. ),
  2775. ),
  2776. 'primary key' => array(
  2777. 0 => 'cvtermpath_id',
  2778. ),
  2779. 'unique keys' => array(
  2780. 'cvtermpath_c1' => array(
  2781. 0 => 'subject_id',
  2782. 1 => 'object_id',
  2783. 2 => 'type_id',
  2784. 3 => 'pathdistance',
  2785. ),
  2786. ),
  2787. 'indexes' => array(
  2788. 'cvtermpath_idx1' => array(
  2789. 0 => 'type_id',
  2790. ),
  2791. 'cvtermpath_idx2' => array(
  2792. 0 => 'subject_id',
  2793. ),
  2794. 'cvtermpath_idx3' => array(
  2795. 0 => 'object_id',
  2796. ),
  2797. 'cvtermpath_idx4' => array(
  2798. 0 => 'cv_id',
  2799. ),
  2800. ),
  2801. 'foreign keys' => array(
  2802. 'cv' => array(
  2803. 'table' => 'cv',
  2804. 'columns' => array(
  2805. 'cv_id' => 'cv_id',
  2806. ),
  2807. ),
  2808. 'cvterm' => array(
  2809. 'table' => 'cvterm',
  2810. 'columns' => array(
  2811. 'type_id' => 'cvterm_id',
  2812. 'subject_id' => 'cvterm_id',
  2813. 'object_id' => 'cvterm_id',
  2814. ),
  2815. ),
  2816. ),
  2817. );
  2818. return $description;
  2819. }
  2820. /**
  2821. * Implements hook_chado_schema_v1_11_cvtermprop()
  2822. * Purpose: To describe the structure of 'cvtermprop' to tripal
  2823. * @see chado_insert_record()
  2824. * @see chado_update_record()
  2825. * @see chado_select_record()
  2826. *
  2827. * @return
  2828. * An array describing the 'cvtermprop' table
  2829. *
  2830. * @ingroup tripal_chado_v1.11_schema_api
  2831. *
  2832. */
  2833. function tripal_chado_chado_schema_v1_11_cvtermprop() {
  2834. $description = array(
  2835. 'table' => 'cvtermprop',
  2836. 'fields' => array(
  2837. 'cvtermprop_id' => array(
  2838. 'type' => 'serial',
  2839. 'not NULL' => '1',
  2840. ),
  2841. 'cvterm_id' => array(
  2842. 'type' => 'int',
  2843. 'not NULL' => '1',
  2844. ),
  2845. 'type_id' => array(
  2846. 'type' => 'int',
  2847. 'not NULL' => '1',
  2848. ),
  2849. 'value' => array(
  2850. 'type' => 'text',
  2851. 'not NULL' => '1',
  2852. 'default' => '',
  2853. ),
  2854. 'rank' => array(
  2855. 'type' => 'int',
  2856. 'not NULL' => '1',
  2857. 'default' => '0',
  2858. ),
  2859. ),
  2860. 'primary key' => array(
  2861. 0 => 'cvtermprop_id',
  2862. ),
  2863. 'unique keys' => array(
  2864. 'cvterm_id' => array(
  2865. 0 => 'cvterm_id',
  2866. 1 => 'type_id',
  2867. 2 => 'value',
  2868. 3 => 'rank',
  2869. ),
  2870. ),
  2871. 'indexes' => array(
  2872. 'cvtermprop_idx1' => array(
  2873. 0 => 'cvterm_id',
  2874. ),
  2875. 'cvtermprop_idx2' => array(
  2876. 0 => 'type_id',
  2877. ),
  2878. ),
  2879. 'foreign keys' => array(
  2880. 'cvterm' => array(
  2881. 'table' => 'cvterm',
  2882. 'columns' => array(
  2883. 'cvterm_id' => 'cvterm_id',
  2884. 'type_id' => 'cvterm_id',
  2885. ),
  2886. ),
  2887. ),
  2888. );
  2889. return $description;
  2890. }
  2891. /**
  2892. * Implements hook_chado_schema_v1_11_cvtermsynonym()
  2893. * Purpose: To describe the structure of 'cvtermsynonym' to tripal
  2894. * @see chado_insert_record()
  2895. * @see chado_update_record()
  2896. * @see chado_select_record()
  2897. *
  2898. * @return
  2899. * An array describing the 'cvtermsynonym' table
  2900. *
  2901. * @ingroup tripal_chado_v1.11_schema_api
  2902. *
  2903. */
  2904. function tripal_chado_chado_schema_v1_11_cvtermsynonym() {
  2905. $description = array(
  2906. 'table' => 'cvtermsynonym',
  2907. 'fields' => array(
  2908. 'cvtermsynonym_id' => array(
  2909. 'type' => 'serial',
  2910. 'not NULL' => '1',
  2911. ),
  2912. 'cvterm_id' => array(
  2913. 'type' => 'int',
  2914. 'not NULL' => '1',
  2915. ),
  2916. 'synonym' => array(
  2917. 'type' => 'varchar',
  2918. 'length' => '1024',
  2919. 'not NULL' => '1',
  2920. ),
  2921. 'type_id' => array(
  2922. 'type' => 'int',
  2923. 'not NULL' => '',
  2924. ),
  2925. ),
  2926. 'primary key' => array(
  2927. 0 => 'cvtermsynonym_id',
  2928. ),
  2929. 'unique keys' => array(
  2930. 'cvtermsynonym_c1' => array(
  2931. 0 => 'cvterm_id',
  2932. 1 => 'synonym',
  2933. ),
  2934. ),
  2935. 'indexes' => array(
  2936. 'cvtermsynonym_idx1' => array(
  2937. 0 => 'cvterm_id',
  2938. ),
  2939. ),
  2940. 'foreign keys' => array(
  2941. 'cvterm' => array(
  2942. 'table' => 'cvterm',
  2943. 'columns' => array(
  2944. 'cvterm_id' => 'cvterm_id',
  2945. 'type_id' => 'cvterm_id',
  2946. ),
  2947. ),
  2948. ),
  2949. );
  2950. return $description;
  2951. }
  2952. /**
  2953. * Implements hook_chado_schema_v1_11_db()
  2954. * Purpose: To describe the structure of 'db' to tripal
  2955. * @see chado_insert_record()
  2956. * @see chado_update_record()
  2957. * @see chado_select_record()
  2958. *
  2959. * @return
  2960. * An array describing the 'db' table
  2961. *
  2962. * @ingroup tripal_chado_v1.11_schema_api
  2963. *
  2964. */
  2965. function tripal_chado_chado_schema_v1_11_db() {
  2966. $description = array(
  2967. 'table' => 'db',
  2968. 'fields' => array(
  2969. 'db_id' => array(
  2970. 'type' => 'serial',
  2971. 'not NULL' => '1',
  2972. ),
  2973. 'name' => array(
  2974. 'type' => 'varchar',
  2975. 'length' => '255',
  2976. 'not NULL' => '1',
  2977. ),
  2978. 'description' => array(
  2979. 'type' => 'varchar',
  2980. 'length' => '255',
  2981. 'not NULL' => '',
  2982. ),
  2983. 'urlprefix' => array(
  2984. 'type' => 'varchar',
  2985. 'length' => '255',
  2986. 'not NULL' => '',
  2987. ),
  2988. 'url' => array(
  2989. 'type' => 'varchar',
  2990. 'length' => '255',
  2991. 'not NULL' => '',
  2992. ),
  2993. ),
  2994. 'primary key' => array(
  2995. 0 => 'db_id',
  2996. ),
  2997. 'unique keys' => array(
  2998. 'db_c1' => array(
  2999. 0 => 'name',
  3000. ),
  3001. ),
  3002. 'indexes' => array(
  3003. ),
  3004. 'foreign keys' => array(
  3005. ),
  3006. );
  3007. return $description;
  3008. }
  3009. /**
  3010. * Implements hook_chado_schema_v1_11_dbxref()
  3011. * Purpose: To describe the structure of 'dbxref' to tripal
  3012. * @see chado_insert_record()
  3013. * @see chado_update_record()
  3014. * @see chado_select_record()
  3015. *
  3016. * @return
  3017. * An array describing the 'dbxref' table
  3018. *
  3019. * @ingroup tripal_chado_v1.11_schema_api
  3020. *
  3021. */
  3022. function tripal_chado_chado_schema_v1_11_dbxref() {
  3023. $description = array(
  3024. 'table' => 'dbxref',
  3025. 'fields' => array(
  3026. 'dbxref_id' => array(
  3027. 'type' => 'serial',
  3028. 'not NULL' => '1',
  3029. ),
  3030. 'db_id' => array(
  3031. 'type' => 'int',
  3032. 'not NULL' => '1',
  3033. ),
  3034. 'accession' => array(
  3035. 'type' => 'varchar',
  3036. 'length' => '255',
  3037. 'not NULL' => '1',
  3038. ),
  3039. 'version' => array(
  3040. 'type' => 'varchar',
  3041. 'length' => '255',
  3042. 'not NULL' => '1',
  3043. 'default' => '',
  3044. ),
  3045. 'description' => array(
  3046. 'type' => 'text',
  3047. 'not NULL' => '',
  3048. ),
  3049. ),
  3050. 'primary key' => array(
  3051. 0 => 'dbxref_id',
  3052. ),
  3053. 'unique keys' => array(
  3054. 'dbxref_c1' => array(
  3055. 0 => 'db_id',
  3056. 1 => 'accession',
  3057. 2 => 'version',
  3058. ),
  3059. ),
  3060. 'indexes' => array(
  3061. 'dbxref_idx1' => array(
  3062. 0 => 'db_id',
  3063. ),
  3064. 'dbxref_idx2' => array(
  3065. 0 => 'accession',
  3066. ),
  3067. 'dbxref_idx3' => array(
  3068. 0 => 'version',
  3069. ),
  3070. ),
  3071. 'foreign keys' => array(
  3072. 'db' => array(
  3073. 'table' => 'db',
  3074. 'columns' => array(
  3075. 'db_id' => 'db_id',
  3076. ),
  3077. ),
  3078. ),
  3079. );
  3080. return $description;
  3081. }
  3082. /**
  3083. * Implements hook_chado_schema_v1_11_dbxrefprop()
  3084. * Purpose: To describe the structure of 'dbxrefprop' to tripal
  3085. * @see chado_insert_record()
  3086. * @see chado_update_record()
  3087. * @see chado_select_record()
  3088. *
  3089. * @return
  3090. * An array describing the 'dbxrefprop' table
  3091. *
  3092. * @ingroup tripal_chado_v1.11_schema_api
  3093. *
  3094. */
  3095. function tripal_chado_chado_schema_v1_11_dbxrefprop() {
  3096. $description = array(
  3097. 'table' => 'dbxrefprop',
  3098. 'fields' => array(
  3099. 'dbxrefprop_id' => array(
  3100. 'type' => 'serial',
  3101. 'not NULL' => '1',
  3102. ),
  3103. 'dbxref_id' => array(
  3104. 'type' => 'int',
  3105. 'not NULL' => '1',
  3106. ),
  3107. 'type_id' => array(
  3108. 'type' => 'int',
  3109. 'not NULL' => '1',
  3110. ),
  3111. 'value' => array(
  3112. 'type' => 'text',
  3113. 'not NULL' => '1',
  3114. 'default' => '',
  3115. ),
  3116. 'rank' => array(
  3117. 'type' => 'int',
  3118. 'not NULL' => '1',
  3119. 'default' => '0',
  3120. ),
  3121. ),
  3122. 'primary key' => array(
  3123. 0 => 'dbxrefprop_id',
  3124. ),
  3125. 'unique keys' => array(
  3126. 'dbxrefprop_c1' => array(
  3127. 0 => 'dbxref_id',
  3128. 1 => 'type_id',
  3129. 2 => 'rank',
  3130. ),
  3131. ),
  3132. 'indexes' => array(
  3133. 'dbxrefprop_idx1' => array(
  3134. 0 => 'dbxref_id',
  3135. ),
  3136. 'dbxrefprop_idx2' => array(
  3137. 0 => 'type_id',
  3138. ),
  3139. ),
  3140. 'foreign keys' => array(
  3141. 'dbxref' => array(
  3142. 'table' => 'dbxref',
  3143. 'columns' => array(
  3144. 'dbxref_id' => 'dbxref_id',
  3145. ),
  3146. ),
  3147. 'cvterm' => array(
  3148. 'table' => 'cvterm',
  3149. 'columns' => array(
  3150. 'type_id' => 'cvterm_id',
  3151. ),
  3152. ),
  3153. ),
  3154. );
  3155. return $description;
  3156. }
  3157. /**
  3158. * Implements hook_chado_schema_v1_11_eimage()
  3159. * Purpose: To describe the structure of 'eimage' to tripal
  3160. * @see chado_insert_record()
  3161. * @see chado_update_record()
  3162. * @see chado_select_record()
  3163. *
  3164. * @return
  3165. * An array describing the 'eimage' table
  3166. *
  3167. * @ingroup tripal_chado_v1.11_schema_api
  3168. *
  3169. */
  3170. function tripal_chado_chado_schema_v1_11_eimage() {
  3171. $description = array(
  3172. 'table' => 'eimage',
  3173. 'fields' => array(
  3174. 'eimage_id' => array(
  3175. 'type' => 'serial',
  3176. 'not NULL' => '1',
  3177. ),
  3178. 'eimage_data' => array(
  3179. 'type' => 'text',
  3180. 'not NULL' => '',
  3181. ),
  3182. 'eimage_type' => array(
  3183. 'type' => 'varchar',
  3184. 'length' => '255',
  3185. 'not NULL' => '1',
  3186. ),
  3187. 'image_uri' => array(
  3188. 'type' => 'varchar',
  3189. 'length' => '255',
  3190. 'not NULL' => '',
  3191. ),
  3192. ),
  3193. 'primary key' => array(
  3194. 0 => 'eimage_id',
  3195. ),
  3196. 'unique keys' => array(
  3197. ),
  3198. 'indexes' => array(
  3199. ),
  3200. 'foreign keys' => array(
  3201. ),
  3202. );
  3203. return $description;
  3204. }
  3205. /**
  3206. * Implements hook_chado_schema_v1_11_element()
  3207. * Purpose: To describe the structure of 'element' to tripal
  3208. * @see chado_insert_record()
  3209. * @see chado_update_record()
  3210. * @see chado_select_record()
  3211. *
  3212. * @return
  3213. * An array describing the 'element' table
  3214. *
  3215. * @ingroup tripal_chado_v1.11_schema_api
  3216. *
  3217. */
  3218. function tripal_chado_chado_schema_v1_11_element() {
  3219. $description = array(
  3220. 'table' => 'element',
  3221. 'fields' => array(
  3222. 'element_id' => array(
  3223. 'type' => 'serial',
  3224. 'not NULL' => '1',
  3225. ),
  3226. 'feature_id' => array(
  3227. 'type' => 'int',
  3228. 'not NULL' => '',
  3229. ),
  3230. 'arraydesign_id' => array(
  3231. 'type' => 'int',
  3232. 'not NULL' => '1',
  3233. ),
  3234. 'type_id' => array(
  3235. 'type' => 'int',
  3236. 'not NULL' => '',
  3237. ),
  3238. 'dbxref_id' => array(
  3239. 'type' => 'int',
  3240. 'not NULL' => '',
  3241. ),
  3242. ),
  3243. 'primary key' => array(
  3244. 0 => 'element_id',
  3245. ),
  3246. 'unique keys' => array(
  3247. 'element_c1' => array(
  3248. 0 => 'feature_id',
  3249. 1 => 'arraydesign_id',
  3250. ),
  3251. ),
  3252. 'indexes' => array(
  3253. 'element_idx1' => array(
  3254. 0 => 'feature_id',
  3255. ),
  3256. 'element_idx2' => array(
  3257. 0 => 'arraydesign_id',
  3258. ),
  3259. 'element_idx3' => array(
  3260. 0 => 'type_id',
  3261. ),
  3262. 'element_idx4' => array(
  3263. 0 => 'dbxref_id',
  3264. ),
  3265. ),
  3266. 'foreign keys' => array(
  3267. 'dbxref' => array(
  3268. 'table' => 'dbxref',
  3269. 'columns' => array(
  3270. 'dbxref_id' => 'dbxref_id',
  3271. ),
  3272. ),
  3273. 'cvterm' => array(
  3274. 'table' => 'cvterm',
  3275. 'columns' => array(
  3276. 'type_id' => 'cvterm_id',
  3277. ),
  3278. ),
  3279. 'feature' => array(
  3280. 'table' => 'feature',
  3281. 'columns' => array(
  3282. 'feature_id' => 'feature_id',
  3283. ),
  3284. ),
  3285. 'arraydesign' => array(
  3286. 'table' => 'arraydesign',
  3287. 'columns' => array(
  3288. 'arraydesign_id' => 'arraydesign_id',
  3289. ),
  3290. ),
  3291. ),
  3292. );
  3293. return $description;
  3294. }
  3295. /**
  3296. * Implements hook_chado_schema_v1_11_element_relationship()
  3297. * Purpose: To describe the structure of 'element_relationship' to tripal
  3298. * @see chado_insert_record()
  3299. * @see chado_update_record()
  3300. * @see chado_select_record()
  3301. *
  3302. * @return
  3303. * An array describing the 'element_relationship' table
  3304. *
  3305. * @ingroup tripal_chado_v1.11_schema_api
  3306. *
  3307. */
  3308. function tripal_chado_chado_schema_v1_11_element_relationship() {
  3309. $description = array(
  3310. 'table' => 'element_relationship',
  3311. 'fields' => array(
  3312. 'element_relationship_id' => array(
  3313. 'type' => 'serial',
  3314. 'not NULL' => '1',
  3315. ),
  3316. 'subject_id' => array(
  3317. 'type' => 'int',
  3318. 'not NULL' => '1',
  3319. ),
  3320. 'type_id' => array(
  3321. 'type' => 'int',
  3322. 'not NULL' => '1',
  3323. ),
  3324. 'object_id' => array(
  3325. 'type' => 'int',
  3326. 'not NULL' => '1',
  3327. ),
  3328. 'value' => array(
  3329. 'type' => 'text',
  3330. 'not NULL' => '',
  3331. ),
  3332. 'rank' => array(
  3333. 'type' => 'int',
  3334. 'not NULL' => '1',
  3335. 'default' => '0',
  3336. ),
  3337. ),
  3338. 'primary key' => array(
  3339. 0 => 'element_relationship_id',
  3340. ),
  3341. 'unique keys' => array(
  3342. 'element_relationship_c1' => array(
  3343. 0 => 'subject_id',
  3344. 1 => 'object_id',
  3345. 2 => 'type_id',
  3346. 3 => 'rank',
  3347. ),
  3348. ),
  3349. 'indexes' => array(
  3350. 'element_relationship_idx1' => array(
  3351. 0 => 'subject_id',
  3352. ),
  3353. 'element_relationship_idx2' => array(
  3354. 0 => 'type_id',
  3355. ),
  3356. 'element_relationship_idx3' => array(
  3357. 0 => 'object_id',
  3358. ),
  3359. 'element_relationship_idx4' => array(
  3360. 0 => 'value',
  3361. ),
  3362. ),
  3363. 'foreign keys' => array(
  3364. 'cvterm' => array(
  3365. 'table' => 'cvterm',
  3366. 'columns' => array(
  3367. 'type_id' => 'cvterm_id',
  3368. ),
  3369. ),
  3370. 'element' => array(
  3371. 'table' => 'element',
  3372. 'columns' => array(
  3373. 'subject_id' => 'element_id',
  3374. 'object_id' => 'element_id',
  3375. ),
  3376. ),
  3377. ),
  3378. );
  3379. return $description;
  3380. }
  3381. /**
  3382. * Implements hook_chado_schema_v1_11_elementresult()
  3383. * Purpose: To describe the structure of 'elementresult' to tripal
  3384. * @see chado_insert_record()
  3385. * @see chado_update_record()
  3386. * @see chado_select_record()
  3387. *
  3388. * @return
  3389. * An array describing the 'elementresult' table
  3390. *
  3391. * @ingroup tripal_chado_v1.11_schema_api
  3392. *
  3393. */
  3394. function tripal_chado_chado_schema_v1_11_elementresult() {
  3395. $description = array(
  3396. 'table' => 'elementresult',
  3397. 'fields' => array(
  3398. 'elementresult_id' => array(
  3399. 'type' => 'serial',
  3400. 'not NULL' => '1',
  3401. ),
  3402. 'element_id' => array(
  3403. 'type' => 'int',
  3404. 'not NULL' => '1',
  3405. ),
  3406. 'quantification_id' => array(
  3407. 'type' => 'int',
  3408. 'not NULL' => '1',
  3409. ),
  3410. 'signal' => array(
  3411. 'type' => 'float',
  3412. 'size' => 'big',
  3413. 'not NULL' => '1',
  3414. ),
  3415. ),
  3416. 'primary key' => array(
  3417. 0 => 'elementresult_id',
  3418. ),
  3419. 'unique keys' => array(
  3420. 'elementresult_c1' => array(
  3421. 0 => 'element_id',
  3422. 1 => 'quantification_id',
  3423. ),
  3424. ),
  3425. 'indexes' => array(
  3426. 'elementresult_idx1' => array(
  3427. 0 => 'element_id',
  3428. ),
  3429. 'elementresult_idx2' => array(
  3430. 0 => 'quantification_id',
  3431. ),
  3432. 'elementresult_idx3' => array(
  3433. 0 => 'signal',
  3434. ),
  3435. ),
  3436. 'foreign keys' => array(
  3437. 'quantification' => array(
  3438. 'table' => 'quantification',
  3439. 'columns' => array(
  3440. 'quantification_id' => 'quantification_id',
  3441. ),
  3442. ),
  3443. 'element' => array(
  3444. 'table' => 'element',
  3445. 'columns' => array(
  3446. 'element_id' => 'element_id',
  3447. ),
  3448. ),
  3449. ),
  3450. );
  3451. return $description;
  3452. }
  3453. /**
  3454. * Implements hook_chado_schema_v1_11_elementresult_relationship()
  3455. * Purpose: To describe the structure of 'elementresult_relationship' to tripal
  3456. * @see chado_insert_record()
  3457. * @see chado_update_record()
  3458. * @see chado_select_record()
  3459. *
  3460. * @return
  3461. * An array describing the 'elementresult_relationship' table
  3462. *
  3463. * @ingroup tripal_chado_v1.11_schema_api
  3464. *
  3465. */
  3466. function tripal_chado_chado_schema_v1_11_elementresult_relationship() {
  3467. $description = array(
  3468. 'table' => 'elementresult_relationship',
  3469. 'fields' => array(
  3470. 'elementresult_relationship_id' => array(
  3471. 'type' => 'serial',
  3472. 'not NULL' => '1',
  3473. ),
  3474. 'subject_id' => array(
  3475. 'type' => 'int',
  3476. 'not NULL' => '1',
  3477. ),
  3478. 'type_id' => array(
  3479. 'type' => 'int',
  3480. 'not NULL' => '1',
  3481. ),
  3482. 'object_id' => array(
  3483. 'type' => 'int',
  3484. 'not NULL' => '1',
  3485. ),
  3486. 'value' => array(
  3487. 'type' => 'text',
  3488. 'not NULL' => '',
  3489. ),
  3490. 'rank' => array(
  3491. 'type' => 'int',
  3492. 'not NULL' => '1',
  3493. 'default' => '0',
  3494. ),
  3495. ),
  3496. 'primary key' => array(
  3497. 0 => 'elementresult_relationship_id',
  3498. ),
  3499. 'unique keys' => array(
  3500. 'elementresult_relationship_c1' => array(
  3501. 0 => 'subject_id',
  3502. 1 => 'object_id',
  3503. 2 => 'type_id',
  3504. 3 => 'rank',
  3505. ),
  3506. ),
  3507. 'indexes' => array(
  3508. 'elementresult_relationship_idx1' => array(
  3509. 0 => 'subject_id',
  3510. ),
  3511. 'elementresult_relationship_idx2' => array(
  3512. 0 => 'type_id',
  3513. ),
  3514. 'elementresult_relationship_idx3' => array(
  3515. 0 => 'object_id',
  3516. ),
  3517. 'elementresult_relationship_idx4' => array(
  3518. 0 => 'value',
  3519. ),
  3520. ),
  3521. 'foreign keys' => array(
  3522. 'cvterm' => array(
  3523. 'table' => 'cvterm',
  3524. 'columns' => array(
  3525. 'type_id' => 'cvterm_id',
  3526. ),
  3527. ),
  3528. 'elementresult' => array(
  3529. 'table' => 'elementresult',
  3530. 'columns' => array(
  3531. 'subject_id' => 'elementresult_id',
  3532. 'object_id' => 'elementresult_id',
  3533. ),
  3534. ),
  3535. ),
  3536. );
  3537. return $description;
  3538. }
  3539. /**
  3540. * Implements hook_chado_schema_v1_11_environment()
  3541. * Purpose: To describe the structure of 'environment' to tripal
  3542. * @see chado_insert_record()
  3543. * @see chado_update_record()
  3544. * @see chado_select_record()
  3545. *
  3546. * @return
  3547. * An array describing the 'environment' table
  3548. *
  3549. * @ingroup tripal_chado_v1.11_schema_api
  3550. *
  3551. */
  3552. function tripal_chado_chado_schema_v1_11_environment() {
  3553. $description = array(
  3554. 'table' => 'environment',
  3555. 'fields' => array(
  3556. 'environment_id' => array(
  3557. 'type' => 'serial',
  3558. 'not NULL' => '1',
  3559. ),
  3560. 'uniquename' => array(
  3561. 'type' => 'text',
  3562. 'not NULL' => '1',
  3563. ),
  3564. 'description' => array(
  3565. 'type' => 'text',
  3566. 'not NULL' => '',
  3567. ),
  3568. ),
  3569. 'primary key' => array(
  3570. 0 => 'environment_id',
  3571. ),
  3572. 'unique keys' => array(
  3573. 'environment_c1' => array(
  3574. 0 => 'uniquename',
  3575. ),
  3576. ),
  3577. 'indexes' => array(
  3578. 'environment_idx1' => array(
  3579. 0 => 'uniquename',
  3580. ),
  3581. ),
  3582. 'foreign keys' => array(
  3583. ),
  3584. );
  3585. return $description;
  3586. }
  3587. /**
  3588. * Implements hook_chado_schema_v1_11_environment_cvterm()
  3589. * Purpose: To describe the structure of 'environment_cvterm' to tripal
  3590. * @see chado_insert_record()
  3591. * @see chado_update_record()
  3592. * @see chado_select_record()
  3593. *
  3594. * @return
  3595. * An array describing the 'environment_cvterm' table
  3596. *
  3597. * @ingroup tripal_chado_v1.11_schema_api
  3598. *
  3599. */
  3600. function tripal_chado_chado_schema_v1_11_environment_cvterm() {
  3601. $description = array(
  3602. 'table' => 'environment_cvterm',
  3603. 'fields' => array(
  3604. 'environment_cvterm_id' => array(
  3605. 'type' => 'serial',
  3606. 'not NULL' => '1',
  3607. ),
  3608. 'environment_id' => array(
  3609. 'type' => 'int',
  3610. 'not NULL' => '1',
  3611. ),
  3612. 'cvterm_id' => array(
  3613. 'type' => 'int',
  3614. 'not NULL' => '1',
  3615. ),
  3616. ),
  3617. 'primary key' => array(
  3618. 0 => 'environment_cvterm_id',
  3619. ),
  3620. 'unique keys' => array(
  3621. 'environment_cvterm_c1' => array(
  3622. 0 => 'environment_id',
  3623. 1 => 'cvterm_id',
  3624. ),
  3625. ),
  3626. 'indexes' => array(
  3627. 'environment_cvterm_idx1' => array(
  3628. 0 => 'environment_id',
  3629. ),
  3630. 'environment_cvterm_idx2' => array(
  3631. 0 => 'cvterm_id',
  3632. ),
  3633. ),
  3634. 'foreign keys' => array(
  3635. 'cvterm' => array(
  3636. 'table' => 'cvterm',
  3637. 'columns' => array(
  3638. 'cvterm_id' => 'cvterm_id',
  3639. ),
  3640. ),
  3641. 'environment' => array(
  3642. 'table' => 'environment',
  3643. 'columns' => array(
  3644. 'environment_id' => 'environment_id',
  3645. ),
  3646. ),
  3647. ),
  3648. );
  3649. return $description;
  3650. }
  3651. /**
  3652. * Implements hook_chado_schema_v1_11_expression()
  3653. * Purpose: To describe the structure of 'expression' to tripal
  3654. * @see chado_insert_record()
  3655. * @see chado_update_record()
  3656. * @see chado_select_record()
  3657. *
  3658. * @return
  3659. * An array describing the 'expression' table
  3660. *
  3661. * @ingroup tripal_chado_v1.11_schema_api
  3662. *
  3663. */
  3664. function tripal_chado_chado_schema_v1_11_expression() {
  3665. $description = array(
  3666. 'table' => 'expression',
  3667. 'fields' => array(
  3668. 'expression_id' => array(
  3669. 'type' => 'serial',
  3670. 'not NULL' => '1',
  3671. ),
  3672. 'uniquename' => array(
  3673. 'type' => 'text',
  3674. 'not NULL' => '1',
  3675. ),
  3676. 'md5checksum' => array(
  3677. 'type' => 'char',
  3678. 'length' => '32',
  3679. 'not NULL' => '',
  3680. ),
  3681. 'description' => array(
  3682. 'type' => 'text',
  3683. 'not NULL' => '',
  3684. ),
  3685. ),
  3686. 'primary key' => array(
  3687. 0 => 'expression_id',
  3688. ),
  3689. 'unique keys' => array(
  3690. 'expression_c1' => array(
  3691. 0 => 'uniquename',
  3692. ),
  3693. ),
  3694. 'indexes' => array(
  3695. ),
  3696. 'foreign keys' => array(
  3697. ),
  3698. );
  3699. return $description;
  3700. }
  3701. /**
  3702. * Implements hook_chado_schema_v1_11_expression_cvterm()
  3703. * Purpose: To describe the structure of 'expression_cvterm' to tripal
  3704. * @see chado_insert_record()
  3705. * @see chado_update_record()
  3706. * @see chado_select_record()
  3707. *
  3708. * @return
  3709. * An array describing the 'expression_cvterm' table
  3710. *
  3711. * @ingroup tripal_chado_v1.11_schema_api
  3712. *
  3713. */
  3714. function tripal_chado_chado_schema_v1_11_expression_cvterm() {
  3715. $description = array(
  3716. 'table' => 'expression_cvterm',
  3717. 'fields' => array(
  3718. 'expression_cvterm_id' => array(
  3719. 'type' => 'serial',
  3720. 'not NULL' => '1',
  3721. ),
  3722. 'expression_id' => array(
  3723. 'type' => 'int',
  3724. 'not NULL' => '1',
  3725. ),
  3726. 'cvterm_id' => array(
  3727. 'type' => 'int',
  3728. 'not NULL' => '1',
  3729. ),
  3730. 'rank' => array(
  3731. 'type' => 'int',
  3732. 'not NULL' => '1',
  3733. 'default' => '0',
  3734. ),
  3735. 'cvterm_type_id' => array(
  3736. 'type' => 'int',
  3737. 'not NULL' => '1',
  3738. ),
  3739. ),
  3740. 'primary key' => array(
  3741. 0 => 'expression_cvterm_id',
  3742. ),
  3743. 'unique keys' => array(
  3744. 'expression_cvterm_c1' => array(
  3745. 0 => 'expression_id',
  3746. 1 => 'cvterm_id',
  3747. 2 => 'cvterm_type_id',
  3748. ),
  3749. ),
  3750. 'indexes' => array(
  3751. 'expression_cvterm_idx1' => array(
  3752. 0 => 'expression_id',
  3753. ),
  3754. 'expression_cvterm_idx2' => array(
  3755. 0 => 'cvterm_id',
  3756. ),
  3757. 'expression_cvterm_idx3' => array(
  3758. 0 => 'cvterm_type_id',
  3759. ),
  3760. ),
  3761. 'foreign keys' => array(
  3762. 'cvterm' => array(
  3763. 'table' => 'cvterm',
  3764. 'columns' => array(
  3765. 'cvterm_id' => 'cvterm_id',
  3766. 'cvterm_type_id' => 'cvterm_id',
  3767. ),
  3768. ),
  3769. 'expression' => array(
  3770. 'table' => 'expression',
  3771. 'columns' => array(
  3772. 'expression_id' => 'expression_id',
  3773. ),
  3774. ),
  3775. ),
  3776. );
  3777. return $description;
  3778. }
  3779. /**
  3780. * Implements hook_chado_schema_v1_11_expression_cvtermprop()
  3781. * Purpose: To describe the structure of 'expression_cvtermprop' to tripal
  3782. * @see chado_insert_record()
  3783. * @see chado_update_record()
  3784. * @see chado_select_record()
  3785. *
  3786. * @return
  3787. * An array describing the 'expression_cvtermprop' table
  3788. *
  3789. * @ingroup tripal_chado_v1.11_schema_api
  3790. *
  3791. */
  3792. function tripal_chado_chado_schema_v1_11_expression_cvtermprop() {
  3793. $description = array(
  3794. 'table' => 'expression_cvtermprop',
  3795. 'fields' => array(
  3796. 'expression_cvtermprop_id' => array(
  3797. 'type' => 'serial',
  3798. 'not NULL' => '1',
  3799. ),
  3800. 'expression_cvterm_id' => array(
  3801. 'type' => 'int',
  3802. 'not NULL' => '1',
  3803. ),
  3804. 'type_id' => array(
  3805. 'type' => 'int',
  3806. 'not NULL' => '1',
  3807. ),
  3808. 'value' => array(
  3809. 'type' => 'text',
  3810. 'not NULL' => '',
  3811. ),
  3812. 'rank' => array(
  3813. 'type' => 'int',
  3814. 'not NULL' => '1',
  3815. 'default' => '0',
  3816. ),
  3817. ),
  3818. 'primary key' => array(
  3819. 0 => 'expression_cvtermprop_id',
  3820. ),
  3821. 'unique keys' => array(
  3822. 'expression_cvtermprop_c1' => array(
  3823. 0 => 'expression_cvterm_id',
  3824. 1 => 'type_id',
  3825. 2 => 'rank',
  3826. ),
  3827. ),
  3828. 'indexes' => array(
  3829. 'expression_cvtermprop_idx1' => array(
  3830. 0 => 'expression_cvterm_id',
  3831. ),
  3832. 'expression_cvtermprop_idx2' => array(
  3833. 0 => 'type_id',
  3834. ),
  3835. ),
  3836. 'foreign keys' => array(
  3837. 'cvterm' => array(
  3838. 'table' => 'cvterm',
  3839. 'columns' => array(
  3840. 'type_id' => 'cvterm_id',
  3841. ),
  3842. ),
  3843. 'expression_cvterm' => array(
  3844. 'table' => 'expression_cvterm',
  3845. 'columns' => array(
  3846. 'expression_cvterm_id' => 'expression_cvterm_id',
  3847. ),
  3848. ),
  3849. ),
  3850. );
  3851. return $description;
  3852. }
  3853. /**
  3854. * Implements hook_chado_schema_v1_11_expression_image()
  3855. * Purpose: To describe the structure of 'expression_image' to tripal
  3856. * @see chado_insert_record()
  3857. * @see chado_update_record()
  3858. * @see chado_select_record()
  3859. *
  3860. * @return
  3861. * An array describing the 'expression_image' table
  3862. *
  3863. * @ingroup tripal_chado_v1.11_schema_api
  3864. *
  3865. */
  3866. function tripal_chado_chado_schema_v1_11_expression_image() {
  3867. $description = array(
  3868. 'table' => 'expression_image',
  3869. 'fields' => array(
  3870. 'expression_image_id' => array(
  3871. 'type' => 'serial',
  3872. 'not NULL' => '1',
  3873. ),
  3874. 'expression_id' => array(
  3875. 'type' => 'int',
  3876. 'not NULL' => '1',
  3877. ),
  3878. 'eimage_id' => array(
  3879. 'type' => 'int',
  3880. 'not NULL' => '1',
  3881. ),
  3882. ),
  3883. 'primary key' => array(
  3884. 0 => 'expression_image_id',
  3885. ),
  3886. 'unique keys' => array(
  3887. 'expression_image_c1' => array(
  3888. 0 => 'expression_id',
  3889. 1 => 'eimage_id',
  3890. ),
  3891. ),
  3892. 'indexes' => array(
  3893. 'expression_image_idx1' => array(
  3894. 0 => 'expression_id',
  3895. ),
  3896. 'expression_image_idx2' => array(
  3897. 0 => 'eimage_id',
  3898. ),
  3899. ),
  3900. 'foreign keys' => array(
  3901. 'expression' => array(
  3902. 'table' => 'expression',
  3903. 'columns' => array(
  3904. 'expression_id' => 'expression_id',
  3905. ),
  3906. ),
  3907. 'eimage' => array(
  3908. 'table' => 'eimage',
  3909. 'columns' => array(
  3910. 'eimage_id' => 'eimage_id',
  3911. ),
  3912. ),
  3913. ),
  3914. );
  3915. return $description;
  3916. }
  3917. /**
  3918. * Implements hook_chado_schema_v1_11_expression_pub()
  3919. * Purpose: To describe the structure of 'expression_pub' to tripal
  3920. * @see chado_insert_record()
  3921. * @see chado_update_record()
  3922. * @see chado_select_record()
  3923. *
  3924. * @return
  3925. * An array describing the 'expression_pub' table
  3926. *
  3927. * @ingroup tripal_chado_v1.11_schema_api
  3928. *
  3929. */
  3930. function tripal_chado_chado_schema_v1_11_expression_pub() {
  3931. $description = array(
  3932. 'table' => 'expression_pub',
  3933. 'fields' => array(
  3934. 'expression_pub_id' => array(
  3935. 'type' => 'serial',
  3936. 'not NULL' => '1',
  3937. ),
  3938. 'expression_id' => array(
  3939. 'type' => 'int',
  3940. 'not NULL' => '1',
  3941. ),
  3942. 'pub_id' => array(
  3943. 'type' => 'int',
  3944. 'not NULL' => '1',
  3945. ),
  3946. ),
  3947. 'primary key' => array(
  3948. 0 => 'expression_pub_id',
  3949. ),
  3950. 'unique keys' => array(
  3951. 'expression_pub_c1' => array(
  3952. 0 => 'expression_id',
  3953. 1 => 'pub_id',
  3954. ),
  3955. ),
  3956. 'indexes' => array(
  3957. 'expression_pub_idx1' => array(
  3958. 0 => 'expression_id',
  3959. ),
  3960. 'expression_pub_idx2' => array(
  3961. 0 => 'pub_id',
  3962. ),
  3963. ),
  3964. 'foreign keys' => array(
  3965. 'pub' => array(
  3966. 'table' => 'pub',
  3967. 'columns' => array(
  3968. 'pub_id' => 'pub_id',
  3969. ),
  3970. ),
  3971. 'expression' => array(
  3972. 'table' => 'expression',
  3973. 'columns' => array(
  3974. 'expression_id' => 'expression_id',
  3975. ),
  3976. ),
  3977. ),
  3978. );
  3979. return $description;
  3980. }
  3981. /**
  3982. * Implements hook_chado_schema_v1_11_expressionprop()
  3983. * Purpose: To describe the structure of 'expressionprop' to tripal
  3984. * @see chado_insert_record()
  3985. * @see chado_update_record()
  3986. * @see chado_select_record()
  3987. *
  3988. * @return
  3989. * An array describing the 'expressionprop' table
  3990. *
  3991. * @ingroup tripal_chado_v1.11_schema_api
  3992. *
  3993. */
  3994. function tripal_chado_chado_schema_v1_11_expressionprop() {
  3995. $description = array(
  3996. 'table' => 'expressionprop',
  3997. 'fields' => array(
  3998. 'expressionprop_id' => array(
  3999. 'type' => 'serial',
  4000. 'not NULL' => '1',
  4001. ),
  4002. 'expression_id' => array(
  4003. 'type' => 'int',
  4004. 'not NULL' => '1',
  4005. ),
  4006. 'type_id' => array(
  4007. 'type' => 'int',
  4008. 'not NULL' => '1',
  4009. ),
  4010. 'value' => array(
  4011. 'type' => 'text',
  4012. 'not NULL' => '',
  4013. ),
  4014. 'rank' => array(
  4015. 'type' => 'int',
  4016. 'not NULL' => '1',
  4017. 'default' => '0',
  4018. ),
  4019. ),
  4020. 'primary key' => array(
  4021. 0 => 'expressionprop_id',
  4022. ),
  4023. 'unique keys' => array(
  4024. 'expressionprop_c1' => array(
  4025. 0 => 'expression_id',
  4026. 1 => 'type_id',
  4027. 2 => 'rank',
  4028. ),
  4029. ),
  4030. 'indexes' => array(
  4031. 'expressionprop_idx1' => array(
  4032. 0 => 'expression_id',
  4033. ),
  4034. 'expressionprop_idx2' => array(
  4035. 0 => 'type_id',
  4036. ),
  4037. ),
  4038. 'foreign keys' => array(
  4039. 'cvterm' => array(
  4040. 'table' => 'cvterm',
  4041. 'columns' => array(
  4042. 'type_id' => 'cvterm_id',
  4043. ),
  4044. ),
  4045. 'expression' => array(
  4046. 'table' => 'expression',
  4047. 'columns' => array(
  4048. 'expression_id' => 'expression_id',
  4049. ),
  4050. ),
  4051. ),
  4052. );
  4053. return $description;
  4054. }
  4055. /**
  4056. * Implements hook_chado_schema_v1_11_feature()
  4057. * Purpose: To describe the structure of 'feature' to tripal
  4058. * @see chado_insert_record()
  4059. * @see chado_update_record()
  4060. * @see chado_select_record()
  4061. *
  4062. * @return
  4063. * An array describing the 'feature' table
  4064. *
  4065. * @ingroup tripal_chado_v1.11_schema_api
  4066. *
  4067. */
  4068. function tripal_chado_chado_schema_v1_11_feature() {
  4069. $description = array(
  4070. 'table' => 'feature',
  4071. 'fields' => array(
  4072. 'feature_id' => array(
  4073. 'type' => 'serial',
  4074. 'not NULL' => '1',
  4075. ),
  4076. 'dbxref_id' => array(
  4077. 'type' => 'int',
  4078. 'not NULL' => '',
  4079. ),
  4080. 'organism_id' => array(
  4081. 'type' => 'int',
  4082. 'not NULL' => '1',
  4083. ),
  4084. 'name' => array(
  4085. 'type' => 'varchar',
  4086. 'length' => '255',
  4087. 'not NULL' => '',
  4088. ),
  4089. 'uniquename' => array(
  4090. 'type' => 'text',
  4091. 'not NULL' => '1',
  4092. ),
  4093. 'residues' => array(
  4094. 'type' => 'text',
  4095. 'not NULL' => '',
  4096. ),
  4097. 'seqlen' => array(
  4098. 'type' => 'int',
  4099. 'not NULL' => '',
  4100. ),
  4101. 'md5checksum' => array(
  4102. 'type' => 'char',
  4103. 'length' => '32',
  4104. 'not NULL' => '',
  4105. ),
  4106. 'type_id' => array(
  4107. 'type' => 'int',
  4108. 'not NULL' => '1',
  4109. ),
  4110. 'is_analysis' => array(
  4111. 'type' => 'boolean',
  4112. 'not NULL' => '1',
  4113. 'default' => 'false',
  4114. ),
  4115. 'is_obsolete' => array(
  4116. 'type' => 'boolean',
  4117. 'not NULL' => '1',
  4118. 'default' => 'false',
  4119. ),
  4120. 'timeaccessioned' => array(
  4121. 'type' => 'datetime',
  4122. 'not NULL' => '1',
  4123. 'default' => 'ow(',
  4124. ),
  4125. 'timelastmodified' => array(
  4126. 'type' => 'datetime',
  4127. 'not NULL' => '1',
  4128. 'default' => 'ow(',
  4129. ),
  4130. ),
  4131. 'primary key' => array(
  4132. 0 => 'feature_id',
  4133. ),
  4134. 'unique keys' => array(
  4135. 'feature_c1' => array(
  4136. 0 => 'organism_id',
  4137. 1 => 'uniquename',
  4138. 2 => 'type_id',
  4139. ),
  4140. ),
  4141. 'indexes' => array(
  4142. 'feature_idx1' => array(
  4143. 0 => 'dbxref_id',
  4144. ),
  4145. 'feature_idx2' => array(
  4146. 0 => 'organism_id',
  4147. ),
  4148. 'feature_idx3' => array(
  4149. 0 => 'type_id',
  4150. ),
  4151. 'feature_idx4' => array(
  4152. 0 => 'uniquename',
  4153. ),
  4154. 'feature_name_ind1' => array(
  4155. 0 => 'name',
  4156. ),
  4157. ),
  4158. 'foreign keys' => array(
  4159. 'organism' => array(
  4160. 'table' => 'organism',
  4161. 'columns' => array(
  4162. 'organism_id' => 'organism_id',
  4163. ),
  4164. ),
  4165. 'dbxref' => array(
  4166. 'table' => 'dbxref',
  4167. 'columns' => array(
  4168. 'dbxref_id' => 'dbxref_id',
  4169. ),
  4170. ),
  4171. 'cvterm' => array(
  4172. 'table' => 'cvterm',
  4173. 'columns' => array(
  4174. 'type_id' => 'cvterm_id',
  4175. ),
  4176. ),
  4177. ),
  4178. 'referring_tables' => array(
  4179. 0 => 'analysisfeature',
  4180. 1 => 'element',
  4181. 2 => 'feature_cvterm',
  4182. 3 => 'feature_dbxref',
  4183. 4 => 'feature_expression',
  4184. 5 => 'feature_genotype',
  4185. 6 => 'feature_phenotype',
  4186. 7 => 'feature_pub',
  4187. 8 => 'feature_relationship',
  4188. 9 => 'feature_synonym',
  4189. 10 => 'featureloc',
  4190. 11 => 'featurepos',
  4191. 12 => 'featureprop',
  4192. 13 => 'featurerange',
  4193. 14 => 'library_feature',
  4194. 15 => 'phylonode',
  4195. 16 => 'wwwuser_feature',
  4196. ),
  4197. );
  4198. return $description;
  4199. }
  4200. /**
  4201. * Implements hook_chado_schema_v1_11_feature_cvterm()
  4202. * Purpose: To describe the structure of 'feature_cvterm' to tripal
  4203. * @see chado_insert_record()
  4204. * @see chado_update_record()
  4205. * @see chado_select_record()
  4206. *
  4207. * @return
  4208. * An array describing the 'feature_cvterm' table
  4209. *
  4210. * @ingroup tripal_chado_v1.11_schema_api
  4211. *
  4212. */
  4213. function tripal_chado_chado_schema_v1_11_feature_cvterm() {
  4214. $description = array(
  4215. 'table' => 'feature_cvterm',
  4216. 'fields' => array(
  4217. 'feature_cvterm_id' => array(
  4218. 'type' => 'serial',
  4219. 'not NULL' => '1',
  4220. ),
  4221. 'feature_id' => array(
  4222. 'type' => 'int',
  4223. 'not NULL' => '1',
  4224. ),
  4225. 'cvterm_id' => array(
  4226. 'type' => 'int',
  4227. 'not NULL' => '1',
  4228. ),
  4229. 'pub_id' => array(
  4230. 'type' => 'int',
  4231. 'not NULL' => '1',
  4232. ),
  4233. 'is_not' => array(
  4234. 'type' => 'boolean',
  4235. 'not NULL' => '1',
  4236. 'default' => 'false',
  4237. ),
  4238. 'rank' => array(
  4239. 'type' => 'int',
  4240. 'not NULL' => '1',
  4241. 'default' => '0',
  4242. ),
  4243. ),
  4244. 'primary key' => array(
  4245. 0 => 'feature_cvterm_id',
  4246. ),
  4247. 'unique keys' => array(
  4248. 'feature_cvterm_c1' => array(
  4249. 0 => 'feature_id',
  4250. 1 => 'cvterm_id',
  4251. 2 => 'pub_id',
  4252. 3 => 'rank',
  4253. ),
  4254. ),
  4255. 'indexes' => array(
  4256. 'feature_cvterm_idx1' => array(
  4257. 0 => 'feature_id',
  4258. ),
  4259. 'feature_cvterm_idx2' => array(
  4260. 0 => 'cvterm_id',
  4261. ),
  4262. 'feature_cvterm_idx3' => array(
  4263. 0 => 'pub_id',
  4264. ),
  4265. ),
  4266. 'foreign keys' => array(
  4267. 'feature' => array(
  4268. 'table' => 'feature',
  4269. 'columns' => array(
  4270. 'feature_id' => 'feature_id',
  4271. ),
  4272. ),
  4273. 'cvterm' => array(
  4274. 'table' => 'cvterm',
  4275. 'columns' => array(
  4276. 'cvterm_id' => 'cvterm_id',
  4277. ),
  4278. ),
  4279. 'pub' => array(
  4280. 'table' => 'pub',
  4281. 'columns' => array(
  4282. 'pub_id' => 'pub_id',
  4283. ),
  4284. ),
  4285. ),
  4286. );
  4287. return $description;
  4288. }
  4289. /**
  4290. * Implements hook_chado_schema_v1_11_feature_cvterm_dbxref()
  4291. * Purpose: To describe the structure of 'feature_cvterm_dbxref' to tripal
  4292. * @see chado_insert_record()
  4293. * @see chado_update_record()
  4294. * @see chado_select_record()
  4295. *
  4296. * @return
  4297. * An array describing the 'feature_cvterm_dbxref' table
  4298. *
  4299. * @ingroup tripal_chado_v1.11_schema_api
  4300. *
  4301. */
  4302. function tripal_chado_chado_schema_v1_11_feature_cvterm_dbxref() {
  4303. $description = array(
  4304. 'table' => 'feature_cvterm_dbxref',
  4305. 'fields' => array(
  4306. 'feature_cvterm_dbxref_id' => array(
  4307. 'type' => 'serial',
  4308. 'not NULL' => '1',
  4309. ),
  4310. 'feature_cvterm_id' => array(
  4311. 'type' => 'int',
  4312. 'not NULL' => '1',
  4313. ),
  4314. 'dbxref_id' => array(
  4315. 'type' => 'int',
  4316. 'not NULL' => '1',
  4317. ),
  4318. ),
  4319. 'primary key' => array(
  4320. 0 => 'feature_cvterm_dbxref_id',
  4321. ),
  4322. 'unique keys' => array(
  4323. 'feature_cvterm_dbxref_c1' => array(
  4324. 0 => 'feature_cvterm_id',
  4325. 1 => 'dbxref_id',
  4326. ),
  4327. ),
  4328. 'indexes' => array(
  4329. 'feature_cvterm_dbxref_idx1' => array(
  4330. 0 => 'feature_cvterm_id',
  4331. ),
  4332. 'feature_cvterm_dbxref_idx2' => array(
  4333. 0 => 'dbxref_id',
  4334. ),
  4335. ),
  4336. 'foreign keys' => array(
  4337. 'feature_cvterm' => array(
  4338. 'table' => 'feature_cvterm',
  4339. 'columns' => array(
  4340. 'feature_cvterm_id' => 'feature_cvterm_id',
  4341. ),
  4342. ),
  4343. 'dbxref' => array(
  4344. 'table' => 'dbxref',
  4345. 'columns' => array(
  4346. 'dbxref_id' => 'dbxref_id',
  4347. ),
  4348. ),
  4349. ),
  4350. );
  4351. return $description;
  4352. }
  4353. /**
  4354. * Implements hook_chado_schema_v1_11_feature_cvterm_pub()
  4355. * Purpose: To describe the structure of 'feature_cvterm_pub' to tripal
  4356. * @see chado_insert_record()
  4357. * @see chado_update_record()
  4358. * @see chado_select_record()
  4359. *
  4360. * @return
  4361. * An array describing the 'feature_cvterm_pub' table
  4362. *
  4363. * @ingroup tripal_chado_v1.11_schema_api
  4364. *
  4365. */
  4366. function tripal_chado_chado_schema_v1_11_feature_cvterm_pub() {
  4367. $description = array(
  4368. 'table' => 'feature_cvterm_pub',
  4369. 'fields' => array(
  4370. 'feature_cvterm_pub_id' => array(
  4371. 'type' => 'serial',
  4372. 'not NULL' => '1',
  4373. ),
  4374. 'feature_cvterm_id' => array(
  4375. 'type' => 'int',
  4376. 'not NULL' => '1',
  4377. ),
  4378. 'pub_id' => array(
  4379. 'type' => 'int',
  4380. 'not NULL' => '1',
  4381. ),
  4382. ),
  4383. 'primary key' => array(
  4384. 0 => 'feature_cvterm_pub_id',
  4385. ),
  4386. 'unique keys' => array(
  4387. 'feature_cvterm_pub_c1' => array(
  4388. 0 => 'feature_cvterm_id',
  4389. 1 => 'pub_id',
  4390. ),
  4391. ),
  4392. 'indexes' => array(
  4393. 'feature_cvterm_pub_idx1' => array(
  4394. 0 => 'feature_cvterm_id',
  4395. ),
  4396. 'feature_cvterm_pub_idx2' => array(
  4397. 0 => 'pub_id',
  4398. ),
  4399. ),
  4400. 'foreign keys' => array(
  4401. 'feature_cvterm' => array(
  4402. 'table' => 'feature_cvterm',
  4403. 'columns' => array(
  4404. 'feature_cvterm_id' => 'feature_cvterm_id',
  4405. ),
  4406. ),
  4407. 'pub' => array(
  4408. 'table' => 'pub',
  4409. 'columns' => array(
  4410. 'pub_id' => 'pub_id',
  4411. ),
  4412. ),
  4413. ),
  4414. );
  4415. return $description;
  4416. }
  4417. /**
  4418. * Implements hook_chado_schema_v1_11_feature_cvtermprop()
  4419. * Purpose: To describe the structure of 'feature_cvtermprop' to tripal
  4420. * @see chado_insert_record()
  4421. * @see chado_update_record()
  4422. * @see chado_select_record()
  4423. *
  4424. * @return
  4425. * An array describing the 'feature_cvtermprop' table
  4426. *
  4427. * @ingroup tripal_chado_v1.11_schema_api
  4428. *
  4429. */
  4430. function tripal_chado_chado_schema_v1_11_feature_cvtermprop() {
  4431. $description = array(
  4432. 'table' => 'feature_cvtermprop',
  4433. 'fields' => array(
  4434. 'feature_cvtermprop_id' => array(
  4435. 'type' => 'serial',
  4436. 'not NULL' => '1',
  4437. ),
  4438. 'feature_cvterm_id' => array(
  4439. 'type' => 'int',
  4440. 'not NULL' => '1',
  4441. ),
  4442. 'type_id' => array(
  4443. 'type' => 'int',
  4444. 'not NULL' => '1',
  4445. ),
  4446. 'value' => array(
  4447. 'type' => 'text',
  4448. 'not NULL' => '',
  4449. ),
  4450. 'rank' => array(
  4451. 'type' => 'int',
  4452. 'not NULL' => '1',
  4453. 'default' => '0',
  4454. ),
  4455. ),
  4456. 'primary key' => array(
  4457. 0 => 'feature_cvtermprop_id',
  4458. ),
  4459. 'unique keys' => array(
  4460. 'feature_cvtermprop_c1' => array(
  4461. 0 => 'feature_cvterm_id',
  4462. 1 => 'type_id',
  4463. 2 => 'rank',
  4464. ),
  4465. ),
  4466. 'indexes' => array(
  4467. 'feature_cvtermprop_idx1' => array(
  4468. 0 => 'feature_cvterm_id',
  4469. ),
  4470. 'feature_cvtermprop_idx2' => array(
  4471. 0 => 'type_id',
  4472. ),
  4473. ),
  4474. 'foreign keys' => array(
  4475. 'feature_cvterm' => array(
  4476. 'table' => 'feature_cvterm',
  4477. 'columns' => array(
  4478. 'feature_cvterm_id' => 'feature_cvterm_id',
  4479. ),
  4480. ),
  4481. 'cvterm' => array(
  4482. 'table' => 'cvterm',
  4483. 'columns' => array(
  4484. 'type_id' => 'cvterm_id',
  4485. ),
  4486. ),
  4487. ),
  4488. );
  4489. return $description;
  4490. }
  4491. /**
  4492. * Implements hook_chado_schema_v1_11_feature_dbxref()
  4493. * Purpose: To describe the structure of 'feature_dbxref' to tripal
  4494. * @see chado_insert_record()
  4495. * @see chado_update_record()
  4496. * @see chado_select_record()
  4497. *
  4498. * @return
  4499. * An array describing the 'feature_dbxref' table
  4500. *
  4501. * @ingroup tripal_chado_v1.11_schema_api
  4502. *
  4503. */
  4504. function tripal_chado_chado_schema_v1_11_feature_dbxref() {
  4505. $description = array(
  4506. 'table' => 'feature_dbxref',
  4507. 'fields' => array(
  4508. 'feature_dbxref_id' => array(
  4509. 'type' => 'serial',
  4510. 'not NULL' => '1',
  4511. ),
  4512. 'feature_id' => array(
  4513. 'type' => 'int',
  4514. 'not NULL' => '1',
  4515. ),
  4516. 'dbxref_id' => array(
  4517. 'type' => 'int',
  4518. 'not NULL' => '1',
  4519. ),
  4520. 'is_current' => array(
  4521. 'type' => 'boolean',
  4522. 'not NULL' => '1',
  4523. 'default' => 'true',
  4524. ),
  4525. ),
  4526. 'primary key' => array(
  4527. 0 => 'feature_dbxref_id',
  4528. ),
  4529. 'unique keys' => array(
  4530. 'feature_dbxref_c1' => array(
  4531. 0 => 'feature_id',
  4532. 1 => 'dbxref_id',
  4533. ),
  4534. ),
  4535. 'indexes' => array(
  4536. 'feature_dbxref_idx1' => array(
  4537. 0 => 'feature_id',
  4538. ),
  4539. 'feature_dbxref_idx2' => array(
  4540. 0 => 'dbxref_id',
  4541. ),
  4542. ),
  4543. 'foreign keys' => array(
  4544. 'feature' => array(
  4545. 'table' => 'feature',
  4546. 'columns' => array(
  4547. 'feature_id' => 'feature_id',
  4548. ),
  4549. ),
  4550. 'dbxref' => array(
  4551. 'table' => 'dbxref',
  4552. 'columns' => array(
  4553. 'dbxref_id' => 'dbxref_id',
  4554. ),
  4555. ),
  4556. ),
  4557. );
  4558. return $description;
  4559. }
  4560. /**
  4561. * Implements hook_chado_schema_v1_11_feature_expression()
  4562. * Purpose: To describe the structure of 'feature_expression' to tripal
  4563. * @see chado_insert_record()
  4564. * @see chado_update_record()
  4565. * @see chado_select_record()
  4566. *
  4567. * @return
  4568. * An array describing the 'feature_expression' table
  4569. *
  4570. * @ingroup tripal_chado_v1.11_schema_api
  4571. *
  4572. */
  4573. function tripal_chado_chado_schema_v1_11_feature_expression() {
  4574. $description = array(
  4575. 'table' => 'feature_expression',
  4576. 'fields' => array(
  4577. 'feature_expression_id' => array(
  4578. 'type' => 'serial',
  4579. 'not NULL' => '1',
  4580. ),
  4581. 'expression_id' => array(
  4582. 'type' => 'int',
  4583. 'not NULL' => '1',
  4584. ),
  4585. 'feature_id' => array(
  4586. 'type' => 'int',
  4587. 'not NULL' => '1',
  4588. ),
  4589. 'pub_id' => array(
  4590. 'type' => 'int',
  4591. 'not NULL' => '1',
  4592. ),
  4593. ),
  4594. 'primary key' => array(
  4595. 0 => 'feature_expression_id',
  4596. ),
  4597. 'unique keys' => array(
  4598. 'feature_expression_c1' => array(
  4599. 0 => 'expression_id',
  4600. 1 => 'feature_id',
  4601. 2 => 'pub_id',
  4602. ),
  4603. ),
  4604. 'indexes' => array(
  4605. 'feature_expression_idx1' => array(
  4606. 0 => 'expression_id',
  4607. ),
  4608. 'feature_expression_idx2' => array(
  4609. 0 => 'feature_id',
  4610. ),
  4611. 'feature_expression_idx3' => array(
  4612. 0 => 'pub_id',
  4613. ),
  4614. ),
  4615. 'foreign keys' => array(
  4616. 'pub' => array(
  4617. 'table' => 'pub',
  4618. 'columns' => array(
  4619. 'pub_id' => 'pub_id',
  4620. ),
  4621. ),
  4622. 'feature' => array(
  4623. 'table' => 'feature',
  4624. 'columns' => array(
  4625. 'feature_id' => 'feature_id',
  4626. ),
  4627. ),
  4628. 'expression' => array(
  4629. 'table' => 'expression',
  4630. 'columns' => array(
  4631. 'expression_id' => 'expression_id',
  4632. ),
  4633. ),
  4634. ),
  4635. );
  4636. return $description;
  4637. }
  4638. /**
  4639. * Implements hook_chado_schema_v1_11_feature_expressionprop()
  4640. * Purpose: To describe the structure of 'feature_expressionprop' to tripal
  4641. * @see chado_insert_record()
  4642. * @see chado_update_record()
  4643. * @see chado_select_record()
  4644. *
  4645. * @return
  4646. * An array describing the 'feature_expressionprop' table
  4647. *
  4648. * @ingroup tripal_chado_v1.11_schema_api
  4649. *
  4650. */
  4651. function tripal_chado_chado_schema_v1_11_feature_expressionprop() {
  4652. $description = array(
  4653. 'table' => 'feature_expressionprop',
  4654. 'fields' => array(
  4655. 'feature_expressionprop_id' => array(
  4656. 'type' => 'serial',
  4657. 'not NULL' => '1',
  4658. ),
  4659. 'feature_expression_id' => array(
  4660. 'type' => 'int',
  4661. 'not NULL' => '1',
  4662. ),
  4663. 'type_id' => array(
  4664. 'type' => 'int',
  4665. 'not NULL' => '1',
  4666. ),
  4667. 'value' => array(
  4668. 'type' => 'text',
  4669. 'not NULL' => '',
  4670. ),
  4671. 'rank' => array(
  4672. 'type' => 'int',
  4673. 'not NULL' => '1',
  4674. 'default' => '0',
  4675. ),
  4676. ),
  4677. 'primary key' => array(
  4678. 0 => 'feature_expressionprop_id',
  4679. ),
  4680. 'unique keys' => array(
  4681. 'feature_expressionprop_c1' => array(
  4682. 0 => 'feature_expression_id',
  4683. 1 => 'type_id',
  4684. 2 => 'rank',
  4685. ),
  4686. ),
  4687. 'indexes' => array(
  4688. 'feature_expressionprop_idx1' => array(
  4689. 0 => 'feature_expression_id',
  4690. ),
  4691. 'feature_expressionprop_idx2' => array(
  4692. 0 => 'type_id',
  4693. ),
  4694. ),
  4695. 'foreign keys' => array(
  4696. 'cvterm' => array(
  4697. 'table' => 'cvterm',
  4698. 'columns' => array(
  4699. 'type_id' => 'cvterm_id',
  4700. ),
  4701. ),
  4702. 'feature_expression' => array(
  4703. 'table' => 'feature_expression',
  4704. 'columns' => array(
  4705. 'feature_expression_id' => 'feature_expression_id',
  4706. ),
  4707. ),
  4708. ),
  4709. );
  4710. return $description;
  4711. }
  4712. /**
  4713. * Implements hook_chado_schema_v1_11_feature_genotype()
  4714. * Purpose: To describe the structure of 'feature_genotype' to tripal
  4715. * @see chado_insert_record()
  4716. * @see chado_update_record()
  4717. * @see chado_select_record()
  4718. *
  4719. * @return
  4720. * An array describing the 'feature_genotype' table
  4721. *
  4722. * @ingroup tripal_chado_v1.11_schema_api
  4723. *
  4724. */
  4725. function tripal_chado_chado_schema_v1_11_feature_genotype() {
  4726. $description = array(
  4727. 'table' => 'feature_genotype',
  4728. 'fields' => array(
  4729. 'feature_genotype_id' => array(
  4730. 'type' => 'serial',
  4731. 'not NULL' => '1',
  4732. ),
  4733. 'feature_id' => array(
  4734. 'type' => 'int',
  4735. 'not NULL' => '1',
  4736. ),
  4737. 'genotype_id' => array(
  4738. 'type' => 'int',
  4739. 'not NULL' => '1',
  4740. ),
  4741. 'chromosome_id' => array(
  4742. 'type' => 'int',
  4743. 'not NULL' => '',
  4744. ),
  4745. 'rank' => array(
  4746. 'type' => 'int',
  4747. 'not NULL' => '1',
  4748. ),
  4749. 'cgroup' => array(
  4750. 'type' => 'int',
  4751. 'not NULL' => '1',
  4752. ),
  4753. 'cvterm_id' => array(
  4754. 'type' => 'int',
  4755. 'not NULL' => '1',
  4756. ),
  4757. ),
  4758. 'primary key' => array(
  4759. 0 => 'feature_genotype_id',
  4760. ),
  4761. 'unique keys' => array(
  4762. 'feature_genotype_c1' => array(
  4763. 0 => 'feature_id',
  4764. 1 => 'genotype_id',
  4765. 2 => 'cvterm_id',
  4766. 3 => 'chromosome_id',
  4767. 4 => 'rank',
  4768. 5 => 'cgroup',
  4769. ),
  4770. ),
  4771. 'indexes' => array(
  4772. 'feature_genotype_idx1' => array(
  4773. 0 => 'feature_id',
  4774. ),
  4775. 'feature_genotype_idx2' => array(
  4776. 0 => 'genotype_id',
  4777. ),
  4778. ),
  4779. 'foreign keys' => array(
  4780. 'cvterm' => array(
  4781. 'table' => 'cvterm',
  4782. 'columns' => array(
  4783. 'cvterm_id' => 'cvterm_id',
  4784. ),
  4785. ),
  4786. 'feature' => array(
  4787. 'table' => 'feature',
  4788. 'columns' => array(
  4789. 'feature_id' => 'feature_id',
  4790. 'chromosome_id' => 'feature_id',
  4791. ),
  4792. ),
  4793. 'genotype' => array(
  4794. 'table' => 'genotype',
  4795. 'columns' => array(
  4796. 'genotype_id' => 'genotype_id',
  4797. ),
  4798. ),
  4799. ),
  4800. );
  4801. return $description;
  4802. }
  4803. /**
  4804. * Implements hook_chado_schema_v1_11_feature_phenotype()
  4805. * Purpose: To describe the structure of 'feature_phenotype' to tripal
  4806. * @see chado_insert_record()
  4807. * @see chado_update_record()
  4808. * @see chado_select_record()
  4809. *
  4810. * @return
  4811. * An array describing the 'feature_phenotype' table
  4812. *
  4813. * @ingroup tripal_chado_v1.11_schema_api
  4814. *
  4815. */
  4816. function tripal_chado_chado_schema_v1_11_feature_phenotype() {
  4817. $description = array(
  4818. 'table' => 'feature_phenotype',
  4819. 'fields' => array(
  4820. 'feature_phenotype_id' => array(
  4821. 'type' => 'serial',
  4822. 'not NULL' => '1',
  4823. ),
  4824. 'feature_id' => array(
  4825. 'type' => 'int',
  4826. 'not NULL' => '1',
  4827. ),
  4828. 'phenotype_id' => array(
  4829. 'type' => 'int',
  4830. 'not NULL' => '1',
  4831. ),
  4832. ),
  4833. 'primary key' => array(
  4834. 0 => 'feature_phenotype_id',
  4835. ),
  4836. 'unique keys' => array(
  4837. 'feature_phenotype_c1' => array(
  4838. 0 => 'feature_id',
  4839. 1 => 'phenotype_id',
  4840. ),
  4841. ),
  4842. 'indexes' => array(
  4843. 'feature_phenotype_idx1' => array(
  4844. 0 => 'feature_id',
  4845. ),
  4846. 'feature_phenotype_idx2' => array(
  4847. 0 => 'phenotype_id',
  4848. ),
  4849. ),
  4850. 'foreign keys' => array(
  4851. 'feature' => array(
  4852. 'table' => 'feature',
  4853. 'columns' => array(
  4854. 'feature_id' => 'feature_id',
  4855. ),
  4856. ),
  4857. 'phenotype' => array(
  4858. 'table' => 'phenotype',
  4859. 'columns' => array(
  4860. 'phenotype_id' => 'phenotype_id',
  4861. ),
  4862. ),
  4863. ),
  4864. );
  4865. return $description;
  4866. }
  4867. /**
  4868. * Implements hook_chado_schema_v1_11_feature_pub()
  4869. * Purpose: To describe the structure of 'feature_pub' to tripal
  4870. * @see chado_insert_record()
  4871. * @see chado_update_record()
  4872. * @see chado_select_record()
  4873. *
  4874. * @return
  4875. * An array describing the 'feature_pub' table
  4876. *
  4877. * @ingroup tripal_chado_v1.11_schema_api
  4878. *
  4879. */
  4880. function tripal_chado_chado_schema_v1_11_feature_pub() {
  4881. $description = array(
  4882. 'table' => 'feature_pub',
  4883. 'fields' => array(
  4884. 'feature_pub_id' => array(
  4885. 'type' => 'serial',
  4886. 'not NULL' => '1',
  4887. ),
  4888. 'feature_id' => array(
  4889. 'type' => 'int',
  4890. 'not NULL' => '1',
  4891. ),
  4892. 'pub_id' => array(
  4893. 'type' => 'int',
  4894. 'not NULL' => '1',
  4895. ),
  4896. ),
  4897. 'primary key' => array(
  4898. 0 => 'feature_pub_id',
  4899. ),
  4900. 'unique keys' => array(
  4901. 'feature_pub_c1' => array(
  4902. 0 => 'feature_id',
  4903. 1 => 'pub_id',
  4904. ),
  4905. ),
  4906. 'indexes' => array(
  4907. 'feature_pub_idx1' => array(
  4908. 0 => 'feature_id',
  4909. ),
  4910. 'feature_pub_idx2' => array(
  4911. 0 => 'pub_id',
  4912. ),
  4913. ),
  4914. 'foreign keys' => array(
  4915. 'pub' => array(
  4916. 'table' => 'pub',
  4917. 'columns' => array(
  4918. 'pub_id' => 'pub_id',
  4919. ),
  4920. ),
  4921. 'feature' => array(
  4922. 'table' => 'feature',
  4923. 'columns' => array(
  4924. 'feature_id' => 'feature_id',
  4925. ),
  4926. ),
  4927. ),
  4928. );
  4929. return $description;
  4930. }
  4931. /**
  4932. * Implements hook_chado_schema_v1_11_feature_pubprop()
  4933. * Purpose: To describe the structure of 'feature_pubprop' to tripal
  4934. * @see chado_insert_record()
  4935. * @see chado_update_record()
  4936. * @see chado_select_record()
  4937. *
  4938. * @return
  4939. * An array describing the 'feature_pubprop' table
  4940. *
  4941. * @ingroup tripal_chado_v1.11_schema_api
  4942. *
  4943. */
  4944. function tripal_chado_chado_schema_v1_11_feature_pubprop() {
  4945. $description = array(
  4946. 'table' => 'feature_pubprop',
  4947. 'fields' => array(
  4948. 'feature_pubprop_id' => array(
  4949. 'type' => 'serial',
  4950. 'not NULL' => '1',
  4951. ),
  4952. 'feature_pub_id' => array(
  4953. 'type' => 'int',
  4954. 'not NULL' => '1',
  4955. ),
  4956. 'type_id' => array(
  4957. 'type' => 'int',
  4958. 'not NULL' => '1',
  4959. ),
  4960. 'value' => array(
  4961. 'type' => 'text',
  4962. 'not NULL' => '',
  4963. ),
  4964. 'rank' => array(
  4965. 'type' => 'int',
  4966. 'not NULL' => '1',
  4967. 'default' => '0',
  4968. ),
  4969. ),
  4970. 'primary key' => array(
  4971. 0 => 'feature_pubprop_id',
  4972. ),
  4973. 'unique keys' => array(
  4974. 'feature_pubprop_c1' => array(
  4975. 0 => 'feature_pub_id',
  4976. 1 => 'type_id',
  4977. 2 => 'rank',
  4978. ),
  4979. ),
  4980. 'indexes' => array(
  4981. 'feature_pubprop_idx1' => array(
  4982. 0 => 'feature_pub_id',
  4983. ),
  4984. ),
  4985. 'foreign keys' => array(
  4986. 'cvterm' => array(
  4987. 'table' => 'cvterm',
  4988. 'columns' => array(
  4989. 'type_id' => 'cvterm_id',
  4990. ),
  4991. ),
  4992. 'feature_pub' => array(
  4993. 'table' => 'feature_pub',
  4994. 'columns' => array(
  4995. 'feature_pub_id' => 'feature_pub_id',
  4996. ),
  4997. ),
  4998. ),
  4999. );
  5000. return $description;
  5001. }
  5002. /**
  5003. * Implements hook_chado_schema_v1_11_feature_relationship()
  5004. * Purpose: To describe the structure of 'feature_relationship' to tripal
  5005. * @see chado_insert_record()
  5006. * @see chado_update_record()
  5007. * @see chado_select_record()
  5008. *
  5009. * @return
  5010. * An array describing the 'feature_relationship' table
  5011. *
  5012. * @ingroup tripal_chado_v1.11_schema_api
  5013. *
  5014. */
  5015. function tripal_chado_chado_schema_v1_11_feature_relationship() {
  5016. $description = array(
  5017. 'table' => 'feature_relationship',
  5018. 'fields' => array(
  5019. 'feature_relationship_id' => array(
  5020. 'type' => 'serial',
  5021. 'not NULL' => '1',
  5022. ),
  5023. 'subject_id' => array(
  5024. 'type' => 'int',
  5025. 'not NULL' => '1',
  5026. ),
  5027. 'object_id' => array(
  5028. 'type' => 'int',
  5029. 'not NULL' => '1',
  5030. ),
  5031. 'type_id' => array(
  5032. 'type' => 'int',
  5033. 'not NULL' => '1',
  5034. ),
  5035. 'value' => array(
  5036. 'type' => 'text',
  5037. 'not NULL' => '',
  5038. ),
  5039. 'rank' => array(
  5040. 'type' => 'int',
  5041. 'not NULL' => '1',
  5042. 'default' => '0',
  5043. ),
  5044. ),
  5045. 'primary key' => array(
  5046. 0 => 'feature_relationship_id',
  5047. ),
  5048. 'unique keys' => array(
  5049. 'feature_relationship_c1' => array(
  5050. 0 => 'subject_id',
  5051. 1 => 'object_id',
  5052. 2 => 'type_id',
  5053. 3 => 'rank',
  5054. ),
  5055. ),
  5056. 'indexes' => array(
  5057. 'feature_relationship_idx1' => array(
  5058. 0 => 'subject_id',
  5059. ),
  5060. 'feature_relationship_idx2' => array(
  5061. 0 => 'object_id',
  5062. ),
  5063. 'feature_relationship_idx3' => array(
  5064. 0 => 'type_id',
  5065. ),
  5066. ),
  5067. 'foreign keys' => array(
  5068. 'feature' => array(
  5069. 'table' => 'feature',
  5070. 'columns' => array(
  5071. 'object_id' => 'feature_id',
  5072. 'subject_id' => 'feature_id',
  5073. ),
  5074. ),
  5075. 'cvterm' => array(
  5076. 'table' => 'cvterm',
  5077. 'columns' => array(
  5078. 'type_id' => 'cvterm_id',
  5079. ),
  5080. ),
  5081. ),
  5082. );
  5083. return $description;
  5084. }
  5085. /**
  5086. * Implements hook_chado_schema_v1_11_feature_relationship_pub()
  5087. * Purpose: To describe the structure of 'feature_relationship_pub' to tripal
  5088. * @see chado_insert_record()
  5089. * @see chado_update_record()
  5090. * @see chado_select_record()
  5091. *
  5092. * @return
  5093. * An array describing the 'feature_relationship_pub' table
  5094. *
  5095. * @ingroup tripal_chado_v1.11_schema_api
  5096. *
  5097. */
  5098. function tripal_chado_chado_schema_v1_11_feature_relationship_pub() {
  5099. $description = array(
  5100. 'table' => 'feature_relationship_pub',
  5101. 'fields' => array(
  5102. 'feature_relationship_pub_id' => array(
  5103. 'type' => 'serial',
  5104. 'not NULL' => '1',
  5105. ),
  5106. 'feature_relationship_id' => array(
  5107. 'type' => 'int',
  5108. 'not NULL' => '1',
  5109. ),
  5110. 'pub_id' => array(
  5111. 'type' => 'int',
  5112. 'not NULL' => '1',
  5113. ),
  5114. ),
  5115. 'primary key' => array(
  5116. 0 => 'feature_relationship_pub_id',
  5117. ),
  5118. 'unique keys' => array(
  5119. 'feature_relationship_pub_c1' => array(
  5120. 0 => 'feature_relationship_id',
  5121. 1 => 'pub_id',
  5122. ),
  5123. ),
  5124. 'indexes' => array(
  5125. 'feature_relationship_pub_idx1' => array(
  5126. 0 => 'feature_relationship_id',
  5127. ),
  5128. 'feature_relationship_pub_idx2' => array(
  5129. 0 => 'pub_id',
  5130. ),
  5131. ),
  5132. 'foreign keys' => array(
  5133. 'pub' => array(
  5134. 'table' => 'pub',
  5135. 'columns' => array(
  5136. 'pub_id' => 'pub_id',
  5137. ),
  5138. ),
  5139. 'feature_relationship' => array(
  5140. 'table' => 'feature_relationship',
  5141. 'columns' => array(
  5142. 'feature_relationship_id' => 'feature_relationship_id',
  5143. ),
  5144. ),
  5145. ),
  5146. );
  5147. return $description;
  5148. }
  5149. /**
  5150. * Implements hook_chado_schema_v1_11_feature_relationshipprop()
  5151. * Purpose: To describe the structure of 'feature_relationshipprop' to tripal
  5152. * @see chado_insert_record()
  5153. * @see chado_update_record()
  5154. * @see chado_select_record()
  5155. *
  5156. * @return
  5157. * An array describing the 'feature_relationshipprop' table
  5158. *
  5159. * @ingroup tripal_chado_v1.11_schema_api
  5160. *
  5161. */
  5162. function tripal_chado_chado_schema_v1_11_feature_relationshipprop() {
  5163. $description = array(
  5164. 'table' => 'feature_relationshipprop',
  5165. 'fields' => array(
  5166. 'feature_relationshipprop_id' => array(
  5167. 'type' => 'serial',
  5168. 'not NULL' => '1',
  5169. ),
  5170. 'feature_relationship_id' => array(
  5171. 'type' => 'int',
  5172. 'not NULL' => '1',
  5173. ),
  5174. 'type_id' => array(
  5175. 'type' => 'int',
  5176. 'not NULL' => '1',
  5177. ),
  5178. 'value' => array(
  5179. 'type' => 'text',
  5180. 'not NULL' => '',
  5181. ),
  5182. 'rank' => array(
  5183. 'type' => 'int',
  5184. 'not NULL' => '1',
  5185. 'default' => '0',
  5186. ),
  5187. ),
  5188. 'primary key' => array(
  5189. 0 => 'feature_relationshipprop_id',
  5190. ),
  5191. 'unique keys' => array(
  5192. 'feature_relationshipprop_c1' => array(
  5193. 0 => 'feature_relationship_id',
  5194. 1 => 'type_id',
  5195. 2 => 'rank',
  5196. ),
  5197. ),
  5198. 'indexes' => array(
  5199. 'feature_relationshipprop_idx1' => array(
  5200. 0 => 'feature_relationship_id',
  5201. ),
  5202. 'feature_relationshipprop_idx2' => array(
  5203. 0 => 'type_id',
  5204. ),
  5205. ),
  5206. 'foreign keys' => array(
  5207. 'cvterm' => array(
  5208. 'table' => 'cvterm',
  5209. 'columns' => array(
  5210. 'type_id' => 'cvterm_id',
  5211. ),
  5212. ),
  5213. 'feature_relationship' => array(
  5214. 'table' => 'feature_relationship',
  5215. 'columns' => array(
  5216. 'feature_relationship_id' => 'feature_relationship_id',
  5217. ),
  5218. ),
  5219. ),
  5220. );
  5221. return $description;
  5222. }
  5223. /**
  5224. * Implements hook_chado_schema_v1_11_feature_relationshipprop_pub()
  5225. * Purpose: To describe the structure of 'feature_relationshipprop_pub' to tripal
  5226. * @see chado_insert_record()
  5227. * @see chado_update_record()
  5228. * @see chado_select_record()
  5229. *
  5230. * @return
  5231. * An array describing the 'feature_relationshipprop_pub' table
  5232. *
  5233. * @ingroup tripal_chado_v1.11_schema_api
  5234. *
  5235. */
  5236. function tripal_chado_chado_schema_v1_11_feature_relationshipprop_pub() {
  5237. $description = array(
  5238. 'table' => 'feature_relationshipprop_pub',
  5239. 'fields' => array(
  5240. 'feature_relationshipprop_pub_id' => array(
  5241. 'type' => 'serial',
  5242. 'not NULL' => '1',
  5243. ),
  5244. 'feature_relationshipprop_id' => array(
  5245. 'type' => 'int',
  5246. 'not NULL' => '1',
  5247. ),
  5248. 'pub_id' => array(
  5249. 'type' => 'int',
  5250. 'not NULL' => '1',
  5251. ),
  5252. ),
  5253. 'primary key' => array(
  5254. 0 => 'feature_relationshipprop_pub_id',
  5255. ),
  5256. 'unique keys' => array(
  5257. 'feature_relationshipprop_pub_c1' => array(
  5258. 0 => 'feature_relationshipprop_id',
  5259. 1 => 'pub_id',
  5260. ),
  5261. ),
  5262. 'indexes' => array(
  5263. 'feature_relationshipprop_pub_idx1' => array(
  5264. 0 => 'feature_relationshipprop_id',
  5265. ),
  5266. 'feature_relationshipprop_pub_idx2' => array(
  5267. 0 => 'pub_id',
  5268. ),
  5269. ),
  5270. 'foreign keys' => array(
  5271. 'feature_relationshipprop' => array(
  5272. 'table' => 'feature_relationshipprop',
  5273. 'columns' => array(
  5274. 'feature_relationshipprop_id' => 'feature_relationshipprop_id',
  5275. ),
  5276. ),
  5277. 'pub' => array(
  5278. 'table' => 'pub',
  5279. 'columns' => array(
  5280. 'pub_id' => 'pub_id',
  5281. ),
  5282. ),
  5283. ),
  5284. );
  5285. return $description;
  5286. }
  5287. /**
  5288. * Implements hook_chado_schema_v1_11_feature_synonym()
  5289. * Purpose: To describe the structure of 'feature_synonym' to tripal
  5290. * @see chado_insert_record()
  5291. * @see chado_update_record()
  5292. * @see chado_select_record()
  5293. *
  5294. * @return
  5295. * An array describing the 'feature_synonym' table
  5296. *
  5297. * @ingroup tripal_chado_v1.11_schema_api
  5298. *
  5299. */
  5300. function tripal_chado_chado_schema_v1_11_feature_synonym() {
  5301. $description = array(
  5302. 'table' => 'feature_synonym',
  5303. 'fields' => array(
  5304. 'feature_synonym_id' => array(
  5305. 'type' => 'serial',
  5306. 'not NULL' => '1',
  5307. ),
  5308. 'synonym_id' => array(
  5309. 'type' => 'int',
  5310. 'not NULL' => '1',
  5311. ),
  5312. 'feature_id' => array(
  5313. 'type' => 'int',
  5314. 'not NULL' => '1',
  5315. ),
  5316. 'pub_id' => array(
  5317. 'type' => 'int',
  5318. 'not NULL' => '1',
  5319. ),
  5320. 'is_current' => array(
  5321. 'type' => 'boolean',
  5322. 'not NULL' => '1',
  5323. 'default' => 'false',
  5324. ),
  5325. 'is_internal' => array(
  5326. 'type' => 'boolean',
  5327. 'not NULL' => '1',
  5328. 'default' => 'false',
  5329. ),
  5330. ),
  5331. 'primary key' => array(
  5332. 0 => 'feature_synonym_id',
  5333. ),
  5334. 'unique keys' => array(
  5335. 'feature_synonym_c1' => array(
  5336. 0 => 'synonym_id',
  5337. 1 => 'feature_id',
  5338. 2 => 'pub_id',
  5339. ),
  5340. ),
  5341. 'indexes' => array(
  5342. 'feature_synonym_idx1' => array(
  5343. 0 => 'synonym_id',
  5344. ),
  5345. 'feature_synonym_idx2' => array(
  5346. 0 => 'feature_id',
  5347. ),
  5348. 'feature_synonym_idx3' => array(
  5349. 0 => 'pub_id',
  5350. ),
  5351. ),
  5352. 'foreign keys' => array(
  5353. 'feature' => array(
  5354. 'table' => 'feature',
  5355. 'columns' => array(
  5356. 'feature_id' => 'feature_id',
  5357. ),
  5358. ),
  5359. 'synonym' => array(
  5360. 'table' => 'synonym',
  5361. 'columns' => array(
  5362. 'synonym_id' => 'synonym_id',
  5363. ),
  5364. ),
  5365. 'pub' => array(
  5366. 'table' => 'pub',
  5367. 'columns' => array(
  5368. 'pub_id' => 'pub_id',
  5369. ),
  5370. ),
  5371. ),
  5372. );
  5373. return $description;
  5374. }
  5375. /**
  5376. * Implements hook_chado_schema_v1_11_featureloc()
  5377. * Purpose: To describe the structure of 'featureloc' to tripal
  5378. * @see chado_insert_record()
  5379. * @see chado_update_record()
  5380. * @see chado_select_record()
  5381. *
  5382. * @return
  5383. * An array describing the 'featureloc' table
  5384. *
  5385. * @ingroup tripal_chado_v1.11_schema_api
  5386. *
  5387. */
  5388. function tripal_chado_chado_schema_v1_11_featureloc() {
  5389. $description = array(
  5390. 'table' => 'featureloc',
  5391. 'fields' => array(
  5392. 'featureloc_id' => array(
  5393. 'type' => 'serial',
  5394. 'not NULL' => '1',
  5395. ),
  5396. 'feature_id' => array(
  5397. 'type' => 'int',
  5398. 'not NULL' => '1',
  5399. ),
  5400. 'srcfeature_id' => array(
  5401. 'type' => 'int',
  5402. 'not NULL' => '',
  5403. ),
  5404. 'fmin' => array(
  5405. 'type' => 'int',
  5406. 'not NULL' => '',
  5407. ),
  5408. 'is_fmin_partial' => array(
  5409. 'type' => 'boolean',
  5410. 'not NULL' => '1',
  5411. 'default' => 'false',
  5412. ),
  5413. 'fmax' => array(
  5414. 'type' => 'int',
  5415. 'not NULL' => '',
  5416. ),
  5417. 'is_fmax_partial' => array(
  5418. 'type' => 'boolean',
  5419. 'not NULL' => '1',
  5420. 'default' => 'false',
  5421. ),
  5422. 'strand' => array(
  5423. 'type' => 'int',
  5424. 'size' => 'small',
  5425. 'not NULL' => '',
  5426. ),
  5427. 'phase' => array(
  5428. 'type' => 'int',
  5429. 'not NULL' => '',
  5430. ),
  5431. 'residue_info' => array(
  5432. 'type' => 'text',
  5433. 'not NULL' => '',
  5434. ),
  5435. 'locgroup' => array(
  5436. 'type' => 'int',
  5437. 'not NULL' => '1',
  5438. 'default' => '0',
  5439. ),
  5440. 'rank' => array(
  5441. 'type' => 'int',
  5442. 'not NULL' => '1',
  5443. 'default' => '0',
  5444. ),
  5445. ),
  5446. 'primary key' => array(
  5447. 0 => 'featureloc_id',
  5448. ),
  5449. 'unique keys' => array(
  5450. 'featureloc_c1' => array(
  5451. 0 => 'feature_id',
  5452. 1 => 'locgroup',
  5453. 2 => 'rank',
  5454. ),
  5455. ),
  5456. 'indexes' => array(
  5457. 'binloc_boxrange' => array(
  5458. 0 => 'fmin',
  5459. ),
  5460. 'binloc_boxrange_src' => array(
  5461. 0 => 'srcfeature_id',
  5462. 1 => 'fmin',
  5463. ),
  5464. 'featureloc_idx1' => array(
  5465. 0 => 'feature_id',
  5466. ),
  5467. 'featureloc_idx2' => array(
  5468. 0 => 'srcfeature_id',
  5469. ),
  5470. 'featureloc_idx3' => array(
  5471. 0 => 'srcfeature_id',
  5472. 1 => 'fmin',
  5473. 2 => 'fmax',
  5474. ),
  5475. ),
  5476. 'foreign keys' => array(
  5477. 'feature' => array(
  5478. 'table' => 'feature',
  5479. 'columns' => array(
  5480. 'feature_id' => 'feature_id',
  5481. 'srcfeature_id' => 'feature_id',
  5482. ),
  5483. ),
  5484. ),
  5485. 'referring_tables' => array(
  5486. 0 => 'analysisfeature',
  5487. 1 => 'featureloc_pub',
  5488. ),
  5489. );
  5490. return $description;
  5491. }
  5492. /**
  5493. * Implements hook_chado_schema_v1_11_featureloc_pub()
  5494. * Purpose: To describe the structure of 'featureloc_pub' to tripal
  5495. * @see chado_insert_record()
  5496. * @see chado_update_record()
  5497. * @see chado_select_record()
  5498. *
  5499. * @return
  5500. * An array describing the 'featureloc_pub' table
  5501. *
  5502. * @ingroup tripal_chado_v1.11_schema_api
  5503. *
  5504. */
  5505. function tripal_chado_chado_schema_v1_11_featureloc_pub() {
  5506. $description = array(
  5507. 'table' => 'featureloc_pub',
  5508. 'fields' => array(
  5509. 'featureloc_pub_id' => array(
  5510. 'type' => 'serial',
  5511. 'not NULL' => '1',
  5512. ),
  5513. 'featureloc_id' => array(
  5514. 'type' => 'int',
  5515. 'not NULL' => '1',
  5516. ),
  5517. 'pub_id' => array(
  5518. 'type' => 'int',
  5519. 'not NULL' => '1',
  5520. ),
  5521. ),
  5522. 'primary key' => array(
  5523. 0 => 'featureloc_pub_id',
  5524. ),
  5525. 'unique keys' => array(
  5526. 'featureloc_pub_c1' => array(
  5527. 0 => 'featureloc_id',
  5528. 1 => 'pub_id',
  5529. ),
  5530. ),
  5531. 'indexes' => array(
  5532. 'featureloc_pub_idx1' => array(
  5533. 0 => 'featureloc_id',
  5534. ),
  5535. 'featureloc_pub_idx2' => array(
  5536. 0 => 'pub_id',
  5537. ),
  5538. ),
  5539. 'foreign keys' => array(
  5540. 'pub' => array(
  5541. 'table' => 'pub',
  5542. 'columns' => array(
  5543. 'pub_id' => 'pub_id',
  5544. ),
  5545. ),
  5546. 'featureloc' => array(
  5547. 'table' => 'featureloc',
  5548. 'columns' => array(
  5549. 'featureloc_id' => 'featureloc_id',
  5550. ),
  5551. ),
  5552. ),
  5553. );
  5554. return $description;
  5555. }
  5556. /**
  5557. * Implements hook_chado_schema_v1_11_featuremap()
  5558. * Purpose: To describe the structure of 'featuremap' to tripal
  5559. * @see chado_insert_record()
  5560. * @see chado_update_record()
  5561. * @see chado_select_record()
  5562. *
  5563. * @return
  5564. * An array describing the 'featuremap' table
  5565. *
  5566. * @ingroup tripal_chado_v1.11_schema_api
  5567. *
  5568. */
  5569. function tripal_chado_chado_schema_v1_11_featuremap() {
  5570. $description = array(
  5571. 'table' => 'featuremap',
  5572. 'fields' => array(
  5573. 'featuremap_id' => array(
  5574. 'type' => 'serial',
  5575. 'not NULL' => '1',
  5576. ),
  5577. 'name' => array(
  5578. 'type' => 'varchar',
  5579. 'length' => '255',
  5580. 'not NULL' => '',
  5581. ),
  5582. 'description' => array(
  5583. 'type' => 'text',
  5584. 'not NULL' => '',
  5585. ),
  5586. 'unittype_id' => array(
  5587. 'type' => 'int',
  5588. 'not NULL' => '',
  5589. ),
  5590. ),
  5591. 'primary key' => array(
  5592. 0 => 'featuremap_id',
  5593. ),
  5594. 'unique keys' => array(
  5595. 'featuremap_c1' => array(
  5596. 0 => 'name',
  5597. ),
  5598. ),
  5599. 'indexes' => array(
  5600. ),
  5601. 'foreign keys' => array(
  5602. 'cvterm' => array(
  5603. 'table' => 'cvterm',
  5604. 'columns' => array(
  5605. 'unittype_id' => 'cvterm_id',
  5606. ),
  5607. ),
  5608. ),
  5609. );
  5610. return $description;
  5611. }
  5612. /**
  5613. * Implements hook_chado_schema_v1_11_featuremap_pub()
  5614. * Purpose: To describe the structure of 'featuremap_pub' to tripal
  5615. * @see chado_insert_record()
  5616. * @see chado_update_record()
  5617. * @see chado_select_record()
  5618. *
  5619. * @return
  5620. * An array describing the 'featuremap_pub' table
  5621. *
  5622. * @ingroup tripal_chado_v1.11_schema_api
  5623. *
  5624. */
  5625. function tripal_chado_chado_schema_v1_11_featuremap_pub() {
  5626. $description = array(
  5627. 'table' => 'featuremap_pub',
  5628. 'fields' => array(
  5629. 'featuremap_pub_id' => array(
  5630. 'type' => 'serial',
  5631. 'not NULL' => '1',
  5632. ),
  5633. 'featuremap_id' => array(
  5634. 'type' => 'int',
  5635. 'not NULL' => '1',
  5636. ),
  5637. 'pub_id' => array(
  5638. 'type' => 'int',
  5639. 'not NULL' => '1',
  5640. ),
  5641. ),
  5642. 'primary key' => array(
  5643. 0 => 'featuremap_pub_id',
  5644. ),
  5645. 'unique keys' => array(
  5646. ),
  5647. 'indexes' => array(
  5648. 'featuremap_pub_idx1' => array(
  5649. 0 => 'featuremap_id',
  5650. ),
  5651. 'featuremap_pub_idx2' => array(
  5652. 0 => 'pub_id',
  5653. ),
  5654. ),
  5655. 'foreign keys' => array(
  5656. 'pub' => array(
  5657. 'table' => 'pub',
  5658. 'columns' => array(
  5659. 'pub_id' => 'pub_id',
  5660. ),
  5661. ),
  5662. 'featuremap' => array(
  5663. 'table' => 'featuremap',
  5664. 'columns' => array(
  5665. 'featuremap_id' => 'featuremap_id',
  5666. ),
  5667. ),
  5668. ),
  5669. );
  5670. return $description;
  5671. }
  5672. /**
  5673. * Implements hook_chado_schema_v1_11_featurepos()
  5674. * Purpose: To describe the structure of 'featurepos' to tripal
  5675. * @see chado_insert_record()
  5676. * @see chado_update_record()
  5677. * @see chado_select_record()
  5678. *
  5679. * @return
  5680. * An array describing the 'featurepos' table
  5681. *
  5682. * @ingroup tripal_chado_v1.11_schema_api
  5683. *
  5684. */
  5685. function tripal_chado_chado_schema_v1_11_featurepos() {
  5686. $description = array(
  5687. 'table' => 'featurepos',
  5688. 'fields' => array(
  5689. 'featurepos_id' => array(
  5690. 'type' => 'serial',
  5691. 'not NULL' => '1',
  5692. ),
  5693. 'featuremap_id' => array(
  5694. 'type' => 'serial',
  5695. 'not NULL' => '1',
  5696. ),
  5697. 'feature_id' => array(
  5698. 'type' => 'int',
  5699. 'not NULL' => '1',
  5700. ),
  5701. 'map_feature_id' => array(
  5702. 'type' => 'int',
  5703. 'not NULL' => '1',
  5704. ),
  5705. 'mappos' => array(
  5706. 'type' => 'float',
  5707. 'size' => 'big',
  5708. 'not NULL' => '1',
  5709. ),
  5710. ),
  5711. 'primary key' => array(
  5712. 0 => 'featurepos_id',
  5713. ),
  5714. 'unique keys' => array(
  5715. ),
  5716. 'indexes' => array(
  5717. 'featurepos_idx1' => array(
  5718. 0 => 'featuremap_id',
  5719. ),
  5720. 'featurepos_idx2' => array(
  5721. 0 => 'feature_id',
  5722. ),
  5723. 'featurepos_idx3' => array(
  5724. 0 => 'map_feature_id',
  5725. ),
  5726. ),
  5727. 'foreign keys' => array(
  5728. 'feature' => array(
  5729. 'table' => 'feature',
  5730. 'columns' => array(
  5731. 'feature_id' => 'feature_id',
  5732. 'map_feature_id' => 'feature_id',
  5733. ),
  5734. ),
  5735. 'featuremap' => array(
  5736. 'table' => 'featuremap',
  5737. 'columns' => array(
  5738. 'featuremap_id' => 'featuremap_id',
  5739. ),
  5740. ),
  5741. ),
  5742. );
  5743. return $description;
  5744. }
  5745. /**
  5746. * Implements hook_chado_schema_v1_11_featureprop()
  5747. * Purpose: To describe the structure of 'featureprop' to tripal
  5748. * @see chado_insert_record()
  5749. * @see chado_update_record()
  5750. * @see chado_select_record()
  5751. *
  5752. * @return
  5753. * An array describing the 'featureprop' table
  5754. *
  5755. * @ingroup tripal_chado_v1.11_schema_api
  5756. *
  5757. */
  5758. function tripal_chado_chado_schema_v1_11_featureprop() {
  5759. $description = array(
  5760. 'table' => 'featureprop',
  5761. 'fields' => array(
  5762. 'featureprop_id' => array(
  5763. 'type' => 'serial',
  5764. 'not NULL' => '1',
  5765. ),
  5766. 'feature_id' => array(
  5767. 'type' => 'int',
  5768. 'not NULL' => '1',
  5769. ),
  5770. 'type_id' => array(
  5771. 'type' => 'int',
  5772. 'not NULL' => '1',
  5773. ),
  5774. 'value' => array(
  5775. 'type' => 'text',
  5776. 'not NULL' => '',
  5777. ),
  5778. 'rank' => array(
  5779. 'type' => 'int',
  5780. 'not NULL' => '1',
  5781. 'default' => '0',
  5782. ),
  5783. ),
  5784. 'primary key' => array(
  5785. 0 => 'featureprop_id',
  5786. ),
  5787. 'unique keys' => array(
  5788. 'featureprop_c1' => array(
  5789. 0 => 'feature_id',
  5790. 1 => 'type_id',
  5791. 2 => 'rank',
  5792. ),
  5793. ),
  5794. 'indexes' => array(
  5795. 'featureprop_idx1' => array(
  5796. 0 => 'feature_id',
  5797. ),
  5798. 'featureprop_idx2' => array(
  5799. 0 => 'type_id',
  5800. ),
  5801. ),
  5802. 'foreign keys' => array(
  5803. 'feature' => array(
  5804. 'table' => 'feature',
  5805. 'columns' => array(
  5806. 'feature_id' => 'feature_id',
  5807. ),
  5808. ),
  5809. 'cvterm' => array(
  5810. 'table' => 'cvterm',
  5811. 'columns' => array(
  5812. 'type_id' => 'cvterm_id',
  5813. ),
  5814. ),
  5815. ),
  5816. 'referring_tables' => array(
  5817. 0 => 'analysisfeature',
  5818. 1 => 'featureprop_pub',
  5819. ),
  5820. );
  5821. return $description;
  5822. }
  5823. /**
  5824. * Implements hook_chado_schema_v1_11_featureprop_pub()
  5825. * Purpose: To describe the structure of 'featureprop_pub' to tripal
  5826. * @see chado_insert_record()
  5827. * @see chado_update_record()
  5828. * @see chado_select_record()
  5829. *
  5830. * @return
  5831. * An array describing the 'featureprop_pub' table
  5832. *
  5833. * @ingroup tripal_chado_v1.11_schema_api
  5834. *
  5835. */
  5836. function tripal_chado_chado_schema_v1_11_featureprop_pub() {
  5837. $description = array(
  5838. 'table' => 'featureprop_pub',
  5839. 'fields' => array(
  5840. 'featureprop_pub_id' => array(
  5841. 'type' => 'serial',
  5842. 'not NULL' => '1',
  5843. ),
  5844. 'featureprop_id' => array(
  5845. 'type' => 'int',
  5846. 'not NULL' => '1',
  5847. ),
  5848. 'pub_id' => array(
  5849. 'type' => 'int',
  5850. 'not NULL' => '1',
  5851. ),
  5852. ),
  5853. 'primary key' => array(
  5854. 0 => 'featureprop_pub_id',
  5855. ),
  5856. 'unique keys' => array(
  5857. 'featureprop_pub_c1' => array(
  5858. 0 => 'featureprop_id',
  5859. 1 => 'pub_id',
  5860. ),
  5861. ),
  5862. 'indexes' => array(
  5863. 'featureprop_pub_idx1' => array(
  5864. 0 => 'featureprop_id',
  5865. ),
  5866. 'featureprop_pub_idx2' => array(
  5867. 0 => 'pub_id',
  5868. ),
  5869. ),
  5870. 'foreign keys' => array(
  5871. 'pub' => array(
  5872. 'table' => 'pub',
  5873. 'columns' => array(
  5874. 'pub_id' => 'pub_id',
  5875. ),
  5876. ),
  5877. 'featureprop' => array(
  5878. 'table' => 'featureprop',
  5879. 'columns' => array(
  5880. 'featureprop_id' => 'featureprop_id',
  5881. ),
  5882. ),
  5883. ),
  5884. );
  5885. return $description;
  5886. }
  5887. /**
  5888. * Implements hook_chado_schema_v1_11_featurerange()
  5889. * Purpose: To describe the structure of 'featurerange' to tripal
  5890. * @see chado_insert_record()
  5891. * @see chado_update_record()
  5892. * @see chado_select_record()
  5893. *
  5894. * @return
  5895. * An array describing the 'featurerange' table
  5896. *
  5897. * @ingroup tripal_chado_v1.11_schema_api
  5898. *
  5899. */
  5900. function tripal_chado_chado_schema_v1_11_featurerange() {
  5901. $description = array(
  5902. 'table' => 'featurerange',
  5903. 'fields' => array(
  5904. 'featurerange_id' => array(
  5905. 'type' => 'serial',
  5906. 'not NULL' => '1',
  5907. ),
  5908. 'featuremap_id' => array(
  5909. 'type' => 'int',
  5910. 'not NULL' => '1',
  5911. ),
  5912. 'feature_id' => array(
  5913. 'type' => 'int',
  5914. 'not NULL' => '1',
  5915. ),
  5916. 'leftstartf_id' => array(
  5917. 'type' => 'int',
  5918. 'not NULL' => '1',
  5919. ),
  5920. 'leftendf_id' => array(
  5921. 'type' => 'int',
  5922. 'not NULL' => '',
  5923. ),
  5924. 'rightstartf_id' => array(
  5925. 'type' => 'int',
  5926. 'not NULL' => '',
  5927. ),
  5928. 'rightendf_id' => array(
  5929. 'type' => 'int',
  5930. 'not NULL' => '1',
  5931. ),
  5932. 'rangestr' => array(
  5933. 'type' => 'varchar',
  5934. 'length' => '255',
  5935. 'not NULL' => '',
  5936. ),
  5937. ),
  5938. 'primary key' => array(
  5939. 0 => 'featurerange_id',
  5940. ),
  5941. 'unique keys' => array(
  5942. ),
  5943. 'indexes' => array(
  5944. 'featurerange_idx1' => array(
  5945. 0 => 'featuremap_id',
  5946. ),
  5947. 'featurerange_idx2' => array(
  5948. 0 => 'feature_id',
  5949. ),
  5950. 'featurerange_idx3' => array(
  5951. 0 => 'leftstartf_id',
  5952. ),
  5953. 'featurerange_idx4' => array(
  5954. 0 => 'leftendf_id',
  5955. ),
  5956. 'featurerange_idx5' => array(
  5957. 0 => 'rightstartf_id',
  5958. ),
  5959. 'featurerange_idx6' => array(
  5960. 0 => 'rightendf_id',
  5961. ),
  5962. ),
  5963. 'foreign keys' => array(
  5964. 'feature' => array(
  5965. 'table' => 'feature',
  5966. 'columns' => array(
  5967. 'feature_id' => 'feature_id',
  5968. 'leftstartf_id' => 'feature_id',
  5969. 'leftendf_id' => 'feature_id',
  5970. 'rightstartf_id' => 'feature_id',
  5971. 'rightendf_id' => 'feature_id',
  5972. ),
  5973. ),
  5974. 'featuremap' => array(
  5975. 'table' => 'featuremap',
  5976. 'columns' => array(
  5977. 'featuremap_id' => 'featuremap_id',
  5978. ),
  5979. ),
  5980. ),
  5981. );
  5982. return $description;
  5983. }
  5984. /**
  5985. * Implements hook_chado_schema_v1_11_genotype()
  5986. * Purpose: To describe the structure of 'genotype' to tripal
  5987. * @see chado_insert_record()
  5988. * @see chado_update_record()
  5989. * @see chado_select_record()
  5990. *
  5991. * @return
  5992. * An array describing the 'genotype' table
  5993. *
  5994. * @ingroup tripal_chado_v1.11_schema_api
  5995. *
  5996. */
  5997. function tripal_chado_chado_schema_v1_11_genotype() {
  5998. $description = array(
  5999. 'table' => 'genotype',
  6000. 'fields' => array(
  6001. 'genotype_id' => array(
  6002. 'type' => 'serial',
  6003. 'not NULL' => '1',
  6004. ),
  6005. 'name' => array(
  6006. 'type' => 'text',
  6007. 'not NULL' => '',
  6008. ),
  6009. 'uniquename' => array(
  6010. 'type' => 'text',
  6011. 'not NULL' => '1',
  6012. ),
  6013. 'description' => array(
  6014. 'type' => 'varchar',
  6015. 'length' => '255',
  6016. 'not NULL' => '',
  6017. ),
  6018. ),
  6019. 'primary key' => array(
  6020. 0 => 'genotype_id',
  6021. ),
  6022. 'unique keys' => array(
  6023. 'genotype_c1' => array(
  6024. 0 => 'uniquename',
  6025. ),
  6026. ),
  6027. 'indexes' => array(
  6028. 'genotype_idx1' => array(
  6029. 0 => 'uniquename',
  6030. ),
  6031. 'genotype_idx2' => array(
  6032. 0 => 'name',
  6033. ),
  6034. ),
  6035. 'foreign keys' => array(
  6036. ),
  6037. 'referring_tables' => array(
  6038. 'analysisfeature',
  6039. 'feature_genotype',
  6040. 'phendesc',
  6041. 'phenotype_comparison',
  6042. 'phenstatement',
  6043. 'stock_genotype',
  6044. )
  6045. );
  6046. return $description;
  6047. }
  6048. /**
  6049. * Implements hook_chado_schema_v1_11_library()
  6050. * Purpose: To describe the structure of 'library' to tripal
  6051. * @see chado_insert_record()
  6052. * @see chado_update_record()
  6053. * @see chado_select_record()
  6054. *
  6055. * @return
  6056. * An array describing the 'library' table
  6057. *
  6058. * @ingroup tripal_chado_v1.11_schema_api
  6059. *
  6060. */
  6061. function tripal_chado_chado_schema_v1_11_library() {
  6062. $description = array(
  6063. 'table' => 'library',
  6064. 'referring_tables' => array(
  6065. 0 => 'cell_line_library',
  6066. 1 => 'library_cvterm',
  6067. 2 => 'library_dbxref',
  6068. 3 => 'library_feature',
  6069. 4 => 'library_pub',
  6070. 5 => 'library_synonym',
  6071. 6 => 'libraryprop',
  6072. ),
  6073. 'fields' => array(
  6074. 'library_id' => array(
  6075. 'type' => 'serial',
  6076. 'not NULL' => '1',
  6077. ),
  6078. 'organism_id' => array(
  6079. 'type' => 'int',
  6080. 'not NULL' => '1',
  6081. ),
  6082. 'name' => array(
  6083. 'type' => 'varchar',
  6084. 'length' => '255',
  6085. 'not NULL' => '',
  6086. ),
  6087. 'uniquename' => array(
  6088. 'type' => 'text',
  6089. 'not NULL' => '1',
  6090. ),
  6091. 'type_id' => array(
  6092. 'type' => 'int',
  6093. 'not NULL' => '1',
  6094. ),
  6095. 'is_obsolete' => array(
  6096. 'type' => 'int',
  6097. 'not NULL' => '1',
  6098. 'default' => '0',
  6099. ),
  6100. 'timeaccessioned' => array(
  6101. 'type' => 'datetime',
  6102. 'not NULL' => '1',
  6103. 'default' => 'ow(',
  6104. ),
  6105. 'timelastmodified' => array(
  6106. 'type' => 'datetime',
  6107. 'not NULL' => '1',
  6108. 'default' => 'ow(',
  6109. ),
  6110. ),
  6111. 'primary key' => array(
  6112. 0 => 'library_id',
  6113. ),
  6114. 'unique keys' => array(
  6115. 'library_c1' => array(
  6116. 0 => 'organism_id',
  6117. 1 => 'uniquename',
  6118. 2 => 'type_id',
  6119. ),
  6120. ),
  6121. 'indexes' => array(
  6122. 'library_idx1' => array(
  6123. 0 => 'organism_id',
  6124. ),
  6125. 'library_idx2' => array(
  6126. 0 => 'type_id',
  6127. ),
  6128. 'library_idx3' => array(
  6129. 0 => 'uniquename',
  6130. ),
  6131. 'library_name_ind1' => array(
  6132. 0 => 'name',
  6133. ),
  6134. ),
  6135. 'foreign keys' => array(
  6136. 'cvterm' => array(
  6137. 'table' => 'cvterm',
  6138. 'columns' => array(
  6139. 'type_id' => 'cvterm_id',
  6140. ),
  6141. ),
  6142. 'organism' => array(
  6143. 'table' => 'organism',
  6144. 'columns' => array(
  6145. 'organism_id' => 'organism_id',
  6146. ),
  6147. ),
  6148. ),
  6149. );
  6150. return $description;
  6151. }
  6152. /**
  6153. * Implements hook_chado_schema_v1_11_library_cvterm()
  6154. * Purpose: To describe the structure of 'library_cvterm' to tripal
  6155. * @see chado_insert_record()
  6156. * @see chado_update_record()
  6157. * @see chado_select_record()
  6158. *
  6159. * @return
  6160. * An array describing the 'library_cvterm' table
  6161. *
  6162. * @ingroup tripal_chado_v1.11_schema_api
  6163. *
  6164. */
  6165. function tripal_chado_chado_schema_v1_11_library_cvterm() {
  6166. $description = array(
  6167. 'table' => 'library_cvterm',
  6168. 'fields' => array(
  6169. 'library_cvterm_id' => array(
  6170. 'type' => 'serial',
  6171. 'not NULL' => '1',
  6172. ),
  6173. 'library_id' => array(
  6174. 'type' => 'int',
  6175. 'not NULL' => '1',
  6176. ),
  6177. 'cvterm_id' => array(
  6178. 'type' => 'int',
  6179. 'not NULL' => '1',
  6180. ),
  6181. 'pub_id' => array(
  6182. 'type' => 'int',
  6183. 'not NULL' => '1',
  6184. ),
  6185. ),
  6186. 'primary key' => array(
  6187. 0 => 'library_cvterm_id',
  6188. ),
  6189. 'unique keys' => array(
  6190. 'library_cvterm_c1' => array(
  6191. 0 => 'library_id',
  6192. 1 => 'cvterm_id',
  6193. 2 => 'pub_id',
  6194. ),
  6195. ),
  6196. 'indexes' => array(
  6197. 'library_cvterm_idx1' => array(
  6198. 0 => 'library_id',
  6199. ),
  6200. 'library_cvterm_idx2' => array(
  6201. 0 => 'cvterm_id',
  6202. ),
  6203. 'library_cvterm_idx3' => array(
  6204. 0 => 'pub_id',
  6205. ),
  6206. ),
  6207. 'foreign keys' => array(
  6208. 'cvterm' => array(
  6209. 'table' => 'cvterm',
  6210. 'columns' => array(
  6211. 'cvterm_id' => 'cvterm_id',
  6212. ),
  6213. ),
  6214. 'pub' => array(
  6215. 'table' => 'pub',
  6216. 'columns' => array(
  6217. 'pub_id' => 'pub_id',
  6218. ),
  6219. ),
  6220. 'library' => array(
  6221. 'table' => 'library',
  6222. 'columns' => array(
  6223. 'library_id' => 'library_id',
  6224. ),
  6225. ),
  6226. ),
  6227. );
  6228. return $description;
  6229. }
  6230. /**
  6231. * Implements hook_chado_schema_v1_11_library_dbxref()
  6232. * Purpose: To describe the structure of 'library_dbxref' to tripal
  6233. * @see chado_insert_record()
  6234. * @see chado_update_record()
  6235. * @see chado_select_record()
  6236. *
  6237. * @return
  6238. * An array describing the 'library_dbxref' table
  6239. *
  6240. * @ingroup tripal_chado_v1.11_schema_api
  6241. *
  6242. */
  6243. function tripal_chado_chado_schema_v1_11_library_dbxref() {
  6244. $description = array(
  6245. 'table' => 'library_dbxref',
  6246. 'fields' => array(
  6247. 'library_dbxref_id' => array(
  6248. 'type' => 'serial',
  6249. 'not NULL' => '1',
  6250. ),
  6251. 'library_id' => array(
  6252. 'type' => 'int',
  6253. 'not NULL' => '1',
  6254. ),
  6255. 'dbxref_id' => array(
  6256. 'type' => 'int',
  6257. 'not NULL' => '1',
  6258. ),
  6259. 'is_current' => array(
  6260. 'type' => 'boolean',
  6261. 'not NULL' => '1',
  6262. 'default' => 'true',
  6263. ),
  6264. ),
  6265. 'primary key' => array(
  6266. 0 => 'library_dbxref_id',
  6267. ),
  6268. 'unique keys' => array(
  6269. 'library_dbxref_c1' => array(
  6270. 0 => 'library_id',
  6271. 1 => 'dbxref_id',
  6272. ),
  6273. ),
  6274. 'indexes' => array(
  6275. 'library_dbxref_idx1' => array(
  6276. 0 => 'library_id',
  6277. ),
  6278. 'library_dbxref_idx2' => array(
  6279. 0 => 'dbxref_id',
  6280. ),
  6281. ),
  6282. 'foreign keys' => array(
  6283. 'dbxref' => array(
  6284. 'table' => 'dbxref',
  6285. 'columns' => array(
  6286. 'dbxref_id' => 'dbxref_id',
  6287. ),
  6288. ),
  6289. 'library' => array(
  6290. 'table' => 'library',
  6291. 'columns' => array(
  6292. 'library_id' => 'library_id',
  6293. ),
  6294. ),
  6295. ),
  6296. );
  6297. return $description;
  6298. }
  6299. /**
  6300. * Implements hook_chado_schema_v1_11_library_feature()
  6301. * Purpose: To describe the structure of 'library_feature' to tripal
  6302. * @see chado_insert_record()
  6303. * @see chado_update_record()
  6304. * @see chado_select_record()
  6305. *
  6306. * @return
  6307. * An array describing the 'library_feature' table
  6308. *
  6309. * @ingroup tripal_chado_v1.11_schema_api
  6310. *
  6311. */
  6312. function tripal_chado_chado_schema_v1_11_library_feature() {
  6313. $description = array(
  6314. 'table' => 'library_feature',
  6315. 'fields' => array(
  6316. 'library_feature_id' => array(
  6317. 'type' => 'serial',
  6318. 'not NULL' => '1',
  6319. ),
  6320. 'library_id' => array(
  6321. 'type' => 'int',
  6322. 'not NULL' => '1',
  6323. ),
  6324. 'feature_id' => array(
  6325. 'type' => 'int',
  6326. 'not NULL' => '1',
  6327. ),
  6328. ),
  6329. 'primary key' => array(
  6330. 0 => 'library_feature_id',
  6331. ),
  6332. 'unique keys' => array(
  6333. 'library_feature_c1' => array(
  6334. 0 => 'library_id',
  6335. 1 => 'feature_id',
  6336. ),
  6337. ),
  6338. 'indexes' => array(
  6339. 'library_feature_idx1' => array(
  6340. 0 => 'library_id',
  6341. ),
  6342. 'library_feature_idx2' => array(
  6343. 0 => 'feature_id',
  6344. ),
  6345. ),
  6346. 'foreign keys' => array(
  6347. 'feature' => array(
  6348. 'table' => 'feature',
  6349. 'columns' => array(
  6350. 'feature_id' => 'feature_id',
  6351. ),
  6352. ),
  6353. 'library' => array(
  6354. 'table' => 'library',
  6355. 'columns' => array(
  6356. 'library_id' => 'library_id',
  6357. ),
  6358. ),
  6359. ),
  6360. );
  6361. return $description;
  6362. }
  6363. /**
  6364. * Implements hook_chado_schema_v1_11_library_pub()
  6365. * Purpose: To describe the structure of 'library_pub' to tripal
  6366. * @see chado_insert_record()
  6367. * @see chado_update_record()
  6368. * @see chado_select_record()
  6369. *
  6370. * @return
  6371. * An array describing the 'library_pub' table
  6372. *
  6373. * @ingroup tripal_chado_v1.11_schema_api
  6374. *
  6375. */
  6376. function tripal_chado_chado_schema_v1_11_library_pub() {
  6377. $description = array(
  6378. 'table' => 'library_pub',
  6379. 'fields' => array(
  6380. 'library_pub_id' => array(
  6381. 'type' => 'serial',
  6382. 'not NULL' => '1',
  6383. ),
  6384. 'library_id' => array(
  6385. 'type' => 'int',
  6386. 'not NULL' => '1',
  6387. ),
  6388. 'pub_id' => array(
  6389. 'type' => 'int',
  6390. 'not NULL' => '1',
  6391. ),
  6392. ),
  6393. 'primary key' => array(
  6394. 0 => 'library_pub_id',
  6395. ),
  6396. 'unique keys' => array(
  6397. 'library_pub_c1' => array(
  6398. 0 => 'library_id',
  6399. 1 => 'pub_id',
  6400. ),
  6401. ),
  6402. 'indexes' => array(
  6403. 'library_pub_idx1' => array(
  6404. 0 => 'library_id',
  6405. ),
  6406. 'library_pub_idx2' => array(
  6407. 0 => 'pub_id',
  6408. ),
  6409. ),
  6410. 'foreign keys' => array(
  6411. 'pub' => array(
  6412. 'table' => 'pub',
  6413. 'columns' => array(
  6414. 'pub_id' => 'pub_id',
  6415. ),
  6416. ),
  6417. 'library' => array(
  6418. 'table' => 'library',
  6419. 'columns' => array(
  6420. 'library_id' => 'library_id',
  6421. ),
  6422. ),
  6423. ),
  6424. );
  6425. return $description;
  6426. }
  6427. /**
  6428. * Implements hook_chado_schema_v1_11_library_synonym()
  6429. * Purpose: To describe the structure of 'library_synonym' to tripal
  6430. * @see chado_insert_record()
  6431. * @see chado_update_record()
  6432. * @see chado_select_record()
  6433. *
  6434. * @return
  6435. * An array describing the 'library_synonym' table
  6436. *
  6437. * @ingroup tripal_chado_v1.11_schema_api
  6438. *
  6439. */
  6440. function tripal_chado_chado_schema_v1_11_library_synonym() {
  6441. $description = array(
  6442. 'table' => 'library_synonym',
  6443. 'fields' => array(
  6444. 'library_synonym_id' => array(
  6445. 'type' => 'serial',
  6446. 'not NULL' => '1',
  6447. ),
  6448. 'synonym_id' => array(
  6449. 'type' => 'int',
  6450. 'not NULL' => '1',
  6451. ),
  6452. 'library_id' => array(
  6453. 'type' => 'int',
  6454. 'not NULL' => '1',
  6455. ),
  6456. 'pub_id' => array(
  6457. 'type' => 'int',
  6458. 'not NULL' => '1',
  6459. ),
  6460. 'is_current' => array(
  6461. 'type' => 'boolean',
  6462. 'not NULL' => '1',
  6463. 'default' => 'true',
  6464. ),
  6465. 'is_internal' => array(
  6466. 'type' => 'boolean',
  6467. 'not NULL' => '1',
  6468. 'default' => 'false',
  6469. ),
  6470. ),
  6471. 'primary key' => array(
  6472. 0 => 'library_synonym_id',
  6473. ),
  6474. 'unique keys' => array(
  6475. 'library_synonym_c1' => array(
  6476. 0 => 'synonym_id',
  6477. 1 => 'library_id',
  6478. 2 => 'pub_id',
  6479. ),
  6480. ),
  6481. 'indexes' => array(
  6482. 'library_synonym_idx1' => array(
  6483. 0 => 'synonym_id',
  6484. ),
  6485. 'library_synonym_idx2' => array(
  6486. 0 => 'library_id',
  6487. ),
  6488. 'library_synonym_idx3' => array(
  6489. 0 => 'pub_id',
  6490. ),
  6491. ),
  6492. 'foreign keys' => array(
  6493. 'pub' => array(
  6494. 'table' => 'pub',
  6495. 'columns' => array(
  6496. 'pub_id' => 'pub_id',
  6497. ),
  6498. ),
  6499. 'synonym' => array(
  6500. 'table' => 'synonym',
  6501. 'columns' => array(
  6502. 'synonym_id' => 'synonym_id',
  6503. ),
  6504. ),
  6505. 'library' => array(
  6506. 'table' => 'library',
  6507. 'columns' => array(
  6508. 'library_id' => 'library_id',
  6509. ),
  6510. ),
  6511. ),
  6512. );
  6513. return $description;
  6514. }
  6515. /**
  6516. * Implements hook_chado_schema_v1_11_libraryprop()
  6517. * Purpose: To describe the structure of 'libraryprop' to tripal
  6518. * @see chado_insert_record()
  6519. * @see chado_update_record()
  6520. * @see chado_select_record()
  6521. *
  6522. * @return
  6523. * An array describing the 'libraryprop' table
  6524. *
  6525. * @ingroup tripal_chado_v1.11_schema_api
  6526. *
  6527. */
  6528. function tripal_chado_chado_schema_v1_11_libraryprop() {
  6529. $description = array(
  6530. 'table' => 'libraryprop',
  6531. 'fields' => array(
  6532. 'libraryprop_id' => array(
  6533. 'type' => 'serial',
  6534. 'not NULL' => '1',
  6535. ),
  6536. 'library_id' => array(
  6537. 'type' => 'int',
  6538. 'not NULL' => '1',
  6539. ),
  6540. 'type_id' => array(
  6541. 'type' => 'int',
  6542. 'not NULL' => '1',
  6543. ),
  6544. 'value' => array(
  6545. 'type' => 'text',
  6546. 'not NULL' => '',
  6547. ),
  6548. 'rank' => array(
  6549. 'type' => 'int',
  6550. 'not NULL' => '1',
  6551. 'default' => '0',
  6552. ),
  6553. ),
  6554. 'primary key' => array(
  6555. 0 => 'libraryprop_id',
  6556. ),
  6557. 'unique keys' => array(
  6558. 'libraryprop_c1' => array(
  6559. 0 => 'library_id',
  6560. 1 => 'type_id',
  6561. 2 => 'rank',
  6562. ),
  6563. ),
  6564. 'indexes' => array(
  6565. 'libraryprop_idx1' => array(
  6566. 0 => 'library_id',
  6567. ),
  6568. 'libraryprop_idx2' => array(
  6569. 0 => 'type_id',
  6570. ),
  6571. ),
  6572. 'foreign keys' => array(
  6573. 'cvterm' => array(
  6574. 'table' => 'cvterm',
  6575. 'columns' => array(
  6576. 'type_id' => 'cvterm_id',
  6577. ),
  6578. ),
  6579. 'library' => array(
  6580. 'table' => 'library',
  6581. 'columns' => array(
  6582. 'library_id' => 'library_id',
  6583. ),
  6584. ),
  6585. ),
  6586. );
  6587. return $description;
  6588. }
  6589. /**
  6590. * Implements hook_chado_schema_v1_11_libraryprop_pub()
  6591. * Purpose: To describe the structure of 'libraryprop_pub' to tripal
  6592. * @see chado_insert_record()
  6593. * @see chado_update_record()
  6594. * @see chado_select_record()
  6595. *
  6596. * @return
  6597. * An array describing the 'libraryprop_pub' table
  6598. *
  6599. * @ingroup tripal_chado_v1.11_schema_api
  6600. *
  6601. */
  6602. function tripal_chado_chado_schema_v1_11_libraryprop_pub() {
  6603. $description = array(
  6604. 'table' => 'libraryprop_pub',
  6605. 'fields' => array(
  6606. 'libraryprop_pub_id' => array(
  6607. 'type' => 'serial',
  6608. 'not NULL' => '1',
  6609. ),
  6610. 'libraryprop_id' => array(
  6611. 'type' => 'int',
  6612. 'not NULL' => '1',
  6613. ),
  6614. 'pub_id' => array(
  6615. 'type' => 'int',
  6616. 'not NULL' => '1',
  6617. ),
  6618. ),
  6619. 'primary key' => array(
  6620. 0 => 'libraryprop_pub_id',
  6621. ),
  6622. 'unique keys' => array(
  6623. 'libraryprop_pub_c1' => array(
  6624. 0 => 'libraryprop_id',
  6625. 1 => 'pub_id',
  6626. ),
  6627. ),
  6628. 'indexes' => array(
  6629. 'libraryprop_pub_idx1' => array(
  6630. 0 => 'libraryprop_id',
  6631. ),
  6632. 'libraryprop_pub_idx2' => array(
  6633. 0 => 'pub_id',
  6634. ),
  6635. ),
  6636. 'foreign keys' => array(
  6637. 'pub' => array(
  6638. 'table' => 'pub',
  6639. 'columns' => array(
  6640. 'pub_id' => 'pub_id',
  6641. ),
  6642. ),
  6643. 'libraryprop' => array(
  6644. 'table' => 'libraryprop',
  6645. 'columns' => array(
  6646. 'libraryprop_id' => 'libraryprop_id',
  6647. ),
  6648. ),
  6649. ),
  6650. );
  6651. return $description;
  6652. }
  6653. /**
  6654. * Implements hook_chado_schema_v1_11_magedocumentation()
  6655. * Purpose: To describe the structure of 'magedocumentation' to tripal
  6656. * @see chado_insert_record()
  6657. * @see chado_update_record()
  6658. * @see chado_select_record()
  6659. *
  6660. * @return
  6661. * An array describing the 'magedocumentation' table
  6662. *
  6663. * @ingroup tripal_chado_v1.11_schema_api
  6664. *
  6665. */
  6666. function tripal_chado_chado_schema_v1_11_magedocumentation() {
  6667. $description = array(
  6668. 'table' => 'magedocumentation',
  6669. 'fields' => array(
  6670. 'magedocumentation_id' => array(
  6671. 'type' => 'serial',
  6672. 'not NULL' => '1',
  6673. ),
  6674. 'mageml_id' => array(
  6675. 'type' => 'int',
  6676. 'not NULL' => '1',
  6677. ),
  6678. 'tableinfo_id' => array(
  6679. 'type' => 'int',
  6680. 'not NULL' => '1',
  6681. ),
  6682. 'row_id' => array(
  6683. 'type' => 'int',
  6684. 'not NULL' => '1',
  6685. ),
  6686. 'mageidentifier' => array(
  6687. 'type' => 'text',
  6688. 'not NULL' => '1',
  6689. ),
  6690. ),
  6691. 'primary key' => array(
  6692. 0 => 'magedocumentation_id',
  6693. ),
  6694. 'unique keys' => array(
  6695. ),
  6696. 'indexes' => array(
  6697. 'magedocumentation_idx1' => array(
  6698. 0 => 'mageml_id',
  6699. ),
  6700. 'magedocumentation_idx2' => array(
  6701. 0 => 'tableinfo_id',
  6702. ),
  6703. 'magedocumentation_idx3' => array(
  6704. 0 => 'row_id',
  6705. ),
  6706. ),
  6707. 'foreign keys' => array(
  6708. 'tableinfo' => array(
  6709. 'table' => 'tableinfo',
  6710. 'columns' => array(
  6711. 'tableinfo_id' => 'tableinfo_id',
  6712. ),
  6713. ),
  6714. 'mageml' => array(
  6715. 'table' => 'mageml',
  6716. 'columns' => array(
  6717. 'mageml_id' => 'mageml_id',
  6718. ),
  6719. ),
  6720. ),
  6721. );
  6722. return $description;
  6723. }
  6724. /**
  6725. * Implements hook_chado_schema_v1_11_mageml()
  6726. * Purpose: To describe the structure of 'mageml' to tripal
  6727. * @see chado_insert_record()
  6728. * @see chado_update_record()
  6729. * @see chado_select_record()
  6730. *
  6731. * @return
  6732. * An array describing the 'mageml' table
  6733. *
  6734. * @ingroup tripal_chado_v1.11_schema_api
  6735. *
  6736. */
  6737. function tripal_chado_chado_schema_v1_11_mageml() {
  6738. $description = array(
  6739. 'table' => 'mageml',
  6740. 'fields' => array(
  6741. 'mageml_id' => array(
  6742. 'type' => 'serial',
  6743. 'not NULL' => '1',
  6744. ),
  6745. 'mage_package' => array(
  6746. 'type' => 'text',
  6747. 'not NULL' => '1',
  6748. ),
  6749. 'mage_ml' => array(
  6750. 'type' => 'text',
  6751. 'not NULL' => '1',
  6752. ),
  6753. ),
  6754. 'primary key' => array(
  6755. 0 => 'mageml_id',
  6756. ),
  6757. 'unique keys' => array(
  6758. ),
  6759. 'indexes' => array(
  6760. ),
  6761. 'foreign keys' => array(
  6762. ),
  6763. );
  6764. return $description;
  6765. }
  6766. /**
  6767. * Implements hook_chado_schema_v1_11_materialized_view()
  6768. * Purpose: To describe the structure of 'materialized_view' to tripal
  6769. * @see chado_insert_record()
  6770. * @see chado_update_record()
  6771. * @see chado_select_record()
  6772. *
  6773. * @return
  6774. * An array describing the 'materialized_view' table
  6775. *
  6776. * @ingroup tripal_chado_v1.11_schema_api
  6777. *
  6778. */
  6779. function tripal_chado_chado_schema_v1_11_materialized_view() {
  6780. $description = array(
  6781. 'table' => 'materialized_view',
  6782. 'fields' => array(
  6783. 'materialized_view_id' => array(
  6784. 'type' => 'serial',
  6785. 'not NULL' => '1',
  6786. ),
  6787. 'last_update' => array(
  6788. 'type' => 'datetime',
  6789. 'not NULL' => '',
  6790. ),
  6791. 'refresh_time' => array(
  6792. 'type' => 'int',
  6793. 'not NULL' => '',
  6794. ),
  6795. 'name' => array(
  6796. 'type' => 'varchar',
  6797. 'length' => '64',
  6798. 'not NULL' => '',
  6799. ),
  6800. 'mv_schema' => array(
  6801. 'type' => 'varchar',
  6802. 'length' => '64',
  6803. 'not NULL' => '',
  6804. ),
  6805. 'mv_table' => array(
  6806. 'type' => 'varchar',
  6807. 'length' => '128',
  6808. 'not NULL' => '',
  6809. ),
  6810. 'mv_specs' => array(
  6811. 'type' => 'text',
  6812. 'not NULL' => '',
  6813. ),
  6814. 'indexed' => array(
  6815. 'type' => 'text',
  6816. 'not NULL' => '',
  6817. ),
  6818. 'query' => array(
  6819. 'type' => 'text',
  6820. 'not NULL' => '',
  6821. ),
  6822. 'special_index' => array(
  6823. 'type' => 'text',
  6824. 'not NULL' => '',
  6825. ),
  6826. ),
  6827. 'primary key' => array(
  6828. ),
  6829. 'unique keys' => array(
  6830. 'name' => array(
  6831. 0 => 'name',
  6832. ),
  6833. ),
  6834. 'indexes' => array(
  6835. ),
  6836. 'foreign keys' => array(
  6837. ),
  6838. );
  6839. return $description;
  6840. }
  6841. /**
  6842. * Implements hook_chado_schema_v1_11_organism()
  6843. * Purpose: To describe the structure of 'organism' to tripal
  6844. * @see chado_insert_record()
  6845. * @see chado_update_record()
  6846. * @see chado_select_record()
  6847. *
  6848. * @return
  6849. * An array describing the 'organism' table
  6850. *
  6851. * @ingroup tripal_chado_v1.11_schema_api
  6852. *
  6853. */
  6854. function tripal_chado_chado_schema_v1_11_organism() {
  6855. $description = array(
  6856. 'table' => 'organism',
  6857. 'fields' => array(
  6858. 'organism_id' => array(
  6859. 'type' => 'serial',
  6860. 'not NULL' => '1',
  6861. ),
  6862. 'abbreviation' => array(
  6863. 'type' => 'varchar',
  6864. 'length' => '255',
  6865. 'not NULL' => '',
  6866. ),
  6867. 'genus' => array(
  6868. 'type' => 'varchar',
  6869. 'length' => '255',
  6870. 'not NULL' => '1',
  6871. ),
  6872. 'species' => array(
  6873. 'type' => 'varchar',
  6874. 'length' => '255',
  6875. 'not NULL' => '1',
  6876. ),
  6877. 'common_name' => array(
  6878. 'type' => 'varchar',
  6879. 'length' => '255',
  6880. 'not NULL' => '',
  6881. ),
  6882. 'comment' => array(
  6883. 'type' => 'text',
  6884. 'not NULL' => '',
  6885. ),
  6886. ),
  6887. 'primary key' => array(
  6888. 0 => 'organism_id',
  6889. ),
  6890. 'unique keys' => array(
  6891. 'organism_c1' => array(
  6892. 0 => 'genus',
  6893. 1 => 'species',
  6894. ),
  6895. ),
  6896. 'indexes' => array(
  6897. ),
  6898. 'foreign keys' => array(
  6899. ),
  6900. 'referring_tables' => array(
  6901. 0 => 'biomaterial',
  6902. 1 => 'feature',
  6903. 2 => 'library',
  6904. 3 => 'organism_dbxref',
  6905. 4 => 'organismprop',
  6906. 5 => 'phylonode_organism',
  6907. 6 => 'stock',
  6908. 7 => 'wwwuser_organism',
  6909. ),
  6910. );
  6911. return $description;
  6912. }
  6913. /**
  6914. * Implements hook_chado_schema_v1_11_organism_dbxref()
  6915. * Purpose: To describe the structure of 'organism_dbxref' to tripal
  6916. * @see chado_insert_record()
  6917. * @see chado_update_record()
  6918. * @see chado_select_record()
  6919. *
  6920. * @return
  6921. * An array describing the 'organism_dbxref' table
  6922. *
  6923. * @ingroup tripal_chado_v1.11_schema_api
  6924. *
  6925. */
  6926. function tripal_chado_chado_schema_v1_11_organism_dbxref() {
  6927. $description = array(
  6928. 'table' => 'organism_dbxref',
  6929. 'fields' => array(
  6930. 'organism_dbxref_id' => array(
  6931. 'type' => 'serial',
  6932. 'not NULL' => '1',
  6933. ),
  6934. 'organism_id' => array(
  6935. 'type' => 'int',
  6936. 'not NULL' => '1',
  6937. ),
  6938. 'dbxref_id' => array(
  6939. 'type' => 'int',
  6940. 'not NULL' => '1',
  6941. ),
  6942. ),
  6943. 'primary key' => array(
  6944. 0 => 'organism_dbxref_id',
  6945. ),
  6946. 'unique keys' => array(
  6947. 'organism_dbxref_c1' => array(
  6948. 0 => 'organism_id',
  6949. 1 => 'dbxref_id',
  6950. ),
  6951. ),
  6952. 'indexes' => array(
  6953. 'organism_dbxref_idx1' => array(
  6954. 0 => 'organism_id',
  6955. ),
  6956. 'organism_dbxref_idx2' => array(
  6957. 0 => 'dbxref_id',
  6958. ),
  6959. ),
  6960. 'foreign keys' => array(
  6961. 'dbxref' => array(
  6962. 'table' => 'dbxref',
  6963. 'columns' => array(
  6964. 'dbxref_id' => 'dbxref_id',
  6965. ),
  6966. ),
  6967. 'organism' => array(
  6968. 'table' => 'organism',
  6969. 'columns' => array(
  6970. 'organism_id' => 'organism_id',
  6971. ),
  6972. ),
  6973. ),
  6974. );
  6975. return $description;
  6976. }
  6977. /**
  6978. * Implements hook_chado_schema_v1_11_organismprop()
  6979. * Purpose: To describe the structure of 'organismprop' to tripal
  6980. * @see chado_insert_record()
  6981. * @see chado_update_record()
  6982. * @see chado_select_record()
  6983. *
  6984. * @return
  6985. * An array describing the 'organismprop' table
  6986. *
  6987. * @ingroup tripal_chado_v1.11_schema_api
  6988. *
  6989. */
  6990. function tripal_chado_chado_schema_v1_11_organismprop() {
  6991. $description = array(
  6992. 'table' => 'organismprop',
  6993. 'fields' => array(
  6994. 'organismprop_id' => array(
  6995. 'type' => 'serial',
  6996. 'not NULL' => '1',
  6997. ),
  6998. 'organism_id' => array(
  6999. 'type' => 'int',
  7000. 'not NULL' => '1',
  7001. ),
  7002. 'type_id' => array(
  7003. 'type' => 'int',
  7004. 'not NULL' => '1',
  7005. ),
  7006. 'value' => array(
  7007. 'type' => 'text',
  7008. 'not NULL' => '',
  7009. ),
  7010. 'rank' => array(
  7011. 'type' => 'int',
  7012. 'not NULL' => '1',
  7013. 'default' => '0',
  7014. ),
  7015. ),
  7016. 'primary key' => array(
  7017. 0 => 'organismprop_id',
  7018. ),
  7019. 'unique keys' => array(
  7020. 'organismprop_c1' => array(
  7021. 0 => 'organism_id',
  7022. 1 => 'type_id',
  7023. 2 => 'rank',
  7024. ),
  7025. ),
  7026. 'indexes' => array(
  7027. 'organismprop_idx1' => array(
  7028. 0 => 'organism_id',
  7029. ),
  7030. 'organismprop_idx2' => array(
  7031. 0 => 'type_id',
  7032. ),
  7033. ),
  7034. 'foreign keys' => array(
  7035. 'cvterm' => array(
  7036. 'table' => 'cvterm',
  7037. 'columns' => array(
  7038. 'type_id' => 'cvterm_id',
  7039. ),
  7040. ),
  7041. 'organism' => array(
  7042. 'table' => 'organism',
  7043. 'columns' => array(
  7044. 'organism_id' => 'organism_id',
  7045. ),
  7046. ),
  7047. ),
  7048. );
  7049. return $description;
  7050. }
  7051. /**
  7052. * Implements hook_chado_schema_v1_11_phendesc()
  7053. * Purpose: To describe the structure of 'phendesc' to tripal
  7054. * @see chado_insert_record()
  7055. * @see chado_update_record()
  7056. * @see chado_select_record()
  7057. *
  7058. * @return
  7059. * An array describing the 'phendesc' table
  7060. *
  7061. * @ingroup tripal_chado_v1.11_schema_api
  7062. *
  7063. */
  7064. function tripal_chado_chado_schema_v1_11_phendesc() {
  7065. $description = array(
  7066. 'table' => 'phendesc',
  7067. 'fields' => array(
  7068. 'phendesc_id' => array(
  7069. 'type' => 'serial',
  7070. 'not NULL' => '1',
  7071. ),
  7072. 'genotype_id' => array(
  7073. 'type' => 'int',
  7074. 'not NULL' => '1',
  7075. ),
  7076. 'environment_id' => array(
  7077. 'type' => 'int',
  7078. 'not NULL' => '1',
  7079. ),
  7080. 'description' => array(
  7081. 'type' => 'text',
  7082. 'not NULL' => '1',
  7083. ),
  7084. 'type_id' => array(
  7085. 'type' => 'int',
  7086. 'not NULL' => '1',
  7087. ),
  7088. 'pub_id' => array(
  7089. 'type' => 'int',
  7090. 'not NULL' => '1',
  7091. ),
  7092. ),
  7093. 'primary key' => array(
  7094. 0 => 'phendesc_id',
  7095. ),
  7096. 'unique keys' => array(
  7097. 'phendesc_c1' => array(
  7098. 0 => 'genotype_id',
  7099. 1 => 'environment_id',
  7100. 2 => 'type_id',
  7101. 3 => 'pub_id',
  7102. ),
  7103. ),
  7104. 'indexes' => array(
  7105. 'phendesc_idx1' => array(
  7106. 0 => 'genotype_id',
  7107. ),
  7108. 'phendesc_idx2' => array(
  7109. 0 => 'environment_id',
  7110. ),
  7111. 'phendesc_idx3' => array(
  7112. 0 => 'pub_id',
  7113. ),
  7114. ),
  7115. 'foreign keys' => array(
  7116. 'cvterm' => array(
  7117. 'table' => 'cvterm',
  7118. 'columns' => array(
  7119. 'type_id' => 'cvterm_id',
  7120. ),
  7121. ),
  7122. 'pub' => array(
  7123. 'table' => 'pub',
  7124. 'columns' => array(
  7125. 'pub_id' => 'pub_id',
  7126. ),
  7127. ),
  7128. 'genotype' => array(
  7129. 'table' => 'genotype',
  7130. 'columns' => array(
  7131. 'genotype_id' => 'genotype_id',
  7132. ),
  7133. ),
  7134. 'environment' => array(
  7135. 'table' => 'environment',
  7136. 'columns' => array(
  7137. 'environment_id' => 'environment_id',
  7138. ),
  7139. ),
  7140. ),
  7141. );
  7142. return $description;
  7143. }
  7144. /**
  7145. * Implements hook_chado_schema_v1_11_phenotype()
  7146. * Purpose: To describe the structure of 'phenotype' to tripal
  7147. * @see chado_insert_record()
  7148. * @see chado_update_record()
  7149. * @see chado_select_record()
  7150. *
  7151. * @return
  7152. * An array describing the 'phenotype' table
  7153. *
  7154. * @ingroup tripal_chado_v1.11_schema_api
  7155. *
  7156. */
  7157. function tripal_chado_chado_schema_v1_11_phenotype() {
  7158. $description = array(
  7159. 'table' => 'phenotype',
  7160. 'fields' => array(
  7161. 'phenotype_id' => array(
  7162. 'type' => 'serial',
  7163. 'not NULL' => '1',
  7164. ),
  7165. 'uniquename' => array(
  7166. 'type' => 'text',
  7167. 'not NULL' => '1',
  7168. ),
  7169. 'observable_id' => array(
  7170. 'type' => 'int',
  7171. 'not NULL' => '',
  7172. ),
  7173. 'attr_id' => array(
  7174. 'type' => 'int',
  7175. 'not NULL' => '',
  7176. ),
  7177. 'value' => array(
  7178. 'type' => 'text',
  7179. 'not NULL' => '',
  7180. ),
  7181. 'cvalue_id' => array(
  7182. 'type' => 'int',
  7183. 'not NULL' => '',
  7184. ),
  7185. 'assay_id' => array(
  7186. 'type' => 'int',
  7187. 'not NULL' => '',
  7188. ),
  7189. ),
  7190. 'primary key' => array(
  7191. 0 => 'phenotype_id',
  7192. ),
  7193. 'unique keys' => array(
  7194. 'phenotype_c1' => array(
  7195. 0 => 'uniquename',
  7196. ),
  7197. ),
  7198. 'indexes' => array(
  7199. 'phenotype_idx1' => array(
  7200. 0 => 'cvalue_id',
  7201. ),
  7202. 'phenotype_idx2' => array(
  7203. 0 => 'observable_id',
  7204. ),
  7205. 'phenotype_idx3' => array(
  7206. 0 => 'attr_id',
  7207. ),
  7208. ),
  7209. 'foreign keys' => array(
  7210. 'cvterm' => array(
  7211. 'table' => 'cvterm',
  7212. 'columns' => array(
  7213. 'observable_id' => 'cvterm_id',
  7214. 'attr_id' => 'cvterm_id',
  7215. 'cvalue_id' => 'cvterm_id',
  7216. 'assay_id' => 'cvterm_id',
  7217. ),
  7218. ),
  7219. ),
  7220. );
  7221. return $description;
  7222. }
  7223. /**
  7224. * Implements hook_chado_schema_v1_11_phenotype_comparison()
  7225. * Purpose: To describe the structure of 'phenotype_comparison' to tripal
  7226. * @see chado_insert_record()
  7227. * @see chado_update_record()
  7228. * @see chado_select_record()
  7229. *
  7230. * @return
  7231. * An array describing the 'phenotype_comparison' table
  7232. *
  7233. * @ingroup tripal_chado_v1.11_schema_api
  7234. *
  7235. */
  7236. function tripal_chado_chado_schema_v1_11_phenotype_comparison() {
  7237. $description = array(
  7238. 'table' => 'phenotype_comparison',
  7239. 'fields' => array(
  7240. 'phenotype_comparison_id' => array(
  7241. 'type' => 'serial',
  7242. 'not NULL' => '1',
  7243. ),
  7244. 'genotype1_id' => array(
  7245. 'type' => 'int',
  7246. 'not NULL' => '1',
  7247. ),
  7248. 'environment1_id' => array(
  7249. 'type' => 'int',
  7250. 'not NULL' => '1',
  7251. ),
  7252. 'genotype2_id' => array(
  7253. 'type' => 'int',
  7254. 'not NULL' => '1',
  7255. ),
  7256. 'environment2_id' => array(
  7257. 'type' => 'int',
  7258. 'not NULL' => '1',
  7259. ),
  7260. 'phenotype1_id' => array(
  7261. 'type' => 'int',
  7262. 'not NULL' => '1',
  7263. ),
  7264. 'phenotype2_id' => array(
  7265. 'type' => 'int',
  7266. 'not NULL' => '',
  7267. ),
  7268. 'pub_id' => array(
  7269. 'type' => 'int',
  7270. 'not NULL' => '1',
  7271. ),
  7272. 'organism_id' => array(
  7273. 'type' => 'int',
  7274. 'not NULL' => '1',
  7275. ),
  7276. ),
  7277. 'primary key' => array(
  7278. 0 => 'phenotype_comparison_id',
  7279. ),
  7280. 'unique keys' => array(
  7281. 'phenotype_comparison_c1' => array(
  7282. 0 => 'genotype1_id',
  7283. 1 => 'environment1_id',
  7284. 2 => 'genotype2_id',
  7285. 3 => 'environment2_id',
  7286. 4 => 'phenotype1_id',
  7287. 5 => 'pub_id',
  7288. ),
  7289. ),
  7290. 'indexes' => array(
  7291. 'phenotype_comparison_idx1' => array(
  7292. 0 => 'genotype1_id',
  7293. ),
  7294. 'phenotype_comparison_idx2' => array(
  7295. 0 => 'genotype2_id',
  7296. ),
  7297. 'phenotype_comparison_idx4' => array(
  7298. 0 => 'pub_id',
  7299. ),
  7300. ),
  7301. 'foreign keys' => array(
  7302. 'pub' => array(
  7303. 'table' => 'pub',
  7304. 'columns' => array(
  7305. 'pub_id' => 'pub_id',
  7306. ),
  7307. ),
  7308. 'organism' => array(
  7309. 'table' => 'organism',
  7310. 'columns' => array(
  7311. 'organism_id' => 'organism_id',
  7312. ),
  7313. ),
  7314. 'phenotype' => array(
  7315. 'table' => 'phenotype',
  7316. 'columns' => array(
  7317. 'phenotype1_id' => 'phenotype_id',
  7318. 'phenotype2_id' => 'phenotype_id',
  7319. ),
  7320. ),
  7321. 'genotype' => array(
  7322. 'table' => 'genotype',
  7323. 'columns' => array(
  7324. 'genotype1_id' => 'genotype_id',
  7325. 'genotype2_id' => 'genotype_id',
  7326. ),
  7327. ),
  7328. 'environment' => array(
  7329. 'table' => 'environment',
  7330. 'columns' => array(
  7331. 'environment1_id' => 'environment_id',
  7332. 'environment2_id' => 'environment_id',
  7333. ),
  7334. ),
  7335. ),
  7336. );
  7337. return $description;
  7338. }
  7339. /**
  7340. * Implements hook_chado_schema_v1_11_phenotype_comparison_cvterm()
  7341. * Purpose: To describe the structure of 'phenotype_comparison_cvterm' to tripal
  7342. * @see chado_insert_record()
  7343. * @see chado_update_record()
  7344. * @see chado_select_record()
  7345. *
  7346. * @return
  7347. * An array describing the 'phenotype_comparison_cvterm' table
  7348. *
  7349. * @ingroup tripal_chado_v1.11_schema_api
  7350. *
  7351. */
  7352. function tripal_chado_chado_schema_v1_11_phenotype_comparison_cvterm() {
  7353. $description = array(
  7354. 'table' => 'phenotype_comparison_cvterm',
  7355. 'fields' => array(
  7356. 'phenotype_comparison_cvterm_id' => array(
  7357. 'type' => 'serial',
  7358. 'not NULL' => '1',
  7359. ),
  7360. 'phenotype_comparison_id' => array(
  7361. 'type' => 'int',
  7362. 'not NULL' => '1',
  7363. ),
  7364. 'cvterm_id' => array(
  7365. 'type' => 'int',
  7366. 'not NULL' => '1',
  7367. ),
  7368. 'pub_id' => array(
  7369. 'type' => 'int',
  7370. 'not NULL' => '1',
  7371. ),
  7372. 'rank' => array(
  7373. 'type' => 'int',
  7374. 'not NULL' => '1',
  7375. 'default' => '0',
  7376. ),
  7377. ),
  7378. 'primary key' => array(
  7379. 0 => 'phenotype_comparison_cvterm_id',
  7380. ),
  7381. 'unique keys' => array(
  7382. 'phenotype_comparison_cvterm_c1' => array(
  7383. 0 => 'phenotype_comparison_id',
  7384. 1 => 'cvterm_id',
  7385. ),
  7386. ),
  7387. 'indexes' => array(
  7388. 'phenotype_comparison_cvterm_idx1' => array(
  7389. 0 => 'phenotype_comparison_id',
  7390. ),
  7391. 'phenotype_comparison_cvterm_idx2' => array(
  7392. 0 => 'cvterm_id',
  7393. ),
  7394. ),
  7395. 'foreign keys' => array(
  7396. 'cvterm' => array(
  7397. 'table' => 'cvterm',
  7398. 'columns' => array(
  7399. 'cvterm_id' => 'cvterm_id',
  7400. ),
  7401. ),
  7402. 'pub' => array(
  7403. 'table' => 'pub',
  7404. 'columns' => array(
  7405. 'pub_id' => 'pub_id',
  7406. ),
  7407. ),
  7408. 'phenotype_comparison' => array(
  7409. 'table' => 'phenotype_comparison',
  7410. 'columns' => array(
  7411. 'phenotype_comparison_id' => 'phenotype_comparison_id',
  7412. ),
  7413. ),
  7414. ),
  7415. );
  7416. return $description;
  7417. }
  7418. /**
  7419. * Implements hook_chado_schema_v1_11_phenotype_cvterm()
  7420. * Purpose: To describe the structure of 'phenotype_cvterm' to tripal
  7421. * @see chado_insert_record()
  7422. * @see chado_update_record()
  7423. * @see chado_select_record()
  7424. *
  7425. * @return
  7426. * An array describing the 'phenotype_cvterm' table
  7427. *
  7428. * @ingroup tripal_chado_v1.11_schema_api
  7429. *
  7430. */
  7431. function tripal_chado_chado_schema_v1_11_phenotype_cvterm() {
  7432. $description = array(
  7433. 'table' => 'phenotype_cvterm',
  7434. 'fields' => array(
  7435. 'phenotype_cvterm_id' => array(
  7436. 'type' => 'serial',
  7437. 'not NULL' => '1',
  7438. ),
  7439. 'phenotype_id' => array(
  7440. 'type' => 'int',
  7441. 'not NULL' => '1',
  7442. ),
  7443. 'cvterm_id' => array(
  7444. 'type' => 'int',
  7445. 'not NULL' => '1',
  7446. ),
  7447. 'rank' => array(
  7448. 'type' => 'int',
  7449. 'not NULL' => '1',
  7450. 'default' => '0',
  7451. ),
  7452. ),
  7453. 'primary key' => array(
  7454. 0 => 'phenotype_cvterm_id',
  7455. ),
  7456. 'unique keys' => array(
  7457. 'phenotype_cvterm_c1' => array(
  7458. 0 => 'phenotype_id',
  7459. 1 => 'cvterm_id',
  7460. 2 => 'rank',
  7461. ),
  7462. ),
  7463. 'indexes' => array(
  7464. 'phenotype_cvterm_idx1' => array(
  7465. 0 => 'phenotype_id',
  7466. ),
  7467. 'phenotype_cvterm_idx2' => array(
  7468. 0 => 'cvterm_id',
  7469. ),
  7470. ),
  7471. 'foreign keys' => array(
  7472. 'cvterm' => array(
  7473. 'table' => 'cvterm',
  7474. 'columns' => array(
  7475. 'cvterm_id' => 'cvterm_id',
  7476. ),
  7477. ),
  7478. 'phenotype' => array(
  7479. 'table' => 'phenotype',
  7480. 'columns' => array(
  7481. 'phenotype_id' => 'phenotype_id',
  7482. ),
  7483. ),
  7484. ),
  7485. );
  7486. return $description;
  7487. }
  7488. /**
  7489. * Implements hook_chado_schema_v1_11_phenstatement()
  7490. * Purpose: To describe the structure of 'phenstatement' to tripal
  7491. * @see chado_insert_record()
  7492. * @see chado_update_record()
  7493. * @see chado_select_record()
  7494. *
  7495. * @return
  7496. * An array describing the 'phenstatement' table
  7497. *
  7498. * @ingroup tripal_chado_v1.11_schema_api
  7499. *
  7500. */
  7501. function tripal_chado_chado_schema_v1_11_phenstatement() {
  7502. $description = array(
  7503. 'table' => 'phenstatement',
  7504. 'fields' => array(
  7505. 'phenstatement_id' => array(
  7506. 'type' => 'serial',
  7507. 'not NULL' => '1',
  7508. ),
  7509. 'genotype_id' => array(
  7510. 'type' => 'int',
  7511. 'not NULL' => '1',
  7512. ),
  7513. 'environment_id' => array(
  7514. 'type' => 'int',
  7515. 'not NULL' => '1',
  7516. ),
  7517. 'phenotype_id' => array(
  7518. 'type' => 'int',
  7519. 'not NULL' => '1',
  7520. ),
  7521. 'type_id' => array(
  7522. 'type' => 'int',
  7523. 'not NULL' => '1',
  7524. ),
  7525. 'pub_id' => array(
  7526. 'type' => 'int',
  7527. 'not NULL' => '1',
  7528. ),
  7529. ),
  7530. 'primary key' => array(
  7531. 0 => 'phenstatement_id',
  7532. ),
  7533. 'unique keys' => array(
  7534. 'phenstatement_c1' => array(
  7535. 0 => 'genotype_id',
  7536. 1 => 'phenotype_id',
  7537. 2 => 'environment_id',
  7538. 3 => 'type_id',
  7539. 4 => 'pub_id',
  7540. ),
  7541. ),
  7542. 'indexes' => array(
  7543. 'phenstatement_idx1' => array(
  7544. 0 => 'genotype_id',
  7545. ),
  7546. 'phenstatement_idx2' => array(
  7547. 0 => 'phenotype_id',
  7548. ),
  7549. ),
  7550. 'foreign keys' => array(
  7551. 'cvterm' => array(
  7552. 'table' => 'cvterm',
  7553. 'columns' => array(
  7554. 'type_id' => 'cvterm_id',
  7555. ),
  7556. ),
  7557. 'pub' => array(
  7558. 'table' => 'pub',
  7559. 'columns' => array(
  7560. 'pub_id' => 'pub_id',
  7561. ),
  7562. ),
  7563. 'phenotype' => array(
  7564. 'table' => 'phenotype',
  7565. 'columns' => array(
  7566. 'phenotype_id' => 'phenotype_id',
  7567. ),
  7568. ),
  7569. 'genotype' => array(
  7570. 'table' => 'genotype',
  7571. 'columns' => array(
  7572. 'genotype_id' => 'genotype_id',
  7573. ),
  7574. ),
  7575. 'environment' => array(
  7576. 'table' => 'environment',
  7577. 'columns' => array(
  7578. 'environment_id' => 'environment_id',
  7579. ),
  7580. ),
  7581. ),
  7582. );
  7583. return $description;
  7584. }
  7585. /**
  7586. * Implements hook_chado_schema_v1_11_phylonode()
  7587. * Purpose: To describe the structure of 'phylonode' to tripal
  7588. * @see chado_insert_record()
  7589. * @see chado_update_record()
  7590. * @see chado_select_record()
  7591. *
  7592. * @return
  7593. * An array describing the 'phylonode' table
  7594. *
  7595. * @ingroup tripal_chado_v1.11_schema_api
  7596. *
  7597. */
  7598. function tripal_chado_chado_schema_v1_11_phylonode() {
  7599. $description = array(
  7600. 'table' => 'phylonode',
  7601. 'fields' => array(
  7602. 'phylonode_id' => array(
  7603. 'type' => 'serial',
  7604. 'not NULL' => '1',
  7605. ),
  7606. 'phylotree_id' => array(
  7607. 'type' => 'int',
  7608. 'not NULL' => '1',
  7609. ),
  7610. 'parent_phylonode_id' => array(
  7611. 'type' => 'int',
  7612. 'not NULL' => '',
  7613. ),
  7614. 'left_idx' => array(
  7615. 'type' => 'int',
  7616. 'not NULL' => '1',
  7617. ),
  7618. 'right_idx' => array(
  7619. 'type' => 'int',
  7620. 'not NULL' => '1',
  7621. ),
  7622. 'type_id' => array(
  7623. 'type' => 'int',
  7624. 'not NULL' => '',
  7625. ),
  7626. 'feature_id' => array(
  7627. 'type' => 'int',
  7628. 'not NULL' => '',
  7629. ),
  7630. 'label' => array(
  7631. 'type' => 'varchar',
  7632. 'length' => '255',
  7633. 'not NULL' => '',
  7634. ),
  7635. 'distance' => array(
  7636. 'type' => 'float',
  7637. 'size' => 'big',
  7638. 'not NULL' => '',
  7639. ),
  7640. ),
  7641. 'primary key' => array(
  7642. 0 => 'phylonode_id',
  7643. ),
  7644. 'unique keys' => array(
  7645. 'phylotree_id' => array(
  7646. 0 => 'phylotree_id',
  7647. 1 => 'left_idx',
  7648. ),
  7649. 'phylonode_phylotree_id_key1' => array(
  7650. 0 => 'phylotree_id',
  7651. 1 => 'right_idx',
  7652. ),
  7653. ),
  7654. 'indexes' => array(
  7655. ),
  7656. 'foreign keys' => array(
  7657. 'cvterm' => array(
  7658. 'table' => 'cvterm',
  7659. 'columns' => array(
  7660. 'type_id' => 'cvterm_id',
  7661. ),
  7662. ),
  7663. 'feature' => array(
  7664. 'table' => 'feature',
  7665. 'columns' => array(
  7666. 'feature_id' => 'feature_id',
  7667. ),
  7668. ),
  7669. 'phylotree' => array(
  7670. 'table' => 'phylotree',
  7671. 'columns' => array(
  7672. 'phylotree_id' => 'phylotree_id',
  7673. ),
  7674. ),
  7675. 'phylonode' => array(
  7676. 'table' => 'phylonode',
  7677. 'columns' => array(
  7678. 'parent_phylonode_id' => 'phylonode_id',
  7679. ),
  7680. ),
  7681. ),
  7682. );
  7683. return $description;
  7684. }
  7685. /**
  7686. * Implements hook_chado_schema_v1_11_phylonode_dbxref()
  7687. * Purpose: To describe the structure of 'phylonode_dbxref' to tripal
  7688. * @see chado_insert_record()
  7689. * @see chado_update_record()
  7690. * @see chado_select_record()
  7691. *
  7692. * @return
  7693. * An array describing the 'phylonode_dbxref' table
  7694. *
  7695. * @ingroup tripal_chado_v1.11_schema_api
  7696. *
  7697. */
  7698. function tripal_chado_chado_schema_v1_11_phylonode_dbxref() {
  7699. $description = array(
  7700. 'table' => 'phylonode_dbxref',
  7701. 'fields' => array(
  7702. 'phylonode_dbxref_id' => array(
  7703. 'type' => 'serial',
  7704. 'not NULL' => '1',
  7705. ),
  7706. 'phylonode_id' => array(
  7707. 'type' => 'int',
  7708. 'not NULL' => '1',
  7709. ),
  7710. 'dbxref_id' => array(
  7711. 'type' => 'int',
  7712. 'not NULL' => '1',
  7713. ),
  7714. ),
  7715. 'primary key' => array(
  7716. 0 => 'phylonode_dbxref_id',
  7717. ),
  7718. 'unique keys' => array(
  7719. 'phylonode_id' => array(
  7720. 0 => 'phylonode_id',
  7721. 1 => 'dbxref_id',
  7722. ),
  7723. ),
  7724. 'indexes' => array(
  7725. 'phylonode_dbxref_idx1' => array(
  7726. 0 => 'phylonode_id',
  7727. ),
  7728. 'phylonode_dbxref_idx2' => array(
  7729. 0 => 'dbxref_id',
  7730. ),
  7731. ),
  7732. 'foreign keys' => array(
  7733. 'dbxref' => array(
  7734. 'table' => 'dbxref',
  7735. 'columns' => array(
  7736. 'dbxref_id' => 'dbxref_id',
  7737. ),
  7738. ),
  7739. 'phylonode' => array(
  7740. 'table' => 'phylonode',
  7741. 'columns' => array(
  7742. 'phylonode_id' => 'phylonode_id',
  7743. ),
  7744. ),
  7745. ),
  7746. );
  7747. return $description;
  7748. }
  7749. /**
  7750. * Implements hook_chado_schema_v1_11_phylonode_organism()
  7751. * Purpose: To describe the structure of 'phylonode_organism' to tripal
  7752. * @see chado_insert_record()
  7753. * @see chado_update_record()
  7754. * @see chado_select_record()
  7755. *
  7756. * @return
  7757. * An array describing the 'phylonode_organism' table
  7758. *
  7759. * @ingroup tripal_chado_v1.11_schema_api
  7760. *
  7761. */
  7762. function tripal_chado_chado_schema_v1_11_phylonode_organism() {
  7763. $description = array(
  7764. 'table' => 'phylonode_organism',
  7765. 'fields' => array(
  7766. 'phylonode_organism_id' => array(
  7767. 'type' => 'serial',
  7768. 'not NULL' => '1',
  7769. ),
  7770. 'phylonode_id' => array(
  7771. 'type' => 'int',
  7772. 'not NULL' => '1',
  7773. ),
  7774. 'organism_id' => array(
  7775. 'type' => 'int',
  7776. 'not NULL' => '1',
  7777. ),
  7778. ),
  7779. 'primary key' => array(
  7780. 0 => 'phylonode_organism_id',
  7781. ),
  7782. 'unique keys' => array(
  7783. 'phylonode_id' => array(
  7784. 0 => 'phylonode_id',
  7785. ),
  7786. ),
  7787. 'indexes' => array(
  7788. 'phylonode_organism_idx1' => array(
  7789. 0 => 'phylonode_id',
  7790. ),
  7791. 'phylonode_organism_idx2' => array(
  7792. 0 => 'organism_id',
  7793. ),
  7794. ),
  7795. 'foreign keys' => array(
  7796. 'organism' => array(
  7797. 'table' => 'organism',
  7798. 'columns' => array(
  7799. 'organism_id' => 'organism_id',
  7800. ),
  7801. ),
  7802. 'phylonode' => array(
  7803. 'table' => 'phylonode',
  7804. 'columns' => array(
  7805. 'phylonode_id' => 'phylonode_id',
  7806. ),
  7807. ),
  7808. ),
  7809. );
  7810. return $description;
  7811. }
  7812. /**
  7813. * Implements hook_chado_schema_v1_11_phylonode_pub()
  7814. * Purpose: To describe the structure of 'phylonode_pub' to tripal
  7815. * @see chado_insert_record()
  7816. * @see chado_update_record()
  7817. * @see chado_select_record()
  7818. *
  7819. * @return
  7820. * An array describing the 'phylonode_pub' table
  7821. *
  7822. * @ingroup tripal_chado_v1.11_schema_api
  7823. *
  7824. */
  7825. function tripal_chado_chado_schema_v1_11_phylonode_pub() {
  7826. $description = array(
  7827. 'table' => 'phylonode_pub',
  7828. 'fields' => array(
  7829. 'phylonode_pub_id' => array(
  7830. 'type' => 'serial',
  7831. 'not NULL' => '1',
  7832. ),
  7833. 'phylonode_id' => array(
  7834. 'type' => 'int',
  7835. 'not NULL' => '1',
  7836. ),
  7837. 'pub_id' => array(
  7838. 'type' => 'int',
  7839. 'not NULL' => '1',
  7840. ),
  7841. ),
  7842. 'primary key' => array(
  7843. 0 => 'phylonode_pub_id',
  7844. ),
  7845. 'unique keys' => array(
  7846. 'phylonode_id' => array(
  7847. 0 => 'phylonode_id',
  7848. 1 => 'pub_id',
  7849. ),
  7850. ),
  7851. 'indexes' => array(
  7852. 'phylonode_pub_idx1' => array(
  7853. 0 => 'phylonode_id',
  7854. ),
  7855. 'phylonode_pub_idx2' => array(
  7856. 0 => 'pub_id',
  7857. ),
  7858. ),
  7859. 'foreign keys' => array(
  7860. 'pub' => array(
  7861. 'table' => 'pub',
  7862. 'columns' => array(
  7863. 'pub_id' => 'pub_id',
  7864. ),
  7865. ),
  7866. 'phylonode' => array(
  7867. 'table' => 'phylonode',
  7868. 'columns' => array(
  7869. 'phylonode_id' => 'phylonode_id',
  7870. ),
  7871. ),
  7872. ),
  7873. );
  7874. return $description;
  7875. }
  7876. /**
  7877. * Implements hook_chado_schema_v1_11_phylonode_relationship()
  7878. * Purpose: To describe the structure of 'phylonode_relationship' to tripal
  7879. * @see chado_insert_record()
  7880. * @see chado_update_record()
  7881. * @see chado_select_record()
  7882. *
  7883. * @return
  7884. * An array describing the 'phylonode_relationship' table
  7885. *
  7886. * @ingroup tripal_chado_v1.11_schema_api
  7887. *
  7888. */
  7889. function tripal_chado_chado_schema_v1_11_phylonode_relationship() {
  7890. $description = array(
  7891. 'table' => 'phylonode_relationship',
  7892. 'fields' => array(
  7893. 'phylonode_relationship_id' => array(
  7894. 'type' => 'serial',
  7895. 'not NULL' => '1',
  7896. ),
  7897. 'subject_id' => array(
  7898. 'type' => 'int',
  7899. 'not NULL' => '1',
  7900. ),
  7901. 'object_id' => array(
  7902. 'type' => 'int',
  7903. 'not NULL' => '1',
  7904. ),
  7905. 'type_id' => array(
  7906. 'type' => 'int',
  7907. 'not NULL' => '1',
  7908. ),
  7909. 'rank' => array(
  7910. 'type' => 'int',
  7911. 'not NULL' => '',
  7912. ),
  7913. 'phylotree_id' => array(
  7914. 'type' => 'int',
  7915. 'not NULL' => '1',
  7916. ),
  7917. ),
  7918. 'primary key' => array(
  7919. 0 => 'phylonode_relationship_id',
  7920. ),
  7921. 'unique keys' => array(
  7922. 'subject_id' => array(
  7923. 0 => 'subject_id',
  7924. 1 => 'object_id',
  7925. 2 => 'type_id',
  7926. ),
  7927. ),
  7928. 'indexes' => array(
  7929. 'phylonode_relationship_idx1' => array(
  7930. 0 => 'subject_id',
  7931. ),
  7932. 'phylonode_relationship_idx2' => array(
  7933. 0 => 'object_id',
  7934. ),
  7935. 'phylonode_relationship_idx3' => array(
  7936. 0 => 'type_id',
  7937. ),
  7938. ),
  7939. 'foreign keys' => array(
  7940. 'cvterm' => array(
  7941. 'table' => 'cvterm',
  7942. 'columns' => array(
  7943. 'type_id' => 'cvterm_id',
  7944. ),
  7945. ),
  7946. 'phylotree' => array(
  7947. 'table' => 'phylotree',
  7948. 'columns' => array(
  7949. 'phylotree_id' => 'phylotree_id',
  7950. ),
  7951. ),
  7952. 'phylonode' => array(
  7953. 'table' => 'phylonode',
  7954. 'columns' => array(
  7955. 'subject_id' => 'phylonode_id',
  7956. 'object_id' => 'phylonode_id',
  7957. ),
  7958. ),
  7959. ),
  7960. );
  7961. return $description;
  7962. }
  7963. /**
  7964. * Implements hook_chado_schema_v1_11_phylonodeprop()
  7965. * Purpose: To describe the structure of 'phylonodeprop' to tripal
  7966. * @see chado_insert_record()
  7967. * @see chado_update_record()
  7968. * @see chado_select_record()
  7969. *
  7970. * @return
  7971. * An array describing the 'phylonodeprop' table
  7972. *
  7973. * @ingroup tripal_chado_v1.11_schema_api
  7974. *
  7975. */
  7976. function tripal_chado_chado_schema_v1_11_phylonodeprop() {
  7977. $description = array(
  7978. 'table' => 'phylonodeprop',
  7979. 'fields' => array(
  7980. 'phylonodeprop_id' => array(
  7981. 'type' => 'serial',
  7982. 'not NULL' => '1',
  7983. ),
  7984. 'phylonode_id' => array(
  7985. 'type' => 'int',
  7986. 'not NULL' => '1',
  7987. ),
  7988. 'type_id' => array(
  7989. 'type' => 'int',
  7990. 'not NULL' => '1',
  7991. ),
  7992. 'value' => array(
  7993. 'type' => 'text',
  7994. 'not NULL' => '1',
  7995. 'default' => '',
  7996. ),
  7997. 'rank' => array(
  7998. 'type' => 'int',
  7999. 'not NULL' => '1',
  8000. 'default' => '0',
  8001. ),
  8002. ),
  8003. 'primary key' => array(
  8004. 0 => 'phylonodeprop_id',
  8005. ),
  8006. 'unique keys' => array(
  8007. 'phylonode_id' => array(
  8008. 0 => 'phylonode_id',
  8009. 1 => 'type_id',
  8010. 2 => 'value',
  8011. 3 => 'rank',
  8012. ),
  8013. ),
  8014. 'indexes' => array(
  8015. 'phylonodeprop_idx1' => array(
  8016. 0 => 'phylonode_id',
  8017. ),
  8018. 'phylonodeprop_idx2' => array(
  8019. 0 => 'type_id',
  8020. ),
  8021. ),
  8022. 'foreign keys' => array(
  8023. 'cvterm' => array(
  8024. 'table' => 'cvterm',
  8025. 'columns' => array(
  8026. 'type_id' => 'cvterm_id',
  8027. ),
  8028. ),
  8029. 'phylonode' => array(
  8030. 'table' => 'phylonode',
  8031. 'columns' => array(
  8032. 'phylonode_id' => 'phylonode_id',
  8033. ),
  8034. ),
  8035. ),
  8036. );
  8037. return $description;
  8038. }
  8039. /**
  8040. * Implements hook_chado_schema_v1_11_phylotree()
  8041. * Purpose: To describe the structure of 'phylotree' to tripal
  8042. * @see chado_insert_record()
  8043. * @see chado_update_record()
  8044. * @see chado_select_record()
  8045. *
  8046. * @return
  8047. * An array describing the 'phylotree' table
  8048. *
  8049. * @ingroup tripal_chado_v1.11_schema_api
  8050. *
  8051. */
  8052. function tripal_chado_chado_schema_v1_11_phylotree() {
  8053. $description = array(
  8054. 'table' => 'phylotree',
  8055. 'fields' => array(
  8056. 'phylotree_id' => array(
  8057. 'type' => 'serial',
  8058. 'not NULL' => '1',
  8059. ),
  8060. 'dbxref_id' => array(
  8061. 'type' => 'int',
  8062. 'not NULL' => '1',
  8063. ),
  8064. 'name' => array(
  8065. 'type' => 'varchar',
  8066. 'length' => '255',
  8067. 'not NULL' => '',
  8068. ),
  8069. 'type_id' => array(
  8070. 'type' => 'int',
  8071. 'not NULL' => '',
  8072. ),
  8073. 'analysis_id' => array(
  8074. 'type' => 'int',
  8075. 'not NULL' => '',
  8076. ),
  8077. 'comment' => array(
  8078. 'type' => 'text',
  8079. 'not NULL' => '',
  8080. ),
  8081. ),
  8082. 'primary key' => array(
  8083. 0 => 'phylotree_id',
  8084. ),
  8085. 'unique keys' => array(
  8086. ),
  8087. 'indexes' => array(
  8088. 'phylotree_idx1' => array(
  8089. 0 => 'phylotree_id',
  8090. ),
  8091. ),
  8092. 'foreign keys' => array(
  8093. 'dbxref' => array(
  8094. 'table' => 'dbxref',
  8095. 'columns' => array(
  8096. 'dbxref_id' => 'dbxref_id',
  8097. ),
  8098. ),
  8099. 'cvterm' => array(
  8100. 'table' => 'cvterm',
  8101. 'columns' => array(
  8102. 'type_id' => 'cvterm_id',
  8103. ),
  8104. ),
  8105. 'analysis' => array(
  8106. 'table' => 'analysis',
  8107. 'columns' => array(
  8108. 'analysis_id' => 'analysis_id',
  8109. ),
  8110. ),
  8111. ),
  8112. );
  8113. return $description;
  8114. }
  8115. /**
  8116. * Implements hook_chado_schema_v1_11_phylotree_pub()
  8117. * Purpose: To describe the structure of 'phylotree_pub' to tripal
  8118. * @see chado_insert_record()
  8119. * @see chado_update_record()
  8120. * @see chado_select_record()
  8121. *
  8122. * @return
  8123. * An array describing the 'phylotree_pub' table
  8124. *
  8125. * @ingroup tripal_chado_v1.11_schema_api
  8126. *
  8127. */
  8128. function tripal_chado_chado_schema_v1_11_phylotree_pub() {
  8129. $description = array(
  8130. 'table' => 'phylotree_pub',
  8131. 'fields' => array(
  8132. 'phylotree_pub_id' => array(
  8133. 'type' => 'serial',
  8134. 'not NULL' => '1',
  8135. ),
  8136. 'phylotree_id' => array(
  8137. 'type' => 'int',
  8138. 'not NULL' => '1',
  8139. ),
  8140. 'pub_id' => array(
  8141. 'type' => 'int',
  8142. 'not NULL' => '1',
  8143. ),
  8144. ),
  8145. 'primary key' => array(
  8146. 0 => 'phylotree_pub_id',
  8147. ),
  8148. 'unique keys' => array(
  8149. 'phylotree_id' => array(
  8150. 0 => 'phylotree_id',
  8151. 1 => 'pub_id',
  8152. ),
  8153. ),
  8154. 'indexes' => array(
  8155. 'phylotree_pub_idx1' => array(
  8156. 0 => 'phylotree_id',
  8157. ),
  8158. 'phylotree_pub_idx2' => array(
  8159. 0 => 'pub_id',
  8160. ),
  8161. ),
  8162. 'foreign keys' => array(
  8163. 'pub' => array(
  8164. 'table' => 'pub',
  8165. 'columns' => array(
  8166. 'pub_id' => 'pub_id',
  8167. ),
  8168. ),
  8169. 'phylotree' => array(
  8170. 'table' => 'phylotree',
  8171. 'columns' => array(
  8172. 'phylotree_id' => 'phylotree_id',
  8173. ),
  8174. ),
  8175. ),
  8176. );
  8177. return $description;
  8178. }
  8179. /**
  8180. * Implements hook_chado_schema_v1_11_project()
  8181. * Purpose: To describe the structure of 'project' to tripal
  8182. * @see chado_insert_record()
  8183. * @see chado_update_record()
  8184. * @see chado_select_record()
  8185. *
  8186. * @return
  8187. * An array describing the 'project' table
  8188. *
  8189. * @ingroup tripal_chado_v1.11_schema_api
  8190. *
  8191. */
  8192. function tripal_chado_chado_schema_v1_11_project() {
  8193. $description = array(
  8194. 'table' => 'project',
  8195. 'fields' => array(
  8196. 'project_id' => array(
  8197. 'type' => 'serial',
  8198. 'not NULL' => '1',
  8199. ),
  8200. 'name' => array(
  8201. 'type' => 'varchar',
  8202. 'length' => '255',
  8203. 'not NULL' => '1',
  8204. ),
  8205. 'description' => array(
  8206. 'type' => 'varchar',
  8207. 'length' => '255',
  8208. 'not NULL' => '1',
  8209. ),
  8210. ),
  8211. 'primary key' => array(
  8212. 0 => 'project_id',
  8213. ),
  8214. 'unique keys' => array(
  8215. 'project_c1' => array(
  8216. 0 => 'name',
  8217. ),
  8218. ),
  8219. 'indexes' => array(
  8220. ),
  8221. 'foreign keys' => array(
  8222. ),
  8223. );
  8224. return $description;
  8225. }
  8226. /**
  8227. * Implements hook_chado_schema_v1_11_protocol()
  8228. * Purpose: To describe the structure of 'protocol' to tripal
  8229. * @see chado_insert_record()
  8230. * @see chado_update_record()
  8231. * @see chado_select_record()
  8232. *
  8233. * @return
  8234. * An array describing the 'protocol' table
  8235. *
  8236. * @ingroup tripal_chado_v1.11_schema_api
  8237. *
  8238. */
  8239. function tripal_chado_chado_schema_v1_11_protocol() {
  8240. $description = array(
  8241. 'table' => 'protocol',
  8242. 'fields' => array(
  8243. 'protocol_id' => array(
  8244. 'type' => 'serial',
  8245. 'not NULL' => '1',
  8246. ),
  8247. 'type_id' => array(
  8248. 'type' => 'int',
  8249. 'not NULL' => '1',
  8250. ),
  8251. 'pub_id' => array(
  8252. 'type' => 'int',
  8253. 'not NULL' => '',
  8254. ),
  8255. 'dbxref_id' => array(
  8256. 'type' => 'int',
  8257. 'not NULL' => '',
  8258. ),
  8259. 'name' => array(
  8260. 'type' => 'text',
  8261. 'not NULL' => '1',
  8262. ),
  8263. 'uri' => array(
  8264. 'type' => 'text',
  8265. 'not NULL' => '',
  8266. ),
  8267. 'protocoldescription' => array(
  8268. 'type' => 'text',
  8269. 'not NULL' => '',
  8270. ),
  8271. 'hardwaredescription' => array(
  8272. 'type' => 'text',
  8273. 'not NULL' => '',
  8274. ),
  8275. 'softwaredescription' => array(
  8276. 'type' => 'text',
  8277. 'not NULL' => '',
  8278. ),
  8279. ),
  8280. 'primary key' => array(
  8281. 0 => 'protocol_id',
  8282. ),
  8283. 'unique keys' => array(
  8284. 'protocol_c1' => array(
  8285. 0 => 'name',
  8286. ),
  8287. ),
  8288. 'indexes' => array(
  8289. 'protocol_idx1' => array(
  8290. 0 => 'type_id',
  8291. ),
  8292. 'protocol_idx2' => array(
  8293. 0 => 'pub_id',
  8294. ),
  8295. 'protocol_idx3' => array(
  8296. 0 => 'dbxref_id',
  8297. ),
  8298. ),
  8299. 'foreign keys' => array(
  8300. 'dbxref' => array(
  8301. 'table' => 'dbxref',
  8302. 'columns' => array(
  8303. 'dbxref_id' => 'dbxref_id',
  8304. ),
  8305. ),
  8306. 'cvterm' => array(
  8307. 'table' => 'cvterm',
  8308. 'columns' => array(
  8309. 'type_id' => 'cvterm_id',
  8310. ),
  8311. ),
  8312. 'pub' => array(
  8313. 'table' => 'pub',
  8314. 'columns' => array(
  8315. 'pub_id' => 'pub_id',
  8316. ),
  8317. ),
  8318. ),
  8319. );
  8320. return $description;
  8321. }
  8322. /**
  8323. * Implements hook_chado_schema_v1_11_protocolparam()
  8324. * Purpose: To describe the structure of 'protocolparam' to tripal
  8325. * @see chado_insert_record()
  8326. * @see chado_update_record()
  8327. * @see chado_select_record()
  8328. *
  8329. * @return
  8330. * An array describing the 'protocolparam' table
  8331. *
  8332. * @ingroup tripal_chado_v1.11_schema_api
  8333. *
  8334. */
  8335. function tripal_chado_chado_schema_v1_11_protocolparam() {
  8336. $description = array(
  8337. 'table' => 'protocolparam',
  8338. 'fields' => array(
  8339. 'protocolparam_id' => array(
  8340. 'type' => 'serial',
  8341. 'not NULL' => '1',
  8342. ),
  8343. 'protocol_id' => array(
  8344. 'type' => 'int',
  8345. 'not NULL' => '1',
  8346. ),
  8347. 'name' => array(
  8348. 'type' => 'text',
  8349. 'not NULL' => '1',
  8350. ),
  8351. 'datatype_id' => array(
  8352. 'type' => 'int',
  8353. 'not NULL' => '',
  8354. ),
  8355. 'unittype_id' => array(
  8356. 'type' => 'int',
  8357. 'not NULL' => '',
  8358. ),
  8359. 'value' => array(
  8360. 'type' => 'text',
  8361. 'not NULL' => '',
  8362. ),
  8363. 'rank' => array(
  8364. 'type' => 'int',
  8365. 'not NULL' => '1',
  8366. 'default' => '0',
  8367. ),
  8368. ),
  8369. 'primary key' => array(
  8370. 0 => 'protocolparam_id',
  8371. ),
  8372. 'unique keys' => array(
  8373. ),
  8374. 'indexes' => array(
  8375. 'protocolparam_idx1' => array(
  8376. 0 => 'protocol_id',
  8377. ),
  8378. 'protocolparam_idx2' => array(
  8379. 0 => 'datatype_id',
  8380. ),
  8381. 'protocolparam_idx3' => array(
  8382. 0 => 'unittype_id',
  8383. ),
  8384. ),
  8385. 'foreign keys' => array(
  8386. 'cvterm' => array(
  8387. 'table' => 'cvterm',
  8388. 'columns' => array(
  8389. 'datatype_id' => 'cvterm_id',
  8390. 'unittype_id' => 'cvterm_id',
  8391. ),
  8392. ),
  8393. 'protocol' => array(
  8394. 'table' => 'protocol',
  8395. 'columns' => array(
  8396. 'protocol_id' => 'protocol_id',
  8397. ),
  8398. ),
  8399. ),
  8400. );
  8401. return $description;
  8402. }
  8403. /**
  8404. * Implements hook_chado_schema_v1_11_pub()
  8405. * Purpose: To describe the structure of 'pub' to tripal
  8406. * @see chado_insert_record()
  8407. * @see chado_update_record()
  8408. * @see chado_select_record()
  8409. *
  8410. * @return
  8411. * An array describing the 'pub' table
  8412. *
  8413. * @ingroup tripal_chado_v1.11_schema_api
  8414. *
  8415. */
  8416. function tripal_chado_chado_schema_v1_11_pub() {
  8417. $description = array(
  8418. 'table' => 'pub',
  8419. 'fields' => array(
  8420. 'pub_id' => array(
  8421. 'type' => 'serial',
  8422. 'not NULL' => '1',
  8423. ),
  8424. 'title' => array(
  8425. 'type' => 'text',
  8426. 'not NULL' => '',
  8427. ),
  8428. 'volumetitle' => array(
  8429. 'type' => 'text',
  8430. 'not NULL' => '',
  8431. ),
  8432. 'volume' => array(
  8433. 'type' => 'varchar',
  8434. 'length' => '255',
  8435. 'not NULL' => '',
  8436. ),
  8437. 'series_name' => array(
  8438. 'type' => 'varchar',
  8439. 'length' => '255',
  8440. 'not NULL' => '',
  8441. ),
  8442. 'issue' => array(
  8443. 'type' => 'varchar',
  8444. 'length' => '255',
  8445. 'not NULL' => '',
  8446. ),
  8447. 'pyear' => array(
  8448. 'type' => 'varchar',
  8449. 'length' => '255',
  8450. 'not NULL' => '',
  8451. ),
  8452. 'pages' => array(
  8453. 'type' => 'varchar',
  8454. 'length' => '255',
  8455. 'not NULL' => '',
  8456. ),
  8457. 'miniref' => array(
  8458. 'type' => 'varchar',
  8459. 'length' => '255',
  8460. 'not NULL' => '',
  8461. ),
  8462. 'uniquename' => array(
  8463. 'type' => 'text',
  8464. 'not NULL' => '1',
  8465. ),
  8466. 'type_id' => array(
  8467. 'type' => 'int',
  8468. 'not NULL' => '1',
  8469. ),
  8470. 'is_obsolete' => array(
  8471. 'type' => 'boolean',
  8472. 'not NULL' => '',
  8473. 'default' => 'false',
  8474. ),
  8475. 'publisher' => array(
  8476. 'type' => 'varchar',
  8477. 'length' => '255',
  8478. 'not NULL' => '',
  8479. ),
  8480. 'pubplace' => array(
  8481. 'type' => 'varchar',
  8482. 'length' => '255',
  8483. 'not NULL' => '',
  8484. ),
  8485. ),
  8486. 'primary key' => array(
  8487. 0 => 'pub_id',
  8488. ),
  8489. 'unique keys' => array(
  8490. 'pub_c1' => array(
  8491. 0 => 'uniquename',
  8492. ),
  8493. ),
  8494. 'indexes' => array(
  8495. 'pub_idx1' => array(
  8496. 0 => 'type_id',
  8497. ),
  8498. ),
  8499. 'foreign keys' => array(
  8500. 'cvterm' => array(
  8501. 'table' => 'cvterm',
  8502. 'columns' => array(
  8503. 'type_id' => 'cvterm_id',
  8504. ),
  8505. ),
  8506. ),
  8507. );
  8508. return $description;
  8509. }
  8510. /**
  8511. * Implements hook_chado_schema_v1_11_pub_dbxref()
  8512. * Purpose: To describe the structure of 'pub_dbxref' to tripal
  8513. * @see chado_insert_record()
  8514. * @see chado_update_record()
  8515. * @see chado_select_record()
  8516. *
  8517. * @return
  8518. * An array describing the 'pub_dbxref' table
  8519. *
  8520. * @ingroup tripal_chado_v1.11_schema_api
  8521. *
  8522. */
  8523. function tripal_chado_chado_schema_v1_11_pub_dbxref() {
  8524. $description = array(
  8525. 'table' => 'pub_dbxref',
  8526. 'fields' => array(
  8527. 'pub_dbxref_id' => array(
  8528. 'type' => 'serial',
  8529. 'not NULL' => '1',
  8530. ),
  8531. 'pub_id' => array(
  8532. 'type' => 'int',
  8533. 'not NULL' => '1',
  8534. ),
  8535. 'dbxref_id' => array(
  8536. 'type' => 'int',
  8537. 'not NULL' => '1',
  8538. ),
  8539. 'is_current' => array(
  8540. 'type' => 'boolean',
  8541. 'not NULL' => '1',
  8542. 'default' => 'true',
  8543. ),
  8544. ),
  8545. 'primary key' => array(
  8546. 0 => 'pub_dbxref_id',
  8547. ),
  8548. 'unique keys' => array(
  8549. 'pub_dbxref_c1' => array(
  8550. 0 => 'pub_id',
  8551. 1 => 'dbxref_id',
  8552. ),
  8553. ),
  8554. 'indexes' => array(
  8555. 'pub_dbxref_idx1' => array(
  8556. 0 => 'pub_id',
  8557. ),
  8558. 'pub_dbxref_idx2' => array(
  8559. 0 => 'dbxref_id',
  8560. ),
  8561. ),
  8562. 'foreign keys' => array(
  8563. 'dbxref' => array(
  8564. 'table' => 'dbxref',
  8565. 'columns' => array(
  8566. 'dbxref_id' => 'dbxref_id',
  8567. ),
  8568. ),
  8569. 'pub' => array(
  8570. 'table' => 'pub',
  8571. 'columns' => array(
  8572. 'pub_id' => 'pub_id',
  8573. ),
  8574. ),
  8575. ),
  8576. );
  8577. return $description;
  8578. }
  8579. /**
  8580. * Implements hook_chado_schema_v1_11_pub_relationship()
  8581. * Purpose: To describe the structure of 'pub_relationship' to tripal
  8582. * @see chado_insert_record()
  8583. * @see chado_update_record()
  8584. * @see chado_select_record()
  8585. *
  8586. * @return
  8587. * An array describing the 'pub_relationship' table
  8588. *
  8589. * @ingroup tripal_chado_v1.11_schema_api
  8590. *
  8591. */
  8592. function tripal_chado_chado_schema_v1_11_pub_relationship() {
  8593. $description = array(
  8594. 'table' => 'pub_relationship',
  8595. 'fields' => array(
  8596. 'pub_relationship_id' => array(
  8597. 'type' => 'serial',
  8598. 'not NULL' => '1',
  8599. ),
  8600. 'subject_id' => array(
  8601. 'type' => 'int',
  8602. 'not NULL' => '1',
  8603. ),
  8604. 'object_id' => array(
  8605. 'type' => 'int',
  8606. 'not NULL' => '1',
  8607. ),
  8608. 'type_id' => array(
  8609. 'type' => 'int',
  8610. 'not NULL' => '1',
  8611. ),
  8612. ),
  8613. 'primary key' => array(
  8614. 0 => 'pub_relationship_id',
  8615. ),
  8616. 'unique keys' => array(
  8617. 'pub_relationship_c1' => array(
  8618. 0 => 'subject_id',
  8619. 1 => 'object_id',
  8620. 2 => 'type_id',
  8621. ),
  8622. ),
  8623. 'indexes' => array(
  8624. 'pub_relationship_idx1' => array(
  8625. 0 => 'subject_id',
  8626. ),
  8627. 'pub_relationship_idx2' => array(
  8628. 0 => 'object_id',
  8629. ),
  8630. 'pub_relationship_idx3' => array(
  8631. 0 => 'type_id',
  8632. ),
  8633. ),
  8634. 'foreign keys' => array(
  8635. 'cvterm' => array(
  8636. 'table' => 'cvterm',
  8637. 'columns' => array(
  8638. 'type_id' => 'cvterm_id',
  8639. ),
  8640. ),
  8641. 'pub' => array(
  8642. 'table' => 'pub',
  8643. 'columns' => array(
  8644. 'subject_id' => 'pub_id',
  8645. 'object_id' => 'pub_id',
  8646. ),
  8647. ),
  8648. ),
  8649. );
  8650. return $description;
  8651. }
  8652. /**
  8653. * Implements hook_chado_schema_v1_11_pubauthor()
  8654. * Purpose: To describe the structure of 'pubauthor' to tripal
  8655. * @see chado_insert_record()
  8656. * @see chado_update_record()
  8657. * @see chado_select_record()
  8658. *
  8659. * @return
  8660. * An array describing the 'pubauthor' table
  8661. *
  8662. * @ingroup tripal_chado_v1.11_schema_api
  8663. *
  8664. */
  8665. function tripal_chado_chado_schema_v1_11_pubauthor() {
  8666. $description = array(
  8667. 'table' => 'pubauthor',
  8668. 'fields' => array(
  8669. 'pubauthor_id' => array(
  8670. 'type' => 'serial',
  8671. 'not NULL' => '1',
  8672. ),
  8673. 'pub_id' => array(
  8674. 'type' => 'int',
  8675. 'not NULL' => '1',
  8676. ),
  8677. 'rank' => array(
  8678. 'type' => 'int',
  8679. 'not NULL' => '1',
  8680. ),
  8681. 'editor' => array(
  8682. 'type' => 'boolean',
  8683. 'not NULL' => '',
  8684. 'default' => 'false',
  8685. ),
  8686. 'surname' => array(
  8687. 'type' => 'varchar',
  8688. 'length' => '100',
  8689. 'not NULL' => '1',
  8690. ),
  8691. 'givennames' => array(
  8692. 'type' => 'varchar',
  8693. 'length' => '100',
  8694. 'not NULL' => '',
  8695. ),
  8696. 'suffix' => array(
  8697. 'type' => 'varchar',
  8698. 'length' => '100',
  8699. 'not NULL' => '',
  8700. ),
  8701. ),
  8702. 'primary key' => array(
  8703. 0 => 'pubauthor_id',
  8704. ),
  8705. 'unique keys' => array(
  8706. 'pubauthor_c1' => array(
  8707. 0 => 'pub_id',
  8708. 1 => 'rank',
  8709. ),
  8710. ),
  8711. 'indexes' => array(
  8712. 'pubauthor_idx2' => array(
  8713. 0 => 'pub_id',
  8714. ),
  8715. ),
  8716. 'foreign keys' => array(
  8717. 'pub' => array(
  8718. 'table' => 'pub',
  8719. 'columns' => array(
  8720. 'pub_id' => 'pub_id',
  8721. ),
  8722. ),
  8723. ),
  8724. );
  8725. return $description;
  8726. }
  8727. /**
  8728. * Implements hook_chado_schema_v1_11_pubprop()
  8729. * Purpose: To describe the structure of 'pubprop' to tripal
  8730. * @see chado_insert_record()
  8731. * @see chado_update_record()
  8732. * @see chado_select_record()
  8733. *
  8734. * @return
  8735. * An array describing the 'pubprop' table
  8736. *
  8737. * @ingroup tripal_chado_v1.11_schema_api
  8738. *
  8739. */
  8740. function tripal_chado_chado_schema_v1_11_pubprop() {
  8741. $description = array(
  8742. 'table' => 'pubprop',
  8743. 'fields' => array(
  8744. 'pubprop_id' => array(
  8745. 'type' => 'serial',
  8746. 'not NULL' => '1',
  8747. ),
  8748. 'pub_id' => array(
  8749. 'type' => 'int',
  8750. 'not NULL' => '1',
  8751. ),
  8752. 'type_id' => array(
  8753. 'type' => 'int',
  8754. 'not NULL' => '1',
  8755. ),
  8756. 'value' => array(
  8757. 'type' => 'text',
  8758. 'not NULL' => '1',
  8759. ),
  8760. 'rank' => array(
  8761. 'type' => 'int',
  8762. 'not NULL' => '',
  8763. ),
  8764. ),
  8765. 'primary key' => array(
  8766. 0 => 'pubprop_id',
  8767. ),
  8768. 'unique keys' => array(
  8769. 'pubprop_c1' => array(
  8770. 0 => 'pub_id',
  8771. 1 => 'type_id',
  8772. 2 => 'rank',
  8773. ),
  8774. ),
  8775. 'indexes' => array(
  8776. 'pubprop_idx1' => array(
  8777. 0 => 'pub_id',
  8778. ),
  8779. 'pubprop_idx2' => array(
  8780. 0 => 'type_id',
  8781. ),
  8782. ),
  8783. 'foreign keys' => array(
  8784. 'cvterm' => array(
  8785. 'table' => 'cvterm',
  8786. 'columns' => array(
  8787. 'type_id' => 'cvterm_id',
  8788. ),
  8789. ),
  8790. 'pub' => array(
  8791. 'table' => 'pub',
  8792. 'columns' => array(
  8793. 'pub_id' => 'pub_id',
  8794. ),
  8795. ),
  8796. ),
  8797. );
  8798. return $description;
  8799. }
  8800. /**
  8801. * Implements hook_chado_schema_v1_11_quantification()
  8802. * Purpose: To describe the structure of 'quantification' to tripal
  8803. * @see chado_insert_record()
  8804. * @see chado_update_record()
  8805. * @see chado_select_record()
  8806. *
  8807. * @return
  8808. * An array describing the 'quantification' table
  8809. *
  8810. * @ingroup tripal_chado_v1.11_schema_api
  8811. *
  8812. */
  8813. function tripal_chado_chado_schema_v1_11_quantification() {
  8814. $description = array(
  8815. 'table' => 'quantification',
  8816. 'fields' => array(
  8817. 'quantification_id' => array(
  8818. 'type' => 'serial',
  8819. 'not NULL' => '1',
  8820. ),
  8821. 'acquisition_id' => array(
  8822. 'type' => 'int',
  8823. 'not NULL' => '1',
  8824. ),
  8825. 'operator_id' => array(
  8826. 'type' => 'int',
  8827. 'not NULL' => '',
  8828. ),
  8829. 'protocol_id' => array(
  8830. 'type' => 'int',
  8831. 'not NULL' => '',
  8832. ),
  8833. 'analysis_id' => array(
  8834. 'type' => 'int',
  8835. 'not NULL' => '1',
  8836. ),
  8837. 'quantificationdate' => array(
  8838. 'type' => 'datetime',
  8839. 'not NULL' => '',
  8840. 'default' => 'ow(',
  8841. ),
  8842. 'name' => array(
  8843. 'type' => 'text',
  8844. 'not NULL' => '',
  8845. ),
  8846. 'uri' => array(
  8847. 'type' => 'text',
  8848. 'not NULL' => '',
  8849. ),
  8850. ),
  8851. 'primary key' => array(
  8852. 0 => 'quantification_id',
  8853. ),
  8854. 'unique keys' => array(
  8855. 'quantification_c1' => array(
  8856. 0 => 'name',
  8857. 1 => 'analysis_id',
  8858. ),
  8859. ),
  8860. 'indexes' => array(
  8861. 'quantification_idx1' => array(
  8862. 0 => 'acquisition_id',
  8863. ),
  8864. 'quantification_idx2' => array(
  8865. 0 => 'operator_id',
  8866. ),
  8867. 'quantification_idx3' => array(
  8868. 0 => 'protocol_id',
  8869. ),
  8870. 'quantification_idx4' => array(
  8871. 0 => 'analysis_id',
  8872. ),
  8873. ),
  8874. 'foreign keys' => array(
  8875. 'analysis' => array(
  8876. 'table' => 'analysis',
  8877. 'columns' => array(
  8878. 'analysis_id' => 'analysis_id',
  8879. ),
  8880. ),
  8881. 'contact' => array(
  8882. 'table' => 'contact',
  8883. 'columns' => array(
  8884. 'operator_id' => 'contact_id',
  8885. ),
  8886. ),
  8887. 'protocol' => array(
  8888. 'table' => 'protocol',
  8889. 'columns' => array(
  8890. 'protocol_id' => 'protocol_id',
  8891. ),
  8892. ),
  8893. 'acquisition' => array(
  8894. 'table' => 'acquisition',
  8895. 'columns' => array(
  8896. 'acquisition_id' => 'acquisition_id',
  8897. ),
  8898. ),
  8899. ),
  8900. );
  8901. return $description;
  8902. }
  8903. /**
  8904. * Implements hook_chado_schema_v1_11_quantification_relationship()
  8905. * Purpose: To describe the structure of 'quantification_relationship' to tripal
  8906. * @see chado_insert_record()
  8907. * @see chado_update_record()
  8908. * @see chado_select_record()
  8909. *
  8910. * @return
  8911. * An array describing the 'quantification_relationship' table
  8912. *
  8913. * @ingroup tripal_chado_v1.11_schema_api
  8914. *
  8915. */
  8916. function tripal_chado_chado_schema_v1_11_quantification_relationship() {
  8917. $description = array(
  8918. 'table' => 'quantification_relationship',
  8919. 'fields' => array(
  8920. 'quantification_relationship_id' => array(
  8921. 'type' => 'serial',
  8922. 'not NULL' => '1',
  8923. ),
  8924. 'subject_id' => array(
  8925. 'type' => 'int',
  8926. 'not NULL' => '1',
  8927. ),
  8928. 'type_id' => array(
  8929. 'type' => 'int',
  8930. 'not NULL' => '1',
  8931. ),
  8932. 'object_id' => array(
  8933. 'type' => 'int',
  8934. 'not NULL' => '1',
  8935. ),
  8936. ),
  8937. 'primary key' => array(
  8938. 0 => 'quantification_relationship_id',
  8939. ),
  8940. 'unique keys' => array(
  8941. 'quantification_relationship_c1' => array(
  8942. 0 => 'subject_id',
  8943. 1 => 'object_id',
  8944. 2 => 'type_id',
  8945. ),
  8946. ),
  8947. 'indexes' => array(
  8948. 'quantification_relationship_idx1' => array(
  8949. 0 => 'subject_id',
  8950. ),
  8951. 'quantification_relationship_idx2' => array(
  8952. 0 => 'type_id',
  8953. ),
  8954. 'quantification_relationship_idx3' => array(
  8955. 0 => 'object_id',
  8956. ),
  8957. ),
  8958. 'foreign keys' => array(
  8959. 'cvterm' => array(
  8960. 'table' => 'cvterm',
  8961. 'columns' => array(
  8962. 'type_id' => 'cvterm_id',
  8963. ),
  8964. ),
  8965. 'quantification' => array(
  8966. 'table' => 'quantification',
  8967. 'columns' => array(
  8968. 'subject_id' => 'quantification_id',
  8969. 'object_id' => 'quantification_id',
  8970. ),
  8971. ),
  8972. ),
  8973. );
  8974. return $description;
  8975. }
  8976. /**
  8977. * Implements hook_chado_schema_v1_11_quantificationprop()
  8978. * Purpose: To describe the structure of 'quantificationprop' to tripal
  8979. * @see chado_insert_record()
  8980. * @see chado_update_record()
  8981. * @see chado_select_record()
  8982. *
  8983. * @return
  8984. * An array describing the 'quantificationprop' table
  8985. *
  8986. * @ingroup tripal_chado_v1.11_schema_api
  8987. *
  8988. */
  8989. function tripal_chado_chado_schema_v1_11_quantificationprop() {
  8990. $description = array(
  8991. 'table' => 'quantificationprop',
  8992. 'fields' => array(
  8993. 'quantificationprop_id' => array(
  8994. 'type' => 'serial',
  8995. 'not NULL' => '1',
  8996. ),
  8997. 'quantification_id' => array(
  8998. 'type' => 'int',
  8999. 'not NULL' => '1',
  9000. ),
  9001. 'type_id' => array(
  9002. 'type' => 'int',
  9003. 'not NULL' => '1',
  9004. ),
  9005. 'value' => array(
  9006. 'type' => 'text',
  9007. 'not NULL' => '',
  9008. ),
  9009. 'rank' => array(
  9010. 'type' => 'int',
  9011. 'not NULL' => '1',
  9012. 'default' => '0',
  9013. ),
  9014. ),
  9015. 'primary key' => array(
  9016. 0 => 'quantificationprop_id',
  9017. ),
  9018. 'unique keys' => array(
  9019. 'quantificationprop_c1' => array(
  9020. 0 => 'quantification_id',
  9021. 1 => 'type_id',
  9022. 2 => 'rank',
  9023. ),
  9024. ),
  9025. 'indexes' => array(
  9026. 'quantificationprop_idx1' => array(
  9027. 0 => 'quantification_id',
  9028. ),
  9029. 'quantificationprop_idx2' => array(
  9030. 0 => 'type_id',
  9031. ),
  9032. ),
  9033. 'foreign keys' => array(
  9034. 'cvterm' => array(
  9035. 'table' => 'cvterm',
  9036. 'columns' => array(
  9037. 'type_id' => 'cvterm_id',
  9038. ),
  9039. ),
  9040. 'quantification' => array(
  9041. 'table' => 'quantification',
  9042. 'columns' => array(
  9043. 'quantification_id' => 'quantification_id',
  9044. ),
  9045. ),
  9046. ),
  9047. );
  9048. return $description;
  9049. }
  9050. /**
  9051. * Implements hook_chado_schema_v1_11_stock()
  9052. * Purpose: To describe the structure of 'stock' to tripal
  9053. * @see chado_insert_record()
  9054. * @see chado_update_record()
  9055. * @see chado_select_record()
  9056. *
  9057. * @return
  9058. * An array describing the 'stock' table
  9059. *
  9060. * @ingroup tripal_chado_v1.11_schema_api
  9061. *
  9062. */
  9063. function tripal_chado_chado_schema_v1_11_stock() {
  9064. $description = array(
  9065. 'table' => 'stock',
  9066. 'referring_tables' => array(
  9067. 1 => 'stock_cvterm',
  9068. 2 => 'stock_dbxref',
  9069. 3 => 'stock_genotype',
  9070. 4 => 'stock_pub',
  9071. 5 => 'stock_relationship',
  9072. 7 => 'stockcollection_stock',
  9073. 8 => 'stockprop',
  9074. ),
  9075. 'fields' => array(
  9076. 'stock_id' => array(
  9077. 'type' => 'serial',
  9078. 'not NULL' => '1',
  9079. ),
  9080. 'dbxref_id' => array(
  9081. 'type' => 'int',
  9082. 'not NULL' => '',
  9083. ),
  9084. 'organism_id' => array(
  9085. 'type' => 'int',
  9086. 'not NULL' => '1',
  9087. ),
  9088. 'name' => array(
  9089. 'type' => 'varchar',
  9090. 'length' => '255',
  9091. 'not NULL' => '',
  9092. ),
  9093. 'uniquename' => array(
  9094. 'type' => 'text',
  9095. 'not NULL' => '1',
  9096. ),
  9097. 'description' => array(
  9098. 'type' => 'text',
  9099. 'not NULL' => '',
  9100. ),
  9101. 'type_id' => array(
  9102. 'type' => 'int',
  9103. 'not NULL' => '1',
  9104. ),
  9105. 'is_obsolete' => array(
  9106. 'type' => 'boolean',
  9107. 'not NULL' => '1',
  9108. 'default' => 'false',
  9109. ),
  9110. ),
  9111. 'primary key' => array(
  9112. 0 => 'stock_id',
  9113. ),
  9114. 'unique keys' => array(
  9115. 'stock_c1' => array(
  9116. 0 => 'organism_id',
  9117. 1 => 'uniquename',
  9118. 2 => 'type_id',
  9119. ),
  9120. ),
  9121. 'indexes' => array(
  9122. 'stock_idx1' => array(
  9123. 0 => 'dbxref_id',
  9124. ),
  9125. 'stock_idx2' => array(
  9126. 0 => 'organism_id',
  9127. ),
  9128. 'stock_idx3' => array(
  9129. 0 => 'type_id',
  9130. ),
  9131. 'stock_idx4' => array(
  9132. 0 => 'uniquename',
  9133. ),
  9134. 'stock_name_ind1' => array(
  9135. 0 => 'name',
  9136. ),
  9137. ),
  9138. 'foreign keys' => array(
  9139. 'dbxref' => array(
  9140. 'table' => 'dbxref',
  9141. 'columns' => array(
  9142. 'dbxref_id' => 'dbxref_id',
  9143. ),
  9144. ),
  9145. 'cvterm' => array(
  9146. 'table' => 'cvterm',
  9147. 'columns' => array(
  9148. 'type_id' => 'cvterm_id',
  9149. ),
  9150. ),
  9151. 'organism' => array(
  9152. 'table' => 'organism',
  9153. 'columns' => array(
  9154. 'organism_id' => 'organism_id',
  9155. ),
  9156. ),
  9157. ),
  9158. );
  9159. return $description;
  9160. }
  9161. /**
  9162. * Implements hook_chado_schema_v1_11_stock_cvterm()
  9163. * Purpose: To describe the structure of 'stock_cvterm' to tripal
  9164. * @see chado_insert_record()
  9165. * @see chado_update_record()
  9166. * @see chado_select_record()
  9167. *
  9168. * @return
  9169. * An array describing the 'stock_cvterm' table
  9170. *
  9171. * @ingroup tripal_chado_v1.11_schema_api
  9172. *
  9173. */
  9174. function tripal_chado_chado_schema_v1_11_stock_cvterm() {
  9175. $description = array(
  9176. 'table' => 'stock_cvterm',
  9177. 'fields' => array(
  9178. 'stock_cvterm_id' => array(
  9179. 'type' => 'serial',
  9180. 'not NULL' => '1',
  9181. ),
  9182. 'stock_id' => array(
  9183. 'type' => 'int',
  9184. 'not NULL' => '1',
  9185. ),
  9186. 'cvterm_id' => array(
  9187. 'type' => 'int',
  9188. 'not NULL' => '1',
  9189. ),
  9190. 'pub_id' => array(
  9191. 'type' => 'int',
  9192. 'not NULL' => '1',
  9193. ),
  9194. ),
  9195. 'primary key' => array(
  9196. 0 => 'stock_cvterm_id',
  9197. ),
  9198. 'unique keys' => array(
  9199. 'stock_cvterm_c1' => array(
  9200. 0 => 'stock_id',
  9201. 1 => 'cvterm_id',
  9202. 2 => 'pub_id',
  9203. ),
  9204. ),
  9205. 'indexes' => array(
  9206. 'stock_cvterm_idx1' => array(
  9207. 0 => 'stock_id',
  9208. ),
  9209. 'stock_cvterm_idx2' => array(
  9210. 0 => 'cvterm_id',
  9211. ),
  9212. 'stock_cvterm_idx3' => array(
  9213. 0 => 'pub_id',
  9214. ),
  9215. ),
  9216. 'foreign keys' => array(
  9217. 'cvterm' => array(
  9218. 'table' => 'cvterm',
  9219. 'columns' => array(
  9220. 'cvterm_id' => 'cvterm_id',
  9221. ),
  9222. ),
  9223. 'pub' => array(
  9224. 'table' => 'pub',
  9225. 'columns' => array(
  9226. 'pub_id' => 'pub_id',
  9227. ),
  9228. ),
  9229. 'stock' => array(
  9230. 'table' => 'stock',
  9231. 'columns' => array(
  9232. 'stock_id' => 'stock_id',
  9233. ),
  9234. ),
  9235. ),
  9236. );
  9237. return $description;
  9238. }
  9239. /**
  9240. * Implements hook_chado_schema_v1_11_stock_dbxref()
  9241. * Purpose: To describe the structure of 'stock_dbxref' to tripal
  9242. * @see chado_insert_record()
  9243. * @see chado_update_record()
  9244. * @see chado_select_record()
  9245. *
  9246. * @return
  9247. * An array describing the 'stock_dbxref' table
  9248. *
  9249. * @ingroup tripal_chado_v1.11_schema_api
  9250. *
  9251. */
  9252. function tripal_chado_chado_schema_v1_11_stock_dbxref() {
  9253. $description = array(
  9254. 'table' => 'stock_dbxref',
  9255. 'fields' => array(
  9256. 'stock_dbxref_id' => array(
  9257. 'type' => 'serial',
  9258. 'not NULL' => '1',
  9259. ),
  9260. 'stock_id' => array(
  9261. 'type' => 'int',
  9262. 'not NULL' => '1',
  9263. ),
  9264. 'dbxref_id' => array(
  9265. 'type' => 'int',
  9266. 'not NULL' => '1',
  9267. ),
  9268. 'is_current' => array(
  9269. 'type' => 'boolean',
  9270. 'not NULL' => '1',
  9271. 'default' => 'true',
  9272. ),
  9273. ),
  9274. 'primary key' => array(
  9275. 0 => 'stock_dbxref_id',
  9276. ),
  9277. 'unique keys' => array(
  9278. 'stock_dbxref_c1' => array(
  9279. 0 => 'stock_id',
  9280. 1 => 'dbxref_id',
  9281. ),
  9282. ),
  9283. 'indexes' => array(
  9284. 'stock_dbxref_idx1' => array(
  9285. 0 => 'stock_id',
  9286. ),
  9287. 'stock_dbxref_idx2' => array(
  9288. 0 => 'dbxref_id',
  9289. ),
  9290. ),
  9291. 'foreign keys' => array(
  9292. 'dbxref' => array(
  9293. 'table' => 'dbxref',
  9294. 'columns' => array(
  9295. 'dbxref_id' => 'dbxref_id',
  9296. ),
  9297. ),
  9298. 'stock' => array(
  9299. 'table' => 'stock',
  9300. 'columns' => array(
  9301. 'stock_id' => 'stock_id',
  9302. ),
  9303. ),
  9304. ),
  9305. );
  9306. return $description;
  9307. }
  9308. /**
  9309. * Implements hook_chado_schema_v1_11_stock_genotype()
  9310. * Purpose: To describe the structure of 'stock_genotype' to tripal
  9311. * @see chado_insert_record()
  9312. * @see chado_update_record()
  9313. * @see chado_select_record()
  9314. *
  9315. * @return
  9316. * An array describing the 'stock_genotype' table
  9317. *
  9318. * @ingroup tripal_chado_v1.11_schema_api
  9319. *
  9320. */
  9321. function tripal_chado_chado_schema_v1_11_stock_genotype() {
  9322. $description = array(
  9323. 'table' => 'stock_genotype',
  9324. 'fields' => array(
  9325. 'stock_genotype_id' => array(
  9326. 'type' => 'serial',
  9327. 'not NULL' => '1',
  9328. ),
  9329. 'stock_id' => array(
  9330. 'type' => 'int',
  9331. 'not NULL' => '1',
  9332. ),
  9333. 'genotype_id' => array(
  9334. 'type' => 'int',
  9335. 'not NULL' => '1',
  9336. ),
  9337. ),
  9338. 'primary key' => array(
  9339. 0 => 'stock_genotype_id',
  9340. ),
  9341. 'unique keys' => array(
  9342. 'stock_genotype_c1' => array(
  9343. 0 => 'stock_id',
  9344. 1 => 'genotype_id',
  9345. ),
  9346. ),
  9347. 'indexes' => array(
  9348. 'stock_genotype_idx1' => array(
  9349. 0 => 'stock_id',
  9350. ),
  9351. 'stock_genotype_idx2' => array(
  9352. 0 => 'genotype_id',
  9353. ),
  9354. ),
  9355. 'foreign keys' => array(
  9356. 'genotype' => array(
  9357. 'table' => 'genotype',
  9358. 'columns' => array(
  9359. 'genotype_id' => 'genotype_id',
  9360. ),
  9361. ),
  9362. 'stock' => array(
  9363. 'table' => 'stock',
  9364. 'columns' => array(
  9365. 'stock_id' => 'stock_id',
  9366. ),
  9367. ),
  9368. ),
  9369. );
  9370. return $description;
  9371. }
  9372. /**
  9373. * Implements hook_chado_schema_v1_11_stock_pub()
  9374. * Purpose: To describe the structure of 'stock_pub' to tripal
  9375. * @see chado_insert_record()
  9376. * @see chado_update_record()
  9377. * @see chado_select_record()
  9378. *
  9379. * @return
  9380. * An array describing the 'stock_pub' table
  9381. *
  9382. * @ingroup tripal_chado_v1.11_schema_api
  9383. *
  9384. */
  9385. function tripal_chado_chado_schema_v1_11_stock_pub() {
  9386. $description = array(
  9387. 'table' => 'stock_pub',
  9388. 'fields' => array(
  9389. 'stock_pub_id' => array(
  9390. 'type' => 'serial',
  9391. 'not NULL' => '1',
  9392. ),
  9393. 'stock_id' => array(
  9394. 'type' => 'int',
  9395. 'not NULL' => '1',
  9396. ),
  9397. 'pub_id' => array(
  9398. 'type' => 'int',
  9399. 'not NULL' => '1',
  9400. ),
  9401. ),
  9402. 'primary key' => array(
  9403. 0 => 'stock_pub_id',
  9404. ),
  9405. 'unique keys' => array(
  9406. 'stock_pub_c1' => array(
  9407. 0 => 'stock_id',
  9408. 1 => 'pub_id',
  9409. ),
  9410. ),
  9411. 'indexes' => array(
  9412. 'stock_pub_idx1' => array(
  9413. 0 => 'stock_id',
  9414. ),
  9415. 'stock_pub_idx2' => array(
  9416. 0 => 'pub_id',
  9417. ),
  9418. ),
  9419. 'foreign keys' => array(
  9420. 'pub' => array(
  9421. 'table' => 'pub',
  9422. 'columns' => array(
  9423. 'pub_id' => 'pub_id',
  9424. ),
  9425. ),
  9426. 'stock' => array(
  9427. 'table' => 'stock',
  9428. 'columns' => array(
  9429. 'stock_id' => 'stock_id',
  9430. ),
  9431. ),
  9432. ),
  9433. );
  9434. return $description;
  9435. }
  9436. /**
  9437. * Implements hook_chado_schema_v1_11_stock_relationship()
  9438. * Purpose: To describe the structure of 'stock_relationship' to tripal
  9439. * @see chado_insert_record()
  9440. * @see chado_update_record()
  9441. * @see chado_select_record()
  9442. *
  9443. * @return
  9444. * An array describing the 'stock_relationship' table
  9445. *
  9446. * @ingroup tripal_chado_v1.11_schema_api
  9447. *
  9448. */
  9449. function tripal_chado_chado_schema_v1_11_stock_relationship() {
  9450. $description = array(
  9451. 'table' => 'stock_relationship',
  9452. 'fields' => array(
  9453. 'stock_relationship_id' => array(
  9454. 'type' => 'serial',
  9455. 'not NULL' => '1',
  9456. ),
  9457. 'subject_id' => array(
  9458. 'type' => 'int',
  9459. 'not NULL' => '1',
  9460. ),
  9461. 'object_id' => array(
  9462. 'type' => 'int',
  9463. 'not NULL' => '1',
  9464. ),
  9465. 'type_id' => array(
  9466. 'type' => 'int',
  9467. 'not NULL' => '1',
  9468. ),
  9469. 'value' => array(
  9470. 'type' => 'text',
  9471. 'not NULL' => '',
  9472. ),
  9473. 'rank' => array(
  9474. 'type' => 'int',
  9475. 'not NULL' => '1',
  9476. 'default' => '0',
  9477. ),
  9478. ),
  9479. 'primary key' => array(
  9480. 0 => 'stock_relationship_id',
  9481. ),
  9482. 'unique keys' => array(
  9483. 'stock_relationship_c1' => array(
  9484. 0 => 'subject_id',
  9485. 1 => 'object_id',
  9486. 2 => 'type_id',
  9487. 3 => 'rank',
  9488. ),
  9489. ),
  9490. 'indexes' => array(
  9491. 'stock_relationship_idx1' => array(
  9492. 0 => 'subject_id',
  9493. ),
  9494. 'stock_relationship_idx2' => array(
  9495. 0 => 'object_id',
  9496. ),
  9497. 'stock_relationship_idx3' => array(
  9498. 0 => 'type_id',
  9499. ),
  9500. ),
  9501. 'foreign keys' => array(
  9502. 'cvterm' => array(
  9503. 'table' => 'cvterm',
  9504. 'columns' => array(
  9505. 'type_id' => 'cvterm_id',
  9506. ),
  9507. ),
  9508. 'stock' => array(
  9509. 'table' => 'stock',
  9510. 'columns' => array(
  9511. 'subject_id' => 'stock_id',
  9512. 'object_id' => 'stock_id',
  9513. ),
  9514. ),
  9515. ),
  9516. );
  9517. return $description;
  9518. }
  9519. /**
  9520. * Implements hook_chado_schema_v1_11_stock_relationship_pub()
  9521. * Purpose: To describe the structure of 'stock_relationship_pub' to tripal
  9522. * @see chado_insert_record()
  9523. * @see chado_update_record()
  9524. * @see chado_select_record()
  9525. *
  9526. * @return
  9527. * An array describing the 'stock_relationship_pub' table
  9528. *
  9529. * @ingroup tripal_chado_v1.11_schema_api
  9530. *
  9531. */
  9532. function tripal_chado_chado_schema_v1_11_stock_relationship_pub() {
  9533. $description = array(
  9534. 'table' => 'stock_relationship_pub',
  9535. 'fields' => array(
  9536. 'stock_relationship_pub_id' => array(
  9537. 'type' => 'serial',
  9538. 'not NULL' => '1',
  9539. ),
  9540. 'stock_relationship_id' => array(
  9541. 'type' => 'int',
  9542. 'not NULL' => '1',
  9543. ),
  9544. 'pub_id' => array(
  9545. 'type' => 'int',
  9546. 'not NULL' => '1',
  9547. ),
  9548. ),
  9549. 'primary key' => array(
  9550. 0 => 'stock_relationship_pub_id',
  9551. ),
  9552. 'unique keys' => array(
  9553. 'stock_relationship_pub_c1' => array(
  9554. 0 => 'stock_relationship_id',
  9555. 1 => 'pub_id',
  9556. ),
  9557. ),
  9558. 'indexes' => array(
  9559. 'stock_relationship_pub_idx1' => array(
  9560. 0 => 'stock_relationship_id',
  9561. ),
  9562. 'stock_relationship_pub_idx2' => array(
  9563. 0 => 'pub_id',
  9564. ),
  9565. ),
  9566. 'foreign keys' => array(
  9567. 'pub' => array(
  9568. 'table' => 'pub',
  9569. 'columns' => array(
  9570. 'pub_id' => 'pub_id',
  9571. ),
  9572. ),
  9573. 'stock_relationship' => array(
  9574. 'table' => 'stock_relationship',
  9575. 'columns' => array(
  9576. 'stock_relationship_id' => 'stock_relationship_id',
  9577. ),
  9578. ),
  9579. ),
  9580. );
  9581. return $description;
  9582. }
  9583. /**
  9584. * Implements hook_chado_schema_v1_11_stockcollection()
  9585. * Purpose: To describe the structure of 'stockcollection' to tripal
  9586. * @see chado_insert_record()
  9587. * @see chado_update_record()
  9588. * @see chado_select_record()
  9589. *
  9590. * @return
  9591. * An array describing the 'stockcollection' table
  9592. *
  9593. * @ingroup tripal_chado_v1.11_schema_api
  9594. *
  9595. */
  9596. function tripal_chado_chado_schema_v1_11_stockcollection() {
  9597. $description = array(
  9598. 'table' => 'stockcollection',
  9599. 'fields' => array(
  9600. 'stockcollection_id' => array(
  9601. 'type' => 'serial',
  9602. 'not NULL' => '1',
  9603. ),
  9604. 'type_id' => array(
  9605. 'type' => 'int',
  9606. 'not NULL' => '1',
  9607. ),
  9608. 'contact_id' => array(
  9609. 'type' => 'int',
  9610. 'not NULL' => '',
  9611. ),
  9612. 'name' => array(
  9613. 'type' => 'varchar',
  9614. 'length' => '255',
  9615. 'not NULL' => '',
  9616. ),
  9617. 'uniquename' => array(
  9618. 'type' => 'text',
  9619. 'not NULL' => '1',
  9620. ),
  9621. ),
  9622. 'primary key' => array(
  9623. 0 => 'stockcollection_id',
  9624. ),
  9625. 'unique keys' => array(
  9626. 'stockcollection_c1' => array(
  9627. 0 => 'uniquename',
  9628. 1 => 'type_id',
  9629. ),
  9630. ),
  9631. 'indexes' => array(
  9632. 'stockcollection_idx1' => array(
  9633. 0 => 'contact_id',
  9634. ),
  9635. 'stockcollection_idx2' => array(
  9636. 0 => 'type_id',
  9637. ),
  9638. 'stockcollection_idx3' => array(
  9639. 0 => 'uniquename',
  9640. ),
  9641. 'stockcollection_name_ind1' => array(
  9642. 0 => 'name',
  9643. ),
  9644. ),
  9645. 'foreign keys' => array(
  9646. 'cvterm' => array(
  9647. 'table' => 'cvterm',
  9648. 'columns' => array(
  9649. 'type_id' => 'cvterm_id',
  9650. ),
  9651. ),
  9652. 'contact' => array(
  9653. 'table' => 'contact',
  9654. 'columns' => array(
  9655. 'contact_id' => 'contact_id',
  9656. ),
  9657. ),
  9658. ),
  9659. );
  9660. return $description;
  9661. }
  9662. /**
  9663. * Implements hook_chado_schema_v1_11_stockcollection_stock()
  9664. * Purpose: To describe the structure of 'stockcollection_stock' to tripal
  9665. * @see chado_insert_record()
  9666. * @see chado_update_record()
  9667. * @see chado_select_record()
  9668. *
  9669. * @return
  9670. * An array describing the 'stockcollection_stock' table
  9671. *
  9672. * @ingroup tripal_chado_v1.11_schema_api
  9673. *
  9674. */
  9675. function tripal_chado_chado_schema_v1_11_stockcollection_stock() {
  9676. $description = array(
  9677. 'table' => 'stockcollection_stock',
  9678. 'fields' => array(
  9679. 'stockcollection_stock_id' => array(
  9680. 'type' => 'serial',
  9681. 'not NULL' => '1',
  9682. ),
  9683. 'stockcollection_id' => array(
  9684. 'type' => 'int',
  9685. 'not NULL' => '1',
  9686. ),
  9687. 'stock_id' => array(
  9688. 'type' => 'int',
  9689. 'not NULL' => '1',
  9690. ),
  9691. ),
  9692. 'primary key' => array(
  9693. 0 => 'stockcollection_stock_id',
  9694. ),
  9695. 'unique keys' => array(
  9696. 'stockcollection_stock_c1' => array(
  9697. 0 => 'stockcollection_id',
  9698. 1 => 'stock_id',
  9699. ),
  9700. ),
  9701. 'indexes' => array(
  9702. 'stockcollection_stock_idx1' => array(
  9703. 0 => 'stockcollection_id',
  9704. ),
  9705. 'stockcollection_stock_idx2' => array(
  9706. 0 => 'stock_id',
  9707. ),
  9708. ),
  9709. 'foreign keys' => array(
  9710. 'stock' => array(
  9711. 'table' => 'stock',
  9712. 'columns' => array(
  9713. 'stock_id' => 'stock_id',
  9714. ),
  9715. ),
  9716. 'stockcollection' => array(
  9717. 'table' => 'stockcollection',
  9718. 'columns' => array(
  9719. 'stockcollection_id' => 'stockcollection_id',
  9720. ),
  9721. ),
  9722. ),
  9723. );
  9724. return $description;
  9725. }
  9726. /**
  9727. * Implements hook_chado_schema_v1_11_stockcollectionprop()
  9728. * Purpose: To describe the structure of 'stockcollectionprop' to tripal
  9729. * @see chado_insert_record()
  9730. * @see chado_update_record()
  9731. * @see chado_select_record()
  9732. *
  9733. * @return
  9734. * An array describing the 'stockcollectionprop' table
  9735. *
  9736. * @ingroup tripal_chado_v1.11_schema_api
  9737. *
  9738. */
  9739. function tripal_chado_chado_schema_v1_11_stockcollectionprop() {
  9740. $description = array(
  9741. 'table' => 'stockcollectionprop',
  9742. 'fields' => array(
  9743. 'stockcollectionprop_id' => array(
  9744. 'type' => 'serial',
  9745. 'not NULL' => '1',
  9746. ),
  9747. 'stockcollection_id' => array(
  9748. 'type' => 'int',
  9749. 'not NULL' => '1',
  9750. ),
  9751. 'type_id' => array(
  9752. 'type' => 'int',
  9753. 'not NULL' => '1',
  9754. ),
  9755. 'value' => array(
  9756. 'type' => 'text',
  9757. 'not NULL' => '',
  9758. ),
  9759. 'rank' => array(
  9760. 'type' => 'int',
  9761. 'not NULL' => '1',
  9762. 'default' => '0',
  9763. ),
  9764. ),
  9765. 'primary key' => array(
  9766. 0 => 'stockcollectionprop_id',
  9767. ),
  9768. 'unique keys' => array(
  9769. 'stockcollectionprop_c1' => array(
  9770. 0 => 'stockcollection_id',
  9771. 1 => 'type_id',
  9772. 2 => 'rank',
  9773. ),
  9774. ),
  9775. 'indexes' => array(
  9776. 'stockcollectionprop_idx1' => array(
  9777. 0 => 'stockcollection_id',
  9778. ),
  9779. 'stockcollectionprop_idx2' => array(
  9780. 0 => 'type_id',
  9781. ),
  9782. ),
  9783. 'foreign keys' => array(
  9784. 'cvterm' => array(
  9785. 'table' => 'cvterm',
  9786. 'columns' => array(
  9787. 'type_id' => 'cvterm_id',
  9788. ),
  9789. ),
  9790. 'stockcollection' => array(
  9791. 'table' => 'stockcollection',
  9792. 'columns' => array(
  9793. 'stockcollection_id' => 'stockcollection_id',
  9794. ),
  9795. ),
  9796. ),
  9797. );
  9798. return $description;
  9799. }
  9800. /**
  9801. * Implements hook_chado_schema_v1_11_stockprop()
  9802. * Purpose: To describe the structure of 'stockprop' to tripal
  9803. * @see chado_insert_record()
  9804. * @see chado_update_record()
  9805. * @see chado_select_record()
  9806. *
  9807. * @return
  9808. * An array describing the 'stockprop' table
  9809. *
  9810. * @ingroup tripal_chado_v1.11_schema_api
  9811. *
  9812. */
  9813. function tripal_chado_chado_schema_v1_11_stockprop() {
  9814. $description = array(
  9815. 'table' => 'stockprop',
  9816. 'fields' => array(
  9817. 'stockprop_id' => array(
  9818. 'type' => 'serial',
  9819. 'not NULL' => '1',
  9820. ),
  9821. 'stock_id' => array(
  9822. 'type' => 'int',
  9823. 'not NULL' => '1',
  9824. ),
  9825. 'type_id' => array(
  9826. 'type' => 'int',
  9827. 'not NULL' => '1',
  9828. ),
  9829. 'value' => array(
  9830. 'type' => 'text',
  9831. 'not NULL' => '',
  9832. ),
  9833. 'rank' => array(
  9834. 'type' => 'int',
  9835. 'not NULL' => '1',
  9836. 'default' => '0',
  9837. ),
  9838. ),
  9839. 'primary key' => array(
  9840. 0 => 'stockprop_id',
  9841. ),
  9842. 'unique keys' => array(
  9843. 'stockprop_c1' => array(
  9844. 0 => 'stock_id',
  9845. 1 => 'type_id',
  9846. 2 => 'rank',
  9847. ),
  9848. ),
  9849. 'indexes' => array(
  9850. 'stockprop_idx1' => array(
  9851. 0 => 'stock_id',
  9852. ),
  9853. 'stockprop_idx2' => array(
  9854. 0 => 'type_id',
  9855. ),
  9856. ),
  9857. 'foreign keys' => array(
  9858. 'cvterm' => array(
  9859. 'table' => 'cvterm',
  9860. 'columns' => array(
  9861. 'type_id' => 'cvterm_id',
  9862. ),
  9863. ),
  9864. 'stock' => array(
  9865. 'table' => 'stock',
  9866. 'columns' => array(
  9867. 'stock_id' => 'stock_id',
  9868. ),
  9869. ),
  9870. ),
  9871. );
  9872. return $description;
  9873. }
  9874. /**
  9875. * Implements hook_chado_schema_v1_11_stockprop_pub()
  9876. * Purpose: To describe the structure of 'stockprop_pub' to tripal
  9877. * @see chado_insert_record()
  9878. * @see chado_update_record()
  9879. * @see chado_select_record()
  9880. *
  9881. * @return
  9882. * An array describing the 'stockprop_pub' table
  9883. *
  9884. * @ingroup tripal_chado_v1.11_schema_api
  9885. *
  9886. */
  9887. function tripal_chado_chado_schema_v1_11_stockprop_pub() {
  9888. $description = array(
  9889. 'table' => 'stockprop_pub',
  9890. 'fields' => array(
  9891. 'stockprop_pub_id' => array(
  9892. 'type' => 'serial',
  9893. 'not NULL' => '1',
  9894. ),
  9895. 'stockprop_id' => array(
  9896. 'type' => 'int',
  9897. 'not NULL' => '1',
  9898. ),
  9899. 'pub_id' => array(
  9900. 'type' => 'int',
  9901. 'not NULL' => '1',
  9902. ),
  9903. ),
  9904. 'primary key' => array(
  9905. 0 => 'stockprop_pub_id',
  9906. ),
  9907. 'unique keys' => array(
  9908. 'stockprop_pub_c1' => array(
  9909. 0 => 'stockprop_id',
  9910. 1 => 'pub_id',
  9911. ),
  9912. ),
  9913. 'indexes' => array(
  9914. 'stockprop_pub_idx1' => array(
  9915. 0 => 'stockprop_id',
  9916. ),
  9917. 'stockprop_pub_idx2' => array(
  9918. 0 => 'pub_id',
  9919. ),
  9920. ),
  9921. 'foreign keys' => array(
  9922. 'pub' => array(
  9923. 'table' => 'pub',
  9924. 'columns' => array(
  9925. 'pub_id' => 'pub_id',
  9926. ),
  9927. ),
  9928. 'stockprop' => array(
  9929. 'table' => 'stockprop',
  9930. 'columns' => array(
  9931. 'stockprop_id' => 'stockprop_id',
  9932. ),
  9933. ),
  9934. ),
  9935. );
  9936. return $description;
  9937. }
  9938. /**
  9939. * Implements hook_chado_schema_v1_11_study()
  9940. * Purpose: To describe the structure of 'study' to tripal
  9941. * @see chado_insert_record()
  9942. * @see chado_update_record()
  9943. * @see chado_select_record()
  9944. *
  9945. * @return
  9946. * An array describing the 'study' table
  9947. *
  9948. * @ingroup tripal_chado_v1.11_schema_api
  9949. *
  9950. */
  9951. function tripal_chado_chado_schema_v1_11_study() {
  9952. $description = array(
  9953. 'table' => 'study',
  9954. 'fields' => array(
  9955. 'study_id' => array(
  9956. 'type' => 'serial',
  9957. 'not NULL' => '1',
  9958. ),
  9959. 'contact_id' => array(
  9960. 'type' => 'int',
  9961. 'not NULL' => '1',
  9962. ),
  9963. 'pub_id' => array(
  9964. 'type' => 'int',
  9965. 'not NULL' => '',
  9966. ),
  9967. 'dbxref_id' => array(
  9968. 'type' => 'int',
  9969. 'not NULL' => '',
  9970. ),
  9971. 'name' => array(
  9972. 'type' => 'text',
  9973. 'not NULL' => '1',
  9974. ),
  9975. 'description' => array(
  9976. 'type' => 'text',
  9977. 'not NULL' => '',
  9978. ),
  9979. ),
  9980. 'primary key' => array(
  9981. 0 => 'study_id',
  9982. ),
  9983. 'unique keys' => array(
  9984. 'study_c1' => array(
  9985. 0 => 'name',
  9986. ),
  9987. ),
  9988. 'indexes' => array(
  9989. 'study_idx1' => array(
  9990. 0 => 'contact_id',
  9991. ),
  9992. 'study_idx2' => array(
  9993. 0 => 'pub_id',
  9994. ),
  9995. 'study_idx3' => array(
  9996. 0 => 'dbxref_id',
  9997. ),
  9998. ),
  9999. 'foreign keys' => array(
  10000. 'dbxref' => array(
  10001. 'table' => 'dbxref',
  10002. 'columns' => array(
  10003. 'dbxref_id' => 'dbxref_id',
  10004. ),
  10005. ),
  10006. 'pub' => array(
  10007. 'table' => 'pub',
  10008. 'columns' => array(
  10009. 'pub_id' => 'pub_id',
  10010. ),
  10011. ),
  10012. 'contact' => array(
  10013. 'table' => 'contact',
  10014. 'columns' => array(
  10015. 'contact_id' => 'contact_id',
  10016. ),
  10017. ),
  10018. ),
  10019. );
  10020. return $description;
  10021. }
  10022. /**
  10023. * Implements hook_chado_schema_v1_11_study_assay()
  10024. * Purpose: To describe the structure of 'study_assay' to tripal
  10025. * @see chado_insert_record()
  10026. * @see chado_update_record()
  10027. * @see chado_select_record()
  10028. *
  10029. * @return
  10030. * An array describing the 'study_assay' table
  10031. *
  10032. * @ingroup tripal_chado_v1.11_schema_api
  10033. *
  10034. */
  10035. function tripal_chado_chado_schema_v1_11_study_assay() {
  10036. $description = array(
  10037. 'table' => 'study_assay',
  10038. 'fields' => array(
  10039. 'study_assay_id' => array(
  10040. 'type' => 'serial',
  10041. 'not NULL' => '1',
  10042. ),
  10043. 'study_id' => array(
  10044. 'type' => 'int',
  10045. 'not NULL' => '1',
  10046. ),
  10047. 'assay_id' => array(
  10048. 'type' => 'int',
  10049. 'not NULL' => '1',
  10050. ),
  10051. ),
  10052. 'primary key' => array(
  10053. 0 => 'study_assay_id',
  10054. ),
  10055. 'unique keys' => array(
  10056. 'study_assay_c1' => array(
  10057. 0 => 'study_id',
  10058. 1 => 'assay_id',
  10059. ),
  10060. ),
  10061. 'indexes' => array(
  10062. 'study_assay_idx1' => array(
  10063. 0 => 'study_id',
  10064. ),
  10065. 'study_assay_idx2' => array(
  10066. 0 => 'assay_id',
  10067. ),
  10068. ),
  10069. 'foreign keys' => array(
  10070. 'assay' => array(
  10071. 'table' => 'assay',
  10072. 'columns' => array(
  10073. 'assay_id' => 'assay_id',
  10074. ),
  10075. ),
  10076. 'study' => array(
  10077. 'table' => 'study',
  10078. 'columns' => array(
  10079. 'study_id' => 'study_id',
  10080. ),
  10081. ),
  10082. ),
  10083. );
  10084. return $description;
  10085. }
  10086. /**
  10087. * Implements hook_chado_schema_v1_11_studydesign()
  10088. * Purpose: To describe the structure of 'studydesign' to tripal
  10089. * @see chado_insert_record()
  10090. * @see chado_update_record()
  10091. * @see chado_select_record()
  10092. *
  10093. * @return
  10094. * An array describing the 'studydesign' table
  10095. *
  10096. * @ingroup tripal_chado_v1.11_schema_api
  10097. *
  10098. */
  10099. function tripal_chado_chado_schema_v1_11_studydesign() {
  10100. $description = array(
  10101. 'table' => 'studydesign',
  10102. 'fields' => array(
  10103. 'studydesign_id' => array(
  10104. 'type' => 'serial',
  10105. 'not NULL' => '1',
  10106. ),
  10107. 'study_id' => array(
  10108. 'type' => 'int',
  10109. 'not NULL' => '1',
  10110. ),
  10111. 'description' => array(
  10112. 'type' => 'text',
  10113. 'not NULL' => '',
  10114. ),
  10115. ),
  10116. 'primary key' => array(
  10117. 0 => 'studydesign_id',
  10118. ),
  10119. 'unique keys' => array(
  10120. ),
  10121. 'indexes' => array(
  10122. 'studydesign_idx1' => array(
  10123. 0 => 'study_id',
  10124. ),
  10125. ),
  10126. 'foreign keys' => array(
  10127. 'study' => array(
  10128. 'table' => 'study',
  10129. 'columns' => array(
  10130. 'study_id' => 'study_id',
  10131. ),
  10132. ),
  10133. ),
  10134. );
  10135. return $description;
  10136. }
  10137. /**
  10138. * Implements hook_chado_schema_v1_11_studydesignprop()
  10139. * Purpose: To describe the structure of 'studydesignprop' to tripal
  10140. * @see chado_insert_record()
  10141. * @see chado_update_record()
  10142. * @see chado_select_record()
  10143. *
  10144. * @return
  10145. * An array describing the 'studydesignprop' table
  10146. *
  10147. * @ingroup tripal_chado_v1.11_schema_api
  10148. *
  10149. */
  10150. function tripal_chado_chado_schema_v1_11_studydesignprop() {
  10151. $description = array(
  10152. 'table' => 'studydesignprop',
  10153. 'fields' => array(
  10154. 'studydesignprop_id' => array(
  10155. 'type' => 'serial',
  10156. 'not NULL' => '1',
  10157. ),
  10158. 'studydesign_id' => array(
  10159. 'type' => 'int',
  10160. 'not NULL' => '1',
  10161. ),
  10162. 'type_id' => array(
  10163. 'type' => 'int',
  10164. 'not NULL' => '1',
  10165. ),
  10166. 'value' => array(
  10167. 'type' => 'text',
  10168. 'not NULL' => '',
  10169. ),
  10170. 'rank' => array(
  10171. 'type' => 'int',
  10172. 'not NULL' => '1',
  10173. 'default' => '0',
  10174. ),
  10175. ),
  10176. 'primary key' => array(
  10177. 0 => 'studydesignprop_id',
  10178. ),
  10179. 'unique keys' => array(
  10180. 'studydesignprop_c1' => array(
  10181. 0 => 'studydesign_id',
  10182. 1 => 'type_id',
  10183. 2 => 'rank',
  10184. ),
  10185. ),
  10186. 'indexes' => array(
  10187. 'studydesignprop_idx1' => array(
  10188. 0 => 'studydesign_id',
  10189. ),
  10190. 'studydesignprop_idx2' => array(
  10191. 0 => 'type_id',
  10192. ),
  10193. ),
  10194. 'foreign keys' => array(
  10195. 'cvterm' => array(
  10196. 'table' => 'cvterm',
  10197. 'columns' => array(
  10198. 'type_id' => 'cvterm_id',
  10199. ),
  10200. ),
  10201. 'studydesign' => array(
  10202. 'table' => 'studydesign',
  10203. 'columns' => array(
  10204. 'studydesign_id' => 'studydesign_id',
  10205. ),
  10206. ),
  10207. ),
  10208. );
  10209. return $description;
  10210. }
  10211. /**
  10212. * Implements hook_chado_schema_v1_11_studyfactor()
  10213. * Purpose: To describe the structure of 'studyfactor' to tripal
  10214. * @see chado_insert_record()
  10215. * @see chado_update_record()
  10216. * @see chado_select_record()
  10217. *
  10218. * @return
  10219. * An array describing the 'studyfactor' table
  10220. *
  10221. * @ingroup tripal_chado_v1.11_schema_api
  10222. *
  10223. */
  10224. function tripal_chado_chado_schema_v1_11_studyfactor() {
  10225. $description = array(
  10226. 'table' => 'studyfactor',
  10227. 'fields' => array(
  10228. 'studyfactor_id' => array(
  10229. 'type' => 'serial',
  10230. 'not NULL' => '1',
  10231. ),
  10232. 'studydesign_id' => array(
  10233. 'type' => 'int',
  10234. 'not NULL' => '1',
  10235. ),
  10236. 'type_id' => array(
  10237. 'type' => 'int',
  10238. 'not NULL' => '',
  10239. ),
  10240. 'name' => array(
  10241. 'type' => 'text',
  10242. 'not NULL' => '1',
  10243. ),
  10244. 'description' => array(
  10245. 'type' => 'text',
  10246. 'not NULL' => '',
  10247. ),
  10248. ),
  10249. 'primary key' => array(
  10250. 0 => 'studyfactor_id',
  10251. ),
  10252. 'unique keys' => array(
  10253. ),
  10254. 'indexes' => array(
  10255. 'studyfactor_idx1' => array(
  10256. 0 => 'studydesign_id',
  10257. ),
  10258. 'studyfactor_idx2' => array(
  10259. 0 => 'type_id',
  10260. ),
  10261. ),
  10262. 'foreign keys' => array(
  10263. 'cvterm' => array(
  10264. 'table' => 'cvterm',
  10265. 'columns' => array(
  10266. 'type_id' => 'cvterm_id',
  10267. ),
  10268. ),
  10269. 'studydesign' => array(
  10270. 'table' => 'studydesign',
  10271. 'columns' => array(
  10272. 'studydesign_id' => 'studydesign_id',
  10273. ),
  10274. ),
  10275. ),
  10276. );
  10277. return $description;
  10278. }
  10279. /**
  10280. * Implements hook_chado_schema_v1_11_studyfactorvalue()
  10281. * Purpose: To describe the structure of 'studyfactorvalue' to tripal
  10282. * @see chado_insert_record()
  10283. * @see chado_update_record()
  10284. * @see chado_select_record()
  10285. *
  10286. * @return
  10287. * An array describing the 'studyfactorvalue' table
  10288. *
  10289. * @ingroup tripal_chado_v1.11_schema_api
  10290. *
  10291. */
  10292. function tripal_chado_chado_schema_v1_11_studyfactorvalue() {
  10293. $description = array(
  10294. 'table' => 'studyfactorvalue',
  10295. 'fields' => array(
  10296. 'studyfactorvalue_id' => array(
  10297. 'type' => 'serial',
  10298. 'not NULL' => '1',
  10299. ),
  10300. 'studyfactor_id' => array(
  10301. 'type' => 'int',
  10302. 'not NULL' => '1',
  10303. ),
  10304. 'assay_id' => array(
  10305. 'type' => 'int',
  10306. 'not NULL' => '1',
  10307. ),
  10308. 'factorvalue' => array(
  10309. 'type' => 'text',
  10310. 'not NULL' => '',
  10311. ),
  10312. 'name' => array(
  10313. 'type' => 'text',
  10314. 'not NULL' => '',
  10315. ),
  10316. 'rank' => array(
  10317. 'type' => 'int',
  10318. 'not NULL' => '1',
  10319. 'default' => '0',
  10320. ),
  10321. ),
  10322. 'primary key' => array(
  10323. 0 => 'studyfactorvalue_id',
  10324. ),
  10325. 'unique keys' => array(
  10326. ),
  10327. 'indexes' => array(
  10328. 'studyfactorvalue_idx1' => array(
  10329. 0 => 'studyfactor_id',
  10330. ),
  10331. 'studyfactorvalue_idx2' => array(
  10332. 0 => 'assay_id',
  10333. ),
  10334. ),
  10335. 'foreign keys' => array(
  10336. 'assay' => array(
  10337. 'table' => 'assay',
  10338. 'columns' => array(
  10339. 'assay_id' => 'assay_id',
  10340. ),
  10341. ),
  10342. 'studyfactor' => array(
  10343. 'table' => 'studyfactor',
  10344. 'columns' => array(
  10345. 'studyfactor_id' => 'studyfactor_id',
  10346. ),
  10347. ),
  10348. ),
  10349. );
  10350. return $description;
  10351. }
  10352. /**
  10353. * Implements hook_chado_schema_v1_11_studyprop()
  10354. * Purpose: To describe the structure of 'studyprop' to tripal
  10355. * @see chado_insert_record()
  10356. * @see chado_update_record()
  10357. * @see chado_select_record()
  10358. *
  10359. * @return
  10360. * An array describing the 'studyprop' table
  10361. *
  10362. * @ingroup tripal_chado_v1.11_schema_api
  10363. *
  10364. */
  10365. function tripal_chado_chado_schema_v1_11_studyprop() {
  10366. $description = array(
  10367. 'table' => 'studyprop',
  10368. 'fields' => array(
  10369. 'studyprop_id' => array(
  10370. 'type' => 'serial',
  10371. 'not NULL' => '1',
  10372. ),
  10373. 'study_id' => array(
  10374. 'type' => 'int',
  10375. 'not NULL' => '1',
  10376. ),
  10377. 'type_id' => array(
  10378. 'type' => 'int',
  10379. 'not NULL' => '1',
  10380. ),
  10381. 'value' => array(
  10382. 'type' => 'text',
  10383. 'not NULL' => '',
  10384. ),
  10385. 'rank' => array(
  10386. 'type' => 'int',
  10387. 'not NULL' => '1',
  10388. 'default' => '0',
  10389. ),
  10390. ),
  10391. 'primary key' => array(
  10392. 0 => 'studyprop_id',
  10393. ),
  10394. 'unique keys' => array(
  10395. 'study_id' => array(
  10396. 0 => 'study_id',
  10397. 1 => 'type_id',
  10398. 2 => 'rank',
  10399. ),
  10400. ),
  10401. 'indexes' => array(
  10402. 'studyprop_idx1' => array(
  10403. 0 => 'study_id',
  10404. ),
  10405. 'studyprop_idx2' => array(
  10406. 0 => 'type_id',
  10407. ),
  10408. ),
  10409. 'foreign keys' => array(
  10410. 'cvterm' => array(
  10411. 'table' => 'cvterm',
  10412. 'columns' => array(
  10413. 'type_id' => 'cvterm_id',
  10414. ),
  10415. ),
  10416. 'study' => array(
  10417. 'table' => 'study',
  10418. 'columns' => array(
  10419. 'study_id' => 'study_id',
  10420. ),
  10421. ),
  10422. ),
  10423. );
  10424. return $description;
  10425. }
  10426. /**
  10427. * Implements hook_chado_schema_v1_11_studyprop_feature()
  10428. * Purpose: To describe the structure of 'studyprop_feature' to tripal
  10429. * @see chado_insert_record()
  10430. * @see chado_update_record()
  10431. * @see chado_select_record()
  10432. *
  10433. * @return
  10434. * An array describing the 'studyprop_feature' table
  10435. *
  10436. * @ingroup tripal_chado_v1.11_schema_api
  10437. *
  10438. */
  10439. function tripal_chado_chado_schema_v1_11_studyprop_feature() {
  10440. $description = array(
  10441. 'table' => 'studyprop_feature',
  10442. 'fields' => array(
  10443. 'studyprop_feature_id' => array(
  10444. 'type' => 'serial',
  10445. 'not NULL' => '1',
  10446. ),
  10447. 'studyprop_id' => array(
  10448. 'type' => 'int',
  10449. 'not NULL' => '1',
  10450. ),
  10451. 'feature_id' => array(
  10452. 'type' => 'int',
  10453. 'not NULL' => '1',
  10454. ),
  10455. 'type_id' => array(
  10456. 'type' => 'int',
  10457. 'not NULL' => '',
  10458. ),
  10459. ),
  10460. 'primary key' => array(
  10461. 0 => 'studyprop_feature_id',
  10462. ),
  10463. 'unique keys' => array(
  10464. 'studyprop_id' => array(
  10465. 0 => 'studyprop_id',
  10466. 1 => 'feature_id',
  10467. ),
  10468. ),
  10469. 'indexes' => array(
  10470. 'studyprop_feature_idx1' => array(
  10471. 0 => 'studyprop_id',
  10472. ),
  10473. 'studyprop_feature_idx2' => array(
  10474. 0 => 'feature_id',
  10475. ),
  10476. ),
  10477. 'foreign keys' => array(
  10478. 'cvterm' => array(
  10479. 'table' => 'cvterm',
  10480. 'columns' => array(
  10481. 'type_id' => 'cvterm_id',
  10482. ),
  10483. ),
  10484. 'feature' => array(
  10485. 'table' => 'feature',
  10486. 'columns' => array(
  10487. 'feature_id' => 'feature_id',
  10488. ),
  10489. ),
  10490. 'studyprop' => array(
  10491. 'table' => 'studyprop',
  10492. 'columns' => array(
  10493. 'studyprop_id' => 'studyprop_id',
  10494. ),
  10495. ),
  10496. ),
  10497. );
  10498. return $description;
  10499. }
  10500. /**
  10501. * Implements hook_chado_schema_v1_11_synonym()
  10502. * Purpose: To describe the structure of 'synonym' to tripal
  10503. * @see chado_insert_record()
  10504. * @see chado_update_record()
  10505. * @see chado_select_record()
  10506. *
  10507. * @return
  10508. * An array describing the 'synonym' table
  10509. *
  10510. * @ingroup tripal_chado_v1.11_schema_api
  10511. *
  10512. */
  10513. function tripal_chado_chado_schema_v1_11_synonym() {
  10514. $description = array(
  10515. 'table' => 'synonym',
  10516. 'fields' => array(
  10517. 'synonym_id' => array(
  10518. 'type' => 'serial',
  10519. 'not NULL' => '1',
  10520. ),
  10521. 'name' => array(
  10522. 'type' => 'varchar',
  10523. 'length' => '255',
  10524. 'not NULL' => '1',
  10525. ),
  10526. 'type_id' => array(
  10527. 'type' => 'int',
  10528. 'not NULL' => '1',
  10529. ),
  10530. 'synonym_sgml' => array(
  10531. 'type' => 'varchar',
  10532. 'length' => '255',
  10533. 'not NULL' => '1',
  10534. ),
  10535. ),
  10536. 'primary key' => array(
  10537. 0 => 'synonym_id',
  10538. ),
  10539. 'unique keys' => array(
  10540. 'synonym_c1' => array(
  10541. 0 => 'name',
  10542. 1 => 'type_id',
  10543. ),
  10544. ),
  10545. 'indexes' => array(
  10546. 'synonym_idx1' => array(
  10547. 0 => 'type_id',
  10548. ),
  10549. ),
  10550. 'foreign keys' => array(
  10551. 'cvterm' => array(
  10552. 'table' => 'cvterm',
  10553. 'columns' => array(
  10554. 'type_id' => 'cvterm_id',
  10555. ),
  10556. ),
  10557. ),
  10558. );
  10559. return $description;
  10560. }
  10561. /**
  10562. * Implements hook_chado_schema_v1_11_tableinfo()
  10563. * Purpose: To describe the structure of 'tableinfo' to tripal
  10564. * @see chado_insert_record()
  10565. * @see chado_update_record()
  10566. * @see chado_select_record()
  10567. *
  10568. * @return
  10569. * An array describing the 'tableinfo' table
  10570. *
  10571. * @ingroup tripal_chado_v1.11_schema_api
  10572. *
  10573. */
  10574. function tripal_chado_chado_schema_v1_11_tableinfo() {
  10575. $description = array(
  10576. 'table' => 'tableinfo',
  10577. 'fields' => array(
  10578. 'tableinfo_id' => array(
  10579. 'type' => 'serial',
  10580. 'not NULL' => '1',
  10581. ),
  10582. 'name' => array(
  10583. 'type' => 'varchar',
  10584. 'length' => '30',
  10585. 'not NULL' => '1',
  10586. ),
  10587. 'primary_key_column' => array(
  10588. 'type' => 'varchar',
  10589. 'length' => '30',
  10590. 'not NULL' => '',
  10591. ),
  10592. 'is_view' => array(
  10593. 'type' => 'int',
  10594. 'not NULL' => '1',
  10595. 'default' => '0',
  10596. ),
  10597. 'view_on_table_id' => array(
  10598. 'type' => 'int',
  10599. 'not NULL' => '',
  10600. ),
  10601. 'superclass_table_id' => array(
  10602. 'type' => 'int',
  10603. 'not NULL' => '',
  10604. ),
  10605. 'is_updateable' => array(
  10606. 'type' => 'int',
  10607. 'not NULL' => '1',
  10608. 'default' => '1',
  10609. ),
  10610. 'modification_date' => array(
  10611. 'type' => 'date',
  10612. 'not NULL' => '1',
  10613. 'default' => 'ow(',
  10614. ),
  10615. ),
  10616. 'primary key' => array(
  10617. 0 => 'tableinfo_id',
  10618. ),
  10619. 'unique keys' => array(
  10620. 'tableinfo_c1' => array(
  10621. 0 => 'name',
  10622. ),
  10623. ),
  10624. 'indexes' => array(
  10625. ),
  10626. 'foreign keys' => array(
  10627. ),
  10628. );
  10629. return $description;
  10630. }
  10631. /**
  10632. * Implements hook_chado_schema_v1_11_treatment()
  10633. * Purpose: To describe the structure of 'treatment' to tripal
  10634. * @see chado_insert_record()
  10635. * @see chado_update_record()
  10636. * @see chado_select_record()
  10637. *
  10638. * @return
  10639. * An array describing the 'treatment' table
  10640. *
  10641. * @ingroup tripal_chado_v1.11_schema_api
  10642. *
  10643. */
  10644. function tripal_chado_chado_schema_v1_11_treatment() {
  10645. $description = array(
  10646. 'table' => 'treatment',
  10647. 'fields' => array(
  10648. 'treatment_id' => array(
  10649. 'type' => 'serial',
  10650. 'not NULL' => '1',
  10651. ),
  10652. 'rank' => array(
  10653. 'type' => 'int',
  10654. 'not NULL' => '1',
  10655. 'default' => '0',
  10656. ),
  10657. 'biomaterial_id' => array(
  10658. 'type' => 'int',
  10659. 'not NULL' => '1',
  10660. ),
  10661. 'type_id' => array(
  10662. 'type' => 'int',
  10663. 'not NULL' => '1',
  10664. ),
  10665. 'protocol_id' => array(
  10666. 'type' => 'int',
  10667. 'not NULL' => '',
  10668. ),
  10669. 'name' => array(
  10670. 'type' => 'text',
  10671. 'not NULL' => '',
  10672. ),
  10673. ),
  10674. 'primary key' => array(
  10675. 0 => 'treatment_id',
  10676. ),
  10677. 'unique keys' => array(
  10678. ),
  10679. 'indexes' => array(
  10680. 'treatment_idx1' => array(
  10681. 0 => 'biomaterial_id',
  10682. ),
  10683. 'treatment_idx2' => array(
  10684. 0 => 'type_id',
  10685. ),
  10686. 'treatment_idx3' => array(
  10687. 0 => 'protocol_id',
  10688. ),
  10689. ),
  10690. 'foreign keys' => array(
  10691. 'cvterm' => array(
  10692. 'table' => 'cvterm',
  10693. 'columns' => array(
  10694. 'type_id' => 'cvterm_id',
  10695. ),
  10696. ),
  10697. 'protocol' => array(
  10698. 'table' => 'protocol',
  10699. 'columns' => array(
  10700. 'protocol_id' => 'protocol_id',
  10701. ),
  10702. ),
  10703. 'biomaterial' => array(
  10704. 'table' => 'biomaterial',
  10705. 'columns' => array(
  10706. 'biomaterial_id' => 'biomaterial_id',
  10707. ),
  10708. ),
  10709. ),
  10710. );
  10711. return $description;
  10712. }
  10713. /**
  10714. * Lists the table names in the v1.11 chado schema
  10715. *
  10716. * @return
  10717. * An array containing all of the table names
  10718. *
  10719. * @ingroup tripal_chado_v1.2_schema_api
  10720. *
  10721. */
  10722. function tripal_chado_chado_get_v1_11_tables() {
  10723. $tables = array(
  10724. 'acquisition',
  10725. 'acquisition_relationship',
  10726. 'acquisitionprop',
  10727. 'analysis',
  10728. 'analysisfeature',
  10729. 'analysisfeatureprop',
  10730. 'analysisprop',
  10731. 'arraydesign',
  10732. 'arraydesignprop',
  10733. 'assay',
  10734. 'assay_biomaterial',
  10735. 'assay_project',
  10736. 'assayprop',
  10737. 'biomaterial',
  10738. 'biomaterial_dbxref',
  10739. 'biomaterial_relationship',
  10740. 'biomaterial_treatment',
  10741. 'biomaterialprop',
  10742. 'cell_line',
  10743. 'cell_line_cvterm',
  10744. 'cell_line_cvtermprop',
  10745. 'cell_line_dbxref',
  10746. 'cell_line_feature',
  10747. 'cell_line_library',
  10748. 'cell_line_pub',
  10749. 'cell_line_relationship',
  10750. 'cell_line_synonym',
  10751. 'cell_lineprop',
  10752. 'cell_lineprop_pub',
  10753. 'channel',
  10754. 'contact',
  10755. 'contact_relationship',
  10756. 'control',
  10757. 'cv',
  10758. 'cvterm',
  10759. 'cvterm_dbxref',
  10760. 'cvterm_relationship',
  10761. 'cvtermpath',
  10762. 'cvtermprop',
  10763. 'cvtermsynonym',
  10764. 'db',
  10765. 'dbxref',
  10766. 'dbxrefprop',
  10767. 'eimage',
  10768. 'element',
  10769. 'element_relationship',
  10770. 'elementresult',
  10771. 'elementresult_relationship',
  10772. 'environment',
  10773. 'environment_cvterm',
  10774. 'expression',
  10775. 'expression_cvterm',
  10776. 'expression_cvtermprop',
  10777. 'expression_image',
  10778. 'expression_pub',
  10779. 'expressionprop',
  10780. 'feature',
  10781. 'feature_cvterm',
  10782. 'feature_cvterm_dbxref',
  10783. 'feature_cvterm_pub',
  10784. 'feature_cvtermprop',
  10785. 'feature_dbxref',
  10786. 'feature_expression',
  10787. 'feature_expressionprop',
  10788. 'feature_genotype',
  10789. 'feature_phenotype',
  10790. 'feature_pub',
  10791. 'feature_pubprop',
  10792. 'feature_relationship',
  10793. 'feature_relationship_pub',
  10794. 'feature_relationshipprop',
  10795. 'feature_relationshipprop_pub',
  10796. 'feature_synonym',
  10797. 'featureloc',
  10798. 'featureloc_pub',
  10799. 'featuremap',
  10800. 'featuremap_pub',
  10801. 'featurepos',
  10802. 'featureprop',
  10803. 'featureprop_pub',
  10804. 'featurerange',
  10805. 'genotype',
  10806. 'library',
  10807. 'library_cvterm',
  10808. 'library_dbxref',
  10809. 'library_feature',
  10810. 'library_pub',
  10811. 'library_synonym',
  10812. 'libraryprop',
  10813. 'libraryprop_pub',
  10814. 'magedocumentation',
  10815. 'mageml',
  10816. 'materialized_view',
  10817. 'organism',
  10818. 'organism_dbxref',
  10819. 'organismprop',
  10820. 'phendesc',
  10821. 'phenotype',
  10822. 'phenotype_comparison',
  10823. 'phenotype_comparison_cvterm',
  10824. 'phenotype_cvterm',
  10825. 'phenstatement',
  10826. 'phylonode',
  10827. 'phylonode_dbxref',
  10828. 'phylonode_organism',
  10829. 'phylonode_pub',
  10830. 'phylonode_relationship',
  10831. 'phylonodeprop',
  10832. 'phylotree',
  10833. 'phylotree_pub',
  10834. 'project',
  10835. 'protocol',
  10836. 'protocolparam',
  10837. 'pub',
  10838. 'pub_dbxref',
  10839. 'pub_relationship',
  10840. 'pubauthor',
  10841. 'pubprop',
  10842. 'quantification',
  10843. 'quantification_relationship',
  10844. 'quantificationprop',
  10845. 'stock',
  10846. 'stock_cvterm',
  10847. 'stock_dbxref',
  10848. 'stock_genotype',
  10849. 'stock_pub',
  10850. 'stock_relationship',
  10851. 'stock_relationship_pub',
  10852. 'stockcollection',
  10853. 'stockcollection_stock',
  10854. 'stockcollectionprop',
  10855. 'stockprop',
  10856. 'stockprop_pub',
  10857. 'study',
  10858. 'study_assay',
  10859. 'studydesign',
  10860. 'studydesignprop',
  10861. 'studyfactor',
  10862. 'studyfactorvalue',
  10863. 'studyprop',
  10864. 'studyprop_feature',
  10865. 'synonym',
  10866. 'tableinfo',
  10867. 'treatment'
  10868. );
  10869. return $tables;
  10870. }