-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I tried adding a serial
column.
{
"name": "01_add_test_id",
"operations": [
{
"add_column": {
"table": "tests",
"column": {
"name": "test_id",
"type": "serial",
"nullable": false
}
}
}
]
}
Which I thought would be equivalent to this sql query:
ALTER TABLE IF EXISTS tests ADD COLUMN test_id serial;
The error message is:
Failed to start migration: migration is invalid: field "up" is required
In this case, what would be the SQL expression for the up
property? I have tried with:
...
"up": "",
...
Failed to start migration: unable to execute start operation: failed to create trigger: pq: missing expression at or near ";"
...
"up": "ROW_NUMBER() OVER(ORDER BY created_at ASC)",
...
Failed to start migration: unable to execute start operation: failed to create trigger: pq: syntax error at or near "TRIGGER"
Any suggestions? Thanks!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working