Skip to content

Commit

Permalink
Merge pull request #128 from rhmdnd/create-profile-table
Browse files Browse the repository at this point in the history
Add a table for profiles
  • Loading branch information
openshift-ci[bot] authored Aug 4, 2022
2 parents ebe1775 + ed22900 commit f3d84f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions migrations/000007_create_profiles_table.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE IF EXISTS profiles;
9 changes: 9 additions & 0 deletions migrations/000007_create_profiles_table.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS profiles (
id uuid PRIMARY KEY,
name VARCHAR(255),
metadata_id UUID,
catalog_id UUID,
CONSTRAINT fk_profiles_metadata_id FOREIGN KEY (metadata_id) REFERENCES metadata(id),
CONSTRAINT fk_profiles_catalog_id FOREIGN KEY (catalog_id) REFERENCES catalogs(id)
);

2 changes: 1 addition & 1 deletion tests/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(6)
expectedVersion = uint(7)
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)
Expand Down

0 comments on commit f3d84f2

Please sign in to comment.