title: How to upgrade multiple file of database in magento 2
body: <p>I am not able to update upgrade schema file.</p>
  
  <p>I want to update database using upgrade schema file that i have already updated.</p>
  
  <p>In my module i have a database table which is created using install schema file. </p>
  
  <p>This is my UpgradeSchema file</p>
  
  <pre><code>&lt;?php
  namespace Mageplaza\HelloWorld\Setup;
  
  use Magento\Framework\Setup\UpgradeSchemaInterface;
  use Magento\Framework\Setup\SchemaSetupInterface;
  use Magento\Framework\Setup\ModuleContextInterface;
  
  class UpgradeSchema implements UpgradeSchemaInterface
  {
      public function upgrade( SchemaSetupInterface $setup, ModuleContextInterface $context ) {
          $installer = $setup;
  
          $installer-&gt;startSetup();
  
          if(version_compare($context-&gt;getVersion(), '1.2.0', '&lt;')) {
              $installer-&gt;getConnection()-&gt;addColumn(
                  $installer-&gt;getTable( 'mageplaza_helloworld_post' ),
                  'test',
                  [
                      'type' =&gt; \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL,
                      'nullable' =&gt; true,
                      'length' =&gt; '12,4',
                      'comment' =&gt; 'test',
                      'after' =&gt; 'status'
                  ]
              );
          }
  
  
  
          $installer-&gt;endSetup();
      }
  }
  </code></pre>
  
  <p>this file is correctly updated</p>
  
  <p>now i want also update my table with new column like this</p>
  
  <pre><code>&lt;?php
  namespace Mageplaza\HelloWorld\Setup;
  
  use Magento\Framework\Setup\UpgradeSchemaInterface;
  use Magento\Framework\Setup\SchemaSetupInterface;
  use Magento\Framework\Setup\ModuleContextInterface;
  
  class UpgradeSchema implements UpgradeSchemaInterface
  {
      public function upgrade( SchemaSetupInterface $setup, ModuleContextInterface $context ) {
          $installer = $setup;
  
          $installer-&gt;startSetup();
  
          if(version_compare($context-&gt;getVersion(), '1.2.0', '&lt;')) {
              $installer-&gt;getConnection()-&gt;addColumn(
                  $installer-&gt;getTable( 'mageplaza_helloworld_post' ),
                  'test123',
                  [
                      'type123' =&gt; \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL,
                      'nullable' =&gt; true,
                      'length' =&gt; '12,4',
                      'comment' =&gt; 'test123',
                      'after' =&gt; 'status'
                  ]
              );
          }
  
  
  
          $installer-&gt;endSetup();
      }
  }
  </code></pre>
  
  <p>This is not work properly</p>