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

Error creating projects on the new version. #9

Closed
vhespanha opened this issue Aug 17, 2024 · 6 comments
Closed

Error creating projects on the new version. #9

vhespanha opened this issue Aug 17, 2024 · 6 comments
Labels
bug Something isn't working refactor Code needs refactoring
Milestone

Comments

@vhespanha
Copy link

Hi!

I was testing the new code for sub-projects and sub-tasks and came across a weird error everytime I tried to create a new project.

The bug:

With some basic investigation I found out what was happening, once you added the new column ParentProjectId to the code, our SQLite instance had a schema change that wasn't migrated, so my current ~/.local/share/clido/data.db contained the old version of that database.

Solution:

As a solution to this, I have two things in mind.

  1. Create a versioning system to the DB and a migration system, so everytime we update the schema, we include that migration on the commit, and whenever a user executes any command on a new version, the tool runs that migration before executing the command itself, fixing any schema mismatches in the process.

  2. Include a develop branch to place the code we're still testing until we cover some use cases, then we merge to main once we hit a new minor version, (or a patch if it's related to a bug)

Implementation

I think I can hack a simple versioning system to the DB and open a PR still today, see you later.

@dynnian
Copy link
Owner

dynnian commented Aug 17, 2024

Implementing an ORM like gorm would be quite helpful for this purpose

@dynnian dynnian added bug Something isn't working refactor Code needs refactoring labels Aug 17, 2024
@dynnian dynnian added this to the v1.1 milestone Aug 17, 2024
@vhespanha
Copy link
Author

Just reverted main to HEAD^ and created the develop branch with the changes from #7
See #12 and #13

Next step is the gorm PR, merge it to develop until we release 1.1

@dynnian
Copy link
Owner

dynnian commented Aug 17, 2024

Done creating new develop branch

@vhespanha
Copy link
Author

#15 will close this!

@dynnian
Copy link
Owner

dynnian commented Aug 18, 2024

PRs #14 and #15 have been merged, but I will leave this issue opened until it's resolved in the main branch

@dynnian
Copy link
Owner

dynnian commented Nov 26, 2024

Completed by latest PR

@dynnian dynnian closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor Code needs refactoring
Projects
None yet
Development

No branches or pull requests

2 participants