Skip to content

Commit

Permalink
Merge pull request #146 from partio-scout/technical/db-indexes
Browse files Browse the repository at this point in the history
Set db indexes to fields most queried against
  • Loading branch information
emilvirkki authored Jul 20, 2016
2 parents 89d89f5 + 38a42a7 commit 3a5db8b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/common/models/participant.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"firstName": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "first_name",
"dataType": "character varying",
Expand All @@ -37,6 +38,7 @@
"lastName": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "last_name",
"dataType": "character varying",
Expand Down Expand Up @@ -129,6 +131,7 @@
},
"phoneNumber": {
"type": "string",
"index": true,
"postgresql": {
"columnName": "phone_number",
"dataType": "character varying",
Expand Down Expand Up @@ -229,12 +232,14 @@
}
},
"presence": {
"index": true,
"type": "number"
},

"localGroup": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "local_group",
"dataType": "character varying",
Expand All @@ -247,6 +252,7 @@
"campGroup": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "camp_group",
"dataType": "character varying",
Expand All @@ -259,6 +265,7 @@
"village": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "village",
"dataType": "character varying",
Expand All @@ -271,6 +278,7 @@
"subCamp": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "sub_camp",
"dataType": "character varying",
Expand All @@ -283,6 +291,7 @@
"accommodation": {
"type": "string",
"required": false,
"index": true,
"postgresql": {
"columnName": "accommodation",
"dataType": "character varying",
Expand All @@ -295,6 +304,7 @@
"ageGroup": {
"type": "string",
"required": true,
"index": true,
"postgresql": {
"columnName": "age_group",
"dataType": "character varying",
Expand Down Expand Up @@ -394,6 +404,7 @@
"campOfficeNotes": {
"type": "string",
"required": false,
"index": true,
"postgresql": {
"columnName": "camp_office_notes",
"dataType": "character varying",
Expand All @@ -407,6 +418,7 @@
"editableInfo": {
"type": "string",
"required": false,
"index": true,
"postgresql": {
"columnName": "editable_info",
"dataType": "character varying",
Expand Down

0 comments on commit 3a5db8b

Please sign in to comment.