In case it’s not now obvious, should be committed to your repository.
Whenever you commit a migration, commit the changes in as well. A commit’s code “state” and schema “state” should always match.
Mine usually end up being called create_and populate_
They'll often look something like this: CREATE TABLE artists ( id NUMBER(38) PRIMARY KEY, name VARCHAR(100) NOT NULL, updated_on DATE NOT NULL, created_on DATE NOT NULL ); CREATE TABLE albums ( id NUMBER PRIMARY KEY, release_name VARCHAR2(255), year DATE, created_on DATE NOT NULL, updated_on DATE NOT NULL, artist_id NUMBER(38) NOT NULL ); CREATE TABLE songs ( id NUMBER(38) PRIMARY KEY, title VARCHAR2(255) NOT NULL, length NUMBER(6,2) NOT NULL, created_on DATE NOT NULL, updated_on DATE NOT NULL, album_id NUMBER(38) NOT NULL ); CREATE SEQUENCE artists_seq; CREATE SEQUENCE albums_seq; CREATE SEQUENCE songs_seq; There are quite a few problems with this approach, though.
This keeps database changes in branch A from breaking branch B’s code.