Skip to content

Commit

Permalink
removing seed data from migration except for default accounts (#130) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc J Cenac authored and frankrowe committed Oct 4, 2016
1 parent 6ea2dc1 commit c40e2dc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 56 deletions.
55 changes: 0 additions & 55 deletions server/migrations/sqls/20160614201430-add-data-up.sql
Original file line number Diff line number Diff line change
@@ -1,57 +1,2 @@
INSERT INTO stores (name,store_type,version,uri,id) VALUES ('bars','geojson','1','https://s3.amazonaws.com/test.spacon/bars.geojson','3dc5afc9-393b-444c-8581-582e2c2d98a3');
INSERT INTO stores (name,store_type,version,uri,id) VALUES ('gj2','geojson','1','feature.geojson','3e6c072e-8e62-41be-8d1a-7a3116df9c16');
INSERT INTO stores (name,store_type,version,uri,id) VALUES ('Rio','gpkg','1','https://s3.amazonaws.com/test.spacon/rio.gpkg','f6dcc750-1349-46b9-a324-0223764d46d1');
INSERT INTO stores (name,store_type,version,uri,id) VALUES ('Whitehorse','gpkg','1','https://portal.opengeospatial.org/files/63156','fad33ae1-f529-4c79-affc-befc37c104ae');
INSERT INTO forms (form_key,form_label) VALUES ('weed_inspector','Weed Inspector');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,is_integer,is_required)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),0,'weed_stage','Weed Stage','number',false,true);

INSERT INTO form_fields (form_id,position,field_key,field_label,type,initial_value)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),1,'number_of_plants','Number of Plants','counter','0');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,minimum,maximum,initial_value)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),2,'infestation_size','Infestation Size','slider','0','100','0');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,minimum,initial_value,is_required)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),3,'degree','Degree','counter','0','0',true);

INSERT INTO form_fields (form_id,position,field_key,field_label,type,minimum,maximum,initial_value)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),4,'density','Density','slider','0','100','0');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern,is_required)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),5,'source','Source','string','',true);

INSERT INTO form_fields (form_id,position,field_key,field_label,type)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),6,'date_discovered','Data Discovered','date');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern,is_required)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),7,'common_name','Common Name','string','',true);

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern,is_required)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),8,'genus','Genus','string','',true);

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),9,'species','Species','string','');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),10,'scientific_name','Scientific Name','string','');

INSERT INTO form_fields (form_id,position,field_key,field_label,type,pattern)
VALUES ((SELECT id FROM forms WHERE form_key = 'weed_inspector'),11,'class','Class','string','');

INSERT INTO forms (form_key,form_label) VALUES ('baseball_team','Baseball Team');

INSERT INTO form_fields (form_id,position,field_key,field_label,type)
VALUES ((SELECT id FROM forms WHERE form_key = 'baseball_team'),0,'team','Favorite?','string');

INSERT INTO form_fields (form_id,position,field_key,field_label,type)
VALUES ((SELECT id FROM forms WHERE form_key = 'baseball_team'),1,'why','Why?','string');

INSERT INTO stores (name,store_type,version,uri,id,default_layers) VALUES ('wfstest','wfs','1.1.0','http://efc-dev.boundlessgeo.com:8080/geoserver/spatialconnect/ows','71522e9b-3ec6-48c3-8d5c-57c8d14baf6a','{"baseball_team"}');

INSERT INTO users (name,email,password) VALUES ('Admin Person','admin@something.com','$2a$10$j57V/gWt9UR3wRzUC7ddye9Nhp4SWJVMm2o.lCBQe2IeE6ETztqGy');
INSERT INTO users (name,email,password) VALUES ('Easy admin','a','$2a$10$3F76hRYXoxS4EZ8jgGY8auzLRWZb.UWbMY5b41Zrt7Nqb3c1NShlW');

INSERT INTO triggers (name,description,definition) VALUES ('Freeway Drive', 'iOS Simulator geofence', '{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.04248428344727,37.33263104074124],[-122.04248428344727,37.33774934661962],[-122.03553199768068,37.33774934661962],[-122.03553199768068,37.33263104074124],[-122.04248428344727,37.33263104074124]]]}}');
INSERT INTO triggers (name,definition) VALUES ('Test Geofence', '{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.728759765625,38.496593518947584],[-74.87182617187499,39.308800296002914],[-74.102783203125,38.634036452919226],[-74.02587890625,37.71859032558816],[-75.289306640625,37.42252593456307],[-76.146240234375,37.84883250647402],[-75.728759765625,38.496593518947584]]]}}');
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spacon-server",
"version": "0.5.0",
"version": "0.5.1",
"description": "SpatialConnect backend server for mobile lib and form builder",
"main": "server.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": "NODE_ENV=production webpack"
},
"dependencies": {
"babel-cli": "^6.16.0",
"babel-plugin-transform-class-properties": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-polyfill": "^6.8.0",
Expand Down

0 comments on commit c40e2dc

Please sign in to comment.