Commit graph

7 commits

Author SHA1 Message Date
Claudio Costa
d3a003dcb2
Address outstanding merging issues with cloud branch (#17160) 2021-03-17 10:39:46 +01:00
John Tzikas
809affd6d1
Create basic make commands for configuring golang-migrate (#16938)
* Create basic make commands for configuring golang-migrate

* Showcase full flow with new migrations

* Apply PR suggestions

* Migrate over team members

* Update mocks

* Fix specs

* Move columns that added after table creation onto separate stmts

* Put back gorp table definitions

* Fix issues with golang-migrate that not tracks underlying db driver

* Help prompt after new migration and consistent checksum for bindata

* Put gorp mapping back

* Apply PR suggestiong

* Close migrations after they run

* Add migration file to bindata check

* Updates needed

* Reset store_test

* Add copyright

* Apply PR suggestions

* Fix new circleci check

* Put back upgrade step for backwards comp

* Add store test to test migration directions

* Apply PR suggestions

* Add go-bindata to tools

* Apply PR suggestios

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-02-23 16:22:31 +02:00
Claudio Costa
6b35b933a8
Revert "MM-27312 Allow uploading 10 files per post (#16235)" (#16908)
This reverts commit 8e2986e5ed.
2021-02-10 20:19:05 +01:00
Diogo Nicolau
8e2986e5ed
MM-27312 Allow uploading 10 files per post (#16235)
* Allow uploading 10 files per post

* Increase Post.Fileids column size to fit 10 files

* Add Post.Fileids column changes to DB v531

* Fix current_schema_version

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Update store/sqlstore/upgrade.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Fix schema version

Co-authored-by: Diogo Lima Nicolau <diogo.lima.nicolau@cern.ch>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-14 09:30:02 +01:00
Doug Lauder
b317ee5cf2
MM-25394 session expired push notifications (#14732)
* new job type created that checks for expired mobile sessions and pushes notifications.

* only send session expired notifications if ExtendSessionLengthWithActivity is enabled.

* includes schema change:  field added to Sessions table
2020-06-17 14:47:54 -04:00
Patryk Pomykalski
9369d65441
Optimize reactions table (#13406)
* Optimize reactions table

Change reactions primary key to (PostId, UserId, EmojiName) so fetching
reactions for post will use primary key lookup instead of table scan.

* fix db version

* review fixes

* update database schema in scripts/
2020-03-17 10:53:31 +01:00
Sandeep Sukhani
a9c327c068 [MM-13341] Add an upgrade test to verify schema (#10419)
* [MM-13341] Add an upgrade test to verify schema

Upgrade test is done by following steps:
1. A mysql dump generated from v4.10.0 is imported in a database and is ran through migration code
2. Another fresh database is generated without any initial data, which gets latest schema.
3. Diff between these 2 databases is generated using mysqldiff tool from mysql utilities

For db setup, version cli command is used which takes care of migration or setup of fresh db

* Using 5.7 tag for mysql docker image which is already used for db setup

* Starting docker containers for db before running tests

* Using db from v5.0.0 for migration test

* Added migration test for psql and made some improvements in running commands in docker

* Add postgres db dump file

* Updated message

* moved dump files to scripts and using error code from diff command
2019-03-19 15:05:15 -04:00