I have a PostgreSQL database with about 70 tables and I want to add two columns to each of them, `created_by` and `updated_by`. Since we're using Liquibase, I have written an update script that works fine in PostgreSQL:

```
DO $$
DECLARE
  tables CURSOR FOR
    SELECT tablename
    FROM pg_tables
    WHERE schemaname = 'myschema'
    ORDER BY tablename;
BEGIN
  FOR table_record IN tables LOOP
    EXECUTE
      'ALTER TABLE ' || table_record.tablename || ' ADD COLUMN created_by BIGINT; ' ||
      'ALTER TABLE ' || table_record.tablename || ' ADD COLUMN updated_by BIGINT;';
  END LOOP;
END$$;

```

However, for integration testing we are using an H2 in-memory database, which doesn't accept this SQL, even in PostgreSQL compatibility mode. [From this question](https://stackoverflow.com/questions/30287369/add-trigger-to-every-table-in-my-h2-database), I know how to select all tables:

```
SELECT * FROM INFORMATION_SCHEMA.TABLES

```

but does this work for `myschema` as well? And is there a way to store the results and loop over them to add the columns? I also don't understand how to use or write prepared statements, as mentioned in the answer.

The basic question is: How can I write an equivalent update script for the H2 database without having to manually list all tables?