Skip to content

Commit 3e767ed

Browse files
committed
add migration script
1 parent 29e3965 commit 3e767ed

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

migrations/v1.1.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Column: public."Notifications".version
2+
3+
-- ALTER TABLE public."Notifications" DROP COLUMN version;
4+
5+
ALTER TABLE public."Notifications"
6+
ADD COLUMN version smallint;

src/app.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,28 +111,6 @@ function start(handlers) {
111111
});
112112
});
113113

114-
app.use('/notifications/debug', (req, res) => {
115-
const options = {
116-
from: new Date - 1 * 60 * 60 * 1000,
117-
until: new Date,
118-
limit: 100000,
119-
start: 0,
120-
order: 'desc',
121-
};
122-
123-
//
124-
// Find items logged between today and yesterday.
125-
//
126-
logger.query(options, (err, results) => {
127-
if (err) {
128-
res.status(500).json(err);
129-
return;
130-
}
131-
132-
res.status(200).json({ history: results, env: process.env });
133-
});
134-
});
135-
136114
app.use('/', apiRouter);
137115

138116

src/models/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ const NotificationSetting = require('./NotificationSetting')(sequelize, DataType
1818
module.exports = {
1919
Notification,
2020
NotificationSetting,
21-
init: () => sequelize.sync({ force: true }),
21+
init: () => sequelize.sync(),
2222
};

0 commit comments

Comments
 (0)