We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Right now tables.sql has this condition:
tables.sql
SUBSTRING_INDEX(TABLE_NAME, "_", 1)
This condition works well against table names like 'user_photos_123', but fails against other variations:
SELECT SUBSTRING_INDEX("Users123", "_", 1); # => Users123 SELECT SUBSTRING_INDEX("UserPhotos123", "_", 1); # => UserPhotos123 SELECT SUBSTRING_INDEX("user_photos_123", "_", 1); # => user
The text was updated successfully, but these errors were encountered:
There is an obvious solution at MySQL 8.0:
## "TABLE_NAME_123" => "TABLE_NAME_" SELECT REGEXP_REPLACE("TABLE_NAME_123", "[0-9]+$", "");
Sorry, something went wrong.
No branches or pull requests
Right now
tables.sql
has this condition:This condition works well against table names like 'user_photos_123', but fails against other variations:
The text was updated successfully, but these errors were encountered: