-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[gitpod-db] add new DB entity for VolumeSnapshot #9810
Conversation
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really want to drop the table in case we roll-back? I think here it's sensible to not drop it and keep it around, just unused. It's risky in the sense that server is never just a single replica, so we can't guarantee we won't be running code which will try to access the table and another which won't. Normally, we'd first create the table without any usage and then in later PRs, we'd start using it, such that it doesn't get dropped if the later PR needs to be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I was following other migration examples, and thought that was the way to do it. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@easyCZ updated. PTAL 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'd remove the commented out parts as they are not really useful directly.
Adding hold for you to merge at your will.
/hold
components/gitpod-db/src/typeorm/migration/1651188368768-VolumeSnapshotCreation.ts
Outdated
Show resolved
Hide resolved
components/gitpod-db/src/typeorm/migration/1651188368768-VolumeSnapshotCreation.ts
Outdated
Show resolved
Hide resolved
/unhold |
Description
This adds a new DB entity that is used by #9475
Related Issue(s)
Part of #9475
How to test
This just adds a new entity and shouldn't affect anything else
Release Notes
Documentation