Skip to content

Commit

Permalink
Remove unique constraint (#368)
Browse files Browse the repository at this point in the history
* Remove unique constraint on operations.external_id

* No op down migration
  • Loading branch information
pankrator authored Dec 6, 2019
1 parent 7b9d582 commit dac7d80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion storage/postgres/keystore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var _ = Describe("Secured Storage", func() {
mock.ExpectQuery(`SELECT CURRENT_DATABASE()`).WillReturnRows(sqlmock.NewRows([]string{"mock"}).FromCSVString("mock"))
mock.ExpectQuery(`SELECT COUNT(1)*`).WillReturnRows(sqlmock.NewRows([]string{"mock"}).FromCSVString("1"))
mock.ExpectExec("SELECT pg_advisory_lock*").WithArgs(sqlmock.AnyArg()).WillReturnResult(sqlmock.NewResult(1, 1))
mock.ExpectQuery(`SELECT version, dirty FROM "schema_migrations" LIMIT 1`).WillReturnRows(sqlmock.NewRows([]string{"version", "dirty"}).FromCSVString("20191118203400,false"))
mock.ExpectQuery(`SELECT version, dirty FROM "schema_migrations" LIMIT 1`).WillReturnRows(sqlmock.NewRows([]string{"version", "dirty"}).FromCSVString("20191206134500,false"))
mock.ExpectExec("SELECT pg_advisory_unlock*").WithArgs(sqlmock.AnyArg()).WillReturnResult(sqlmock.NewResult(1, 1))
options := storage.DefaultSettings()
options.EncryptionKey = string(envEncryptionKey)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN;

COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BEGIN;

ALTER TABLE operations DROP CONSTRAINT operations_external_id_key;

COMMIT;

0 comments on commit dac7d80

Please sign in to comment.