2014-08-18 19:53:40 +00:00
|
|
|
-- @copyright 2009-2014 City of Bloomington, Indiana
|
2009-12-18 12:56:12 +00:00
|
|
|
-- @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
|
|
|
-- @author Cliff Ingham <inghamn@bloomington.in.gov>
|
|
|
|
create table people (
|
2014-08-18 19:53:40 +00:00
|
|
|
id int unsigned not null primary key auto_increment,
|
|
|
|
firstname varchar(128) not null,
|
|
|
|
lastname varchar(128) not null,
|
|
|
|
email varchar(255) not null,
|
|
|
|
username varchar(40) unique,
|
|
|
|
password varchar(40),
|
|
|
|
authenticationMethod varchar(40),
|
|
|
|
role varchar(30)
|
|
|
|
);
|
2009-12-18 12:56:12 +00:00
|
|
|
|
|
|
|
create table cemeteries (
|
|
|
|
id int unsigned not null primary key auto_increment,
|
2009-12-18 20:57:41 +00:00
|
|
|
name varchar(128) not null,
|
|
|
|
googleMapURL varchar(255)
|
2009-12-18 12:56:12 +00:00
|
|
|
) engine=InnoDB;
|
|
|
|
|
2010-01-04 15:47:15 +00:00
|
|
|
create table sections (
|
|
|
|
id int unsigned not null primary key auto_increment,
|
|
|
|
cemetery_id int unsigned not null,
|
|
|
|
code varchar(5) not null,
|
|
|
|
name varchar(128),
|
|
|
|
foreign key (cemetery_id) references cemeteries(id)
|
|
|
|
) engine=InnoDB;
|
|
|
|
|
2009-12-18 12:56:12 +00:00
|
|
|
create table deeds (
|
|
|
|
id int unsigned not null primary key auto_increment,
|
2010-01-26 18:43:21 +00:00
|
|
|
section_id int unsigned,
|
2009-12-18 12:56:12 +00:00
|
|
|
lot varchar(5),
|
|
|
|
lastname1 varchar(20),
|
|
|
|
firstname1 varchar(20),
|
2010-01-28 21:23:44 +00:00
|
|
|
middleInitial1 varchar(20),
|
2009-12-18 12:56:12 +00:00
|
|
|
lastname2 varchar(20),
|
|
|
|
firstname2 varchar(20),
|
2010-01-28 21:23:44 +00:00
|
|
|
middleInitial2 varchar(20),
|
2009-12-18 12:56:12 +00:00
|
|
|
issueDate date,
|
|
|
|
notes text,
|
|
|
|
lot2 char(5),
|
|
|
|
cemetery_id int unsigned,
|
2010-01-26 18:43:21 +00:00
|
|
|
foreign key (section_id) references sections(id),
|
2009-12-18 12:56:12 +00:00
|
|
|
foreign key (cemetery_id) references cemeteries(id)
|
|
|
|
) engine=InnoDB;
|
|
|
|
|
2009-12-18 17:45:48 +00:00
|
|
|
create table interments (
|
2009-12-18 12:56:12 +00:00
|
|
|
id int(11) unsigned not null primary key auto_increment,
|
2010-01-04 15:47:15 +00:00
|
|
|
section_id int unsigned,
|
2009-12-18 12:56:12 +00:00
|
|
|
lot varchar(5),
|
|
|
|
book varchar(4),
|
|
|
|
pageNumber varchar(5),
|
|
|
|
deceasedDate date,
|
|
|
|
lastname varchar(20),
|
|
|
|
firstname varchar(20),
|
2010-01-28 21:23:44 +00:00
|
|
|
middleInitial varchar(20),
|
2009-12-18 12:56:12 +00:00
|
|
|
birthPlace varchar(20),
|
|
|
|
lastResidence varchar(20),
|
|
|
|
age int unsigned,
|
|
|
|
sex enum('M','F'),
|
|
|
|
cemetery_id int unsigned,
|
|
|
|
notes text,
|
|
|
|
lot2 varchar(5),
|
2010-01-04 15:47:15 +00:00
|
|
|
foreign key (section_id) references sections(id),
|
2009-12-18 12:56:12 +00:00
|
|
|
foreign key (cemetery_id) references cemeteries(id)
|
|
|
|
) engine=InnoDB;
|