<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Appendix: Database Tables/Columns &mdash; ASM 49u documentation</title>
      <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
      <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=86f27845" />

  
  
        <script src="_static/jquery.js?v=8dae8fb0"></script>
        <script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
        <script src="_static/documentation_options.js?v=1fe27ac2"></script>
        <script src="_static/doctools.js?v=888ff710"></script>
        <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Appendix: Entity Relationship Diagrams" href="relationships.html" />
    <link rel="prev" title="Appendix: CSV file import fields" href="csvimportfields.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="index.html" class="icon icon-home">
            ASM
          </a>
              <div class="version">
                49u
              </div>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="foreword.html">Foreword</a></li>
<li class="toctree-l1"><a class="reference internal" href="gettingstarted.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="searching.html">Search</a></li>
<li class="toctree-l1"><a class="reference internal" href="animals.html">Animals</a></li>
<li class="toctree-l1"><a class="reference internal" href="people.html">People</a></li>
<li class="toctree-l1"><a class="reference internal" href="movements.html">Movements</a></li>
<li class="toctree-l1"><a class="reference internal" href="documents.html">Documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="animalcontrol.html">Animal Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="boarding.html">Boarding</a></li>
<li class="toctree-l1"><a class="reference internal" href="clinic.html">Clinic</a></li>
<li class="toctree-l1"><a class="reference internal" href="events.html">Events</a></li>
<li class="toctree-l1"><a class="reference internal" href="lostandfound.html">Lost and Found</a></li>
<li class="toctree-l1"><a class="reference internal" href="waitinglist.html">Waiting List</a></li>
<li class="toctree-l1"><a class="reference internal" href="generaldiary.html">General Diary</a></li>
<li class="toctree-l1"><a class="reference internal" href="accounts.html">Accounts</a></li>
<li class="toctree-l1"><a class="reference internal" href="stockcontrol.html">Stock Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="reports.html">Reports</a></li>
<li class="toctree-l1"><a class="reference internal" href="onlineform.html">Online Forms</a></li>
<li class="toctree-l1"><a class="reference internal" href="paymentprocessors.html">Payment Processors</a></li>
<li class="toctree-l1"><a class="reference internal" href="rota.html">Rota</a></li>
<li class="toctree-l1"><a class="reference internal" href="mobile.html">Mobile Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="service.html">Service API</a></li>
<li class="toctree-l1"><a class="reference internal" href="publishing.html">Publishing</a></li>
<li class="toctree-l1"><a class="reference internal" href="mailmerge.html">Mail Merge Sources</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="options.html">Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Appendix: Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="csvimportfields.html">Appendix: CSV file import fields</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Appendix: Database Tables/Columns</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#adoption">adoption</a></li>
<li class="toctree-l2"><a class="reference internal" href="#animal">animal</a></li>
<li class="toctree-l2"><a class="reference internal" href="#animalcontrol">animalcontrol</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dbfs">dbfs</a></li>
<li class="toctree-l2"><a class="reference internal" href="#media">media</a></li>
<li class="toctree-l2"><a class="reference internal" href="#owner">owner</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="relationships.html">Appendix: Entity Relationship Diagrams</a></li>
<li class="toctree-l1"><a class="reference internal" href="website.html">Appendix: Integrating with Your Website</a></li>
<li class="toctree-l1"><a class="reference internal" href="onlineformfields.html">Appendix: Online Form import fields</a></li>
<li class="toctree-l1"><a class="reference internal" href="wordkeys.html">Appendix: Wordkeys</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">ASM</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Appendix: Database Tables/Columns</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/databasetables.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="appendix-database-tables-columns">
<h1>Appendix: Database Tables/Columns<a class="headerlink" href="#appendix-database-tables-columns" title="Link to this heading">¶</a></h1>
<section id="adoption">
<h2>adoption<a class="headerlink" href="#adoption" title="Link to this heading">¶</a></h2>
<p>The adoption table holds a row for each movement attached to an animal or person.</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>AdoptionNumber</dt><dd><p>VARCHAR
A unique string identifying this movement (defaults to adoption.ID)</p>
</dd>
<dt>AnimalID</dt><dd><p>INTEGER
Link to the animal table</p>
</dd>
<dt>OwnerID</dt><dd><p>INTEGER
Link to the owner table</p>
</dd>
<dt>RetailerID</dt><dd><p>INTEGER
Link to the owner table for a retailer (0 for no retailer)</p>
</dd>
<dt>OriginalRetailerMovementID</dt><dd><p>INTEGER
Link to another movement in this table for an original movement to retailer that started this adoption</p>
</dd>
<dt>EventID</dt><dd><p>INTEGER
Link to the event table for the adoption event this movement came from</p>
</dd>
<dt>MovementDate</dt><dd><p>TIMESTAMP
The date the animal moved</p>
</dd>
<dt>MovementType</dt><dd><p>INTEGER
Link to the lksmovementtype table for the type of animal movement (none = reservation, adoption, foster, transfer, escaped, stolen, reclaimed, etc)</p>
</dd>
<dt>InsuranceNumber</dt><dd><p>VARCHAR
If your shelter does short term insurance when adopting, the policy number</p>
</dd>
<dt>ReturnDate</dt><dd><p>TIMESTAMP
The date the animal came back to the shelter from this movement (or null for not returned)</p>
</dd>
<dt>ReturnedReasonID</dt><dd><p>INTEGER
Link to the entryreason table for reason for return</p>
</dd>
<dt>ReturnedByOwnerID</dt><dd><p>INTEGER
Link to the owner table for the person who returned the animal</p>
</dd>
<dt>ReasonForReturn</dt><dd><p>VARCHAR
Free text, the reason the animal was returned</p>
</dd>
<dt>ReservationDate</dt><dd><p>TIMESTAMP
For reservation movements, the reservation date</p>
</dd>
<dt>Donation</dt><dd><p>FLOAT
A total of all donations attached to this movement</p>
</dd>
<dt>ReservationCancelledDate</dt><dd><p>TIMESTAMP
If this is a reservation and it has been cancelled, the date it was cancelled</p>
</dd>
<dt>IsPermanentFoster</dt><dd><p>INTEGER
1 if this foster movement is permanent</p>
</dd>
<dt>IsTrial</dt><dd><p>INTEGER
1 if this is a trial adoption movement</p>
</dd>
<dt>TrialEndDate</dt><dd><p>TIMESTAMP
The date this trial ends if it is a trial adoption movement</p>
</dd>
<dt>Comments</dt><dd><p>VARCHAR
Movement comments</p>
</dd>
<dt>RecordVersion</dt><dd><p>INTEGER
Optimistic lock flag</p>
</dd>
<dt>CreatedBy</dt><dd><p>VARCHAR
User who created this record</p>
</dd>
<dt>CreatedDate</dt><dd><p>TIMESTAMP
Date this record was created</p>
</dd>
<dt>LastChangedBy</dt><dd><p>VARCHAR
User who last changed this record</p>
</dd>
<dt>LastChangedDate</dt><dd><p>TIMESTAMP
Date this record was last changed</p>
</dd>
</dl>
</section>
<section id="animal">
<h2>animal<a class="headerlink" href="#animal" title="Link to this heading">¶</a></h2>
<p>The animal table holds a row for each animal on the system. Various denormalised fields at the end are used to track the current movement, whether the animal is on shelter, etc. These are useful for writing reports.</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>AnimalTypeID</dt><dd><p>INTEGER
Link to the animaltype table</p>
</dd>
<dt>AnimalName</dt><dd><p>VARCHAR
The animal’s name</p>
</dd>
<dt>NonShelterAnimal</dt><dd><p>INTEGER
1 if the animal is a non-shelter animal (kept out of figures)</p>
</dd>
<dt>CrueltyCase</dt><dd><p>INTEGER
1 if the animal is a cruelty case (all 0/1 fields link to lksyesno table)</p>
</dd>
<dt>BondedAnimalID</dt><dd><p>INTEGER
Animal ID of bonded animal 1 (or 0)</p>
</dd>
<dt>BondedAnimal2ID</dt><dd><p>INTEGER
Animal ID of bonded animal 2 (or 0)</p>
</dd>
<dt>BaseColourID</dt><dd><p>INTEGER
Link to the basecolour table</p>
</dd>
<dt>SpeciesID</dt><dd><p>INTEGER
Link to the species table</p>
</dd>
<dt>BreedID</dt><dd><p>INTEGER
Primary breed (link to the breed table)</p>
</dd>
<dt>Breed2ID</dt><dd><p>INTEGER
Secondary breed (same as primary if not crossbreed)</p>
</dd>
<dt>BreedName</dt><dd><p>VARCHAR
Name of breed in form breed1 / breed2 if crossbreed</p>
</dd>
<dt>CrossBreed</dt><dd><p>INTEGER
1 if animal is a crossbreed</p>
</dd>
<dt>CoatType</dt><dd><p>INTEGER
Link to lkcoattype table</p>
</dd>
<dt>Markings</dt><dd><p>VARCHAR
Distinguishing features field</p>
</dd>
<dt>ShelterCode</dt><dd><p>VARCHAR
The animal’s shelter code</p>
</dd>
<dt>ShortCode</dt><dd><p>VARCHAR
The short version of the shelter code</p>
</dd>
<dt>UniqueCodeID</dt><dd><p>INTEGER
The next UUU code can be generated by doing MAX(UniqueCodeID)</p>
</dd>
<dt>YearCodeID</dt><dd><p>INTEGER
The next NNN code is MAX(YearCodeID) for matching brought in year and type</p>
</dd>
<dt>AcceptanceNumber</dt><dd><p>VARCHAR
The acceptance number/Litter ID</p>
</dd>
<dt>DateOfBirth</dt><dd><p>TIMESTAMP
The animal’s date of birth</p>
</dd>
<dt>AgeGroup</dt><dd><p>VARCHAR
The animal’s age group based on date of birth at the most recent time it entered the shelter</p>
</dd>
<dt>AgeGroupActiveMovement</dt><dd><p>VARCHAR
The animal’s age group based on date of birth at the last time it left the shelter</p>
</dd>
<dt>DeceasedDate</dt><dd><p>TIMESTAMP
Date the animal died, if null the animal is still alive</p>
</dd>
<dt>Sex</dt><dd><p>INTEGER
Link to the lksex table</p>
</dd>
<dt>Identichipped</dt><dd><p>INTEGER
1 if the animal is microchipped</p>
</dd>
<dt>IdentichipNumber</dt><dd><p>VARCHAR
The animal’s microchip number</p>
</dd>
<dt>IdentichipDate</dt><dd><p>TIMESTAMP
The date the animal was microchipped</p>
</dd>
<dt>Tattoo</dt><dd><p>INTEGER
1 if the animal has an ear tattoo</p>
</dd>
<dt>TattooNumber</dt><dd><p>VARCHAR
The animal’s tattoo number</p>
</dd>
<dt>TattooDate</dt><dd><p>TIMESTAMP
The date the animal was tattooed</p>
</dd>
<dt>Neutered</dt><dd><p>INTEGER
1 if the animal has been neutered/spayed</p>
</dd>
<dt>NeuteredDate</dt><dd><p>TIMESTAMP
The date the animal was neutered/spayed</p>
</dd>
<dt>Declawed</dt><dd><p>INTEGER
1 if the animal has been declawed</p>
</dd>
<dt>HiddenAnimalDetails</dt><dd><p>VARCHAR
Hidden animal comments</p>
</dd>
<dt>AnimalComments</dt><dd><p>VARCHAR
The animal’s comments</p>
</dd>
<dt>OwnersVetID</dt><dd><p>INTEGER
Link to the owner’s vet (owner table, 0 for no value)</p>
</dd>
<dt>CurrentVetID</dt><dd><p>INTEGER
Link to the current vet (owner table, 0 for no value)</p>
</dd>
<dt>OriginalOwnerID</dt><dd><p>INTEGER
Link to the original owner (owner table)</p>
</dd>
<dt>BroughtInByOwnerID</dt><dd><p>INTEGER
Link to the owner who brought the animal in (owner table)</p>
</dd>
<dt>ReasonForEntry</dt><dd><p>VARCHAR
Freeform text, reason animal was brought to shelter</p>
</dd>
<dt>ReasonNO</dt><dd><p>VARCHAR
Freeform text, reason original owner didn’t bring the animal in</p>
</dd>
<dt>DateBroughtIn</dt><dd><p>TIMESTAMP
The date the animal was brought into the shelter</p>
</dd>
<dt>EntryReasonID</dt><dd><p>INTEGER
Reason for entry (link to entryreason table)</p>
</dd>
<dt>HealthProblems</dt><dd><p>VARCHAR
Health problems box on Vet tab</p>
</dd>
<dt>PutToSleep</dt><dd><p>INTEGER
1 if the animal was euthanised</p>
</dd>
<dt>PTSReason</dt><dd><p>VARCHAR
Freeform text, reason the animal died</p>
</dd>
<dt>PTSReasonID</dt><dd><p>INTEGER
Euthanasia category - link to deathreason table</p>
</dd>
<dt>IsDOA</dt><dd><p>INTEGER
1 if the animal was dead on arrival to the shelter</p>
</dd>
<dt>IsTransfer</dt><dd><p>INTEGER
1 if the animal was a transfer from another animal shelter</p>
</dd>
<dt>IsGoodWithCats</dt><dd><p>INTEGER
Link to the lksynun table for yes/no/unknown</p>
</dd>
<dt>IsGoodWithDogs</dt><dd><p>INTEGER
Link to the lksynun table for yes/no/unknown</p>
</dd>
<dt>IsGoodWithChildren</dt><dd><p>INTEGER
Link to the lksynun table for yes/no/unknown</p>
</dd>
<dt>IsHouseTrained</dt><dd><p>INTEGER
Link to the lksynun table for yes/no/unknown</p>
</dd>
<dt>IsNotAvailableForAdoption</dt><dd><p>INTEGER
1 if the animal should not be included for publishing as adoptable</p>
</dd>
<dt>HasSpecialNeeds</dt><dd><p>INTEGER
1 if the animal has special needs</p>
</dd>
<dt>ShelterLocation</dt><dd><p>INTEGER
Location on shelter (link to internallocation table)</p>
</dd>
<dt>DiedOffShelter</dt><dd><p>INTEGER
1 if the animal died off shelter (won’t be included on figures reports)</p>
</dd>
<dt>Size</dt><dd><p>INTEGER
animal’s size (link to lksize table)</p>
</dd>
<dt>RabiesTag</dt><dd><p>VARCHAR
The rabies tag field</p>
</dd>
<dt>Adoptable</dt><dd><p>INTEGER
1 if the animal is adoptable according to publishing rules</p>
</dd>
<dt>Archived</dt><dd><p>INTEGER
1 if the animal is off shelter now</p>
</dd>
<dt>ActiveMovementID</dt><dd><p>INTEGER
Link to the adoption table for the latest movement for this animal</p>
</dd>
<dt>ActiveMovementType</dt><dd><p>INTEGER
Link to lksmovementtype for the current movement type</p>
</dd>
<dt>ActiveMovementDate</dt><dd><p>TIMESTAMP
The current movement date</p>
</dd>
<dt>ActiveMovementReturn</dt><dd><p>TIMESTAMP
The current movement’s return date</p>
</dd>
<dt>HasActiveReserve</dt><dd><p>INTEGER
1 if the animal has an open reservation</p>
</dd>
<dt>HasTrialAdoption</dt><dd><p>INTEGER
1 if the animal is on trial adoption</p>
</dd>
<dt>DisplayLocation</dt><dd><p>VARCHAR
Shows a readable version of the animal’s location. If on shelter, the
internal location. If off shelter, the movementtype, accompanied by the
person name.</p>
</dd>
<dt>MostRecentEntryDate</dt><dd><p>TIMESTAMP
The most recent entry date - either DateBroughtIn or ActiveMovementDate</p>
</dd>
<dt>TimeOnShelter</dt><dd><p>VARCHAR
Readable time spent on shelter (eg: 1 year, 3 months)</p>
</dd>
<dt>DaysOnShelter</dt><dd><p>INTEGER
Number of days spent on shelter</p>
</dd>
<dt>DailyBoardingCost</dt><dd><p>INTEGER
The cost of one days board on shelter for this animal</p>
</dd>
<dt>AnimalAge</dt><dd><p>VARCHAR
Readable animal age (eg: 1 year, 3 months)</p>
</dd>
<dt>RecordVersion</dt><dd><p>INTEGER
For optimistic locking, each save increments this lock value</p>
</dd>
<dt>CreatedBy</dt><dd><p>VARCHAR
Name of user that created this record</p>
</dd>
<dt>CreatedDate</dt><dd><p>TIMESTAMP
Date this record was created</p>
</dd>
<dt>LastChangedBy</dt><dd><p>VARCHAR
Name of user that last changed this record</p>
</dd>
<dt>LastChangedDate</dt><dd><p>TIMESTAMP
Date this record was last changed</p>
</dd>
</dl>
</section>
<section id="animalcontrol">
<h2>animalcontrol<a class="headerlink" href="#animalcontrol" title="Link to this heading">¶</a></h2>
<p>The animalcontrol table holds a row for every animal control incident on the system.</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>IncidentDateTime</dt><dd><p>TIMESTAMP
The date and time of the incident</p>
</dd>
<dt>IncidentTypeID</dt><dd><p>INTEGER
A link to the incidenttype table for the type of incident</p>
</dd>
<dt>CallDateTime</dt><dd><p>TIMESTAMP
The date and time the incident was reported</p>
</dd>
<dt>CallNotes</dt><dd><p>VARCHAR
The incident description</p>
</dd>
<dt>CallTaker</dt><dd><p>VARCHAR
The username of the system user who took the call</p>
</dd>
<dt>CallerID</dt><dd><p>INTEGER
A link to the owner table for the person who called to report the incident</p>
</dd>
<dt>VictimID</dt><dd><p>INTEGER
A link to the owner table for the person who was the victim (if any)</p>
</dd>
<dt>DispatchAddress</dt><dd><p>VARCHAR
The address the incident occurred at</p>
</dd>
<dt>DispatchTown</dt><dd><p>VARCHAR
The incident town/city</p>
</dd>
<dt>DispatchCounty</dt><dd><p>VARCHAR
The incident county/state</p>
</dd>
<dt>DispatchPostcode</dt><dd><p>VARCHAR
The incident postcode/zipcode</p>
</dd>
<dt>DispatchLatLong</dt><dd><p>VARCHAR
A geocode containing the latitude and longitude of the dispatch address</p>
</dd>
<dt>DispatchedACO</dt><dd><p>VARCHAR
The username of the system user representing the ACO</p>
</dd>
<dt>PickupLocationID</dt><dd><p>INTEGER
A link to the pickuplocation table</p>
</dd>
<dt>DispatchDateTime</dt><dd><p>TIMESTAMP
The date and time the ACO was dispatched to the incident</p>
</dd>
<dt>RespondedDateTime</dt><dd><p>TIMESTAMP
The date and time the ACO arrived at the incident</p>
</dd>
<dt>FollowupDateTime / FollowupDateTime2 / FollowupDateTime3</dt><dd><p>TIMESTAMP
The date and time the ACO should return to the incident to follow up</p>
</dd>
<dt>FollowupComplete / FollowupComplete2 / FollowupComplete3</dt><dd><p>INTEGER
1 if the follow up has been done</p>
</dd>
<dt>CompletedDate</dt><dd><p>TIMESTAMP
The date the incident was closed and completed</p>
</dd>
<dt>IncidentCompletedID</dt><dd><p>INTEGER
A link to the incidentcompleted table</p>
</dd>
<dt>SiteID</dt><dd><p>INTEGER
A link to the site table for multi-site setups</p>
</dd>
<dt>OwnerID / Owner2ID / Owner3ID</dt><dd><p>INTEGER
A link to the owner table for the suspect</p>
</dd>
<dt>AnimalDescription</dt><dd><p>VARCHAR
A description of the animal involved in the incident</p>
</dd>
<dt>SpeciesID</dt><dd><p>INTEGER
A link to the species table for the animal involved in the incident</p>
</dd>
<dt>Sex</dt><dd><p>INTEGER
A link to the lksex table for the animal involved in the incident</p>
</dd>
<dt>AgeGroup</dt><dd><p>VARCHAR
The age group of the animal involved in the incident</p>
</dd>
</dl>
</section>
<section id="dbfs">
<h2>dbfs<a class="headerlink" href="#dbfs" title="Link to this heading">¶</a></h2>
<p>The dbfs table holds a row for each file stored in ASM’s database. Name and
Path can be concatenated to form a full path. Eg: path = /templates name =
cage_card.html</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>Name</dt><dd><p>VARCHAR
The name of the element</p>
</dd>
<dt>Path</dt><dd><p>VARCHAR
The path to the element</p>
</dd>
<dt>URL</dt><dd><p>VARCHAR
Either <a class="reference external" href="file:[filename">file:[filename</a>] or s3:[filename] for binary data stored in the
filesystem or remote object storage like Amazon S3, BackBlaze B2 or
Cloudflare R2 etc. If the data is in the Content field, the URL will be
contain the text base64:</p>
</dd>
<dt>Content</dt><dd><p>CLOB
Base64 encoded content or null if the data is in a file storage (see URL)</p>
</dd>
</dl>
</section>
<section id="media">
<h2>media<a class="headerlink" href="#media" title="Link to this heading">¶</a></h2>
<p>The media table holds a row for each piece media attached to an animal, owner,
etc.</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>MediaType</dt><dd><p>INTEGER
1 = File, 2 = Link</p>
</dd>
<dt>MediaName</dt><dd><p>VARCHAR
The name of the file within the dbfs table - always [media.ID].extension unless
MediaType=2 in which case this will hold the link URL</p>
</dd>
<dt>MediaNotes</dt><dd><p>VARCHAR
The notes accompanying the media file (can optionally be used as
description when publishing)</p>
</dd>
<dt>DocPhoto</dt><dd><p>INTEGER
1 if this is the preferred photo of an animal for use with document
templates</p>
</dd>
<dt>WebsitePhoto</dt><dd><p>INTEGER
1 if this is the preferred photo of an animal for use on the web</p>
</dd>
<dt>WebsiteVideo</dt><dd><p>INTEGER
1 if this is the preferred video link of the animal</p>
</dd>
<dt>DocPhoto</dt><dd><p>INTEGER
1 if this is the preferred photo of an animal for use with generated documents</p>
</dd>
<dt>ExcludeFromPublish</dt><dd><p>INTEGER
1 if this photo should be excluded from being used on websites or sent to
third parties</p>
</dd>
<dt>SignatureHash</dt><dd><p>VARCHAR
For media containing documents that have been signed, this field will
contain a cryptographic hash of the document file data so that it can be
checked for tampering</p>
</dd>
<dt>NewSinceLastPublish (deprecated)</dt><dd><p>INTEGER
1 if this media record was created after the last time a publish was done</p>
</dd>
<dt>UpdatedSinceLastPublish  (deprecated)</dt><dd><p>INTEGER
1 if this media record was updated after the last time a publish was done</p>
</dd>
<dt>LastPublished (deprecated - see animalpublished table)</dt><dd><p>TIMESTAMP
The date this record was last published to the web</p>
</dd>
<dt>LastPublishedPF (deprecated)</dt><dd><p>TIMESTAMP
Date this record was last published to PetFinder.com</p>
</dd>
<dt>LastPublishedAP (deprecated)</dt><dd><p>TIMESTAMP
Date this record was last published to AdoptAPet.com</p>
</dd>
<dt>LastPublishedP911 (deprecated)</dt><dd><p>TIMESTAMP
Date this record was last published to Pets911.com</p>
</dd>
<dt>LastPublishedRG (deprecated)</dt><dd><p>TIMESTAMP
Date this record was last published to RescueGroups PetAdoptionPortal.org</p>
</dd>
<dt>LinkID</dt><dd><p>INTEGER
The ID of the record in the table this media is linked to</p>
</dd>
<dt>LinkTypeID</dt><dd><p>INTEGER
Link to lksmedialink table to determine linked table</p>
</dd>
<dt>CreatedDate</dt><dd><p>TIMESTAMP
The date this record was created</p>
</dd>
<dt>Date</dt><dd><p>TIMESTAMP
Date this record was last updated</p>
</dd>
<dt>RetainUntil</dt><dd><p>TIMESTAMP
The date to automatically delete this record (or NULL to never delete)</p>
</dd>
<dt>RecordVersion</dt><dd><p>INTEGER
Optimistic lock flag</p>
</dd>
</dl>
</section>
<section id="owner">
<h2>owner<a class="headerlink" href="#owner" title="Link to this heading">¶</a></h2>
<p>The owner table holds a row for every person stored in ASM’s database.</p>
<dl class="simple">
<dt>ID</dt><dd><p>INTEGER
A unique, incrementing number that identifies this record</p>
</dd>
<dt>OwnerType</dt><dd><p>INTEGER
1 = Individual, 2 = Organization, 3 = Couple</p>
</dd>
<dt>OwnerCode</dt><dd><p>VARCHAR
A unique code for this record, generated from first two letters of surname
and padded ID</p>
</dd>
<dt>OwnerTitle / OwnerTitle2</dt><dd><p>VARCHAR
The person’s title, eg: Mr</p>
</dd>
<dt>OwnerInitials / OwnerInitials2</dt><dd><p>VARCHAR
The person’s initials</p>
</dd>
<dt>OwnerForeNames / OwnerForeNames2</dt><dd><p>VARCHAR
The person’s first name(s)</p>
</dd>
<dt>OwnerSurname / OwnerSurname2</dt><dd><p>VARCHAR
The person’s surname</p>
</dd>
<dt>OwnerName</dt><dd><p>VARCHAR
Title, Forenames and Surname concatenated together for display</p>
</dd>
<dt>OwnerAddress</dt><dd><p>VARCHAR
The address</p>
</dd>
<dt>OwnerTown</dt><dd><p>VARCHAR
The town or city (depending on locale)</p>
</dd>
<dt>OwnerCounty</dt><dd><p>VARCHAR
The county or state (depending on locale)</p>
</dd>
<dt>OwnerPostcode</dt><dd><p>VARCHAR</p>
</dd>
<dt>HomeTelephone</dt><dd><p>VARCHAR</p>
</dd>
<dt>WorkTelephone / WorkTelephone2</dt><dd><p>VARCHAR</p>
</dd>
<dt>MobileTelephone / MobileTelephone2</dt><dd><p>VARCHAR</p>
</dd>
<dt>EmailAddress / EmailAddress2</dt><dd><p>VARCHAR</p>
</dd>
<dt>DateOfBirth / DateOfBirth2</dt><dd><p>TIMESTAMP</p>
</dd>
<dt>IdentificationNumber / IdentificationNumber2</dt><dd><p>VARCHAR
The government issued identification number (passport, driving license, etc)</p>
</dd>
<dt>Comments</dt><dd><p>VARCHAR</p>
</dd>
<dt>GDPRContactOptIn</dt><dd><p>VARCHAR
didnotask,declined,email,post,sms,phone</p>
</dd>
<dt>ExcludeFromBulkEmail</dt><dd><p>INTEGER
1 if this person should not receive bulk emails</p>
</dd>
<dt>IDCheck</dt><dd><p>INTEGER
1 if the person has been homechecked</p>
</dd>
<dt>IsBanned</dt><dd><p>INTEGER
1 if this person has been banned from adopting animals</p>
</dd>
<dt>IsVolunteer</dt><dd><p>INTEGER
1 if this person is a shelter volunteer</p>
</dd>
<dt>IsHomeChecker</dt><dd><p>INTEGER
1 if this person homechecks people</p>
</dd>
<dt>IsMember</dt><dd><p>INTEGER
1 if this person is a shelter member</p>
</dd>
<dt>MembershipExpiryDate</dt><dd><p>TIMESTAMP
The date this person’s membership expires</p>
</dd>
<dt>MembershipNumber</dt><dd><p>VARCHAR
The membership number</p>
</dd>
<dt>IsDonor</dt><dd><p>INTEGER
1 if this person is a regular donor</p>
</dd>
<dt>IsDriver</dt><dd><p>INTEGER
1 if this person is a driver for transport</p>
</dd>
<dt>IsShelter</dt><dd><p>INTEGER
1 if this person is another animal shelter</p>
</dd>
<dt>IsACO</dt><dd><p>INTEGER
1 if this person is an animal care officer</p>
</dd>
<dt>IsStaff</dt><dd><p>INTEGER
1 if this person is shelter staff (permissions exist to prevent users viewing staff records)</p>
</dd>
<dt>IsFosterer</dt><dd><p>INTEGER
1 if this person fosters animals</p>
</dd>
<dt>IsRetailer</dt><dd><p>INTEGER
1 if this person is a retailer for animals (eg: Pet shop)</p>
</dd>
<dt>IsVet</dt><dd><p>INTEGER
1 if this person is a vet</p>
</dd>
<dt>IsGiftAid</dt><dd><p>INTEGER
(UK only) 1 if this person is eligible for gift aid on their donations</p>
</dd>
<dt>AdditionalFlags</dt><dd><p>VARCHAR
Comma separated list of all person flags applying to this owner, includes additional person flags created under lookup data as well as the standard ones above.</p>
</dd>
<dt>HomeCheckAreas</dt><dd><p>VARCHAR
If this person homechecks other people, the areas they are wiling to check</p>
</dd>
<dt>DateLastHomeChecked</dt><dd><p>TIMESTAMP
The date this person was last homechecked</p>
</dd>
<dt>HomeCheckedBy</dt><dd><p>INTEGER
ID of the person record who homechecked this person</p>
</dd>
<dt>MatchAdded</dt><dd><p>TIMESTAMP
Date any looking for match was added to this person</p>
</dd>
<dt>MatchExpires</dt><dd><p>TIMESTAMP
Date this looking for info expires</p>
</dd>
<dt>MatchActive</dt><dd><p>INTEGER
1 If we should consider this person’s looking for info when building the looking for report</p>
</dd>
<dt>MatchSex</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchSize</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchAgeFrom</dt><dd><p>FLOAT</p>
</dd>
<dt>MatchAgeTo</dt><dd><p>FLOAT</p>
</dd>
<dt>MatchAnimalType</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchSpecies</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchBreed</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchBreed2</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchGoodWithCats</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchGoodWithDogs</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchGoodWithChildren</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchHouseTrained</dt><dd><p>INTEGER</p>
</dd>
<dt>MatchCommentsContain</dt><dd><p>VARCHAR</p>
</dd>
<dt>MatchFlags</dt><dd><p>VARCHAR</p>
</dd>
</dl>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="csvimportfields.html" class="btn btn-neutral float-left" title="Appendix: CSV file import fields" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="relationships.html" class="btn btn-neutral float-right" title="Appendix: Entity Relationship Diagrams" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2024, Sheltermanager, Ltd.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>