Data migration postgresql reformulate table

Asked

Viewed 26 times

0

The title may imply that I am recreating a table with similar attributes, but the term is as follows::

I have a database currently running in my application for study purposes, there is a class called PROPERTY in it contains address(street, city, number)/contact(email, phone)/name of the owner, among other data that are in fact hers, this is inside my database in a table of the same name with all the data in it, briefly was created through spring , but as you can see the ideal would be for example the Address in another table, this table PROPERTY is already populated with data, I wonder if it is possible to "tidy" the database and migrate the data of the columns reference the address (street, city, number) to another table, who knows how to migrate the columns in a whole using the Hibernate

  • If I understand your question maybe an INSERT INTO sua_nova_table SELECT fields FROM sua_tabela_original; . Maybe the ON CONFLICT clause can be useful.

  • I understand, I would like to make this migration by Hibernate or maybe Flyway

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.