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

migrate/sqlite: create table only if it doesn't exist #226

Merged
merged 1 commit into from
Mar 27, 2014
Merged

migrate/sqlite: create table only if it doesn't exist #226

merged 1 commit into from
Mar 27, 2014

Conversation

rgarcia
Copy link

@rgarcia rgarcia commented Mar 26, 2014

fixes #224

db.QueryRow("SELECT max(revision) FROM migration").Scan(&current)
if current != rev.Revision() {
t.Fatalf("Did not successfully migrate")
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to add this check here because Migrate() above does not return an error (it logs the error and silently rolls back the transaction)

@bradrydzewski
Copy link

thanks!

bradrydzewski added a commit that referenced this pull request Mar 27, 2014
migrate/sqlite: create table only if it doesn't exist
@bradrydzewski bradrydzewski merged commit 6e2b74e into harness:master Mar 27, 2014
@bradrydzewski bradrydzewski added this to the v0.2 milestone Apr 1, 2014
@bradrydzewski bradrydzewski modified the milestones: v0.3, v0.2 Apr 10, 2014
johannesHarness added a commit that referenced this pull request Sep 26, 2023
This change is a follow up on the effort to remove transactions and sync stores from the database layer, and move them in the application layer. It is addressing the repo + space store.
The following changes are included:
- Introduce PathStore storing resource paths (repo + space)
- Add foreign key from path.repo_id/space_id to repo.id/space.id
- Add foreign key from repo/space.parent_id to space.id
- Remove repo_sync and space_sync
- Move path creation logic to repo/space controller (for both creating primary paths for new repos/spaces, as well as creating alias spaces)
- Reimplement repo/space moving on controller layer
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.

sqlite db migration fails on table already existing
2 participants