DEV: fix joining in the script for moving timestamps (#13721)

Without checking if t.table_schema = '#{@schema}' the SELECT with JOIN in the script were returning every column twice in case there is a 'backup' scheme with exactly the same tables as in the 'public scheme'
This commit is contained in:
Andrei Prigorshnev 2021-07-13 17:21:15 +04:00 committed by GitHub
parent 800c6e1a68
commit 7fe3e4bab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ class TimestampsUpdater
JOIN information_schema.tables AS t
ON c.table_name = t.table_name
WHERE c.table_schema = '#{@schema}'
AND t.table_schema = '#{@schema}'
AND c.data_type = '#{data_type}'
AND t.table_type = 'BASE TABLE'
SQL