Skip to content

Commit 99e7147

Browse files
author
Sachin Maheshwari
committed
changing in sql schema
1 parent eac145f commit 99e7147

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

migrations/v2.0.1.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- rename "topic" column to "topicOld"
2+
ALTER TABLE "public"."NotificationSettings"
3+
RENAME COLUMN "topic" TO "topicOld";
4+
5+
-- add "topic" column
6+
ALTER TABLE "public"."NotificationSettings"
7+
ADD COLUMN "topic" character varying(255);
8+
9+

src/models/NotificationSetting.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ module.exports = (sequelize, DataTypes) => sequelize.define('NotificationSetting
1717
serviceId: { type: DataTypes.STRING, allowNull: false },
1818
name: { type: DataTypes.STRING, allowNull: false },
1919
value: { type: DataTypes.STRING, allowNull: false },
20+
topicOld: { type: DataTypes.STRING, allowNull: false },
2021
}, { timestamps: false });

0 commit comments

Comments
 (0)