Fix Rails/SquishedSQLHeredocs cop (#24694)
This commit is contained in:
		@@ -4,7 +4,7 @@ class StatusIdsToTimestampIds < ActiveRecord::Migration[5.1]
 | 
			
		||||
    Mastodon::Snowflake.define_timestamp_id
 | 
			
		||||
 | 
			
		||||
    # Set up the statuses.id column to use our timestamp-based IDs.
 | 
			
		||||
    ActiveRecord::Base.connection.execute(<<~SQL)
 | 
			
		||||
    ActiveRecord::Base.connection.execute(<<~SQL.squish)
 | 
			
		||||
      ALTER TABLE statuses
 | 
			
		||||
      ALTER COLUMN id
 | 
			
		||||
      SET DEFAULT timestamp_id('statuses')
 | 
			
		||||
@@ -21,7 +21,7 @@ class StatusIdsToTimestampIds < ActiveRecord::Migration[5.1]
 | 
			
		||||
 | 
			
		||||
    # We lock the table during this so that the ID won't get clobbered,
 | 
			
		||||
    # but ID is indexed, so this should be a fast operation.
 | 
			
		||||
    ActiveRecord::Base.connection.execute(<<~SQL)
 | 
			
		||||
    ActiveRecord::Base.connection.execute(<<~SQL.squish)
 | 
			
		||||
      LOCK statuses;
 | 
			
		||||
      SELECT setval('statuses_id_seq', (SELECT MAX(id) FROM statuses));
 | 
			
		||||
      ALTER TABLE statuses
 | 
			
		||||
 
 | 
			
		||||
@@ -2,14 +2,14 @@ class RejectFollowingBlockedUsers < ActiveRecord::Migration[5.2]
 | 
			
		||||
  disable_ddl_transaction!
 | 
			
		||||
 | 
			
		||||
  def up
 | 
			
		||||
    blocked_follows = Follow.find_by_sql(<<-SQL)
 | 
			
		||||
    blocked_follows = Follow.find_by_sql(<<-SQL.squish)
 | 
			
		||||
      select f.* from follows f
 | 
			
		||||
      inner join blocks b on
 | 
			
		||||
        f.account_id = b.target_account_id and
 | 
			
		||||
        f.target_account_id = b.account_id
 | 
			
		||||
    SQL
 | 
			
		||||
 | 
			
		||||
    domain_blocked_follows = Follow.find_by_sql(<<-SQL)
 | 
			
		||||
    domain_blocked_follows = Follow.find_by_sql(<<-SQL.squish)
 | 
			
		||||
      select f.* from follows f
 | 
			
		||||
      inner join accounts following on f.account_id = following.id
 | 
			
		||||
      inner join account_domain_blocks b on
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ class RemoveBoostsWideningAudience < ActiveRecord::Migration[5.2]
 | 
			
		||||
  disable_ddl_transaction!
 | 
			
		||||
 | 
			
		||||
  def up
 | 
			
		||||
    public_boosts = Status.find_by_sql(<<-SQL)
 | 
			
		||||
    public_boosts = Status.find_by_sql(<<-SQL.squish)
 | 
			
		||||
      SELECT boost.id
 | 
			
		||||
      FROM statuses AS boost
 | 
			
		||||
      LEFT JOIN statuses AS boosted ON boost.reblog_of_id = boosted.id
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user