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

Kk db tests #981

Merged
merged 5 commits into from
Dec 20, 2021
Merged

Kk db tests #981

merged 5 commits into from
Dec 20, 2021

Conversation

kevin-kline
Copy link
Contributor

Description

This PR adds more model tests for domain layer entities.

Does this close any open issues?

related to (read for more details):

Other Information

Experiencing some unexpected behavior with migrations. Some result from "dirty database" problems:
https://github.com/golang-migrate/migrate/blob/master/FAQ.md#what-does-dirty-database-mean

image

@joncodo
Copy link
Contributor

joncodo commented Dec 20, 2021

The way to fix the above error is documented in the Migrations.md file

## How to reset your DB. (https://github.com/golang-migrate/migrate/issues/282#issuecomment-530743258)

NOTE: Use this when you get an error like this "error: Dirty database version 16. Fix and force version."

1. Delete your DB
2. `migrate -path db/migration -database "mysql://root:admin@tcp(localhost:3306)/lake" -verbose force 1`
3. `migrate -path db/migration -database "mysql://root:admin@tcp(localhost:3306)/lake" -verbose down`
4. `migrate -path db/migration -database "mysql://root:admin@tcp(localhost:3306)/lake" -verbose up`

@joncodo joncodo marked this pull request as ready for review December 20, 2021 13:51
@joncodo joncodo merged commit 40372c6 into main Dec 20, 2021
@joncodo joncodo deleted the kk-db-tests branch December 20, 2021 13:53
mamh2021 pushed a commit to golang108/merico-dev-lake that referenced this pull request Apr 10, 2022
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.

2 participants