Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
mkraft
a9e21fcaf1 MM-41866: Adds index to UserGroups.DisplayName. (#19799) 2022-03-24 11:38:09 -04:00
Ben Schumacher
7710a2fe37 [MM-40735] Add MattermostAppID to OAuth app (#19214) 2022-03-15 18:00:27 +01:00
Ibrahim Serdar Acikgoz
0f918a0aa4 migrations: use go:embed instead of gobindata (#19769) 2022-03-11 14:14:50 +03:00
Michael Kochell
b87dc5afd1 [MM-41756] Remove AcceptedServiceTermsId column (#19591)
* remove AcceptedServiceTermsId column

* PR feedback

* make migrations-bindata
2022-02-24 12:51:31 -05:00
Kyriakos Z
501d454af5 MM-39351: fixes LastRootPostAt being null (#19574)
* MM-39351: fixes LastRootPostAt being null

After upgrading to v6.1 there is a chance for LastRootPostAt to be NULL.
This might be due to a faulty migration when upgrading to v5.35.

v5.35 had `create_msg_root_count` where LastRootPostAt was used as a
temporary column which at the end was deleted.
Then on v6.1 we are adding that column again, this time to keep.

If the migration to v5.35 had failed and it didn't drop the column
the `upgrade_cte` (v6.1) migration would leave some channels with `LastRootPostAt`
being NULL.

This resulted in crashing the app.

This commit fixes that by running again a migration to again set
LastRootPostAt only when it's NULL this time and then set it to 0
for channels that might still have LastRootPostAt being NULL
(channels with no posts).

PS: the whole issue arose when upon creating the `upgrade_cte` migration
the create_msg_root_count migration was manually edited to change
the column name from LastRootPostAt to LastRootAt.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-22 12:13:04 +02:00
Ibrahim Serdar Acikgoz
3291f00cc0 fix typo in the mysql/000010_create_group_channels.up.sql (#19554)
Automatic Merge
2022-02-15 15:34:18 +02:00
Agniva De Sarker
d8fc23c86b MM-41191: Apply upload_sessions incorrect index fix (#19383)
https://mattermost.atlassian.net/browse/MM-41191

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-26 13:18:09 +05:30
Ibrahim Serdar Acikgoz
56c7da5817 [MM-40952] migrations: Add if statements for some queries (#19359)
* migrations: add if statements for some queries

* add better checks to upgrade posts v6 migration

* use "is null" instead of "= null"

* fix down script for users v6

* reflect review comments
2022-01-19 10:57:28 +03:00
Ibrahim Serdar Acikgoz
00284d9d26 migrations: Fix setting column default for shceme store (#19327) 2022-01-13 14:01:19 +03:00
Ibrahim Serdar Acikgoz
d0724d8b00 migrations: Fix typos/errors and add missing migrations (#19316)
* fix public channels creation script for mysql

* fix several remaining migrations
2022-01-12 16:19:03 +03:00
Ibrahim Serdar Acikgoz
6595b31f23 Replace go-migrate with morph (#19116) 2022-01-08 10:16:07 +02:00
Claudio Costa
177680f08c [MM-36472] Fix inconsistencies in Roles columns (#18390)
* Fix inconsistencies in Roles columns

* Add new migrations
2021-10-01 15:31:29 +02:00
Claudio Costa
ff745fcff7 Remove redundant indexes (#17710) 2021-06-08 18:08:43 +02: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