- 
                Notifications
    
You must be signed in to change notification settings  - Fork 119
 
Open
Milestone
Description
I'm trying to change a table's id column from integer (int4) to bigint (int8), but I'm struggling to complete the migration because other tables reference id as a foreign key.
I tried following this example: https://github.com/xataio/pgroll/blob/main/docs/README.md#change-type
Here's what I have:
{
  "name": "00_testing",
  "operations": [
    {
      "alter_column": {
        "table": "inspection_item",
        "column": "id",
        "type": "bigint",
        "up": "CAST(id as bigint)",
        "down": "CAST(id as integer)"
      }
    }
  ]
}When I try to complete the migration, I get this error:
I see examples for adding/deleting foreign key constraints, but I don't see any examples of changing the type of a column that is referenced as a foreign key.
Does anyone have examples of this?
maingoh and gulcin
Metadata
Metadata
Assignees
Labels
No labels