mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user