* 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>
* 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>
* 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
* 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/
* [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