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:
parent
236addbe23
commit
c3491abf4b
20
src/migrations/20251006111609-add-milestone-progressions.js
Normal file
20
src/migrations/20251006111609-add-milestone-progressions.js
Normal 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,
|
||||
);
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user