I need to alter a table in H2 db. But we have millions of databases with the same same table. What may be the feasible way to alter such databases?
H2 Database – Alter multiple databases
alter-tableh2
Related Question
- Mysql – Alter thesql database engine doesn’t work from cluster to other
- SQL Server – Alter Table for Multiple Databases
- How to Minimize Downtime for an ALTER in MySQL
- Mysql – Prevent replication of ALTER commands
- Sql-server – Large Number of ALTER TABLE Statements
- MySQL Alter Table – Modifying Multiple Columns vs Single Column in INNODB
Best Answer
Database migration
Database migration or schema migration are the evolving terms for the process of managing and deploying changes to the structure of your database.
The idea is that you never make ad-hoc changes to your database. Instead, you make a disciplined practice of accumulating scripts (SQL, XML, etc.), and optionally executable code, to implement each stage of your database’s evolution: adding tables, adding columns, altering columns, etc.
Tools such as Flyway and Liquibase automate the process of managing and executing your collection of scripts and optional code. If you deploy such a tool along with your database or app, the tool can automatically detect which scripts and/or executables need to be run to update the currently-used database to the latest and greatest.