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

feat: add status fields for feature lifecycle table #7014

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/features/feature-lifecycle/feature-lifecycle-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { StageName } from '../../types';
type DBType = {
stage: StageName;
created_at: string;
status?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

normally we have a rule of thumb that we don't add anything in migration prs but I think the optional one should be fine.

status_value?: string;
};

type DBProjectType = DBType & {
Expand Down
16 changes: 16 additions & 0 deletions src/migrations/20240508153244-feature-lifecycles-status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
exports.up = function (db, cb) {
db.runSql(`
ALTER TABLE feature_lifecycles ADD COLUMN IF NOT EXISTS status TEXT;
ALTER TABLE feature_lifecycles ADD COLUMN IF NOT EXISTS status_value TEXT;
`, cb);
};

exports.down = function (db, cb) {
db.runSql(
`
ALTER TABLE feature_lifecycles DROP COLUMN IF EXISTS status;
ALTER TABLE feature_lifecycles DROP COLUMN IF EXISTS status_value;
`,
cb,
);
};
Loading