Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use goose for database migrations #76

Merged
merged 2 commits into from
Feb 23, 2023

Conversation

jnschaeffer
Copy link
Contributor

Using a database migration tool is preferable over writing our own in-house database migration code. This PR adds goose to identity-api and uses it to run database migrations for the in-memory database store.

Using a database migration tool is preferable over writing our own
in-house database migration code. This commit adds goose to
identity-api and uses it to run database migrations for the in-memory
database store.

Signed-off-by: John Schaeffer <jschaeffer@equinix.com>
@jnschaeffer jnschaeffer requested a review from a team February 23, 2023 21:15
@jnschaeffer jnschaeffer requested a review from a team as a code owner February 23, 2023 21:15
@@ -0,0 +1,26 @@
package storage

Check warning

Code scanning / Revive (reported by Codacy)

should have a package comment

should have a package comment
@@ -0,0 +1,18 @@
-- +goose Up
CREATE TABLE issuers (

Check warning

Code scanning / Tsqllint (reported by Codacy)

Expected table to use data compression

Expected table to use data compression
mappings STRING
);

CREATE TABLE user_info (

Check warning

Code scanning / Tsqllint (reported by Codacy)

Expected table to use data compression

Expected table to use data compression
@@ -0,0 +1,18 @@
-- +goose Up

Check warning

Code scanning / Tsqllint (reported by Codacy)

Expected SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED near top of file

Expected SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED near top of file
Signed-off-by: John Schaeffer <jschaeffer@equinix.com>
@jnschaeffer jnschaeffer merged commit 28b4fc1 into infratographer:main Feb 23, 2023
@jnschaeffer jnschaeffer deleted the goose-migrations branch February 23, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants