forked from Genaker/nodejento
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCacheTag.js
More file actions
39 lines (39 loc) · 798 Bytes
/
CacheTag.js
File metadata and controls
39 lines (39 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('CacheTag', {
tag: {
type: DataTypes.STRING(100),
allowNull: false,
primaryKey: true,
comment: "Tag"
},
cache_id: {
type: DataTypes.STRING(200),
allowNull: false,
primaryKey: true,
comment: "Cache Id"
}
}, {
sequelize,
tableName: 'cache_tag',
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "tag" },
{ name: "cache_id" },
]
},
{
name: "CACHE_TAG_CACHE_ID",
using: "BTREE",
fields: [
{ name: "cache_id" },
]
},
]
});
};