Skip to content

[Documentation] Adding exact command for Postgres serial migration #6305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/en/how-to/postgresql-identity-migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ the schema with the DBAL:
END;
$$;

3. For each column and their table, run ``upgrade_serial_to_identity(<table>, <column>)``.
3. Run the function for each table like this:

.. code-block:: sql

SELECT upgrade_serial_to_identity('article', 'id');

Without this migration, next time when DBAL 4 is used to manage the schema, it will perform a similar migration
but instead of reusing the existing sequence, it will drop it and create a new one. As a result,
Expand Down