--- /dev/null
+dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU Affero General Public License as published
+dnl by the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU Affero General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Affero General Public License
+dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
+dnl
+dnl Karl O. Pinc <kop@karlpinc.com>
+dnl
+dnl
+dnl m4 includes
+include(`copyright.m4')dnl
+include(`constants.m4')dnl
+include(`tablemacros.m4')dnl
+include(`grants.m4')dnl
+dnl
+
+dnl Macro to generate birthdate constraints to prevent to-early or to-late
+dnl birthdates.
+dnl
+dnl Syntax: birth_constraint(column)
+dnl Variables required:
+dnl column The (camel-case) column name
+dnl
+changequote({,})
+define({birth_constraint}, {dnl
+ CONSTRAINT "$1 must not be before sdb_min_birthdate"
+ CHECK ($1 >= 'sdb_min_birthdate')
+ CONSTRAINT "$1 must not be after today's date"
+ CHECK ($1 <= CURRENT_DATE)
+})
+changequote(`,')
+
+
+CREATE TABLE follows (
+ key_column(`FOLLOWS', `FID', INTEGER)
+ ,animid_type_column(`focal', `Focal', `NOT NULL')
+ ,community TEXT NOT NULL
+ ,date DATE NOT NULL
+ ,notes TEXT NOT NULL
+ emptytext_check(`Notes')
+);
+
+grant_priv(`FOLLOWS')