New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration errors between v5 beta.1 and beta.2 #20020
Labels
issue: bug
Issue reporting a bug
severity: critical
If the issue has a security impact or breaks core usage of the product
source: core:database
Source is core/database package
source: dependencies
Source is dependency problem
status: confirmed
Confirmed by a Strapi Team member or multiple community members
version: 5
Comments
derrickmehaffy
added
issue: bug
Issue reporting a bug
source: core:database
Source is core/database package
source: dependencies
Source is dependency problem
status: pending reproduction
Waiting for free time to reproduce the issue, or more information
version: 5
labels
Apr 3, 2024
Repro script for reproducing the database migration error between the beta versions#!/bin/bash
# catch ctrl-c without exiting script
trap "echo 'stopping strapi'" SIGINT;
# cleanup any existing repro dir
rm -rf repro/
# start mysql
docker rm -f repro-mysql
docker run -d \
-e MYSQL_ROOT_PASSWORD=strapi \
-e MYSQL_PASSWORD=strapi \
-e MYSQL_USER=strapi \
-e MYSQL_DATABASE=strapi \
-p 3306:3306 \
--name repro-mysql \
mysql:8.3.0
# create app at previos version
npx create-strapi-app@5.0.0-beta.1 repro --typescript --quickstart --no-run
# move to new app for doing work
cd repro
# setup strapi for mysql
yarn add mysql2
export DATABASE_CLIENT=mysql
# start app first time
yarn develop
# stop server with ctrl-c
# update strapi
yarn add @strapi/strapi@5.0.0-beta.2
# restart / upgrade app
yarn develop The second (post update) has the following error
|
Note, the upgrade does work against |
4 tasks
After investigating, the first part of the issue is caused by a bug in Dolt, but the second part with foreign keys unable to be dropped in the db sync appears to be valid. I've got a fix here. |
derrickmehaffy
added
severity: critical
If the issue has a security impact or breaks core usage of the product
status: confirmed
Confirmed by a Strapi Team member or multiple community members
and removed
status: pending reproduction
Waiting for free time to reproduce the issue, or more information
labels
Apr 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
issue: bug
Issue reporting a bug
severity: critical
If the issue has a security impact or breaks core usage of the product
source: core:database
Source is core/database package
source: dependencies
Source is dependency problem
status: confirmed
Confirmed by a Strapi Team member or multiple community members
version: 5
Bug report
pulling in convo from Discord...
Required System information
Describe the bug
Hit a couple of bugs during database migration after
renameColumn
issue (Altar table fails against MySQL, possibly invalid SQL generation knex/knex#6053)drop index
issue, after fixing the issues from the5.0.0-rename-identifiers-longer-than-max-length
migration (ran the alter tables by hand)Steps to reproduce the behavior
yarn dev
I think
Expected behavior
migrations work and the app starts up normally
The text was updated successfully, but these errors were encountered: