I have a table in production whose structure I want to modify. I can ALTER the table to add column but the column gets added at the end, may be the order may not matter. But at least visually I see it as the last column. The table was created at the last release and it was empty. So, I thought of dropping it & re-creating it in my flyway script. But it led to build failure as the database replication is on in production. How to deal with it? Database is PostgreSQL. At this point of time, I do not have information about scheme of replication as the production environment is with client.
-
1Are you using Physical Replication or Logical Replication?– Sahap AsciCommented Sep 28 at 17:27
-
@SahapAsci I will ask the DBA & get back to you– Subhendu MahantaCommented Sep 28 at 17:37
-
@SahapAsci What if it is logical replication?– Subhendu MahantaCommented Sep 28 at 17:59
-
@SahapAsci it is a logical replication. If in subscriber we drop replicated table & recreate will it do?– Subhendu MahantaCommented Sep 28 at 20:08
-
2If it is logical replication, you will have to add the new table to the publication and refresh the publication on the subscriber.– Laurenz AlbeCommented Sep 29 at 5:13
Add a comment
|