Relative Content

Tag Archive for databasepostgresqldatabase-migration

How to automatically refresh NON MATERIALIZED views in postgres?

How do you automatically refresh a view in postgres?
I want to add a script which automatically refreshes all views after a database migration.
How could I achieve this?
I know REFRESH MATERIALIZED VIEW exists, but what if you just want to refresh the definition of a normal view?

Are there problems with using CUIDv1 and CUIDv2 in the same Database?

I recently read that CUIDv1 has been deprecated and replaced by CUIDv2. We currently use a PostgreSQL database where all of our ID’s use CUIDv1. We are planning to change some parts of the table structures and relations. We are considering to start by using CUIDv2 for the new tables with the improved structure and later on change the ID’s of the old tables into CUIDv2. Due to our current project timeline and the tasks we have in the backlog, the change of all the other ID’s to CUIDv2 will be much later.