[MM-37987] cmd/mattermost/version: remove store initialization from version cmd (#19364)

* cmd/mattermost/version: remove store initialization from version cmd

* Update cmd/mattermost/commands/db.go

Co-authored-by: Carlos Tadeu Panato Junior <carlos@mattermost.com>

* reflect review comments

* commands/db: fix config store initializer

Co-authored-by: Carlos Tadeu Panato Junior <carlos@mattermost.com>
This commit is contained in:
Ibrahim Serdar Acikgoz
2022-02-16 11:48:01 +03:00
committed by GitHub
parent 459f54ac9d
commit 23ade1d0c0
7 changed files with 35 additions and 33 deletions

View File

@@ -18,7 +18,7 @@ cat config/config.json | \
jq '.SqlSettings.DriverName = "mysql"' > $TMPDIR/config.json
echo "Running the migration"
make ARGS="version --config $TMPDIR/config.json" run-cli
make ARGS="db migrate --config $TMPDIR/config.json" run-cli
echo "Setting up config for fresh db setup"
cat config/config.json | \
@@ -26,7 +26,7 @@ cat config/config.json | \
jq '.SqlSettings.DriverName = "mysql"' > $TMPDIR/config.json
echo "Setting up fresh db"
make ARGS="version --config $TMPDIR/config.json" run-cli
make ARGS="db migrate --config $TMPDIR/config.json" run-cli
if [ "$SCHEMA_VERSION" == "5.0.0" ]; then
for i in "ChannelMembers SchemeGuest" "ChannelMembers MsgCountRoot" "ChannelMembers MentionCountRoot" "Channels TotalMsgCountRoot"; do

View File

@@ -18,7 +18,7 @@ cat config/config.json | \
jq '.SqlSettings.DriverName = "postgres"' > $TMPDIR/config.json
echo "Running the migration"
make ARGS="version --config $TMPDIR/config.json" run-cli
make ARGS="db migrate --config $TMPDIR/config.json" run-cli
echo "Setting up config for fresh db setup"
cat config/config.json | \
@@ -26,7 +26,7 @@ cat config/config.json | \
jq '.SqlSettings.DriverName = "postgres"' > $TMPDIR/config.json
echo "Setting up fresh db"
make ARGS="version --config $TMPDIR/config.json" run-cli
make ARGS="db migrate --config $TMPDIR/config.json" run-cli
if [ "$SCHEMA_VERSION" == "5.0.0" ]; then
for i in "ChannelMembers MentionCountRoot" "ChannelMembers MsgCountRoot" "Channels TotalMsgCountRoot"; do