Skip to content
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

Make query in SchemaHashMysql independent from internal sorting #608

Merged
merged 2 commits into from
Jul 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/DbSchema/SchemaHasherMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,24 @@ public function hashDb(): string
SELECT
MD5(
GROUP_CONCAT(
CONCAT(
COALESCE(COLUMN_NAME, ""),
COALESCE(EXTRA, ""),
COLUMN_TYPE,
IS_NULLABLE
)
InnerSelect.columns
)
) AS dbsignature,
1 AS grouper
FROM
information_schema.columns
WHERE
table_schema = DATABASE()
FROM (
SELECT
CONCAT(
COALESCE(COLUMN_NAME, ""),
COALESCE(EXTRA, ""),
COLUMN_TYPE,
IS_NULLABLE
) as columns
FROM
information_schema.columns
WHERE
table_schema = DATABASE()
ORDER BY table_name, column_name
) as InnerSelect
GROUP BY
grouper';

Expand Down