20240911230301_change_cooldown.js 465 B

123456789101112131415161718192021
  1. async function up(knex) {
  2. await knex.schema.alterTable("users", table => {
  3. table.dropColumn("cooldowns");
  4. table.datetime("cooldown").nullable();
  5. table.integer("malicious_attempts").defaultTo(0);
  6. });
  7. }
  8. async function down(knex) {
  9. await knex.schema.alterTable("users", table => {
  10. table.dropColumn("cooldown");
  11. table.json("cooldowns").defaultTo("[]");
  12. table.dropColumn("malicious_attempts");
  13. });
  14. }
  15. module.exports = {
  16. up,
  17. down
  18. };