How to add a column to H2 database only if that column does not exists already in the table?
I am using schema.sql to create a database structure.
I have tried several combinations of code like this but nothing works:
ALTER TABLE IF NOT EXISTS TABLE_NAME.column_name ADD COLUMN column_name VARCHAR (50);
h2 version: 1.4.199
The valid syntax is
ALTER TABLE TABLE_NAME ADD COLUMN IF NOT EXISTS COLUMN_NAME VARCHAR(50);