1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/src/migrations/20230224093446-drop-createdBy-from-notifications-table.js
andreas-unleash 5b8302afdf
remove createdBy column from notifications table (#3190)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-02-24 12:33:03 +02:00

22 lines
401 B
JavaScript

'use strict';
exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE notifications
DROP COLUMN IF EXISTS created_by;
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
ALTER TABLE notifications
ADD COLUMN IF NOT EXISTS created_by INTEGER REFERENCES users (id);
`,
cb,
);
};