> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/modeling/develop/table-migration",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Table migration

> Use table migration to update table references in Omni when table names change in your database, without breaking downstream content.

The table migration tool in the model IDE allows you to update table references within your Omni model when table names change on the database end, without breaking workbook queries, dashboards, or other model references that depend on the original table. This is ideal for situations where you are creating new versions of existing tables in your database.

## Requirements

To follow the steps in this guide, you'll need **Modeler** or **Connection Admin** permissions on the model you want to work with.

## Migrating tables

<Steps>
  <Step>
    In Omni, click **Develop** in the left navigation.
  </Step>

  <Step>
    Click the model you want to work with.
  </Step>

  <Step>
    In the model IDE, click **Model > Branch** to [create a new branch](/content/develop/branch-mode).
  </Step>

  <Step>
    In the model IDE, click **Model > Migrate tables**. The **Table migration** modal will display the tables you can migrate.

    <img src="https://mintcdn.com/omni-e7402367/GCQIq52PG6hwOyNR/modeling/images/table-migration-modal.png?fit=max&auto=format&n=GCQIq52PG6hwOyNR&q=85&s=fe8da4265a2a13a30a90bda149e0bdb0" alt="The Migrate tables view in the Omni model IDE, showing a list of tables that can be migrated." width="783" height="872" data-path="modeling/images/table-migration-modal.png" />
  </Step>

  <Step>
    Locate the table you want to work with and click the **Action** dropdown to display the options.

    * **Swap to a new table** - **Use when you have a replacement table ready to go.** Updates references to this table throughout the model. When selected, a second dropdown will display. Use this field to select the table Omni should use as the replacement:

          <img src="https://mintcdn.com/omni-e7402367/GCQIq52PG6hwOyNR/modeling/images/table-migration-swap-to-view.png?fit=max&auto=format&n=GCQIq52PG6hwOyNR&q=85&s=4090097ca2f9a79d77a930a1c19f025d" alt="The table migration modal showing the swap-to-new-table dropdown with available replacement tables." width="775" height="230" data-path="modeling/images/table-migration-swap-to-view.png" />

      Swapping to a new table adds a `renamed_from` parameter to the table's underlying view file, which helps prevent downstream references from breaking. In a view file, this will look like the following:

      ```yaml title="View file with renamed_from parameter" highlight={2} theme={null}
      table_name: blob_sales
      renamed_from: old_blob_sales
      ```
    * **Delete this view** - **Use when a table is no longer needed.** Soft-deletes the table by adding [`ignored: true`](/modeling/views/parameters/ignored) to the table's underlying view file. If needed, you can recover the table by reverting the change in the **Staged** panel of the model IDE before merging your branch.
  </Step>

  <Step>
    If needed, select actions for more tables in the modal.
  </Step>

  <Step>
    When finished, click **Migrate**. This will apply the changes you made in the **Table migration** modal to your Omni branch.
  </Step>

  <Step>
    Merge the Omni branch to promote the changes to the shared model. If the [git integration](/integrations/git) is enabled for the model, you may need to open a pull request first.
  </Step>
</Steps>

## After migrating

After merging your branch, use the [Content Validator](/modeling/develop/content-validator) to verify that no downstream references were broken by the migration.

<Tip>
  If your database schema has changed more broadly — such as new or removed tables and columns — use a [schema refresh](/modeling/develop/schema-refreshes) instead of or in addition to table migration.
</Tip>
