nidus-sync/migrations/00007_add_fieldseeker.sql

1031 lines
23 KiB
MySQL
Raw Normal View History

2025-11-07 06:08:48 +00:00
-- +goose Up
CREATE TABLE fs_containerrelate (
containertype text,
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
inspsampleid text,
mosquitoinspid text,
objectid integer NOT NULL,
treatmentid text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_fieldscoutinglog (
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
objectid integer NOT NULL,
status smallint,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_habitatrelate (
creationdate bigint,
creator text,
editdate bigint,
editor text,
foreign_id text,
globalid text,
habitattype text,
objectid integer NOT NULL,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_inspectionsample (
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
idbytech text,
insp_id text,
objectid integer NOT NULL,
processed smallint,
sampleid text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_inspectionsampledetail (
comments text,
creationdate bigint,
creator text,
editdate bigint,
editor text,
fadultact text,
fdomstage text,
feggcount smallint,
fieldspecies text,
flarvcount smallint,
flstages text,
fpupcount smallint,
globalid text,
inspsample_id text,
labspecies text,
ldomstage text,
leggcount smallint,
llarvcount smallint,
lpupcount smallint,
objectid integer NOT NULL,
processed smallint,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_linelocation (
accessdesc text,
acres double precision,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
globalid text,
habitat text,
hectares double precision,
jurisdiction text,
larvinspectinterval smallint,
lastinspectactiontaken text,
lastinspectactivity text,
lastinspectavglarvae double precision,
lastinspectavgpupae double precision,
lastinspectbreeding text,
lastinspectconditions text,
lastinspectdate bigint,
lastinspectfieldspecies text,
lastinspectlstages text,
lasttreatactivity text,
lasttreatdate bigint,
lasttreatproduct text,
lasttreatqty double precision,
lasttreatqtyunit text,
length_ft double precision,
length_meters double precision,
locationnumber bigint,
name text,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
symbology text,
shape__length double precision,
usetype text,
waterorigin text,
width_ft double precision,
width_meters double precision,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_locationtracking (
accuracy double precision,
creationdate bigint,
creator text,
editdate bigint,
editor text,
fieldtech text,
globalid text,
objectid integer NOT NULL,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_mosquitoinspection (
actiontaken text,
activity text,
adultact text,
avetemp double precision,
avglarvae double precision,
avgpupae double precision,
breeding text,
cbcount smallint,
comments text,
containercount smallint,
creationdate bigint,
creator text,
domstage text,
eggs smallint,
enddatetime bigint,
editdate bigint,
editor text,
fieldspecies text,
fieldtech text,
globalid text,
jurisdiction text,
larvaepresent smallint,
linelocid text,
locationname text,
lstages text,
numdips smallint,
objectid integer NOT NULL,
personalcontact smallint,
pointlocid text,
polygonlocid text,
posdips smallint,
positivecontainercount smallint,
pupaepresent smallint,
raingauge double precision,
recordstatus smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
sdid text,
sitecond text,
srid text,
startdatetime bigint,
tirecount smallint,
totlarvae smallint,
totpupae smallint,
visualmonitoring smallint,
vmcomments text,
winddir text,
windspeed double precision,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
adminaction text,
ptaid text
);
CREATE TABLE fs_pointlocation (
accessdesc text,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
globalid text,
habitat text,
jurisdiction text,
larvinspectinterval smallint,
lastinspectactiontaken text,
lastinspectactivity text,
lastinspectavglarvae double precision,
lastinspectavgpupae double precision,
lastinspectbreeding text,
lastinspectconditions text,
lastinspectdate bigint,
lastinspectfieldspecies text,
lastinspectlstages text,
lasttreatactivity text,
lasttreatdate bigint,
lasttreatproduct text,
lasttreatqty double precision,
lasttreatqtyunit text,
locationnumber bigint,
name text,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
stype text,
symbology text,
usetype text,
waterorigin text,
x double precision,
y double precision,
zone text,
zone2 text,
geometry_x double precision,
geometry_y double precision,
assignedtech text,
deactivate_reason text,
scalarpriority bigint,
sourcestatus text
);
CREATE TABLE fs_polygonlocation (
accessdesc text,
acres double precision,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
filter text,
globalid text,
habitat text,
hectares double precision,
jurisdiction text,
larvinspectinterval smallint,
lastinspectactiontaken text,
lastinspectactivity text,
lastinspectavglarvae double precision,
lastinspectavgpupae double precision,
lastinspectbreeding text,
lastinspectconditions text,
lastinspectdate bigint,
lastinspectfieldspecies text,
lastinspectlstages text,
lasttreatactivity text,
lasttreatdate bigint,
lasttreatproduct text,
lasttreatqty double precision,
lasttreatqtyunit text,
locationnumber bigint,
name text,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
symbology text,
shape__area double precision,
shape__length double precision,
usetype text,
waterorigin text,
zone text,
zone2 text,
geometry_x double precision,
geometry_y double precision
);
CREATE TABLE fs_pool (
comments text,
creationdate bigint,
creator text,
datesent bigint,
datetested bigint,
diseasepos text,
diseasetested text,
editdate bigint,
editor text,
gatewaysync smallint,
globalid text,
lab text,
lab_id text,
objectid integer NOT NULL,
poolyear smallint,
processed smallint,
sampleid text,
survtech text,
testmethod text,
testtech text,
trapdata_id text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
vectorsurvcollectionid text,
vectorsurvpoolid text,
vectorsurvtrapdataid text
);
CREATE TABLE fs_pooldetail (
creationdate bigint,
creator text,
editdate bigint,
editor text,
females smallint,
globalid text,
objectid integer NOT NULL,
pool_id text,
species text,
trapdata_id text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_proposedtreatmentarea (
acres double precision,
comments text,
completed smallint,
completedby text,
completeddate bigint,
creationdate bigint,
creator text,
duedate bigint,
exported smallint,
editdate bigint,
editor text,
globalid text,
hectares double precision,
issprayroute smallint,
lasttreatactivity text,
lasttreatdate bigint,
lasttreatproduct text,
lasttreatqty double precision,
lasttreatqtyunit text,
method text,
name text,
objectid integer NOT NULL,
priority text,
reviewed smallint,
reviewedby text,
revieweddate bigint,
shape__area double precision,
shape__length double precision,
targetapprate double precision,
targetproduct text,
targetspecies text,
zone text,
zone2 text,
geometry_x double precision,
geometry_y double precision
);
CREATE TABLE fs_qamosquitoinspection (
acresbreeding double precision,
actiontaken text,
adultactivity smallint,
aquaticorganisms text,
avetemp double precision,
breedingpotential text,
comments text,
creationdate bigint,
creator text,
enddatetime bigint,
editdate bigint,
editor text,
fieldtech text,
fish smallint,
globalid text,
habvalue1 smallint,
habvalue1percent smallint,
habvalue2 smallint,
habvalue2percent smallint,
larvaeinsidetreatedarea smallint,
larvaeoutsidetreatedarea smallint,
larvaepresent smallint,
larvaereason text,
linelocid text,
locationname text,
lr smallint,
mosquitohabitat text,
movingwater smallint,
negdips smallint,
nowaterever smallint,
objectid integer NOT NULL,
pointlocid text,
polygonlocid text,
posdips smallint,
potential smallint,
raingauge double precision,
recordstatus smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
sitetype text,
soilconditions text,
sourcereduction text,
startdatetime bigint,
totalacres double precision,
vegetation text,
waterconditions text,
waterduration text,
watermovement1 text,
watermovement1percent smallint,
watermovement2 text,
watermovement2percent smallint,
waterpresent smallint,
watersource text,
winddir text,
windspeed double precision,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_rodentlocation (
accessdesc text,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
globalid text,
habitat text,
lastinspectaction text,
lastinspectconditions text,
lastinspectdate bigint,
lastinspectrodentevidence text,
lastinspectspecies text,
locationname text,
locationnumber bigint,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
symbology text,
usetype text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
jurisdiction text
);
CREATE TABLE fs_samplecollection (
activity text,
avetemp double precision,
chickenid text,
comments text,
creationdate bigint,
creator text,
datesent bigint,
datetested bigint,
diseasepos text,
diseasetested text,
enddatetime bigint,
editdate bigint,
editor text,
fieldtech text,
flockid text,
gatewaysync smallint,
globalid text,
lab text,
locationname text,
loc_id text,
objectid integer NOT NULL,
processed smallint,
raingauge double precision,
recordstatus smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
samplecond text,
samplecount smallint,
sampleid text,
sampletype text,
sex text,
sitecond text,
species text,
startdatetime bigint,
survtech text,
testmethod text,
testtech text,
winddir text,
windspeed double precision,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_samplelocation (
accessdesc text,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
gatewaysync smallint,
globalid text,
habitat text,
locationnumber bigint,
name text,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
usetype text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_servicerequest (
accepted smallint,
acceptedby text,
accepteddate bigint,
allowed text,
assignedtech text,
clraddr1 text,
clraddr2 text,
clranon smallint,
clrcity text,
clrcompany text,
clrcontpref text,
clremail text,
clrfname text,
clrother text,
clrphone1 text,
clrphone2 text,
clrstate text,
clrzip text,
comments text,
creationdate bigint,
creator text,
datetimeclosed bigint,
duedate bigint,
entrytech text,
estcompletedate bigint,
externalerror text,
externalid text,
editdate bigint,
editor text,
firstresponsedate bigint,
globalid text,
issuesreported text,
jurisdiction text,
nextaction text,
notificationtimestamp text,
notified smallint,
notifieddate bigint,
objectid integer NOT NULL,
pointlocid text,
priority text,
recdatetime bigint,
recordstatus smallint,
rejectedby text,
rejecteddate bigint,
rejectedreason text,
reqaddr1 text,
reqaddr2 text,
reqcity text,
reqcompany text,
reqcrossst text,
reqdescr text,
reqfldnotes text,
reqmapgrid text,
reqnotesforcust text,
reqnotesfortech text,
reqpermission smallint,
reqprogramactions text,
reqstate text,
reqsubdiv text,
reqtarget text,
reqzip text,
responsedaycount smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
scheduled smallint,
scheduleddate bigint,
source text,
sr_number bigint,
status text,
supervisor text,
techclosed text,
validx text,
validy text,
xvalue text,
yvalue text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
dog bigint,
spanish bigint,
schedule_notes text,
schedule_period text
);
CREATE TABLE fs_speciesabundance (
bloodedfem smallint,
creationdate bigint,
creator text,
eggs smallint,
editdate bigint,
editor text,
females bigint,
gravidfem smallint,
globalid text,
larvae smallint,
males smallint,
objectid integer NOT NULL,
poolstogen smallint,
processed smallint,
pupae smallint,
species text,
total bigint,
trapdata_id text,
unknown smallint,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
globalzscore double precision,
h3r7 text,
h3r8 text,
r7score double precision,
r8score double precision,
yearweek bigint
);
CREATE TABLE fs_stormdrain (
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
jurisdiction text,
lastaction text,
laststatus text,
lasttreatdate bigint,
nexttreatmentdate bigint,
objectid integer NOT NULL,
symbology text,
type text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_timecard (
activity text,
comments text,
creationdate bigint,
creator text,
enddatetime bigint,
equiptype text,
externalid text,
editdate bigint,
editor text,
fieldtech text,
globalid text,
lclocid text,
linelocid text,
locationname text,
objectid integer NOT NULL,
pointlocid text,
polygonlocid text,
samplelocid text,
srid text,
startdatetime bigint,
traplocid text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
rodentlocid text
);
CREATE TABLE fs_trapdata (
avetemp double precision,
comments text,
creationdate bigint,
creator text,
enddatetime bigint,
editdate bigint,
editor text,
fieldtech text,
field bigint,
gatewaysync smallint,
globalid text,
idbytech text,
locationname text,
loc_id text,
lr smallint,
objectid integer NOT NULL,
processed smallint,
raingauge double precision,
recordstatus smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
sitecond text,
sortbytech text,
srid text,
startdatetime bigint,
trapactivitytype text,
trapcondition text,
trapnights smallint,
traptype text,
voltage double precision,
winddir text,
windspeed double precision,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
lure text,
vectorsurvtrapdataid text,
vectorsurvtraplocationid text
);
CREATE TABLE fs_traplocation (
accessdesc text,
active smallint,
comments text,
creationdate bigint,
creator text,
description text,
externalid text,
editdate bigint,
editor text,
gatewaysync smallint,
globalid text,
habitat text,
locationnumber bigint,
name text,
nextactiondatescheduled bigint,
objectid integer NOT NULL,
priority text,
usetype text,
zone text,
zone2 text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text,
route bigint,
route_order bigint,
set_dow bigint,
vectorsurvsiteid text,
h3r7 text,
h3r8 text
);
CREATE TABLE fs_treatment (
activity text,
areaunit text,
avetemp double precision,
barrierrouteid text,
cbcount smallint,
comments text,
containercount smallint,
creationdate bigint,
creator text,
enddatetime bigint,
equiptype text,
editdate bigint,
editor text,
fieldtech text,
flowrate double precision,
globalid text,
habitat text,
insp_id text,
invloc text,
linelocid text,
locationname text,
method text,
objectid integer NOT NULL,
pointlocid text,
polygonlocid text,
product text,
ptaid text,
qty double precision,
qtyunit text,
raingauge double precision,
recordstatus smallint,
reviewed smallint,
reviewedby text,
revieweddate bigint,
sdid text,
sitecond text,
srid text,
startdatetime bigint,
targetspecies text,
tirecount smallint,
treatacres double precision,
treatarea double precision,
treathectares double precision,
treatmenthours double precision,
treatmentlength double precision,
treatmentlengthunits text,
totalcostprodcut double precision,
ulvrouteid text,
warningoverride smallint,
winddir text,
windspeed double precision,
zone text,
zone2 text,
geometry_x double precision,
geometry_y double precision,
temp_sitecond text
);
CREATE TABLE fs_treatmentarea (
comments text,
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
notified smallint,
objectid integer NOT NULL,
session_id text,
shape__area double precision,
shape__length double precision,
treatdate bigint,
treat_id text,
type text,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_zones (
active bigint,
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
name text,
objectid integer NOT NULL,
shape__area double precision,
shape__length double precision,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
CREATE TABLE fs_zones2 (
creationdate bigint,
creator text,
editdate bigint,
editor text,
globalid text,
name text,
objectid integer NOT NULL,
shape__area double precision,
shape__length double precision,
created_date bigint,
created_user text,
geometry_x double precision,
geometry_y double precision,
last_edited_date bigint,
last_edited_user text
);
-- +goose Down
DROP TABLE fs_containerrelate;
DROP TABLE fs_fieldscoutinglog;
DROP TABLE fs_habitatrelate;
DROP TABLE fs_inspectionsample;
DROP TABLE fs_inspectionsampledetail;
DROP TABLE fs_linelocation;
DROP TABLE fs_locationtracking;
DROP TABLE fs_mosquitoinspection;
DROP TABLE fs_pointlocation;
DROP TABLE fs_polygonlocation;
DROP TABLE fs_pool;
DROP TABLE fs_pooldetail;
DROP TABLE fs_proposedtreatmentarea;
DROP TABLE fs_qamosquitoinspection;
DROP TABLE fs_rodentlocation;
DROP TABLE fs_samplecollection;
DROP TABLE fs_samplelocation;
DROP TABLE fs_servicerequest;
DROP TABLE fs_speciesabundance;
DROP TABLE fs_stormdrain;
DROP TABLE fs_timecard;
DROP TABLE fs_trapdata;
DROP TABLE fs_traplocation;
DROP TABLE fs_treatment;
DROP TABLE fs_treatmentarea;
DROP TABLE fs_zones;
DROP TABLE fs_zones2;