mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-05 17:51:27 +03:00
Database things, pinned messages, start on ticket claiming
This commit is contained in:
@@ -39,6 +39,7 @@ module.exports = async (client) => {
|
||||
storage: path('./user/database.sqlite'),
|
||||
logging: text => client.log.debug(text)
|
||||
});
|
||||
client.log.warn('SQLite is not sufficient for a production environment if you want to use ticket archives. You should disable "log_messages" in your servers\' settings or use a different database.');
|
||||
} else {
|
||||
client.log.info(`Connecting to ${types[type].name} database...`);
|
||||
sequelize = new Sequelize(DB_NAME, DB_USER, DB_PASS, {
|
||||
|
@@ -7,6 +7,10 @@ module.exports = ({ config }, sequelize) => {
|
||||
primaryKey: true,
|
||||
allowNull: false,
|
||||
},
|
||||
claiming: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: false,
|
||||
},
|
||||
guild: {
|
||||
type: DataTypes.CHAR(19),
|
||||
allowNull: false,
|
||||
|
@@ -15,6 +15,10 @@ module.exports = (client, sequelize) => {
|
||||
key: 'id'
|
||||
},
|
||||
},
|
||||
claimed_by: {
|
||||
type: DataTypes.CHAR(19),
|
||||
allowNull: true,
|
||||
},
|
||||
closed_by: {
|
||||
type: DataTypes.CHAR(19),
|
||||
allowNull: true,
|
||||
@@ -53,6 +57,10 @@ module.exports = (client, sequelize) => {
|
||||
type: DataTypes.CHAR(19),
|
||||
allowNull: true,
|
||||
},
|
||||
pinned_messages: {
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: []
|
||||
},
|
||||
topic: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
|
Reference in New Issue
Block a user