Commit Graph

42 Commits

Author SHA1 Message Date
Arve Knudsen b5379c5335 Chore: Fix SQL related Go variable naming (#28887)
* Chore: Fix variable naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-11 06:21:08 +01:00
Agnès Toulet f0421ed08e Dashboards / Folders: delete related data (permissions, stars, tags, versions, annotations) when deleting a dashboard or a folder (#28826)
* Dashboard: delete related data when deleting a dashboard or a folder

* fix migrations order

* apply PR feedback
2020-11-06 09:02:31 +01:00
Arve Knudsen 41d432b5ae Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Emil Tullstedt 830e8dc5fd Search: Replace search implementation (#23855) 2020-04-27 14:16:03 +02:00
Oleg Gaidarenko b37ee65bd3 Chore: prepare our SQL for cockroach db (#16471)
This is basically implementation of the https://github.com/grafana/grafana/issues/8900#issuecomment-435437167
points, except for the type conversion bit.

I tried to implement idea mentioned in cockroachdb ticket (see below).
And it is possible, but it complicates things as lot - not only we have to
have 4 SQL statements instead of one, but we would have to copy the column
structure as well - PK, FG, indexes and stuff, plus there will
be additional downtime with this approach.

So idea for this pull is to prepare our SQL as much as possible, so when
cockroachdb will add support for full type conversions, we could easilly add
support for it as well.

* Add `CASCADE` to `DROP INDEX` statement

* Make string conversions explicit

Thanks @Luit

Ref #8900
Ref cockroach/cockroach#9851
2019-04-15 18:49:24 +03:00
bergquist c817aecd66 provisioning: only update dashboard if hash of json changed 2018-05-31 21:05:52 +02:00
Dan Cech 1dfff74da9 move database-specific code into dialects (#11884) 2018-05-10 16:54:21 +02:00
Leonard Gram 0053be9882 login: uses epochs for login throtting.
Closes #10937
2018-02-16 17:25:46 +01:00
bergquist 529fc022d5 db: reduce name column size in dashboard_provisoning
ref #10931
2018-02-16 11:49:17 +01:00
Leonard Gram fa1b92a12b provisioning: uses unix epoch timestamps. (#10907)
* provisioning: uses unix epoch timestamps.
2018-02-14 15:28:30 +01:00
bergquist 59cd2d5102 provisioning: avoid caching and use updated field from db 2018-02-09 15:23:38 +01:00
Leonard Gram b549d29319 Merge branch 'master' into provisioning 2018-02-08 11:01:09 +01:00
Torkel Ödegaard cf7be5da0b fix: changed dashboard title length to match slug length, will fix mysql index size issue, fixes #10779 2018-02-06 11:03:37 +01:00
Carl Bergquist 04a94ce396 adds unique index for org_id+folder_id+title on dashboards (#10766) 2018-02-05 14:11:19 +01:00
bergquist 6d2a555866 Drops unique index orgid_slug from dashboards. 2018-01-31 10:26:06 +01:00
Marcus Efraimsson c1cff3849e dashboard: change unique index for uid to include org_id
Make the max length of uid longer in case we want to change it later
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson 025a14ec24 db: add migrations for creating a unique index for uid. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson 50aa9ec69c db: add migrations for generating uid for existing dashboards. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson 401b01e1e6 db: add new column uid to the dashboard table. #7883 2018-01-30 23:18:34 +01:00
bergquist 67a9e6a71d provisioing: add lookup table provisioned dashboards 2018-01-23 21:52:55 +01:00
Torkel Ödegaard fc1d8416a7 working on dashboard search 2017-11-20 12:47:03 +01:00
Torkel Ödegaard fc69d59cae dashboard folder search fix 2017-06-23 16:00:26 -04:00
Torkel Ödegaard 93bc588dae refactoring: moving dashboards acl migrations to its own folder 2017-06-19 18:48:15 -04:00
Daniel Lee 3785894b40 WIP: guardian service for search
Removes restricted dashboards from search result.
2017-06-12 15:49:09 +02:00
Daniel Lee 1248728d7f WIP: rough prototype of dashboard folders
Breaks some stuff like selected dash in the search result.
In dashboard search, if the user is not searching then the result is
returned as a tree structure. No ACL's or user group ux yet.
2017-06-12 15:49:09 +02:00
Dan Cech f224fd8310 reduce length of dashboard columns used in compound indexes (#8507) 2017-06-04 14:28:03 +02:00
Dan Cech c0d5b61403 tweak column lengths for utf8mb4 support on older mysql (#8483) 2017-05-29 08:31:36 +02:00
Dan Cech 24d4e50343 utf8mb4 encoding (#7959)
* use utf8mb4 character set for connections to mysql

* use utf8mb4 character set for tables, shorten varchar fields used in unique indexes

* migration type to update table character set

* update table character sets

* set charset for temp_user.status

* gofmt
2017-03-28 14:34:53 +02:00
Torkel Ödegaard 6257ae094c feat(sqlstore): added index for dashboard_id in dashboard_tag table, fixes #5868 2016-09-21 21:32:51 +02:00
Torkel Ödegaard d44325affd feat(apps): progress on app dashboard imports 2016-07-08 09:35:06 +02:00
Torkel Ödegaard 305a6ae110 feat(dashboards): dashboard sharing fixes 2016-06-17 11:36:35 +02:00
Torkel Ödegaard 0d4c76a029 feat(import): save gnetId for dashbards imported from grafana.net 2016-05-27 16:42:32 +02:00
utkarshcmu 58121d89fc Updated http_api docs 2016-01-27 22:02:33 -08:00
utkarshcmu 753fd164d7 Added createdBy in metadata ui and dashboard table 2016-01-27 17:11:21 -08:00
utkarshcmu af371249f9 Successfully displayed userdId in UI 2015-12-18 01:52:05 -08:00
utkarshcmu e0ffcda32e Added UI , DB settings 2015-12-18 00:20:23 -08:00
utkarshcmu 42d1205260 Fixed gofmt checks 2015-12-06 23:59:58 -08:00
utkarshcmu 3d90340446 Added new columns to dashboard table 2015-12-06 23:51:43 -08:00
Torkel Ödegaard 8526025792 MySQL: Dashboard.data column type changed to mediumtext (sql migration added), Fixes #1863 2015-04-23 16:18:46 +02:00
Torkel Ödegaard d8005af8ee updated circle with fmt formating test 2015-03-07 16:23:22 +01:00
Torkel Ödegaard ed68a4bb9a More work on SQL migrations 2015-02-24 17:59:21 +01:00
Torkel Ödegaard 02a89c752b Progress on database schema migration for account -> org refactor 2015-02-24 11:46:34 +01:00