-
Notifications
You must be signed in to change notification settings - Fork 446
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
MYSQL - "Identifier name 'components_restaurant_related_restaurants_restaurants_links_inv_fk' is too long" #128
Comments
"Thanks to my friend Subhan Behjati for solving this problem" // Define the path to your SQL file // Read the SQL file const uploadDataPath = path.join(path.resolve('data'), 'uploads'); const tmpPath = path.resolve('.tmp'); // Configure the database connection async function updateUid() { try {
} catch (e) { async function dumpMySQL() { // Remove any empty queries // Execute each query // Function to execute SQL queries try { try { try { try { } // Run the seed |
and you need change database.js like this : module.exports = ({ env }) => { const connections = { |
Bug report
Describe the bug
"Identifier name 'components_restaurant_related_restaurants_restaurants_links_inv_fk' is too long",
Steps to reproduce the behavior
Just Change the database from sqlite to MySQL and try to start the application.
The complete error trace is the following:
code: 'ER_TOO_LONG_IDENT',
errno: 1059,
sqlMessage: "Identifier name 'components_restaurant_related_restaurants_restaurants_links_inv_fk' is too long",
sqlState: '42000',
index: 0,
sql: 'alter table
components_restaurant_related_restaurants_restaurants_links
add indexcomponents_restaurant_related_restaurants_restaurants_links_inv_fk
(restaurant_id
)'}
System
Node.js version: 16.7.0
Strapi version: 4.10.7
Database: MYSQL 5.7
Operating system: MacOS
The text was updated successfully, but these errors were encountered: