Disable auto-timestamp attributes in tables

This commit is contained in:
Sudo Space 2024-08-31 21:22:36 +03:30
parent 42ed897b87
commit b93a261972
2 changed files with 32 additions and 24 deletions

View file

@ -2,24 +2,28 @@ import { DataTypes } from "sequelize";
import database from "database";
const Archive = database.define("Archive", {
msgId: {
type: DataTypes.INTEGER,
primaryKey: true,
allowNull: false,
const Archive = database.define(
"Archive",
{
msgId: {
type: DataTypes.INTEGER,
primaryKey: true,
allowNull: false,
},
senderId: {
type: DataTypes.INTEGER,
allowNull: false,
},
senderMsgId: {
type: DataTypes.INTEGER,
allowNull: false,
},
receiverId: {
type: DataTypes.INTEGER,
allowNull: false,
},
},
senderId: {
type: DataTypes.INTEGER,
allowNull: false,
},
senderMsgId: {
type: DataTypes.INTEGER,
allowNull: false,
},
receiverId: {
type: DataTypes.INTEGER,
allowNull: false,
},
});
{ timestamps: false }
);
export default Archive;

View file

@ -2,12 +2,16 @@ import { DataTypes } from "sequelize";
import database from "database";
const BlockList = database.define("BlockList", {
senderId: {
type: DataTypes.INTEGER,
primaryKey: true,
allowNull: false,
const BlockList = database.define(
"BlockList",
{
senderId: {
type: DataTypes.INTEGER,
primaryKey: true,
allowNull: false,
},
},
});
{ timestamps: false }
);
export default BlockList;