DEV Community

Discussion on: Choosing a Database Manager. SQL or Nah?

Collapse
 
peledzohar profile image
Zohar Peled

Adding a new column to an existing table doesn't force migrating the data. I don't know where you've got that information from but it's simply wrong.

Collapse
 
thetealpickle profile image
✨ thetealpickle 📱

sure.

However, changing schemas does, which was really the core take away 🙃

Collapse
 
peledzohar profile image
Zohar Peled

That depends on what you mean exactly by changing schema...

Thread Thread
 
thetealpickle profile image
✨ thetealpickle 📱

interesting,

I currently only know that any change to the schema => migration

how does the type of schema change influence migration? What are some of the different type of changes?

Thread Thread
 
peledzohar profile image
Zohar Peled

Actually, when working with Alter table (and not using the visual editors), I don't think there should be any data migration. In SQL Server, for instance, when you are changing an existing table using the visual editor built into SSMS, it might sometime migrate the data to a temporary location, drop the table, re-create it with the changes needed, and move the data into the newly formed copy of the table. However, when using the query editor to write Alter table statements, I'm not aware of such a process (that doesn't mean it doesn't happen - it could very well be that the query optimizer decides it's better to drop and recreate the table instead of simply altering it).