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:
parent
800c6e1a68
commit
7fe3e4bab8
|
@ -53,6 +53,7 @@ class TimestampsUpdater
|
||||||
JOIN information_schema.tables AS t
|
JOIN information_schema.tables AS t
|
||||||
ON c.table_name = t.table_name
|
ON c.table_name = t.table_name
|
||||||
WHERE c.table_schema = '#{@schema}'
|
WHERE c.table_schema = '#{@schema}'
|
||||||
|
AND t.table_schema = '#{@schema}'
|
||||||
AND c.data_type = '#{data_type}'
|
AND c.data_type = '#{data_type}'
|
||||||
AND t.table_type = 'BASE TABLE'
|
AND t.table_type = 'BASE TABLE'
|
||||||
SQL
|
SQL
|
||||||
|
|
Loading…
Reference in New Issue