1 -- Copyright (C) 2012 The Meme Factory, Inc., http://www.meme.com/
3 -- This file is part of Gombe-MI.
5 -- Gombe-MI is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
15 -- You should have received a copy of the GNU General Public License
16 -- along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
18 -- SQL to test the biography view.
20 -- All data appearing in this work are fictitious. Any resemblance to
21 -- actual data, living or archived, is purely coincidental.
23 -- Karl O. Pinc <kop@meme.com>
26 -- The regression test system does not like it that timestamps change.
27 -- Ignore the problem by not displaying the import_datetime column.
33 select 'Test insert with no twins.';
36 insert into biography (
103 , 'Dummy variable - stranger'
135 from biography_data order by animid;
136 select * from twins order by animid;
139 -- Test insert with twins.
141 select 'Test insert with twins.';
144 insert into biography (
214 from biography_data order by animid;
215 select 'Should have twins on TWINS.';
216 select * from twins order by animid;
219 select 'selecting the biography view';
237 from biography order by animid;
239 -- Try updating biography.
241 select 'Test update to delete twins.';
244 where animid = 'T1' or animid = 'T2';
246 select 'No twins should be left on TWINS.';
263 from biography_data order by animid;
264 select * from twins order by animid;
268 select 'Test update to add twins back.';
278 select 'The twins should be back on TWINS.';
295 from biography_data order by animid;
296 select * from twins order by animid;
299 -- Delete from biography.
301 select 'Test delete of biography';
304 where animid = 'T1' or animid = 'T2';
306 select 'No twins should be left, anywhere.';
323 from biography_data order by animid;
324 select * from twins order by animid;