refactor: migrate to objection.js + knex
This commit is contained in:
26
server/models_old/setting.js
Normal file
26
server/models_old/setting.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Settings schema
|
||||
*/
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
let settingSchema = sequelize.define('setting', {
|
||||
key: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
config: {
|
||||
type: DataTypes.JSON,
|
||||
allowNull: false
|
||||
}
|
||||
}, {
|
||||
timestamps: true,
|
||||
version: true,
|
||||
indexes: [
|
||||
{
|
||||
unique: true,
|
||||
fields: ['key']
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
return settingSchema
|
||||
}
|
||||
Reference in New Issue
Block a user