diff --git a/migrations/000006_create_profiles_table.down.sql b/migrations/000006_create_profiles_table.down.sql new file mode 100644 index 00000000..dcbc3511 --- /dev/null +++ b/migrations/000006_create_profiles_table.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS profiles; diff --git a/migrations/000006_create_profiles_table.up.sql b/migrations/000006_create_profiles_table.up.sql new file mode 100644 index 00000000..dcae7746 --- /dev/null +++ b/migrations/000006_create_profiles_table.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS profiles ( + id uuid PRIMARY KEY, + name VARCHAR(255), + metadata_id UUID, + CONSTRAINT fk_profiles_metadata_id FOREIGN KEY (metadata_id) REFERENCES metadata(id) +); + diff --git a/tests/integration_test.go b/tests/integration_test.go index 1c692f60..46a9f963 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -303,7 +303,7 @@ func TestMigration(t *testing.T) { // nolint:paralleltest // database tests shou // Upgrade the database and make sure all upgrades apply cleanly. err = m.Up() version, dirty, _ = m.Version() - expectedVersion = uint(5) + expectedVersion = uint(6) assert.Equal(t, expectedVersion, version, "Database version mismatch: want %d but got %d", expectedVersion, version) assert.Equal(t, false, dirty, "Database state mismatch: want %t but got %t", false, dirty) assert.Equal(t, err, nil, "Error upgrading the database: %s", err)