1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-10 01:19:53 +01:00

feat: milestone progressions migration (#10738)

This commit is contained in:
Mateusz Kwasniewski 2025-10-06 13:47:02 +02:00 committed by GitHub
parent 236addbe23
commit c3491abf4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,20 @@
exports.up = function(db, cb) {
db.runSql(
`
CREATE TABLE IF NOT EXISTS milestone_progressions (
id TEXT PRIMARY KEY NOT NULL,
source_milestone TEXT NOT NULL REFERENCES milestones(id) ON DELETE CASCADE,
target_milestone TEXT NOT NULL REFERENCES milestones(id) ON DELETE CASCADE,
transition_condition JSONB NOT NULL
);
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(
`DROP TABLE IF EXISTS milestone_progressions;`,
cb,
);
};