agrs-sequelize-sdk 1.1.51 → 1.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/models/Channel.js +3 -10
  2. package/package.json +1 -1
package/models/Channel.js CHANGED
@@ -1,3 +1,4 @@
1
+ // models/Channel.js
1
2
  module.exports = (sequelize, DataTypes) => {
2
3
  const Channel = sequelize.define(
3
4
  "Channel",
@@ -5,7 +6,7 @@ module.exports = (sequelize, DataTypes) => {
5
6
  channelId: {
6
7
  type: DataTypes.STRING,
7
8
  allowNull: false,
8
- // Remove unique: true here if it exists
9
+ // No unique constraint here
9
10
  },
10
11
  styleId: {
11
12
  type: DataTypes.STRING,
@@ -24,20 +25,12 @@ module.exports = (sequelize, DataTypes) => {
24
25
  allowNull: false,
25
26
  defaultValue: [],
26
27
  },
27
- createdAt: {
28
- type: DataTypes.DATE,
29
- defaultValue: DataTypes.NOW,
30
- },
31
- updatedAt: {
32
- type: DataTypes.DATE,
33
- defaultValue: DataTypes.NOW,
34
- },
35
28
  },
36
29
  {
37
30
  tableName: "channels",
38
31
  timestamps: true,
39
32
  indexes: [
40
- // Add a unique index on the combination of channelId and styleId
33
+ // Add unique composite index
41
34
  {
42
35
  unique: true,
43
36
  fields: ["channelId", "styleId"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.1.51",
3
+ "version": "1.1.52",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",