Skip to content

Latest commit

 

History

History

versions

Schema in SQL scripts

This test case is demonstrating initial database schema creation, then migration to the next schema version. Immutable V-type SQL scripts are used.

You can do the same by defining a declarative model in the mutable YAML files, here is an example.

Schema Guard allows you to mix both: declarative schema model in YAML files and plain-SQL scripts. Please refer to Mixing SQL with YAML example.

Running the test

../test.sh versions

If you're interested in examining the resulting schema or history table content, it can be useful to keep the psql prompt after the example is completed.

../test.sh versions psql