<p>Under the hood, the Super Table fix is running a migration behind a controller, which you can call in a content migration directly in your project. I have done the same, due needing to script it in a deployment.</p>
<pre><code>&lt;?php

namespace craft\contentmigrations;

use craft\db\Migration;
use verbb\supertable\migrations\m190120_000000_fix_supertablecontent_tables;

/**
 * m190412_102156_fix_super_table_content_tables migration.
 *
 * Runs the fix content table migration part of Super Table plugin
 */
class m190412_102156_fix_super_table_content_tables extends Migration
{

    public function safeUp()
    {
        echo &quot;    &gt; Starting migration for fixing Super Table content...\n&quot;;
        (new m190120_000000_fix_supertablecontent_tables())-&gt;safeUp();

        return true;
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo &quot;m190412_102156_fix_super_table_content_tables cannot be reverted.\n&quot;;
        return false;
    }
}
</code></pre>

CC BY-SA 4.0
2022-04-14T15:12:38.807Z
2022-04-14T15:12:38.807Z
James White
<p>We have an issue where the super-table fix-content-tables needs to be run. This fixes the issue on local and development environments.</p>
<p>The problem is we have a very restricted production environment from the customer and need to trigger the repair from the CLI (deploy time command) otherwise it has timeout issues running it from frontend.</p>
<p>What's the best way for us to achieve this?</p>

<plugin-supertable>
Need to run the super table fix-content-tables from CLI
# Need to run the super table fix-content-tables from CLI

(Asked by: username_0 on 2022-04-12)

We have an issue where the super-table fix-content-tables needs to be run. This fixes the issue on local and development environments.

The problem is we have a very restricted production environment from the customer and need to trigger the repair from the CLI (deploy time command) otherwise it has timeout issues running it from frontend.

What's the best way for us to achieve this?

**Tags:** plugin-supertable

---

## 1 answers

### Answer by username_0 on 2022-04-14. Score: 3 | Accepted answer

Under the hood, the Super Table fix is running a migration behind a controller, which you can call in a content migration directly in your project. I have done the same, due needing to script it in a deployment.
 Starting migration for fixing Super Table content...\n";
        (new m190120_000000_fix_supertablecontent_tables())->safeUp();

        return true;
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m190412_102156_fix_super_table_content_tables cannot be reverted.\n";
        return false;
    }
}


---

