title: Convert all multiline LONGTEXT columns to JSON columns
body: <p><strong>SUMMARY:</strong>
  Conducting a Database migration and I'm trying to move 10k worth of LONGTEXT COLUMNS full of paragraphs with line breaks into a new DB TABLE COLUMN of JSON datatype.</p>
  
  <p><strong>SPECS:</strong>
  MYSQL v5.7 and using InnoDB Engine (So there are some limits on JSON functionality.)</p>
  
  <p>EXAMPLE TABLE <code>OLD_DB_TAB</code> COLUMN <code>text_body</code>:</p>
  
  <pre class="lang-sql prettyprint-override"><code>ID     text_body 
  1      This is an intro paragraph. Here are some words.
  
         And a second paragraph. More words.
  
  2      This is another column value with multiline strings. Here are some 
         words.
  
         Look, another paragraph in this same column. More words. 
         Even a third paragraph!
  
  3      And so on ...
  </code></pre>
  
  <p>EXAMPLE TABLE <code>NEW_DB_TAB</code> COLUMN <code>json_text_body</code>:</p>
  
  <pre class="lang-sql prettyprint-override"><code>ID     json_text_body 
  1      {"body": [{"insert": "This is an intro paragraph. Here are some 
         words.\nAnd a second paragraph. More words.\n\n"}]}
  
  2      {"body": [{"insert": "This is another column value with multiline 
         strings.\nHere are some words.\nLook, another paragraph in this 
         same column.\nMore words.\nEven a third paragraph!\n\n"}]}
  
  3      {"body": [{"insert": "And so on ...\n\n"}]}
  </code></pre>
  
  <p>My latest attempt for an SQL code solution has failed and the error says "Subquery returns more than 1 row":</p>
  
  <pre><code>SELECT CAST((SELECT `text_body` FROM `OLD_DB`) AS JSON)
  </code></pre>
  
  <p><strong>How can I:</strong>
  Convert all LONGTEXT columns to JSON columns? In the example tables posted here, convert OLD_DB.text_body to a JSON datatype in NEW_DB.json_text_body. Is there an SQL code solution?</p>