mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
98d462db27
## About the changes Adds a migration and persistence layer with a new column `segment_project_id` to bind a segment to a project.
14 lines
335 B
JavaScript
14 lines
335 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`ALTER TABLE segments ADD COLUMN segment_project_id varchar(255) REFERENCES projects(id) ON DELETE CASCADE;`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`ALTER TABLE segments DROP COLUMN IF EXISTS segment_project_id;`,
|
|
cb,
|
|
);
|
|
};
|