Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
  • Loading branch information
mteodor committed Sep 17, 2019
1 parent 1f37977 commit bb3af58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/provisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ group of things. When specifiying metadata you can specify just a part of the me
curl -s -S -i --cacert docker/ssl/certs/mainflux-server.crt --insecure -H "Authorization: <user_auth_token>" https://localhost/things?offset=0&limit=5&metadata={"serial":"123456"}
```


If you don't provide them, default values will be used instead: 0 for `offset`,
and 10 for `limit`. Note that `limit` cannot be set to values greater than 100. Providing
invalid values will be considered malformed request.
Expand Down
8 changes: 8 additions & 0 deletions things/postgres/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ func migrateDB(db *sqlx.DB) error {
"DROP TABLE channels",
},
},
{
Id: "things_3",
Up: []string{
`ALTER TABLE IF EXISTS things ALTER COLUMN
metadata TYPE JSONB using metadata::text::jsonb
`,
},
},
},
}

Expand Down

0 comments on commit bb3af58

Please sign in to comment.