mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 22:44:41 +08:00
FIX: Check for column that we want to drop instead.
* Otherwise, the migration is called multiple times.
This commit is contained in:
@ -30,7 +30,7 @@ if Category.exec_sql("
|
|||||||
SELECT 1 FROM schema_migration_details
|
SELECT 1 FROM schema_migration_details
|
||||||
WHERE EXISTS(
|
WHERE EXISTS(
|
||||||
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
|
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
WHERE table_schema = 'public' AND table_name = 'categories' AND column_name = 'uploaded_logo_id'
|
WHERE table_schema = 'public' AND table_name = 'categories' AND column_name = 'logo_url'
|
||||||
) AND
|
) AND
|
||||||
name = 'AddUploadsToCategories' AND
|
name = 'AddUploadsToCategories' AND
|
||||||
created_at < (current_timestamp at time zone 'UTC' - interval '#{duration} minutes')
|
created_at < (current_timestamp at time zone 'UTC' - interval '#{duration} minutes')
|
||||||
|
Reference in New Issue
Block a user