修改表唯一约束

This commit is contained in:
whyour
2022-01-27 00:49:44 +08:00
parent a3a62f65dd
commit 891619ad55
7 changed files with 23 additions and 15 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export enum CrontabStatus {
interface AppInstance extends Model<App, App>, App {}
export const AppModel = sequelize.define<AppInstance>('App', {
name: DataTypes.STRING,
name: { type: DataTypes.STRING, unique: 'name' },
scopes: DataTypes.JSON,
client_id: DataTypes.STRING,
client_secret: DataTypes.STRING,