Hi,
as described here Upgrade fails while migrating we’re currently upgrading from a very old installation of discourse to the current v2.3.2. We’ve recognized that all posts have been changed to post_type=3
while the migration-process.
We’ve seen that an old but updated migration-script causes this “destruction”.
It seems that it has to be this way to make the string-append work:
sql = "UPDATE posts SET action_code = 'autoclosed.enabled', post_type = 3 "
sql += "WHERE post_type = 2 AND ("
sql += strings.map { |s| "raw ~* #{ActiveRecord::Base.connection.quote(s)}" }.join(' OR ')
sql += ")"
The current migration-step produces this query/output:
== 20150729150523 MigrateAutoClosePosts: migrating ============================
-- execute("UPDATE posts SET action_code = 'autoclosed.enabled', post_type = 3 ")
Kind Regards
Sascha