@@ -30,10 +30,13 @@ const Notification = db.define('notification', {
|
||||
remove_code: Sequelize.STRING,
|
||||
type: {
|
||||
type: Sequelize.ENUM,
|
||||
values: ['mail', 'admin_mail', 'activity_pub']
|
||||
values: ['mail', 'admin_mail', 'mastodon']
|
||||
}
|
||||
})
|
||||
|
||||
Notification.findOrCreate({ where: { type: 'mastodon' } })
|
||||
Notification.findOrCreate({ where: { type: 'admin_email' } })
|
||||
|
||||
const Place = db.define('place', {
|
||||
name: { type: Sequelize.STRING, unique: true, index: true },
|
||||
address: { type: Sequelize.STRING }
|
||||
|
||||
9
app/models/settings.js
Normal file
9
app/models/settings.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const db = require('../db')
|
||||
const Sequelize = require('sequelize')
|
||||
|
||||
const Settings = db.define('settings', {
|
||||
key: { type: Sequelize.STRING, primaryKey: true, index: true },
|
||||
value: Sequelize.JSON
|
||||
})
|
||||
|
||||
module.exports = Settings
|
||||
@@ -13,7 +13,6 @@ const User = db.define('user', {
|
||||
password: Sequelize.STRING,
|
||||
is_admin: Sequelize.BOOLEAN,
|
||||
is_active: Sequelize.BOOLEAN,
|
||||
mastodon_instance: Sequelize.STRING,
|
||||
mastodon_auth: Sequelize.JSON
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user