We imported a MySQL database and, since in postgre there isn't Autoincrement options, we need to create a serial.
The thing is, the current exported id's doesn't allow us to change its type from int to a serial, instead of that, Postgresql is asking to create a sequence and set the default value as the nextval of that sequence
Is there any more efficient way to do it?
Regards!
PostgreSQLDatabasesMySQL Server
Last Comment
earth man2
8/22/2022 - Mon
Doug Walton
As far as I know, that's the only way to do it which is kind of annoying.
If you have to do this a ton of times you could try creating a procedure that would take a table and column name as parameters that would do it for you.
If you have to do this a ton of times you could try creating a procedure that would take a table and column name as parameters that would do it for you.